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

feat: implement new colors #96

Merged
merged 2 commits into from
Aug 16, 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
32 changes: 16 additions & 16 deletions src/app.postcss
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@

@layer base {
:root {
--text: 13 26 28; /* #0d1a1c */
--background: 245 250 250; /* #f5fafa */
--primary: 49 68 104; /* #314468 */
--secondary: 224 231 240; /* #e0e7f0 */
--accent: 39 92 98; /* #275c62 */
--success: 149 192 48; /* #95c030 */
--warning: 201 156 8; /* #c99c08 */
--error: 218 138 134; /* #da8a86 */
--text: 25 23 36; /* #191724 */
--background: 252 252 252; /* #fcfcfc */
--primary: 180 138 232; /* #b48ae8 */
--secondary: 235 234 245; /* #ebeaf5 */
--accent: 49 116 143; /* #31748f */
--success: 246 193 119; /* #f6c177 */
--warning: 235 188 186; /* #ebbcba */
--error: 235 111 146; /* #eb6f92 */
}
.dark {
--text: 227 240 242; /* #e3f0f2 */
--background: 5 10 10; /* #050a0a */
--primary: 151 170 206; /* #97aace */
--secondary: 15 22 31; /* #0f161f */
--accent: 157 209 216; /* #9dd1d8 */
--success: 164 207 63; /* #a4cf3f */
--warning: 247 202 54; /* #f7ca36 */
--error: 121 41 37; /* #792925 */
--text: 224 222 244; /* #e0def4 */
--background: 12 11 17; /* #0c0b11 */
--primary: 196 167 231; /* #c4a7e7 */
--secondary: 38 35 58; /* #26233a */
--accent: 156 207 216; /* #9ccfd8 */
--success: 256 193 119; /* #f6c177 */
--warning: 236 188 186; /* #ebbcba */
--error: 236 111 146; /* #eb6f92 */
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/homepage/ActivityFigure.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<feComposite operator="out" in="SourceGraphic" in2="offset-blur" result="inverse" />

<!-- Cut color inside shadow -->
<feFlood flood-color="rgb(var(--primary))" flood-opacity=".95" result="color" />
<feFlood flood-color="rgb(var(--accent))" flood-opacity=".95" result="color" />
<feComposite operator="in" in="color" in2="inverse" result="shadow" />
</filter>
<image href={logo} width="100%" height="100%" filter="url(#inset-shadow)" />
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/homepage/Comment.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{/if}
</span>
<br />
<span class="text-primary">{handle}</span>
<span class="text-text/60">{handle}</span>
</div>
</div>
<div class="text-lg">{comment}</div>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/homepage/PostCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
{post.title}
</header>

<div class="row-span-2 text-end text-primary/80">
<div class="row-span-2 text-end text-text/60">
<div>{post.author ?? ""}</div>
<div>{date ?? ""}</div>
</div>

<div>
<span class="font-bold italic text-text/80">{post.unlisted ? "(設定隱藏)" : ""}</span>
<span class="font-bold italic text-text">{post.unlisted ? "(設定隱藏)" : ""}</span>
{post.desc ?? ""}
</div>

Expand Down
8 changes: 3 additions & 5 deletions src/lib/components/svx/CodeBlock.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,15 @@
{/if}

{#if lang && !title}
<span
class="absolute right-2 text-[#727A80] opacity-100 transition-opacity group-hover:opacity-0"
>
<span class="absolute right-2 text-[#e0def4]/60 transition-opacity group-hover:opacity-0">
{lang}
</span>
{/if}

{#if !nocopy}
<button
class="absolute right-2 top-2 rounded-sm border-[#434A52] bg-[#1B212A] text-[#e3f0f2]
{title ? 'p-1' : 'border p-2 opacity-0 transition-opacity group-hover:opacity-100'}"
class="absolute right-2 top-2 rounded-sm bg-secondary/60 text-text
{title ? 'p-1' : 'p-2 opacity-0 transition-opacity group-hover:opacity-100'}"
bind:this={copyButton}
on:click={copy}
aria-label="copy"
Expand Down