diff --git a/README.md b/README.md index 0ef4ce74..b2e144e4 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ Choose a stunning color and font theme for your site. Themes are fully customiza | --- | --- | --- | --- | | ![apogee theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-apogee.png) | ![1950s theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-1950s.png) | ![coffee theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-coffee-playfair.png) | ![cupcake theme](https://raw.githubusercontent.com/gcushen/hugo-academic/master/images/theme-cupcake.png) | +[Browse more themes...](https://sourcethemes.com/academic/themes/) + ## Ecosystem * **[Academic Admin](https://github.com/sourcethemes/academic-admin):** An admin tool to import publications from BibTeX or import assets for an offline site diff --git a/assets/sass/main.scss b/assets/sass/main.scss index 0ec4d43b..ef49c885 100644 --- a/assets/sass/main.scss +++ b/assets/sass/main.scss @@ -2,6 +2,9 @@ {{- $site := $scr.Get "site" -}} {{- partial "functions/parse_theme" . -}} +$sta-darken-percentage: 10%; +$sta-lighten-percentage: 10%; + $sta-font-size: {{ $scr.Get "font_size" }}; $sta-font-size-small: {{ $scr.Get "font_size_small" }}; @@ -11,8 +14,8 @@ $sta-font-nav: {{ $scr.Get "nav_font" }}; $sta-font-mono: {{ $scr.Get "mono_font" }}; $sta-primary: {{ $scr.Get "primary" }}; -$sta-primary-light: {{ $scr.Get "primary_light" }}; -$sta-primary-dark: {{ $scr.Get "primary_dark" }}; +$sta-primary-light: lighten($sta-primary, $sta-lighten-percentage); +$sta-primary-dark: darken($sta-primary, $sta-darken-percentage); $sta-link: {{ $scr.Get "link" }}; $sta-link-hover: {{ $scr.Get "link_hover" }}; diff --git a/data/themes/1950s.toml b/data/themes/1950s.toml index ca377d86..0a4ccb77 100644 --- a/data/themes/1950s.toml +++ b/data/themes/1950s.toml @@ -6,8 +6,6 @@ light = true # Primary primary = "#EF525B" -primary_light = "#FF6771" -primary_dark = "#DA2536" # Menu menu_primary = "#24C2CB" diff --git a/data/themes/apogee.toml b/data/themes/apogee.toml index 9521877a..211e6485 100644 --- a/data/themes/apogee.toml +++ b/data/themes/apogee.toml @@ -6,8 +6,6 @@ light = false # Primary primary = "#EAF04E" -primary_light = "#F8FD74" -primary_dark = "#D7DE26" # Menu menu_primary = "#312450" diff --git a/data/themes/coffee.toml b/data/themes/coffee.toml index cf6f51f3..ff594752 100644 --- a/data/themes/coffee.toml +++ b/data/themes/coffee.toml @@ -6,8 +6,6 @@ light = true # Primary primary = "#795548" -primary_light = "#a98274" -primary_dark = "#4b2c20" # Menu menu_primary = "#795548" diff --git a/data/themes/cupcake.toml b/data/themes/cupcake.toml index 050ad4cb..9da425fe 100644 --- a/data/themes/cupcake.toml +++ b/data/themes/cupcake.toml @@ -6,8 +6,6 @@ light = true # Primary primary = "#EC407A" -primary_light = "#F793B5" -primary_dark = "#CD0045" # Menu menu_primary = "#BE37C7" diff --git a/data/themes/dark.toml b/data/themes/dark.toml index 3b09d8f5..e5f5f788 100644 --- a/data/themes/dark.toml +++ b/data/themes/dark.toml @@ -6,8 +6,6 @@ light = false # Primary primary = "hsl(339, 90%, 68%)" -primary_light = "hsl(339, 90%, 78%)" -primary_dark = "hsl(339, 90%, 58%)" # Menu menu_primary = "rgb(20, 22, 34)" diff --git a/data/themes/default.toml b/data/themes/default.toml index b8e87547..55a57896 100644 --- a/data/themes/default.toml +++ b/data/themes/default.toml @@ -6,8 +6,6 @@ light = true # Primary primary = "#2962ff" -primary_light = "#768fff" -primary_dark = "#0039cb" # Menu menu_primary = "#fff" diff --git a/data/themes/forest.toml b/data/themes/forest.toml index a1559333..2a78e806 100644 --- a/data/themes/forest.toml +++ b/data/themes/forest.toml @@ -6,8 +6,6 @@ light = true # Primary primary = "#4caf50" -primary_light = "#80e27e" -primary_dark = "#087f23" # Menu menu_primary = "#4caf50" diff --git a/data/themes/ocean.toml b/data/themes/ocean.toml index 3aa4e129..7d5ed782 100644 --- a/data/themes/ocean.toml +++ b/data/themes/ocean.toml @@ -6,8 +6,6 @@ light = true # Primary primary = "#3f51b5" -primary_light = "#757de8" -primary_dark = "#002984" # Menu menu_primary = "#3f51b5" # 500 diff --git a/data/themes/strawberry.toml b/data/themes/strawberry.toml new file mode 100644 index 00000000..4ba3f0cf --- /dev/null +++ b/data/themes/strawberry.toml @@ -0,0 +1,18 @@ +# Theme metadata +name = "Strawberry" + +# Is theme light or dark? +light = true + +# Primary +primary = "#ff3860" + +# Menu +menu_primary = "#ff3860" +menu_text = "#fff" +menu_text_active = "rgb(208, 255, 56)" +menu_title = "#fff" + +# Home sections +home_section_odd = "#fff" +home_section_even = "#fff" diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 1a34f6f9..39242f7d 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -2,7 +2,7 @@ # Documentation: https://sourcethemes.com/academic/ # Color theme. -# Choose from `default`, `ocean`, `forest`, `dark`, `apogee`, `1950s`, `coffee`, `cupcake`. +# Choose from `default`, `ocean`, `forest`, `dark`, `apogee`, `1950s`, `coffee`, `cupcake`, `strawberry`. color_theme = "default" # Enable users to switch between day and night mode? day_night = true diff --git a/images/theme-strawberry.png b/images/theme-strawberry.png new file mode 100644 index 00000000..4ba0dab5 Binary files /dev/null and b/images/theme-strawberry.png differ diff --git a/layouts/partials/functions/parse_theme.html b/layouts/partials/functions/parse_theme.html index 270f2374..d03b1e0f 100644 --- a/layouts/partials/functions/parse_theme.html +++ b/layouts/partials/functions/parse_theme.html @@ -42,8 +42,6 @@ {{- $scr.Set "link_hover" ($theme.link_hover | default $theme.primary) -}} {{- $scr.Set "primary" $theme.primary -}} - {{- $scr.Set "primary_light" $theme.primary_light -}} - {{- $scr.Set "primary_dark" $theme.primary_dark -}} {{- $scr.Set "menu_primary" $theme.menu_primary -}} {{- $scr.Set "menu_text" $theme.menu_text -}}