config file
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
6ff2eaa540
commit
df8e8b8355
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
"search_engine": "https://www.google.com/search",
|
||||||
|
"categories": [
|
||||||
|
{
|
||||||
|
"image": "res/4chan.png",
|
||||||
|
"links": [
|
||||||
|
{"href":"https://boards.4chan.org/w/", "label":"walls"},
|
||||||
|
{"href":"https://boards.4chan.org/g/", "label":"tech"},
|
||||||
|
{"href":"https://boards.4chan.org/a/", "label":"anime"},
|
||||||
|
{"href":"https://boards.4chan.org/mu/", "label":"music"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"image": "res/social.png",
|
||||||
|
"links": [
|
||||||
|
{"href":"https://facebook.com", "label":"facebook"},
|
||||||
|
{"href":"https://youtube.com/", "label":"youtube"},
|
||||||
|
{"href":"https://tumblr.com", "label":"tumblr"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"image": "res/music.png",
|
||||||
|
"links": [
|
||||||
|
{"href":"https://last.fm", "label":"last.fm"},
|
||||||
|
{"href":"https://bandcamp.com/", "label":"bandcamp"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"image": "res/mail.png",
|
||||||
|
"links": [
|
||||||
|
{"href":"https://mail.google.com", "label":"gmail"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
23
index.html
23
index.html
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!-- homepage by noha javascript by nullbyte -->
|
<!-- original homepage by noha https://www.deviantart.com/noha-ra/art/Konbanwa-homepage-450787545 -->
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -12,25 +12,6 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 align="center" id="message" class="expandUp"></h1>
|
<h1 align="center" id="message" class="expandUp"></h1>
|
||||||
<div class="boxed" class=slideUp>
|
<div id="categories" class="boxed" class=slideUp>
|
||||||
<span> <img src="res/4chan.png"></span>
|
|
||||||
<a style="padding-left:10px" href="http://boards.4chan.org/w/">walls</a>
|
|
||||||
<a href="http://boards.4chan.org/g/">tech</a>
|
|
||||||
<a href="http://boards.4chan.org/a/">anime</a>
|
|
||||||
<a href="http://boards.4chan.org/mu/">music</a>
|
|
||||||
</br>
|
|
||||||
<span> <img src="res/social.png"></span>
|
|
||||||
<a style="padding-left:10px" href="https://www.facebook.com">facebook</a>
|
|
||||||
<a href="http://youtube.com">youtube</a>
|
|
||||||
<a href="http://tumblr.com">tumblr</a>
|
|
||||||
</br>
|
|
||||||
<span> <img src="res/music.png"></span>
|
|
||||||
<a style="padding-left:10px" href="http://www.last.fm">last.fm</a>
|
|
||||||
<a href="http://bandcamp.com">bandcamp</a>
|
|
||||||
</br>
|
|
||||||
<span> <img src="res/mail.png"></span>
|
|
||||||
<a style="padding-left:10px" href="http://mail.google.com">gmail</a>
|
|
||||||
</br>
|
|
||||||
<form method="get" action="http://www.google.com/search"> <input type="text" placeholder="" value="" name="q">
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,28 +1,72 @@
|
||||||
|
const updateTime = () => {
|
||||||
var d = new Date();
|
const n = (new Date()).getHours()
|
||||||
var n = d.getHours();
|
var imgName = "goodnight"
|
||||||
var message = ""
|
|
||||||
|
|
||||||
if ( n == 23 || n == 0) {
|
if ( n == 23 || n == 0) {
|
||||||
message = "<img src='res/goodnight.png'></img>";
|
imgName = "goodnight"
|
||||||
} else if ( n >= 1 && n <= 4 ) {
|
} else if ( n >= 1 && n <= 4 ) {
|
||||||
message = "<img src='res/goodnight.png'></img>";
|
imgName = "goodnight"
|
||||||
} else if ( n >= 5 && n <= 11 ) {
|
} else if ( n >= 5 && n <= 11 ) {
|
||||||
message = "<img src='res/goodmorning.png'></img>";
|
imgName = "goodmorning"
|
||||||
} else if ( n >= 12 && n <= 17 ) {
|
} else if ( n >= 12 && n <= 17 ) {
|
||||||
message = "<img src='res/goodafternoon.png'></img>";
|
imgName = "goodafternoon"
|
||||||
} else if ( n >= 18 && n <= 22 ) {
|
} else if ( n >= 18 && n <= 22 ) {
|
||||||
message = "<img src='res/goodevening.png'></img>";
|
imgName = "goodevening"
|
||||||
|
}
|
||||||
|
//$("#message").html(imgName)
|
||||||
|
$("#message").html(`<image src="res/${imgName}.png" />`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const renderCategoryLink = (link, first) => {
|
||||||
|
if(first) {
|
||||||
|
return `<a style="padding-left:10px" href="${link.href}">${link.label}</a>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
return `<a href="${link.href}">${link.label}</a>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
const renderCategoryLinks = (links) => {
|
||||||
|
let out = ""
|
||||||
|
for(let i = 0; i < links.length; i++) {
|
||||||
|
out = out + renderCategoryLink(links[i], i==0)
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
const renderCategory =(obj) => {
|
||||||
|
return `<span> <img src="${obj.image}"></span>
|
||||||
|
${renderCategoryLinks(obj.links)}</br>
|
||||||
|
`
|
||||||
|
}
|
||||||
|
const renderCategories =(objs) => {
|
||||||
|
let out = ""
|
||||||
|
for(let i = 0; i < objs.length; i++) {
|
||||||
|
out = out + renderCategory(objs[i])
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
const renderCategoriesBox = (data) => {
|
||||||
|
return `${renderCategories(data.categories)}
|
||||||
|
<form method="get" action="${data.search_engine}"> <input type="text" placeholder="" value="" name="q">
|
||||||
|
`
|
||||||
|
}
|
||||||
|
|
||||||
|
const loadUI = () => {
|
||||||
|
$.getJSON("config/config.json", (data)=>{
|
||||||
|
let drawn = renderCategoriesBox(data)
|
||||||
|
console.log(drawn)
|
||||||
|
$("#categories").html(drawn)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
$(()=>{
|
$(()=>{
|
||||||
document.getElementById("message").innerHTML = message;
|
loadUI();
|
||||||
|
updateTime();
|
||||||
|
setInterval(updateTime, 1000 * 60)
|
||||||
})
|
})
|
||||||
|
|
||||||
$(window).scroll(function() {
|
$(window).scroll(function() {
|
||||||
$('#animatedElement').each(function(){
|
$('#animatedElement').each(function(){
|
||||||
var imagePos = $(this).offset().top;
|
var imagePos = $(this).offset().top;
|
||||||
|
|
||||||
var topOfWindow = $(window).scrollTop();
|
var topOfWindow = $(window).scrollTop();
|
||||||
if (imagePos < topOfWindow+400) {
|
if (imagePos < topOfWindow+400) {
|
||||||
$(this).addClass("slideUp");
|
$(this).addClass("slideUp");
|
||||||
|
|
Loading…
Reference in New Issue