Added "Neocities" Theme
This commit is contained in:
parent
0523157649
commit
23bad5e922
BIN
global/bg.png
Normal file
BIN
global/bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@ -62,16 +62,25 @@ funButtons = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
/* Available Themes located in the footer */
|
/* Available Themes located in the footer */
|
||||||
var styles = ["Tomorrow", "Forgotten", "Yotsuba"];
|
var styles = ["Neocities", "Tomorrow", "Forgotten", "Yotsuba"];
|
||||||
|
|
||||||
dirDepth = ""
|
dirDepth = ""
|
||||||
|
|
||||||
/* Update CSS Colorscheme function for themes */
|
/* Update CSS Colorscheme function for themes */
|
||||||
function updateStyle(type){
|
function updateStyle(type){
|
||||||
|
function resetBackground(){
|
||||||
|
try {
|
||||||
|
document.querySelector("body").style.backgroundImage = "none";
|
||||||
|
document.querySelector("body").style.backgroundRepeat = "repeat-x";
|
||||||
|
document.querySelector("body").style.backgroundPosition = "top";
|
||||||
|
document.querySelector("body").style.backgroundBlendMode = "normal";
|
||||||
|
} catch { }
|
||||||
|
}
|
||||||
|
|
||||||
var doc = document.documentElement;
|
var doc = document.documentElement;
|
||||||
|
|
||||||
/* If type = undefined, default to "tomorrow" */
|
/* If type = undefined, default to "tomorrow" */
|
||||||
if (type == undefined){ type = "Tomorrow"; }
|
if (type == undefined){ type = "Neocities"; }
|
||||||
if (type == "Yotsuba"){
|
if (type == "Yotsuba"){
|
||||||
doc.style.setProperty("--main-bg-color", "#fed6af");
|
doc.style.setProperty("--main-bg-color", "#fed6af");
|
||||||
doc.style.setProperty("--main-bg-end-color", "#ffffee");
|
doc.style.setProperty("--main-bg-end-color", "#ffffee");
|
||||||
@ -82,7 +91,10 @@ function updateStyle(type){
|
|||||||
doc.style.setProperty("--font-family", "Arial, Helvetica, sans-serif");
|
doc.style.setProperty("--font-family", "Arial, Helvetica, sans-serif");
|
||||||
doc.style.setProperty("--font-size", "13px");
|
doc.style.setProperty("--font-size", "13px");
|
||||||
|
|
||||||
document.querySelector("body").style.backgroundImage = "url(" + dirDepth + "global/fade.png)";
|
resetBackground();
|
||||||
|
try {
|
||||||
|
document.querySelector("body").style.backgroundImage = "url(" + dirDepth + "global/fade.png)";
|
||||||
|
} catch { }
|
||||||
} else if (type == "Tomorrow"){
|
} else if (type == "Tomorrow"){
|
||||||
doc.style.setProperty("--main-bg-color", "#1d1f21");
|
doc.style.setProperty("--main-bg-color", "#1d1f21");
|
||||||
doc.style.setProperty("--main-bg-end-color", "#1d1f21");
|
doc.style.setProperty("--main-bg-end-color", "#1d1f21");
|
||||||
@ -93,7 +105,7 @@ function updateStyle(type){
|
|||||||
doc.style.setProperty("--font-family", "Arial, Helvetica, sans-serif");
|
doc.style.setProperty("--font-family", "Arial, Helvetica, sans-serif");
|
||||||
doc.style.setProperty("--font-size", "13px");
|
doc.style.setProperty("--font-size", "13px");
|
||||||
|
|
||||||
document.querySelector("body").style.backgroundImage = "none";
|
resetBackground();
|
||||||
} else if (type == "Forgotten"){
|
} else if (type == "Forgotten"){
|
||||||
doc.style.setProperty("--main-bg-color", "#282828");
|
doc.style.setProperty("--main-bg-color", "#282828");
|
||||||
doc.style.setProperty("--main-bg-end-color", "#458588");
|
doc.style.setProperty("--main-bg-end-color", "#458588");
|
||||||
@ -104,27 +116,33 @@ function updateStyle(type){
|
|||||||
doc.style.setProperty("--font-family", "FreePixel");
|
doc.style.setProperty("--font-family", "FreePixel");
|
||||||
doc.style.setProperty("--font-size", "13px");
|
doc.style.setProperty("--font-size", "13px");
|
||||||
|
|
||||||
document.querySelector("body").style.backgroundImage = "none";
|
resetBackground();
|
||||||
} else if (type == "Neocities"){
|
} else if (type == "Neocities"){
|
||||||
doc.style.setProperty("--main-bg-color", "#282828");
|
doc.style.setProperty("--main-bg-color", "#000000");
|
||||||
doc.style.setProperty("--main-bg-end-color", "#458588");
|
doc.style.setProperty("--main-bg-end-color", "#468184");
|
||||||
doc.style.setProperty("--main-color", "#a89984");
|
doc.style.setProperty("--main-color", "#00000055");
|
||||||
doc.style.setProperty("--main-fg-color", "#282828");
|
doc.style.setProperty("--main-fg-color", "#ffffff");
|
||||||
doc.style.setProperty("--main-title-fg-color", "#7c7c7c");
|
doc.style.setProperty("--main-title-fg-color", "#2c9080");
|
||||||
|
|
||||||
doc.style.setProperty("--font-family", "FreePixel");
|
doc.style.setProperty("--font-family", "FreePixel");
|
||||||
doc.style.setProperty("--font-size", "15px");
|
doc.style.setProperty("--font-size", "15px");
|
||||||
|
|
||||||
document.querySelector("body").style.backgroundImage = "none";
|
try {
|
||||||
|
document.querySelector("body").style.backgroundImage = "url(" + dirDepth + "global/bg.png)";
|
||||||
|
document.querySelector("body").style.backgroundRepeat = "repeat";
|
||||||
|
document.querySelector("body").style.backgroundBlendMode = "overlay";
|
||||||
|
} catch { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ButtonToggle(checkstate){
|
function ButtonToggle(checkstate){
|
||||||
if (checkstate){
|
try {
|
||||||
document.querySelector(".button-container").style.display = "flex";
|
if (checkstate){
|
||||||
} else {
|
document.querySelector(".button-container").style.display = "flex";
|
||||||
document.querySelector(".button-container").style.display = "none";
|
} else {
|
||||||
}
|
document.querySelector(".button-container").style.display = "none";
|
||||||
|
}
|
||||||
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
function LoadWebsite(){
|
function LoadWebsite(){
|
||||||
@ -260,6 +278,12 @@ function LoadWebsite(){
|
|||||||
button_span.appendChild(button_check_buttons);
|
button_span.appendChild(button_check_buttons);
|
||||||
button_span.appendChild(button_check_label);
|
button_span.appendChild(button_check_label);
|
||||||
|
|
||||||
|
if (document.getElementById("please-no-buttons") != null){
|
||||||
|
button_check_buttons.checked = false;
|
||||||
|
button_check_label.disabled = true;
|
||||||
|
button_check_buttons.disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
button_span.appendChild(button_select_label);
|
button_span.appendChild(button_select_label);
|
||||||
button_select_label.appendChild(button_select);
|
button_select_label.appendChild(button_select);
|
||||||
|
|
||||||
@ -318,7 +342,7 @@ function LoadWebsite(){
|
|||||||
updateStyle(event.target.value);
|
updateStyle(event.target.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (localStorage.getItem("style") == "Yotsuba"){
|
if (localStorage.getItem("style") == "Yotsuba" || localStorage.getItem("style") == "Neocities" || localStorage.getItem("style") == undefined){
|
||||||
updateStyle(localStorage.getItem("style"));
|
updateStyle(localStorage.getItem("style"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,11 @@ body {
|
|||||||
|
|
||||||
color:var(--main-fg-color);
|
color:var(--main-fg-color);
|
||||||
|
|
||||||
background: var(--main-bg-end-color) url(../src/fade.png) top repeat-x;
|
background-image: url(../global/fade.png);
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-position: top;
|
||||||
|
background-color: var(--main-bg-end-color);
|
||||||
|
background-position: left;
|
||||||
|
|
||||||
margin:0;
|
margin:0;
|
||||||
padding-bottom:26px;
|
padding-bottom:26px;
|
||||||
@ -62,6 +66,8 @@ nav{
|
|||||||
width: 80%;
|
width: 80%;
|
||||||
float:left;
|
float:left;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
background-color: var(--main-title-fg-color);
|
||||||
|
border-color: var(--main-title-fg-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
main{
|
main{
|
||||||
|
Loading…
Reference in New Issue
Block a user