Browse Source

CSS: Prevent Hugo encoding Google Fonts and fix docs sidebar toggle bg

Close #707
George Cushen 6 years ago
parent
commit
f754e4c7e5
2 changed files with 2 additions and 1 deletions
  1. 1 0
      layouts/partials/css/academic.css
  2. 1 1
      layouts/partials/header.html

+ 1 - 0
layouts/partials/css/academic.css

@@ -1604,6 +1604,7 @@ div.alert a {
   line-height: 1;
   font-size: 1.2rem;
   color: {{ .Get "primary" }};
+  background-color: transparent;
 }
 
 .docs-links {

+ 1 - 1
layouts/partials/header.html

@@ -84,7 +84,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" href="{{ printf "//fonts.googleapis.com/css?family=%s" . }}">
+  <link rel="stylesheet" {{ printf "href=//fonts.googleapis.com/css?family=%s" . | safeHTMLAttr }}>
   {{ end }}
 
   <link rel="stylesheet" href="{{ "styles.css" | relLangURL }}">