Skip to content

Commit

Permalink
Docs updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergi0Martin committed Apr 3, 2024
1 parent 2be0d54 commit 3bcb071
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 48 deletions.
2 changes: 1 addition & 1 deletion docs/src/components/GetStarted/CopyCommand.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section class="mt-8 mb-10 md:mb-28">
<section class="mt-8 mb-12 md:mb-16">
<div class="flex flex-row justify-center text-center">
<div class="bg-gradient mt-5 p-0.5">
<div class="flex items-center code-background">
Expand Down
108 changes: 61 additions & 47 deletions docs/src/components/GetStarted/WeightCodeSample.astro
Original file line number Diff line number Diff line change
@@ -1,68 +1,82 @@
---
---
<div class="mb-32">
<div class="expressive-code">
<pre>
<code>
<div class="code">
<div class="code-line">
<span style="color:#8B909D">// Sample of Kilograms to Ounces conversion:</span>
</div>
</div>
<div class="code">
<div class="code-line">
<!-- ejemplo => WeightUnitType.KG.ConvertTo(WeightUnitType.OZ, 9000.50); -->
<span style="color:#489dd9">var </span>
<span style="color:#89dcfe">convertedValue </span>
<span style="color:#EEF0F9">= </span>
<span style="color:#b6d798">WeightUnitType</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#ffe74c">KG</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#EEF0F9">ConvertTo</span>
<span style="color:#EEF0F9">(</span>
<span style="color:#b6d798">WeightUnitType</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#ffe74c">OZ</span>
<span style="color:#EEF0F9">,</span>
<span style="color:#b5be78">9000</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#b5be78">50</span>
<span style="color:#EEF0F9">)</span>
<span style="color:#EEF0F9">;</span>
</div>
</div>
</code>
</pre>
</div>
<div class="mb-32 flex flex-col justify-center items-center">
<pre class="flex flex-col justify-center text-center max-w-fit">
<code class="max-w-fits">
<div class="code-line">
<span style="color:#8B909D">// Sample of Kilograms to Ounces conversion:</span>
</div>
<div class="code-line">
<span style="color:#489dd9">var </span>
<span style="color:#89dcfe">convertedValue </span>
<span style="color:#EEF0F9">= </span>
<span style="color:#b6d798">WeightUnitType</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#ffe74c">KG</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#EEF0F9">ConvertTo</span>
<span style="color:#EEF0F9">(</span>
<span style="color:#b6d798">WeightUnitType</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#ffe74c">OZ</span>
<span style="color:#EEF0F9">,</span>
<span style="color:#b5be78">9000</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#b5be78">50</span>
<span style="color:#EEF0F9">)</span>
<span style="color:#EEF0F9">;</span>
</div>
<div class="code-line">
<span> </span>
</div>
<div class="code-line">
<span style="color:#8B909D">// Sample of Feet to Millimeters conversion:</span>
</div>
<div class="code-line">
<span style="color:#489dd9">var </span>
<span style="color:#89dcfe">convertedValue </span>
<span style="color:#EEF0F9">= </span>
<span style="color:#b6d798">LengthUnitType</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#ffe74c">FT</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#EEF0F9">ConvertTo</span>
<span style="color:#EEF0F9">(</span>
<span style="color:#b6d798">LengthUnitType</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#ffe74c">MM</span>
<span style="color:#EEF0F9">,</span>
<span style="color:#b5be78">9000</span>
<span style="color:#EEF0F9">.</span>
<span style="color:#b5be78">50</span>
<span style="color:#EEF0F9">)</span>
<span style="color:#EEF0F9">;</span>
</div>
</code>
</pre>
</div>

<style>

.expressive-code {
<style>
code {
margin-top: 1.5rem;
margin-bottom: 1.5rem;
border-radius: 0.375rem;
border-width: 1px;
border-color: rgb(84 88 100);
box-shadow: 10px 10px 60px #ffe74c;
background-color: rgb(11 14 24);
}

.code {
/* all: unset;
display: block; */
/* flex: 1 0 100%;
padding: var(--ec-codePadBlk) 0;
color: var(--ec-codeFg); */
font-weight: 500;
line-height: 10px;
display: flex;
flex-direction: column;
padding: 20px;
}

.code-line {
display: flex;
flex-direction: row;
flex-wrap: wrap;
overflow-x: hidden;
}

</style>

0 comments on commit 3bcb071

Please sign in to comment.