Skip to content

Commit

Permalink
refactor: color scheme #1245 (#1253)
Browse files Browse the repository at this point in the history
* refactor: color scheme

* refactor: colors in Tailwind Config

* fix: scss variables use error

* feat: partially adopt Prime Design for the dark theme

* feat: pick selection color

* feat: pick link color

* feat: pick codeblock, table, blockquote color

* feat: pick more colors

* refactor: remove black theme

* fix: code background color

* refactor: extract primitive colors

* refactor: use primitive colors in tailwind config

* chore: use --verbose

* chore: sync github CI build step

---------

Co-authored-by: PCloud <[email protected]>
  • Loading branch information
kkbt0 and HEIGE-PCloud authored Apr 26, 2024
1 parent a3970ec commit 8b4c1c4
Show file tree
Hide file tree
Showing 39 changed files with 1,207 additions and 1,782 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
run: npm install

- name: Build
run: hugo -v --source=exampleSite --themesDir ../.. --gc
run: npm run build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ the DoIt theme may be more suitable for you.
### Appearance and Layout

* **Responsive** layout
* **Light/Dark/Black** mode
* **Light/Dark** mode
* Globally consistent **design language**
* **Pagination** supported
* Easy-to-use and self-expanding **table of contents**
Expand Down
15 changes: 0 additions & 15 deletions assets/css/_core/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,13 @@ html {

::selection {
background-color: $selection-color;

[theme=dark] & {
background-color: $selection-color-dark;
}
[theme=black] & {
background-color: $selection-color-black;
}
}

body {
background-color: $global-background-color;
color: $global-font-color;
@include overflow-wrap(break-word);
scrollbar-color: auto;
&[theme=dark] {
color: $global-font-color-dark;
background-color: $global-background-color-dark;
}
&[theme=black] {
color: $global-font-color-black;
background-color: $global-background-color-black;
}
}

@include ms;
Expand Down
16 changes: 4 additions & 12 deletions assets/css/_mixin/_link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,16 @@
text-decoration: none;

color: if($light, $global-link-color, $single-link-color);

[theme=dark] & {
color: if($dark, $global-link-color-dark, $single-link-color-dark);
}
[theme=black] & {
color: if($dark, $global-link-color-black, $single-link-color-black);
.dark & {
color: if($dark, $global-link-color, $single-link-color);
}
}

a:active,
a:hover {
color: if($light, $global-link-hover-color, $single-link-hover-color);

[theme=dark] & {
color: if($dark, $global-link-hover-color-dark, $single-link-hover-color-dark);
}
[theme=black] & {
color: if($dark, $global-link-hover-color-black, $single-link-hover-color-black);
.dark & {
color: if($dark, $global-link-hover-color, $single-link-hover-color);
}
}
}
29 changes: 0 additions & 29 deletions assets/css/_page/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@
margin: 0;
padding: .5rem;
color: $global-font-secondary-color;

[theme=dark] & {
color: $global-font-secondary-color-dark;
}
[theme=black] & {
color: $global-font-secondary-color-black;
}
}
}
}
Expand All @@ -85,15 +78,6 @@
color: $global-font-color;
border-bottom: 3px dashed $global-border-color;

[theme=dark] & {
color: $global-font-color-dark;
border-bottom: 3px dashed $global-border-color-dark;
}
[theme=black] & {
color: $global-font-color-black;
border-bottom: 3px dashed $global-border-color-black;
}

.featured-image-preview {
width: 100%;
padding: 30% 0 0;
Expand Down Expand Up @@ -131,12 +115,6 @@
@include overflow-wrap(break-word);
color: $global-font-secondary-color;

[theme=dark] & {
color: $global-font-secondary-color-dark;
}
[theme=black] & {
color: $global-font-secondary-color-black;
}

h2,
h3,
Expand All @@ -162,13 +140,6 @@

b, strong {
color: $global-font-secondary-color;

[theme=dark] & {
color: $global-font-secondary-color-dark;
}
[theme=black] & {
color: $global-font-secondary-color-black;
}
}
}

Expand Down
Loading

0 comments on commit 8b4c1c4

Please sign in to comment.