Add dark mode using Dark Reader
This commit is contained in:
parent
1361c9d28b
commit
967bbd888b
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
/static/
|
/static/ext/
|
||||||
/scope
|
/scope
|
20
Makefile
20
Makefile
@ -6,18 +6,18 @@ build:
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
|
|
||||||
static:
|
static:
|
||||||
mkdir -p static
|
mkdir -p static/ext
|
||||||
|
|
||||||
wget https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css -O static/bulma.min.css
|
wget https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css -O static/ext/bulma.min.css
|
||||||
|
|
||||||
wget https://code.iconify.design/2/2.1.0/iconify.min.js -O static/iconify.min.js
|
wget https://code.iconify.design/2/2.1.0/iconify.min.js -O static/ext/iconify.min.js
|
||||||
|
|
||||||
wget https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css -O static/katex.min.css
|
wget https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css -O static/ext/katex.min.css
|
||||||
wget https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js -O static/katex.min.js
|
wget https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js -O static/ext/katex.min.js
|
||||||
|
|
||||||
wget https://cdn.jsdelivr.net/npm/nerdamer@latest/nerdamer.core.js -O static/nerdamer.core.js
|
wget https://cdn.jsdelivr.net/npm/nerdamer@latest/nerdamer.core.js -O static/ext/nerdamer.core.js
|
||||||
wget https://cdn.jsdelivr.net/npm/nerdamer@latest/Algebra.js -O static/Algebra.js
|
wget https://cdn.jsdelivr.net/npm/nerdamer@latest/Algebra.js -O static/ext/Algebra.js
|
||||||
wget https://cdn.jsdelivr.net/npm/nerdamer@latest/Calculus.js -O static/Calculus.js
|
wget https://cdn.jsdelivr.net/npm/nerdamer@latest/Calculus.js -O static/ext/Calculus.js
|
||||||
wget https://cdn.jsdelivr.net/npm/nerdamer@latest/Solve.js -O static/Solve.js
|
wget https://cdn.jsdelivr.net/npm/nerdamer@latest/Solve.js -O static/ext/Solve.js
|
||||||
|
|
||||||
wget https://unpkg.com/function-plot/dist/function-plot.js -O static/function-plot.js
|
wget https://unpkg.com/function-plot/dist/function-plot.js -O static/ext/function-plot.js
|
@ -94,3 +94,4 @@ This project uses many other projects. Those projects and the reasons for using
|
|||||||
- [Function Plot](https://mauriciopoppe.github.io/function-plot/): Equation grapher
|
- [Function Plot](https://mauriciopoppe.github.io/function-plot/): Equation grapher
|
||||||
- [Metaweather](https://www.metaweather.com/): Weather API
|
- [Metaweather](https://www.metaweather.com/): Weather API
|
||||||
- [DuckDuckGo](https://duckduckgo.com/): Provides instant answers
|
- [DuckDuckGo](https://duckduckgo.com/): Provides instant answers
|
||||||
|
- [Dark Reader](https://darkreader.org/): Dark mode CSS
|
@ -27,14 +27,14 @@ import (
|
|||||||
|
|
||||||
const calcExtraHead = `
|
const calcExtraHead = `
|
||||||
<!-- Import KaTeX for math rendering -->
|
<!-- Import KaTeX for math rendering -->
|
||||||
<link rel="stylesheet" href="/static/katex.min.css">
|
<link rel="stylesheet" href="/static/ext/katex.min.css">
|
||||||
<script defer src="/static/katex.min.js"></script>
|
<script defer src="/static/ext/katex.min.js"></script>
|
||||||
|
|
||||||
<!-- Import Nerdamer for equation evaluator -->
|
<!-- Import Nerdamer for equation evaluator -->
|
||||||
<script src="/static/nerdamer.core.js"></script>
|
<script src="/static/ext/nerdamer.core.js"></script>
|
||||||
<script src="/static/Algebra.js"></script>
|
<script src="/static/ext/Algebra.js"></script>
|
||||||
<script src="/static/Calculus.js"></script>
|
<script src="/static/ext/Calculus.js"></script>
|
||||||
<script src="/static/Solve.js"></script>`
|
<script src="/static/ext/Solve.js"></script>`
|
||||||
|
|
||||||
const solveRenderScript = `
|
const solveRenderScript = `
|
||||||
<div id="calc-content" class="subtitle mx-2 my-0"></div>
|
<div id="calc-content" class="subtitle mx-2 my-0"></div>
|
||||||
|
@ -25,7 +25,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const plotExtraHead = `
|
const plotExtraHead = `
|
||||||
<script src="/static/function-plot.js"></script>
|
<script src="/static/ext/function-plot.js"></script>
|
||||||
<style>
|
<style>
|
||||||
.top-right-legend {
|
.top-right-legend {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
name = "Scope"
|
name = "Scope"
|
||||||
baseURL = "http://localhost:8080"
|
baseURL = "http://localhost:8080"
|
||||||
sourceURL = "https://gitea.arsenm.dev/Arsen6331/scope"
|
sourceURL = "https://gitea.arsenm.dev/Arsen6331/scope"
|
||||||
|
theme = "dark"
|
||||||
|
|
||||||
[search]
|
[search]
|
||||||
engines = ["google", "ddg", "bing"]
|
engines = ["google", "ddg", "bing"]
|
||||||
|
5311
static/DarkReader-scope.css
Normal file
5311
static/DarkReader-scope.css
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,11 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>{{template "page" .}} - {{.Config "site.name"}}</title>
|
<title>{{template "page" .}} - {{.Config "site.name"}}</title>
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title='{{.Config "site.name"}}' href="/opensearch">
|
<link rel="search" type="application/opensearchdescription+xml" title='{{.Config "site.name"}}' href="/opensearch">
|
||||||
<link rel="stylesheet" href="/static/bulma.min.css">
|
<link rel="stylesheet" href="/static/ext/bulma.min.css">
|
||||||
<script async src="/static/iconify.min.js"></script>
|
<script async src="/static/ext/iconify.min.js"></script>
|
||||||
|
{{if .Config "site.theme" | ne "light"}}
|
||||||
|
<link rel="stylesheet" href="/static/DarkReader-scope.css">
|
||||||
|
{{end}}
|
||||||
{{if .Card}}
|
{{if .Card}}
|
||||||
{{.Card.Head}}
|
{{.Card.Head}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
Loading…
Reference in New Issue
Block a user