major config rebuild using once cell. added ability to use .env.
This commit is contained in:
parent
35cd018152
commit
c30976f2d7
26 changed files with 207 additions and 186 deletions
63
site/content/static/css/blog.css
Normal file
63
site/content/static/css/blog.css
Normal file
|
@ -0,0 +1,63 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
padding: 20px;
|
||||
width: 60%;
|
||||
padding-left: 20%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 50%;
|
||||
padding: 20px 0px 20px 0px;
|
||||
}
|
||||
|
||||
article {
|
||||
padding-top: 2em;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.post-link {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.post-title {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.post-publish-date {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
.post-body {
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
#submit-form {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
#submit-body, #submit-title {
|
||||
width: 100%;
|
||||
margin-bottom: 2em;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
#submit-body {
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
#submit-form {
|
||||
display: block
|
||||
}
|
||||
|
||||
@media (max-width:1080px) {
|
||||
html {
|
||||
padding: 20px;
|
||||
width: 90%;
|
||||
padding-left: 5%;
|
||||
}
|
||||
}
|
24
site/content/static/css/index.css
Normal file
24
site/content/static/css/index.css
Normal file
|
@ -0,0 +1,24 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
padding: 20px;
|
||||
width: 60%;
|
||||
padding-left: 20%;
|
||||
}
|
||||
|
||||
.social-icon {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
}
|
||||
|
||||
@media (max-width:1080px) {
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
padding: 20px;
|
||||
width: 90%;
|
||||
padding-left: 5%;
|
||||
}
|
BIN
site/content/static/favicon.ico
Executable file
BIN
site/content/static/favicon.ico
Executable file
Binary file not shown.
After Width: | Height: | Size: 318 B |
35
site/content/static/js/blog.js
Normal file
35
site/content/static/js/blog.js
Normal file
|
@ -0,0 +1,35 @@
|
|||
function setTokenCookie() {
|
||||
let token = document.getElementById('set-token').value;
|
||||
let tokenCookie = 'token=' + token + "; SameSite=None; secure";
|
||||
document.cookie = tokenCookie;
|
||||
setFormTokens(token);
|
||||
document.getElementById("cookie-block").hidden = true;
|
||||
}
|
||||
|
||||
function clearTokenCookie() {
|
||||
document.cookie = "token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; SameSite=None; secure";
|
||||
document.getElementById("cookie-block").hidden = false;
|
||||
}
|
||||
|
||||
function setFormTokens(token) {
|
||||
let tokenFields = document.querySelectorAll(".token");
|
||||
for (t of tokenFields) {
|
||||
t.value = token;
|
||||
}
|
||||
}
|
||||
|
||||
// if cookie is set, use it to pass the token
|
||||
let c_pairs = document.cookie.split(";");
|
||||
let cookie_set = false;
|
||||
for (c of c_pairs) {
|
||||
if (c.trim().split("=")[0].startsWith("token")){
|
||||
// stick token into all the form input fields
|
||||
let token = c.split("=")[1];
|
||||
setFormTokens(token);
|
||||
cookie_set = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!cookie_set) {
|
||||
document.getElementById("cookie-block").hidden = false;
|
||||
}
|
BIN
site/content/static/social-icons/discord.ico
Normal file
BIN
site/content/static/social-icons/discord.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 614 B |
BIN
site/content/static/social-icons/github.ico
Normal file
BIN
site/content/static/social-icons/github.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
BIN
site/content/static/social-icons/mastodon.ico
Normal file
BIN
site/content/static/social-icons/mastodon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
BIN
site/content/static/social-icons/reddit.ico
Normal file
BIN
site/content/static/social-icons/reddit.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
site/content/static/social-icons/twitter.ico
Normal file
BIN
site/content/static/social-icons/twitter.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Add table
Add a link
Reference in a new issue