mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-06 04:35:20 +00:00
Experimenting with themes
This commit is contained in:
parent
2e9432181e
commit
53f2c5baac
6
src/site/_data/meta.js
Normal file
6
src/site/_data/meta.js
Normal file
@ -0,0 +1,6 @@
|
||||
require("dotenv").config();
|
||||
module.exports = {
|
||||
env: process.env.ELEVENTY_ENV,
|
||||
theme: process.env.THEME,
|
||||
baseTheme: process.env.BASE_THEME || "dark"
|
||||
};
|
@ -13,6 +13,13 @@
|
||||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
|
||||
<link href="/styles/style.css" rel="stylesheet">
|
||||
{%-if meta.theme%}
|
||||
<script>
|
||||
fetch("{{meta.theme}}").then(response => response.text()).then(text => {
|
||||
document.head.innerHTML += "<style>" + text + "</style>";
|
||||
});
|
||||
</script>
|
||||
{%endif%}
|
||||
<link href="/styles/custom-style.css" rel="stylesheet">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
|
@ -8,7 +8,7 @@ permalink: "notes/{{ page.fileSlug | slugify }}/"
|
||||
<title>{{ page.fileSlug }}</title>
|
||||
{%include "components/pageheader.njk"%}
|
||||
</head>
|
||||
<body>
|
||||
<body class="theme-{{meta.baseTheme}} markdown-preview-view">
|
||||
{%include "components/notegrowthhistory.njk"%}
|
||||
|
||||
<div class="content">
|
||||
|
@ -4,7 +4,7 @@
|
||||
<title>{{ title }}</title>
|
||||
{%include "components/pageheader.njk"%}
|
||||
</head>
|
||||
<body>
|
||||
<body class="theme-{{meta.baseTheme}} markdown-preview-view">
|
||||
{%include "components/notegrowthhistory.njk"%}
|
||||
<div class="content">
|
||||
{%- for garden in collections.gardenEntry -%}
|
||||
|
@ -48,9 +48,7 @@ body {
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
padding-bottom: 3px;
|
||||
border-bottom: 1px solid rgb(97, 186, 245);
|
||||
text-decoration: underline;
|
||||
color: rgb(97, 186, 245);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user