Skip to content

Commit

Permalink
chore: simplify css and improve design
Browse files Browse the repository at this point in the history
  • Loading branch information
not-matthias committed Jul 9, 2024
1 parent 1b15822 commit f20ab87
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 53 deletions.
6 changes: 3 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ taxonomies = [{ name = "tags" }]

[markdown]
highlight_code = true
highlight_theme = "ayu-dark"
highlight_theme = "ayu-light"

[extra]
toc = true
Expand All @@ -19,8 +19,8 @@ theme = "toggle" # light, dark, auto, toggle
comment = false
fancy_code = true
dynamic_note = true # a note that can be toggled
# mathjax = true
# mathjax_dollar_inline_enable = true
mathjax = true
mathjax_dollar_inline_enable = true

menu = [
{ name = "/posts", url = "/posts", weight = 1 },
Expand Down
4 changes: 2 additions & 2 deletions sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

:root {
/* Used for: block comment, hr, ... */
--border-color: var(--bg-1);
--border-color: var(--border-color);

/* Fonts */
--text-font: 'Jetbrains Mono';
Expand Down Expand Up @@ -48,4 +48,4 @@ html {
html {
font-size: 18px;
}
}
}
2 changes: 1 addition & 1 deletion sass/parts/_cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

.card {
min-height: 100px;
background: var(--bg-2);
background: var(--bg-1);
border: 2px solid var(--border-color);
border-radius: 10px;
overflow: hidden;
Expand Down
21 changes: 6 additions & 15 deletions sass/parts/_code.scss
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
// Define base colors and fonts for light and dark themes
:root {
--bg-primary: #DCEBFF; // Updated light theme background color
--border-color: #ccc; // Light theme border color
--code-font: 'Courier New', monospace; // Code font

// Define light theme specifics
--text-color: #333;
--label-color: #f0f0f0;
--label-background: white;
--hightlight-color: #DCEBFF;
--code-font: 'Courier New', monospace;
--bg-primary: var(--bg-1);
--text-color: var(--text-0); // Color of the code text
--label-color: #f0f0f0; // Text color of the label

--hightlight-color: #f0f0f0;
}

:root.dark {
--bg-primary: rgb(15, 20, 25); // Dark theme background color
--border-color: #333; // Dark theme border color

// Define dark theme specifics
--text-color: #f0f0f0;
--label-background: black;
--hightlight-color: #204e8a;
}

Expand Down
34 changes: 13 additions & 21 deletions sass/parts/_note.scss
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
:root {
--bg-primary: #f0f0f0; // Updated light theme background color
--note-color: #ebdbb2;
--note-bg: #ef534f;
--header-color: rgb(15, 20, 25);
--note-header-bg: var(--bg-2);
--note-header-color: var(--text-0);
--note-content-bg: var(--bg-1);
}

:root.dark {
--bg-primary: rgb(15, 20, 25); // Dark theme background color
--note-color: #00b8d5;
--note-bg: #243b4e;
--header-color: #f0f0f0;
}

.note-container {
border-radius: 4px;
overflow: hidden;
margin: 1em 0;
position: relative;
padding-left: 4px;
background-color: var(--note-color);
border-left: 3px solid var(--primary-color);
font-family: var(--paragraph-font);
}

.note-toggle,
.note-header {
color: var(--header-color);
background-color: var(--note-bg);
color: var(--note-header-color);
background-color: var(--note-header-bg);
padding: 10px 25px;
text-align: left;
border: none;
Expand Down Expand Up @@ -68,19 +60,19 @@

.note-toggle:hover,
.note-toggle:focus {
color: var(--note-color);
background-color: var(--note-bg);
color: var(--note-header-color);
background-color: var(--note-header-bg);
outline: none;
}

.note-content {
padding: 10px 20px;
background-color: var(--bg-primary);
background-color: var(--note-content-bg);
}

.note-icon::before {
content: '';
color: var(--note-color);
color: var(--primary-color);
position: absolute;
left: 20px;
top: 50%;
Expand All @@ -89,8 +81,8 @@

summary:hover,
summary:focus {
color: var(--note-color);
background-color: var(--note-bg);
color: var(--primary-color);
background-color: var(--note-header-bg);
outline: none;
padding: 10px;
}
}
21 changes: 15 additions & 6 deletions sass/theme/dark.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
$bg-0: #121212;
$bg-1: lighten($bg-0, 2%);
$bg-2: lighten($bg-1, 5%);

$text-0: lighten($bg-0, 87%);
$text-1: lighten($bg-0, 60%);

:root.dark {
--text-0: rgba(255, 255, 255, 87%);
--text-1: rgba(255, 255, 255, 60%);
--text-0: #{$text-0};
--text-1: #{$text-1};

--bg-0: #{$bg-0};
--bg-1: #{$bg-1};
--bg-2: #{$bg-2};

--bg-0: #121212;
--bg-1: rgba(255, 255, 255, 5%);
--bg-2: rgba(23, 23, 23, 100%);
--border-color: var(--bg-2);

--primary-color: #ef5350;
--hover-color: white;

.social>img {
filter: invert(1);
}
}
}
19 changes: 14 additions & 5 deletions sass/theme/light.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
$bg-0: #fff;
$bg-1: darken($bg-0, 2%);
$bg-2: darken($bg-1, 5%);

$text-0: darken($bg-0, 87%);
$text-1: darken($bg-0, 60%);

:root.light {
--text-0: rgba(0, 0, 0, 87%);
--text-1: rgba(0, 0, 0, 66%);
--text-0: #{$text-0};
--text-1: #{$text-1};

--bg-0: #{$bg-0};
--bg-1: #{$bg-1};
--bg-2: #{$bg-2};

--bg-0: #fff;
--bg-1: #f2f2f2;
--bg-2: #fefefe;
--border-color: var(--bg-2);

--primary-color: #ef5350;
--hover-color: white;
Expand Down

0 comments on commit f20ab87

Please sign in to comment.