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

Add dark mode feature #26

Merged
merged 23 commits into from
Jun 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Run tests
on: [pull_request]
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Git repository
uses: actions/checkout@v3
- name: Install npm dependencies
run: npm install
- name: Make sure code is formatted
run: npx prettier --check .
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Hugo stuff.
/resources/_gen/
resources/_gen/
public
.hugo_build.lock

# NodeJS
node_modules/
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build
coverage
*.md
*.html
*.json
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
35 changes: 35 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"devDependencies": {
"prettier": "^2.8.4"
}
}
12 changes: 6 additions & 6 deletions themes/makedeb/assets/scss/404.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.four-o-four {
padding: 2em 1em 0;
padding: 2em 1em 0;

p {
font-size: 2em;
text-align: center;
line-height: 1.3em;
}
p {
font-size: 2em;
text-align: center;
line-height: 1.3em;
}
}
118 changes: 60 additions & 58 deletions themes/makedeb/assets/scss/content-section.scss
Original file line number Diff line number Diff line change
@@ -1,62 +1,64 @@
@import "variables";

.content-section {
margin: 2em;

.header {
display: flex;
align-items: end;
padding-bottom: 1em;

h1 {
font-size: 2em;
padding-right: 0.3em;
}

.rss-icon {
color: darken($light-grey, 20%);
width: auto;
height: 1.4em;
transition-property: color;
transition-duration: 0.2s;
}

.rss-icon:hover {
color: $orange;
}
}

.post-card {
height: auto;
border: solid;
border-color: darken($silver, 10%);
border-width: 0.15em;
background-color: $silver;
border-radius: 0.2em;
padding: 1em 0.5em;
margin-bottom: 0.5em;
display: flex;
flex-direction: column;

.date {
font-size: 0.9em;
padding-bottom: 0.5em;
color: lighten($dark-grey, 40%);
}

.title {
font-size: 1.4em;
padding-bottom: 0.5em;
}

.title, .read-more {
color: $dark-grey;
transition: color 0.2s;
width: fit-content;
}

.title:hover, .read-more:hover {
color: $orange;
}
}
margin: 2em;

.header {
display: flex;
align-items: end;
padding-bottom: 1em;

h1 {
font-size: 2em;
padding-right: 0.3em;
}

.rss-icon {
color: darken($light-grey, 20%);
width: auto;
height: 1.4em;
transition-property: color;
transition-duration: 0.2s;
}

.rss-icon:hover {
color: $orange;
}
}

.post-card {
height: auto;
border: solid;
border-color: darken($silver, 10%);
border-width: 0.15em;
@extend .themeCardsColor;
Comment on lines +32 to +34
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The border-color here is a bit too light on the dark theme (see the cards on /news) - could this be one of the theme-toggleable colors, with the dark theme having it set to something like #4d4d4d?

border-radius: 0.2em;
padding: 1em 0.5em;
margin-bottom: 0.5em;
display: flex;
flex-direction: column;

.date {
font-size: 0.9em;
padding-bottom: 0.5em;
@extend .themePostContentDateColor;
}

.title {
font-size: 1.4em;
padding-bottom: 0.5em;
}

.title,
.read-more {
@extend .themeCardsColor;
transition: color 0.2s;
width: fit-content;
}

.title:hover,
.read-more:hover {
color: $orange;
}
}
}
Loading