瀏覽代碼

style(theme): replace Playfair and Cupcake with new Rose theme

Also:
- Make nav links normal font weight
- Make XL container wider
- Update Google Fonts URL
- Explicitly add Twitter Image metadata
George Cushen 6 年之前
父節點
當前提交
94cee73155

+ 0 - 1
assets/sass/academic/_nav.scss

@@ -36,7 +36,6 @@ nav#navbar-main li.nav-item {
   -webkit-transition: 0.2s ease;
   transition: 0.2s ease;
   color: $sta-menu-text;
-  font-weight: 600;
 }
 
 .navbar-light .navbar-nav>.nav-item>.nav-link:focus {

+ 10 - 0
assets/sass/bootstrap_variables.scss

@@ -1,3 +1,13 @@
 /* Set Bootstrap variables */
+
+// Set colors.
 $primary: $sta-primary;
 $text-muted: rgba(0,0,0,0.54);
+
+// Container widths - override XL default of `1140px`.
+$container-max-widths: (
+  sm: 540px,
+  md: 720px,
+  lg: 960px,
+  xl: 1200px
+);

+ 0 - 15
data/fonts/playfair.toml

@@ -1,15 +0,0 @@
-# Font style metadata
-name = "Playfair"
-
-# Optional Google font URL
-google_fonts = "Playfair+Display:400,700|Fauna+One"
-
-# Font families
-heading_font = "Playfair Display"
-body_font = "Fauna One"
-nav_font = "Fauna One"
-mono_font = "Roboto Mono"
-
-# Font size
-font_size = "20"
-font_size_small = "16"

+ 15 - 0
data/fonts/rose.toml

@@ -0,0 +1,15 @@
+# Font style metadata
+name = "Rose"
+
+# Optional Google font URL
+google_fonts = "Cutive+Mono|Lora:400,700|Roboto:400,700"
+
+# Font families
+heading_font = "Lora"
+body_font = "Roboto"
+nav_font = "Lora"
+mono_font = "Cutive Mono"
+
+# Font size
+font_size = "20"
+font_size_small = "16"

+ 0 - 18
data/themes/cupcake.toml

@@ -1,18 +0,0 @@
-# Theme metadata
-name = "Cupcake"
-
-# Is theme light or dark?
-light = true
-
-# Primary
-primary = "#EC407A"
-
-# Menu
-menu_primary = "#BE37C7"
-menu_text = "#FFB298"
-menu_text_active = "#fff"
-menu_title = "#FFB298"
-
-# Home sections
-home_section_odd = "#FFB298"
-home_section_even = "#FFB298"

+ 18 - 0
data/themes/rose.toml

@@ -0,0 +1,18 @@
+# Theme metadata
+name = "Rose"
+
+# Is theme light or dark?
+light = true
+
+# Primary
+primary = "rgb(251, 191, 183)"
+
+# Menu
+menu_primary = "rgb(247, 247, 247)"
+menu_text = "#000"
+menu_text_active = "rgb(25, 25, 25)"
+menu_title = "#000"
+
+# Home sections
+home_section_odd = "#FFF"
+home_section_even = "rgb(234, 242, 250)"

+ 5 - 2
layouts/partials/site_head.html

@@ -96,7 +96,7 @@
 
   {{/* We cannot use SRI with Google Fonts because the CSS is dynamically generated according to the user agent. */}}
   {{ with ($scr.Get "google_fonts") }}
-  <link rel="stylesheet" {{ printf "href=\"//fonts.googleapis.com/css?family=%s\"" . | safeHTMLAttr }}>
+  <link rel="stylesheet" {{ printf "href=\"https://fonts.googleapis.com/css?family=%s&display=swap\"" . | safeHTMLAttr }}>
   {{ end }}
 
   {{ $css_options := (dict "targetPath" "css/academic.css" "outputStyle" "compressed") }}
@@ -170,7 +170,10 @@
   <meta property="og:url" content="{{ .Permalink }}">
   <meta property="og:title" content="{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ site.Title }}">
   <meta property="og:description" content="{{ $desc }}">
-  {{- with $og_image }}<meta property="og:image" content="{{ . }}">{{end}}
+  {{- with $og_image -}}
+  <meta property="og:image" content="{{.}}">
+  <meta property="twitter:image" content="{{.}}">
+  {{- end -}}
   <meta property="og:locale" content="{{ site.LanguageCode | default "en-us" }}">
   {{ if .IsPage }}
   {{ if not .PublishDate.IsZero }}<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">