Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates github star design #58

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions src/lib/components/molecules/StarCount.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
href="https://github.com/langx/langx/stargazers"
>
<Github />
{#if starCount > 0}
<span>{starCount.toLocaleString('en-US')}</span>
{/if}
</a>
{#if starCount > 0}
<small>{starCount}</small>
{/if}
</div>

<style lang="scss">
Expand All @@ -34,15 +34,21 @@
margin-top: 10px;
}
display: flex;
flex-direction: column;
align-items: center;
small {
color: var(--color--text);
}

.star {
color: var(--color--text);
height: 24px;
text-decoration: none;
display: flex;
align-items: center;
color: #ffffff;
background-color: #000000;
padding:1px 4px 0 3px;
border-radius: 3px;

span {
margin-left: 5px;
}
}
}
</style>
2 changes: 1 addition & 1 deletion src/lib/components/organisms/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
<div class="links">
<a href="/blog">Blog</a>
<!-- <StarCount /> -->
<StarCount />
<ThemeToggle />
</div>
</nav>
Expand Down
22 changes: 1 addition & 21 deletions src/lib/icons/socials/github.svelte
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
<svg
width="100%"
height="100%"
stroke-width="1.5"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M16 22.0268V19.1568C16.0375 18.68 15.9731 18.2006 15.811 17.7506C15.6489 17.3006 15.3929 16.8902 15.06 16.5468C18.2 16.1968 21.5 15.0068 21.5 9.54679C21.4997 8.15062 20.9627 6.80799 20 5.79679C20.4558 4.5753 20.4236 3.22514 19.91 2.02679C19.91 2.02679 18.73 1.67679 16 3.50679C13.708 2.88561 11.292 2.88561 8.99999 3.50679C6.26999 1.67679 5.08999 2.02679 5.08999 2.02679C4.57636 3.22514 4.54413 4.5753 4.99999 5.79679C4.03011 6.81549 3.49251 8.17026 3.49999 9.57679C3.49999 14.9968 6.79998 16.1868 9.93998 16.5768C9.61098 16.9168 9.35725 17.3222 9.19529 17.7667C9.03334 18.2112 8.96679 18.6849 8.99999 19.1568V22.0268"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M9 20.0267C6 20.9999 3.5 20.0267 2 17.0267"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="16.92" height="18.114"><path fill="#ffc409" d="M16.919 6.188a7.115 7.115 0 0 1-.459 2.7 5.117 5.117 0 0 1-1.417 2.1 6.457 6.457 0 0 1-1.75.872 10.913 10.913 0 0 1-2.056.395 1.887 1.887 0 0 1 .914 1.744v3.738a14.057 14.057 0 0 1-3.019.38 14.729 14.729 0 0 1-3.063-.38l-.119-1.948a7.4 7.4 0 0 1-1.291.125 4.208 4.208 0 0 1-1.006-.1 3.546 3.546 0 0 1-.744-.27 2.21 2.21 0 0 1-.525-.353 3.414 3.414 0 0 1-.328-.353 1.067 1.067 0 0 1-.175-.291l-.043-.127a4.762 4.762 0 0 0-.591-1 2.212 2.212 0 0 0-.547-.54l-.219-.125Q0 12.381 0 12.236t.306-.187h.263a2.274 2.274 0 0 1 1.006.332 1.887 1.887 0 0 1 .656.581l.219.249q1.181 1.952 3.544.955a3.35 3.35 0 0 1 .825-1.914 10.913 10.913 0 0 1-2.056-.395 6.145 6.145 0 0 1-1.728-.872 5.155 5.155 0 0 1-1.251-2.1 6.827 6.827 0 0 1-.481-2.7 4.226 4.226 0 0 1 1.266-3.07A3.918 3.918 0 0 1 2.7.042.626.626 0 0 0 3.05.02a2.612 2.612 0 0 1 1.094.249 9.858 9.858 0 0 1 1.925.976A13.577 13.577 0 0 1 9.132.83a14.048 14.048 0 0 1 3.063.415A8.312 8.312 0 0 1 14.054.29 4.513 4.513 0 0 1 15.213 0l.306.042a3.683 3.683 0 0 1 .131 3.073 4.226 4.226 0 0 1 1.269 3.073ZM1.4 12.567q.044-.1-.109-.166t-.2.042q-.044.1.109.166t.2-.042Zm.5.519q.109-.083-.044-.228t-.263-.062q-.109.083.044.228t.266.063Zm.459.665q.131-.083 0-.27t-.263-.1q-.131.083 0 .27t.267.1Zm.678.665q.109-.125-.066-.311t-.306-.062q-.131.125.066.311t.31.066Zm.9.353q.044-.145-.2-.228t-.284.083q-.044.166.2.228t.285-.083Zm.744.228q.263 0 .263-.166t-.263-.166q-.263 0-.263.166t.264.166Zm.963-.083a.506.506 0 0 0 .2-.1q.066-.062.022-.1 0-.208-.263-.166a.506.506 0 0 0-.2.1.111.111 0 0 0-.022.145q.001.163.263.121Z"/></svg>
Loading