Skip to content

Commit

Permalink
public-folder-created-with-ntl-build
Browse files Browse the repository at this point in the history
  • Loading branch information
ti ko authored and ti ko committed Dec 29, 2023
1 parent b6a6fe4 commit 513cf39
Show file tree
Hide file tree
Showing 14 changed files with 356 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

.hugo_build.lock
archetypes
resources
resources
# Local Netlify folder
.netlify
8 changes: 8 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build]
command = "hugo"
publish = "public"

[dev]
command = "hugo server -w"
port=8888
autoLaunch = false
11 changes: 11 additions & 0 deletions public/categories/index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Categories on tiko</title>
<link>https://tik9.github.io/categories/</link>
<description>Recent content in Categories on tiko</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<atom:link href="https://tik9.github.io/categories/index.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>
86 changes: 86 additions & 0 deletions public/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

document.title = tiko

// var net_host = 'http://localhost'
var net_host = 'https://tifun.netlify.app'
var net_fun = '/.netlify/functions/'

data()
async function data() {
var data = 'data'
// var res = await (await fetch(net_host + net_fun + 'mongo?op=find&coll=' + data)).json();
// var res = [{ text: 'Alice', cat: 21 },];
var utils = 'utils'
var res = await (await (fetch(net_host + net_fun + utils))).json()

// console.log(res)

var main_div = document.createElement('div')
main_div.id = data
container.append(main_div)
var list = document.createElement('ul')
main_div.append(list)

res = groupBy(res, 'cat');

for (var elem in res) {
var head = document.createElement('h5')
head.textContent = elem
head.style.marginTop = '40px'
list.append(head)
for (var elem2 of res[elem]) {
var li = document.createElement('li')
li.textContent = elem2.text
list.append(li)
}
}
}

function groupBy(objectArray, property) {
return objectArray.reduce((acc, obj) => {
var key = obj[property];
if (!acc[key])
acc[key] = [];

acc[key].push(obj);
return acc;
}, {});
}

function table(arr) {
var excludes = ['_id', '__v', 'cat', 'name', 'url']
var table_ = document.createElement('table')
var thead = document.createElement('thead')
var tr = document.createElement('tr')
thead.appendChild(tr)
var columns = []
for (var elem of arr) {
for (var key in elem) {
if (excludes.includes(key)) continue
if (elem.hasOwnProperty(key) && !columns.includes(key)) {
columns.push(key);
var th = document.createElement('th')
th.appendChild(document.createTextNode(key[0].toUpperCase() + key.slice(1)));
tr.appendChild(th);
}
}
}
table_.appendChild(thead);
var tbody = document.createElement('tbody');
for (var elem of arr) {
var tr = document.createElement('tr')

for (var elem2 of columns) {
var val = elem[elem2]
var td = document.createElement('td');


td.innerHTML = val
tr.appendChild(td);
}
tbody.appendChild(tr)
}
table_.appendChild(tbody);
table_.classList.add('table', 'table-bordered', 'table-striped')
return table_;
}
34 changes: 34 additions & 0 deletions public/contact/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<head>
<link href="/favicon.png" rel="icon">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.0/css/bootstrap.min.css"
rel="stylesheet" />
<link href="/style.css" rel="stylesheet">
<script>

</script>
</head>

<body style="width:800px;padding-top: 80px;margin-left: auto;margin-right: auto;">
<div id=container class="container" style="padding-bottom: 80px;">
<div id="topnav">
<h4 class="mt-5 mb-3" style="color: white;">
Timo' s online classes
</h4>
</div>
<div id="contact">
<h3 style="margin-top: 60px;margin-bottom: 30px;">Kontakt</h3>

<pre><code>- email: timo &quot;at&quot; tik1.net
- Phone: +49 1573 95 98 220
</code></pre>


</div>
<div id=bottomnav></div>
</div>

<script>


</script>
<script src="/nav.js"></script>
Binary file added public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions public/imprint/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<head>
<link href="/favicon.png" rel="icon">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.0/css/bootstrap.min.css"
rel="stylesheet" />
<link href="/style.css" rel="stylesheet">
<script>

</script>
</head>

<body style="width:800px;padding-top: 80px;margin-left: auto;margin-right: auto;">
<div id=container class="container" style="padding-bottom: 80px;">
<div id="topnav">
<h4 class="mt-5 mb-3" style="color: white;">
Timo' s online classes
</h4>
</div>
<div id="imprint">
<h3 style="margin-top: 60px">Imprint</h3>

<h5 id="declaration-of-data-protection-policy">Declaration of Data Protection Policy</h5>
<p>General info</p>
<p>The following information will present an overview of what happens with your personal data while visiting my
page.</p>
<p>Personal data is all data which can be used for identity of yourself.</p>
<p>You get further information regarding data protection in the declaration that follows.</p>
<h5 id="who-is-responsible-for-the-data-acquisition-on-this-website">Who is Responsible for the Data acquisition on this website?</h5>
<p>The data processing will be realized by the content owner of this site.</p>
<p>My contact data is shown further down, contact is possible with a form on this website.</p>
<p>How do I collect data?</p>
<p>I collect data when you send it to me.
This is done by entering your data in the contact form.</p>
<p>Further data is technical data (browser type, operating system, origin, Time of visit, Ip Address).</p>
<p>I use your data to improve the content and to analyse the consumption of my site.</p>
<p>Responsible for the website:</p>
<p>Timo Körner</p>
<p>Hepberg, Germany</p>


</div>
<div id=bottomnav></div>
</div>

<script>


</script>
<script src="/nav.js"></script>
41 changes: 41 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<html>
<head>
<meta name="generator" content="Hugo 0.121.1">
<link href="/favicon.png" rel="icon">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.0/css/bootstrap.min.css"
rel="stylesheet" />
<link href="/style.css" rel="stylesheet">
<script>

</script>
</head>

<body style="width:800px;padding-top: 80px;margin-left: auto;margin-right: auto;">
<div id=container class="container" style="padding-bottom: 80px;">
<div id="topnav">
<h4 class="mt-5 mb-3" style="color: white;">
Timo' s online classes
</h4>
</div>

<h2
style="margin-top: 40px; margin-bottom: 70px; font-size: 5rem; color: #fef6e4; text-shadow: 5px 5px 0px #172c66, 10px 10px 0px #001858, 15px 15px 0px #f9bc60,20px 20px 0px #ff8e3c, 25px 25px 0px #9656a1;">
Online math classes</h2>


</div>
<div id=bottomnav></div>
</div>

<script>


</script>
<script src="/nav.js"></script>

<script>

</script>
<script src=/client.js></script>

</html>
25 changes: 25 additions & 0 deletions public/index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>tiko</title>
<link>https://tik9.github.io/</link>
<description>Recent content on tiko</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<atom:link href="https://tik9.github.io/index.xml" rel="self" type="application/rss+xml" />
<item>
<title></title>
<link>https://tik9.github.io/contact/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://tik9.github.io/contact/</guid>
<description>- email: timo &amp;quot;at&amp;quot; tik1.net - Phone: +49 1573 95 98 220 </description>
</item>
<item>
<title></title>
<link>https://tik9.github.io/imprint/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://tik9.github.io/imprint/</guid>
<description>Declaration of Data Protection Policy General info&#xA;The following information will present an overview of what happens with your personal data while visiting my page.&#xA;Personal data is all data which can be used for identity of yourself.&#xA;You get further information regarding data protection in the declaration that follows.&#xA;Who is Responsible for the Data acquisition on this website? The data processing will be realized by the content owner of this site.</description>
</item>
</channel>
</rss>
26 changes: 26 additions & 0 deletions public/nav.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

// console.log(4)

var tiko = "Tiko's"

var aref = document.createElement("a");

// var test = document.createElement("a");
// test.classList.add('focus')
// test.textContent = 'test'
// test.href = '/'
// bottomnav.append(test)

topnav.classList.add('fixed-top', 'bg-dark')
bottomnav.classList.add('fixed-bottom', 'bg-dark')
aref.textContent = tiko;
aref.href = '/'
aref.classList.add('active')
bottomnav.append(aref)
for (var elem of ["contact", 'imprint']) {
var ahref = document.createElement("a");
ahref.href = '/' + elem;
ahref.textContent = elem[0].toUpperCase() + elem.slice(1)
ahref.classList.add('nav')
bottomnav.append(ahref)
}
15 changes: 15 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://tik9.github.io/contact/</loc>
</url><url>
<loc>https://tik9.github.io/imprint/</loc>
</url><url>
<loc>https://tik9.github.io/categories/</loc>
</url><url>
<loc>https://tik9.github.io/tags/</loc>
</url><url>
<loc>https://tik9.github.io/</loc>
</url>
</urlset>
48 changes: 48 additions & 0 deletions public/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
.focus:focus {
color: wheat;
}

/* Style the links inside the navigation bar */
#topnav a,
#bottomnav a {
font-size: 17px;
float: left;
color: #f2f2f2;
text-decoration: none;
padding: 10px 10px;
}

/* Change the color of links on hover */
#topnav a:hover {
background-color: #ddd;
color: black;
}

/* Add an active class to highlight the current page */
a.active {
background-color: #04AA6D;
color: white;
}


@media screen and (max-width: 650px) {
.nav {
background-color: transparent;
}

.nav.responsive {
position: relative;
}

.nav.responsive a.icon {
position: absolute;
right: 0;
top: 0;
}

.nav.responsive a {
float: none;
display: block;
text-align: left;
}
}
11 changes: 11 additions & 0 deletions public/tags/index.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tags on tiko</title>
<link>https://tik9.github.io/tags/</link>
<description>Recent content in Tags on tiko</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<atom:link href="https://tik9.github.io/tags/index.xml" rel="self" type="application/rss+xml" />
</channel>
</rss>
1 change: 0 additions & 1 deletion static/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ async function data() {
var utils = 'utils'
var res = await (await (fetch(net_host + net_fun + utils))).json()

res = await (await (fetch(net_host + net_fun + utils, { method: 'post', body: JSON.stringify({ type: 'sortTable', val: res, sort1: 'cat', sort2: 'text' }) }))).json();
// console.log(res)

var main_div = document.createElement('div')
Expand Down

0 comments on commit 513cf39

Please sign in to comment.