Skip to content

Commit

Permalink
WIP, introduce dark mode by updating bulma and dart-sass
Browse files Browse the repository at this point in the history
  • Loading branch information
werthen committed Sep 26, 2024
1 parent 5e01774 commit 0fbbc66
Show file tree
Hide file tree
Showing 24 changed files with 326 additions and 113 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
#url = ssh://[email protected]:2222/bestuur/drive.git
url = https://git.zeus.gent/zeuswpi/drive.git
branch = master
[submodule "content/assets/stylesheets/bulma"]
path = content/assets/stylesheets/bulma
url = https://github.com/jgthms/bulma
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ end

group :nanoc do
gem 'guard-nanoc'
gem 'nanoc-dart-sass'
end

group :test do
Expand Down
12 changes: 12 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ GEM
rack-livereload (~> 0.3)
autoprefixer-rails (10.4.15.0)
execjs (~> 2)
bigdecimal (3.1.8)
builder (3.2.4)
coderay (1.1.3)
colored (1.2)
Expand All @@ -29,6 +30,9 @@ GEM
execjs (2.9.1)
ffi (1.15.5)
formatador (1.1.0)
google-protobuf (4.28.2)
bigdecimal
rake (>= 13)
guard (2.18.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
Expand Down Expand Up @@ -101,6 +105,9 @@ GEM
slow_enumerator_tools (~> 1.0)
tty-platform (~> 0.2)
zeitwerk (~> 2.1)
nanoc-dart-sass (1.0.3)
nanoc-core (~> 4.12)
sass-embedded (~> 1.56)
nanoc-deploying (1.0.2)
nanoc-checking (~> 1.0)
nanoc-cli (~> 4.11, >= 4.11.15)
Expand Down Expand Up @@ -142,12 +149,16 @@ GEM
rack (>= 3)
webrick (~> 1.8)
rainpress (1.0.1)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbtree (0.4.6)
rexml (3.2.6)
rubypants (0.7.1)
sass-embedded (1.79.3)
google-protobuf (~> 4.27)
rake (>= 13)
sassc (2.4.0)
ffi (~> 1.9)
set (1.0.1)
Expand Down Expand Up @@ -199,6 +210,7 @@ DEPENDENCIES
kramdown
kramdown-math-katex
nanoc
nanoc-dart-sass
nanoc-live
pandoc-ruby
puma
Expand Down
7 changes: 4 additions & 3 deletions Rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require 'kramdown-math-katex'
# Important!!!
# First ignore the node_modules, we do not need any of it on the site directly.
ignore '/node_modules/**/*'
ignore '/assets/stylesheets/bulma/**/*'

#
#
Expand Down Expand Up @@ -231,18 +232,18 @@ compile '/assets/scripts/**/*.js' do
end

ignore '/data/**/*'

ignore '/assets/stylesheets/includes/**/*'

compile '/assets/stylesheets/**/*.scss' do
# This filter is necessary for the workaround present in main.scss and deals with out of date dependencies
filter :erb

sass_opts = {
syntax: :scss,
load_paths: ['content/assets/stylesheets']
load_paths: ['content/assets/stylesheets','node_modules/'],
}
sass_opts[:style] = :compressed if production?
filter :sassc, sass_opts
filter :dart_sass_custom, sass_opts

filter :autoprefixer if production?
write ext: 'css'
Expand Down
1 change: 1 addition & 0 deletions content/assets/stylesheets/bulma
Submodule bulma added at 3fd2f6
3 changes: 2 additions & 1 deletion content/assets/stylesheets/includes/blogpost.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
margin: auto;

.title {
font-weight: bolder;

@include tablet {
font-size: 4rem;
}
font-weight: bolder;
}

.subtitle {
Expand Down
7 changes: 4 additions & 3 deletions content/assets/stylesheets/includes/eventpage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

&.light-background {
background-color: rgba(0, 0, 0, 0.75);
color: var(--bulma-background);
}
}

Expand Down Expand Up @@ -57,11 +58,11 @@
}

.event-tile-image {
max-width:200px;
max-height:200px;

// For now, don't show the event tile image on mobile, takes too much space
@include mobile {
display: none;
}

max-width:200px;
max-height:200px;
}
10 changes: 6 additions & 4 deletions content/assets/stylesheets/includes/events.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.box.event-preview {
border-radius: 0px;
display: flex;
Expand All @@ -16,11 +17,7 @@
padding-top:0px;
box-shadow : none;
width: 60%;
//for better spacing on mobile

@include mobile {
width: 100%;
}
.title {
font-size: 1.7em;
font-weight: 500;
Expand Down Expand Up @@ -50,6 +47,11 @@
font-size: 1.6em;
font-weight: 400;
}

//for better spacing on mobile
@include mobile {
width: 100%;
}
}

.main-event {
Expand Down
16 changes: 8 additions & 8 deletions content/assets/stylesheets/includes/general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ a.box:hover {
border-bottom: none;
}

&:visited:hover {
color: $link-hover;
}
// &:visited:hover {
// color: $button-link-hover;
// }
}
}

footer .content a {
&:not(.button) {
color: $text-light;
color: $text-weak;

&:visited {
color: $text-light;
color: $text-weak;
}

&:hover {
color: $link-hover;
}
// &:hover {
// color: $button-link-hover;
// }
}
}

Expand Down
30 changes: 15 additions & 15 deletions content/assets/stylesheets/includes/navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
}

.navbar:not(.is-transparent) #logo-link {
@include desktop {
border-bottom: 2px solid $body-background;
margin-bottom: -2px;
width: 124px;
}


#logo {
@include desktop {
max-width: none;
Expand All @@ -35,30 +28,30 @@
position: absolute;
}
}

@include desktop {
border-bottom: 2px solid var(--bulma-body-background-color);
margin-bottom: -2px;
width: 124px;
}
}

.navbar-item {
font-variant: small-caps;
font-size: 1.15em;
}

@include touch {
.navbar-menu {
position: absolute;
width: 100%;
}
}

.navbar:not(.is-transparent) {
.navbar-item {
&:not(.is-active) {
color: #7a7a7a;
color: var(--bulma-text-title-l);
}

&.is-active {
color: $primary;
border-bottom: 2px solid;
margin-bottom: -2px;
background-color: transparent;
}
}
}
Expand All @@ -70,4 +63,11 @@
transform: rotate(10deg);
}
}

@include touch {
.navbar-menu {
position: absolute;
width: 100%;
}
}
}
1 change: 1 addition & 0 deletions content/assets/stylesheets/includes/tiles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ $top_coder_size: 80px;
justify-content: center;

table {
width: 100%;
position: relative;

tr:first-child {
Expand Down
18 changes: 9 additions & 9 deletions content/assets/stylesheets/includes/toc.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
// CSS related to the TOC

#table-of-contents {
@include tablet {
position: absolute;
left: 100%;
}

@include mobile {
text-align: center;
}

#markdown-toc {
@extend .menu-list;

Expand All @@ -18,6 +9,15 @@
list-style: none;
}
}

@include tablet {
position: absolute;
left: 100%;
}

@include mobile {
text-align: center;
}
}

$sel: '';
Expand Down
38 changes: 0 additions & 38 deletions content/assets/stylesheets/includes/variables.scss

This file was deleted.

Loading

0 comments on commit 0fbbc66

Please sign in to comment.