133 lines
3.8 KiB
HTML
133 lines
3.8 KiB
HTML
<!-- DNS preconnect -->
|
|
<meta http-equiv="x-dns-prefetch-control" content="on" />
|
|
<link rel="preconnect" href="https://use.fontawesome.com" crossorigin />
|
|
<link rel="preconnect" href="//cdnjs.cloudflare.com" />
|
|
<link rel="preconnect" href="//www.googletagmanager.com" />
|
|
<link rel="preconnect" href="//www.google-analytics.com" />
|
|
<link rel="dns-prefetch" href="https://use.fontawesome.com" />
|
|
<link rel="dns-prefetch" href="//ajax.googleapis.com" />
|
|
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com" />
|
|
<link rel="dns-prefetch" href="//www.googletagmanager.com" />
|
|
<link rel="dns-prefetch" href="//www.google-analytics.com" />
|
|
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
|
|
<link rel="dns-prefetch" href="//connect.facebook.net" />
|
|
<link rel="dns-prefetch" href="//platform.linkedin.com" />
|
|
<link rel="dns-prefetch" href="//platform.twitter.com" />
|
|
|
|
<!-- google fonts -->
|
|
{{ $pf:= site.Data.theme.fonts.font_family.primary }}
|
|
{{ $sf:= site.Data.theme.fonts.font_family.secondary }}
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<script>
|
|
(function () {
|
|
const googleFont = document.createElement("link");
|
|
googleFont.href = "https://fonts.googleapis.com/css2?family={{$pf | safeURL}}{{with $sf}}&family={{. | safeURL}}{{end}}&display=swap";
|
|
googleFont.type = "text/css";
|
|
googleFont.rel = "stylesheet";
|
|
document.head.appendChild(googleFont);
|
|
})();
|
|
</script>
|
|
|
|
<!-- plugins + stylesheet -->
|
|
{{ $styles := slice }}
|
|
{{ $stylesLazy := slice }}
|
|
{{ range site.Params.plugins.css }}
|
|
{{ if findRE "^http" .link }}
|
|
<link
|
|
crossorigin="anonymous"
|
|
media="all"
|
|
rel="stylesheet"
|
|
href="{{ .link | relURL }}"
|
|
{{ .attributes | safeHTMLAttr }} />
|
|
{{ else }}
|
|
{{ if not .lazy }}
|
|
{{ $styles = $styles | append (resources.Get .link) }}
|
|
{{ else }}
|
|
{{ $stylesLazy = $stylesLazy | append (resources.Get .link) }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{/* main style */}}
|
|
{{ $styles = $styles | append (resources.Get "scss/main.scss" | toCSS) }}
|
|
{{ $styles = $styles | resources.Concat "css/style.css" }}
|
|
{{ $styles = $styles | resources.PostCSS }}
|
|
|
|
{{ $stylesLazy = $stylesLazy | resources.Concat "css/style-lazy.css" }}
|
|
{{ $stylesLazy = $stylesLazy | resources.PostCSS }}
|
|
|
|
{{ if hugo.IsProduction }}
|
|
{{ $styles = $styles | resources.ExecuteAsTemplate "css/style.css" . | minify | fingerprint | resources.PostProcess }}
|
|
{{ $stylesLazy = $stylesLazy | resources.ExecuteAsTemplate "css/style-lazy.css" . | minify | fingerprint | resources.PostProcess }}
|
|
{{ else }}
|
|
{{ $styles = $styles | resources.ExecuteAsTemplate "css/style.css" . }}
|
|
{{ $stylesLazy = $stylesLazy | resources.ExecuteAsTemplate "css/style-lazy.css" . }}
|
|
{{ end }}
|
|
|
|
// Revolt chat server
|
|
.revolt-form-section {
|
|
max-width: 600px;
|
|
margin: 2rem auto;
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
.revolt-form .form-group {
|
|
margin-bottom: 1.25rem;
|
|
}
|
|
|
|
.revolt-form label {
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.revolt-form .required {
|
|
color: #e74c3c;
|
|
}
|
|
|
|
.revolt-form input,
|
|
.revolt-form textarea {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.revolt-form input:focus,
|
|
.revolt-form textarea:focus {
|
|
outline: none;
|
|
border-color: #3498db;
|
|
}
|
|
|
|
.revolt-form button {
|
|
background: #3498db;
|
|
color: white;
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.revolt-form button:hover {
|
|
background: #2980b9;
|
|
}
|
|
|
|
{{/* styles */}}
|
|
<link
|
|
href="{{ $styles.RelPermalink }}"
|
|
integrity="{{ $styles.Data.Integrity }}"
|
|
rel="stylesheet" />
|
|
|
|
{{/* styles lazy */}}
|
|
<link
|
|
defer
|
|
async
|
|
rel="stylesheet"
|
|
href="{{ $stylesLazy.RelPermalink }}"
|
|
integrity="{{ $stylesLazy.Data.Integrity }}"
|
|
media="print"
|
|
onload="this.media='all'; this.onload=null;" />
|