simple-dash-fork

A simple, fully responsive dashboard - fork with some customisations
git clone https://git.ortlepp.eu/simple-dash-fork.git/
Log | Files | Refs | README | LICENSE

commit 123450cda69bd5219fd746e1fc617ea43a34f507
parent 33f9d72c18efcfe44ee45ba41833d3fcddcdd17c
Author: Thorsten Ortlepp <post@ortlepp.eu>
Date:   Sun, 29 Mar 2020 12:59:31 +0200

Moved config into index.html

Diffstat:
Dconfig.sample.json | 20--------------------
Mindex.html | 41+++++++++--------------------------------
2 files changed, 9 insertions(+), 52 deletions(-)

diff --git a/config.sample.json b/config.sample.json @@ -1,20 +0,0 @@ -{ - "title" : "Your Homepage Title", - "items" : [ - { - "alt" : "Github", - "icon" : "fab fa-github", - "link" : "https://github.com/Swagielka" - }, - { - "alt" : "Twitter", - "icon" : "fab fa-twitter", - "link" : "https://twitter.com/Kukielka_" - }, - { - "alt" : "Docker Hub", - "icon" : "fab fa-docker", - "link" : "https://hub.docker.com/u/kukielka/" - } - ] -} diff --git a/index.html b/index.html @@ -1,61 +1,39 @@ <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> - <title>Loading...</title> - + <!-- Set title below --> + <title>Your Homepage Title</title> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <link rel="stylesheet" type="text/css" href="common/css/fontawesome-all.min.css" /> <link rel="stylesheet" type="text/css" href="common/css/main.css" /> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> </head> - <body id="homepage"> - <div id="wrapper"> <div id="itemlist"> - <a title="Loading..."><i class="fa-spin fas fa-spinner fa-fw"></i></a> + <!-- First item: Homepage --> + <a href="https://ortlepp.eu/" title="Homepage"><i class="fa fa-home fa-fw"></i></a> + <!-- Second item: GitHub --> + <a href="https://github.com/tortlepp" title="GitHub"><i class="fab fa-github"></i></a> + <!-- Third item: Google --> + <a href="https://www.google.com/" title="Google"><i class="fab fa-google"></i></a> + <!-- Add more items here ... --> </div> </div> - <script src="common/js/trianglify.min.js"></script> <script> - var request = new XMLHttpRequest(); - request.overrideMimeType("application/json"); - request.open("GET", 'config.json'); - request.onload = function () { - if (request.status >= 200 && request.status < 400) { - var config = JSON.parse(this.response); - console.log(config); - document.title = config.title; - - var itemlistHTML = ''; - for (var i = 0; i < config.items.length; i++) { - var item = config.items[i]; - itemlistHTML += '<a href="'+item.link+'" title="'+item.alt+'"><i class="'+item.icon+' fa-fw"></i></a>'; - } - document.getElementById("itemlist").innerHTML = itemlistHTML; - } else { - var error_text = "Error: "+request.status; - console.error(error_text); - document.title = error_text; - } - } - request.send(null); - function addTriangleTo(target) { var dimensions = target.getClientRects()[0]; var pattern = Trianglify({ width: dimensions.width, height: dimensions.height }); - target.style['background-image'] = 'url(' + pattern.png() + ')'; target.style['background-size'] = 'cover'; target.style['-webkit-background-size'] = 'cover'; target.style['-moz-background-size'] = 'cover'; target.style['-o-background-size'] = 'cover'; } - var resizeTimer; window.addEventListener("resize", function () { clearTimeout(resizeTimer); @@ -63,7 +41,6 @@ addTriangleTo(homepage); }, 400); }) - addTriangleTo(homepage); </script> </body>