Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21f4ba4f87 | |||
| abce59057d | |||
| df8e8b8355 | |||
| 6ff2eaa540 |
@ -1 +1,2 @@
|
||||
Dockerfile
|
||||
readme.md
|
||||
|
||||
35
config/config.json
Normal file
35
config/config.json
Normal file
@ -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"}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
88
config/style.css
Normal file
88
config/style.css
Normal file
@ -0,0 +1,88 @@
|
||||
|
||||
a{
|
||||
color:#c3c3c3;
|
||||
font-family:"Segoe UI";
|
||||
font-size:25px;
|
||||
text-decoration:none;
|
||||
margin-left:5px;
|
||||
transition-property: color;
|
||||
transition-duration: .1s;
|
||||
transition-timing-function: linear;
|
||||
}
|
||||
body{
|
||||
padding-left:10px;
|
||||
padding-right:10px;
|
||||
font-family:"Segoe UI";
|
||||
color:#c8c8c8;
|
||||
font-size:34px;
|
||||
background:#FBFBFB;
|
||||
}
|
||||
|
||||
span{
|
||||
margin-left:10px;
|
||||
text-family:"segoe UI";
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a:hover { color:#A9BFA5}
|
||||
|
||||
input[type=text] {
|
||||
width: 18px;
|
||||
padding: 3px;
|
||||
position:absolute;
|
||||
right:5px;bottom:5px;
|
||||
border: 1px solid #E6e6e6;
|
||||
transition-property: all;
|
||||
transition-duration: .5s;
|
||||
transition-timing-function: ease;
|
||||
color: #bebebe;
|
||||
background-position: -2px -1px;
|
||||
background-image: url('../res/search.png');
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
input[type=text]:hover {
|
||||
border-color: #bebebe;
|
||||
transition-property: all;
|
||||
transition-duration: .5s;
|
||||
transition-timing-function: ease;
|
||||
color: #bebebe;
|
||||
width:230px;
|
||||
background-position: 227px -1px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
input[type=text]:focus {
|
||||
border-color: #bebebe;
|
||||
transition-property: all;
|
||||
transition-duration: .5s;
|
||||
transition-timing-function: ease;
|
||||
color: #bebebe;
|
||||
width:230px;
|
||||
background-position: 227px -1px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.boxed {
|
||||
border: 1px solid #e6e6e6;
|
||||
padding: 5px;
|
||||
color: #494949;
|
||||
background-color: #ffffff;
|
||||
width: 760px;
|
||||
margin-left: -390px;
|
||||
margin-right: auto;
|
||||
position:absolute;
|
||||
left: 50%;
|
||||
top: 40%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding-bottom: -600px;
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
margin-top: -200px;
|
||||
margin-left: -380px;
|
||||
left: 50%;
|
||||
top: 40%;
|
||||
|
||||
}
|
||||
|
||||
53
index.html
53
index.html
@ -1,36 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- homepage by noha javascript by nullbyte -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="src/style.css">
|
||||
<link rel="stylesheet" href="src/animations.css">
|
||||
<script src="src/jquery.min.js"></script>
|
||||
<script src="src/script.js"></script>
|
||||
<title>new tab</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1 align="center" id="message" class="expandUp"></h1>
|
||||
<div 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>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<!-- original homepage by noha https://www.deviantart.com/noha-ra/art/Konbanwa-homepage-450787545 -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="src/animations.css">
|
||||
<link rel="stylesheet" href="config/style.css">
|
||||
<script src="src/jquery.min.js"></script>
|
||||
<script src="src/script.js"></script>
|
||||
<title>new tab</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1 align="center" id="message" class="expandUp"></h1>
|
||||
<div id="categories" class="boxed slideUp">
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@ -13,3 +13,5 @@ docker pull tuxpa.in/a/homepage:stable
|
||||
it runs on port 8076
|
||||
|
||||
|
||||
|
||||
woodpecker ci [](https://ci.tuxpa.in/a/homepage)
|
||||
|
||||
@ -1,28 +1,72 @@
|
||||
const updateTime = () => {
|
||||
const n = (new Date()).getHours()
|
||||
var imgName = "goodnight"
|
||||
if ( n == 23 || n == 0) {
|
||||
imgName = "goodnight"
|
||||
} else if ( n >= 1 && n <= 4 ) {
|
||||
imgName = "goodnight"
|
||||
} else if ( n >= 5 && n <= 11 ) {
|
||||
imgName = "goodmorning"
|
||||
} else if ( n >= 12 && n <= 17 ) {
|
||||
imgName = "goodafternoon"
|
||||
} else if ( n >= 18 && n <= 22 ) {
|
||||
imgName = "goodevening"
|
||||
}
|
||||
//$("#message").html(imgName)
|
||||
$("#message").html(`<image src="res/${imgName}.png" />`)
|
||||
}
|
||||
|
||||
var d = new Date();
|
||||
var n = d.getHours();
|
||||
var message = ""
|
||||
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
|
||||
}
|
||||
|
||||
if ( n == 23 || n == 0) {
|
||||
message = "<img src='res/goodnight.png'></img>";
|
||||
} else if ( n >= 1 && n <= 4 ) {
|
||||
message = "<img src='res/goodnight.png'></img>";
|
||||
} else if ( n >= 5 && n <= 11 ) {
|
||||
message = "<img src='res/goodmorning.png'></img>";
|
||||
} else if ( n >= 12 && n <= 17 ) {
|
||||
message = "<img src='res/goodafternoon.png'></img>";
|
||||
} else if ( n >= 18 && n <= 22 ) {
|
||||
message = "<img src='res/goodevening.png'></img>";
|
||||
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() {
|
||||
$('#animatedElement').each(function(){
|
||||
var imagePos = $(this).offset().top;
|
||||
|
||||
var topOfWindow = $(window).scrollTop();
|
||||
if (imagePos < topOfWindow+400) {
|
||||
$(this).addClass("slideUp");
|
||||
|
||||
@ -1,87 +0,0 @@
|
||||
a{
|
||||
color:#c3c3c3;
|
||||
font-family:"Segoe UI";
|
||||
font-size:25px;
|
||||
text-decoration:none;
|
||||
margin-left:5px;
|
||||
transition-property: color;
|
||||
transition-duration: .1s;
|
||||
transition-timing-function: linear;
|
||||
}
|
||||
body{
|
||||
padding-left:10px;
|
||||
padding-right:10px;
|
||||
font-family:"Segoe UI";
|
||||
color:#c8c8c8;
|
||||
font-size:34px;
|
||||
background:#FBFBFB;
|
||||
}
|
||||
|
||||
span{
|
||||
margin-left:10px;
|
||||
text-family:"segoe UI";
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
a:hover { color:#A9BFA5}
|
||||
|
||||
input[type=text] {
|
||||
width: 18px;
|
||||
padding: 3px;
|
||||
position:absolute;
|
||||
right:5px;bottom:5px;
|
||||
border: 1px solid #E6e6e6;
|
||||
transition-property: all;
|
||||
transition-duration: .5s;
|
||||
transition-timing-function: ease;
|
||||
color: #bebebe;
|
||||
background-position: -2px -1px;
|
||||
background-image: url('../res/search.png');
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
input[type=text]:hover {
|
||||
border-color: #bebebe;
|
||||
transition-property: all;
|
||||
transition-duration: .5s;
|
||||
transition-timing-function: ease;
|
||||
color: #bebebe;
|
||||
width:230px;
|
||||
background-position: 227px -1px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
input[type=text]:focus {
|
||||
border-color: #bebebe;
|
||||
transition-property: all;
|
||||
transition-duration: .5s;
|
||||
transition-timing-function: ease;
|
||||
color: #bebebe;
|
||||
width:230px;
|
||||
background-position: 227px -1px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.boxed {
|
||||
border: 1px solid #e6e6e6;
|
||||
padding: 5px;
|
||||
color: #494949;
|
||||
background-color: #ffffff;
|
||||
width: 760px;
|
||||
margin-left: -390px;
|
||||
margin-right: auto;
|
||||
position:absolute;
|
||||
left: 50%;
|
||||
top: 40%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding-bottom: -600px;
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
margin-top: -200px;
|
||||
margin-left: -380px;
|
||||
left: 50%;
|
||||
top: 40%;
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user