* Initial commit for dark theme. * Use DarkReader.auto() to watch for system theme. * Tunning default parameters. * Allow configurable number of recent posts. * Added invisible element to hack theme initialization. * Added default value. * Use Darkreader CDN. * Cleanup to keep darkreader in as few files as possible. * Renamed darkmode.js to darkmode-darkreader.js. * Bring back the initialization. * Added provider property. * Added theme selector to the posts navbar. * Removed extra line breaks. * Changed darkreader CDN to local copy. * Renamed to darkMode. * Fixed CodeQL failures. * Added icons. * Renamed function. * Added SVG inversion. * Used icons for selection. * Toggle initial dark only in the dynamic navbar. Co-authored-by: donfiguerres <donfiguerres@github.com> Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
36 lines
1.6 KiB
HTML
36 lines
1.6 KiB
HTML
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
|
|
<!-- ============ import common css ========== -->
|
|
<link rel="stylesheet" href="{{ "/css/bootstrap.min.css" | relURL }}"/>
|
|
<link rel="stylesheet" href="{{ "/css/layouts/main.css" | relURL }}"/>
|
|
<link rel="stylesheet" href="{{ "/css/navigators/navbar.css" | relURL }}"/>
|
|
<link rel="stylesheet" href="{{ "/css/plyr.css" | relURL }}"/>
|
|
<link rel="stylesheet" href="{{ "/css/flag-icon.min.css" | relURL }}"/>
|
|
|
|
<!--=================== fonts ==============================-->
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Muli:wght@300;400;500;600">
|
|
|
|
<!--=================== icons ==============================-->
|
|
<link rel="stylesheet" href="{{ "/fontawesome/css/all.min.css" | relURL }}"/>
|
|
|
|
<!--=================== dark mode ==========================-->
|
|
{{ if site.Params.darkMode.enable }}
|
|
<link rel="stylesheet" href="{{ "/css/colortheme/colortheme.css" | relURL }}"/>
|
|
{{ end }}
|
|
|
|
<!--================= fab-icon =========================-->
|
|
{{/* add favicon only if the site author has provided the the favicon */}}
|
|
{{ if site.Params.logo.favicon }}
|
|
{{ $favicon := site.Params.logo.favicon }}
|
|
|
|
{{/* resize the favicon. don't resize svg because it is not supported */}}
|
|
{{ $favicon = resources.Get $favicon }}
|
|
{{ if and $favicon (ne $favicon.MediaType.SubType "svg") }}
|
|
{{ $favicon = $favicon.Resize "42x" }}
|
|
{{ end }}
|
|
{{ $favicon = $favicon.RelPermalink}}
|
|
|
|
<link rel="icon" type="image/png" href="{{ $favicon }}" />
|
|
{{end}}
|