5 Commits

Author SHA1 Message Date
1c3911d722 make webring page
This webring page references another page's CSS rather than making its
own.

It has one link, to Tilde.zone.
2023-08-04 17:48:12 +02:00
c53438e2cc Merge pull request 'Implemented poster script' (#1) from hugo/decentrala-website-static-new:poster into master
Reviewed-on: #1
2023-08-03 16:54:19 +00:00
Luka Ivanovic
c890e98279 So it begins.. 2023-08-03 18:41:30 +02:00
f05390f16c Implemented poster script 2023-07-22 22:10:38 +02:00
eline
9fb8eac7c7 Some new icons for tests 2023-05-07 02:52:46 +02:00
13 changed files with 430 additions and 20 deletions

View File

@@ -10,3 +10,11 @@ datum, vreme, lokacija, tema
08-05-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Linux install day
09-05-2023, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Cryptoparty - Uvod u privatnost
11-05-2023, 18:00, Polyhedra https://www.openstreetmap.org/node/4856556781, Uvod u racunarske mreze
01-08-2023, 19:00, DC Krov, Tehno veče
07-08-2023, 19:00, DC Krov, Linux ricing
08-08-2023, 19:00, DC Krov, Lambda račun
14-08-2023, 19:00, DC Krov, Linux distro diskusija
15-08-2023, 19:00, DC Krov, Pirati 777 mora
21-08-2023, 19:00, DC Krov, Python vežbe
22-08-2023, 19:00, DC Krov, Autentifikacija na internetu
28-08-2023, 19:00, DC Krov, Kviz
1 datum vreme lokacija tema
10 08-05-2023 19:00 DC Krov https://www.openstreetmap.org/node/10594728522 Linux install day
11 09-05-2023 19:00 DC Krov https://www.openstreetmap.org/node/10594728522 Cryptoparty - Uvod u privatnost
12 11-05-2023 18:00 Polyhedra https://www.openstreetmap.org/node/4856556781 Uvod u racunarske mreze
13 01-08-2023 19:00 DC Krov Tehno veče
14 07-08-2023 19:00 DC Krov Linux ricing
15 08-08-2023 19:00 DC Krov Lambda račun
16 14-08-2023 19:00 DC Krov Linux distro diskusija
17 15-08-2023 19:00 DC Krov Pirati 777 mora
18 21-08-2023 19:00 DC Krov Python vežbe
19 22-08-2023 19:00 DC Krov Autentifikacija na internetu
20 28-08-2023 19:00 DC Krov Kviz

BIN
font/Facade-Sud.woff Normal file

Binary file not shown.

Binary file not shown.

21
img/strelica-closed.svg Normal file
View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="40"
height="40"
viewBox="0 0 10 10"
version="1.1"
id="svg5"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<g
id="layer1">
<path
id="path1336"
style="fill:#181715;stroke-width:0.504542;fill-opacity:1"
d="M 10 0 L 8.8911133 0.57714844 L 8.8862305 0.58544922 L 0.96435547 4.2792969 A 10 10 0 0 0 1.574707 5.3740234 L 7.6362305 2.5473633 L 4.1142578 8.0756836 A 10 10 0 0 0 5.1674805 8.7485352 L 8.6904297 3.21875 L 8.6904297 9.9086914 A 10 10 0 0 0 9.9404297 9.9975586 L 9.9404297 1.2568359 L 9.9453125 1.2490234 L 10 0 z " />
</g>
</svg>

After

Width:  |  Height:  |  Size: 773 B

21
img/strelica-opened.svg Normal file
View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="40"
height="40"
viewBox="0 0 10 10"
version="1.1"
id="svg5"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs2" />
<g
id="layer1">
<path
id="path1336"
style="fill:#181715;fill-opacity:1;stroke-width:0.504542"
d="M 5 0.0029296875 L 4.375 1.0859375 L 4.375 1.0952148 L 0.35400391 7.4072266 A 8.75 8.75 0 0 0 1.4614258 7.9956055 L 4.375 3.4213867 L 4.375 8.7265625 A 8.75 8.75 0 0 0 5 8.75 A 8.75 8.75 0 0 0 5.625 8.7265625 L 5.625 3.4213867 L 8.5390625 7.9956055 A 8.75 8.75 0 0 0 9.6464844 7.4072266 L 5.625 1.0952148 L 5.625 1.0859375 L 5 0.0029296875 z " />
</g>
</svg>

After

Width:  |  Height:  |  Size: 799 B

View File

@@ -4,6 +4,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/styles/reset.css">
<link rel="stylesheet" href="/styles/style.css">
<link rel="stylesheet" href="/styles/home.css">
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
@@ -13,7 +14,7 @@
<body>
<header>
<a class="logo" href="/index.html">Decentrala</a>
<a id="logo" href="/index.html">Decentrala</a>
<span>
<button id="theme-switcher">turn the lights off</button>
<a class="account" href="/pages/account.html">Nalog</a>
@@ -64,15 +65,17 @@
<a href="/pages/contact.html">Kontakt</a>
</span>
<span class="copyleft">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="/img/cc-light.svg"
alt="CreativeCommons"></a>
<a href=""><img src="/img/w-light.svg" alt="Webring"></a>
<a href="https://gitea.dmz.rs/eline/decentrala-website-static-new"><img src="/img/git-light.svg"
alt="SourceCode"></a>
<a href="https://balkan.fedive.rs/@decentrala"><img src="/img/mastodon-light.svg" alt="Mastodon"></a>
<span class="links">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="/img/cc-light.svg"
alt="CreativeCommons"></a>
<a href="/pages/webring.html"><img src="/img/w-light.svg" alt="Webring"></a>
<a href="https://gitea.dmz.rs/eline/decentrala-website-static-new"><img src="/img/git-light.svg"
alt="SourceCode"></a>
<a href="https://balkan.fedive.rs/@decentrala"><img src="/img/mastodon-light.svg" alt="Mastodon"></a>
</span>
<span>Decentrala &copy; 2023</span>
</span>
</footer>
</body>
</html>
</html>

56
pages/webring.html Normal file
View File

@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/styles/style.css">
<link rel="stylesheet" href="/styles/blog.css">
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
<script src="/scripts/main.js" defer></script>
<title>Decentrala - Blog</title>
</head>
<body>
<header>
<a class="logo" href="/index.html">Decentrala</a>
<span>
<button id="theme-switcher">turn the lights off</button>
<a class="account" href="/pages/account.html">Nalog</a>
</span>
</header>
<div id="main">
<list>
<li> <a href="https://tilde.zone/explore">Tilde Zone</a> </li>
</list>
<img id="mesh" src="/img/mesh-light.svg">
</div>
<footer>
<div id="sections-menu">
<a href="/pages/events.html">Dogadjaji</a>
<a href="/pages/projects.html">Projekti</a>
<a href="/pages/blog.html">Blog</a>
<a href="/pages/services.html">Servisi</a>
<a href="/pages/contact.html">Kontakt</a>
</div>
<button id="sections-button" opened="false"><img src="/img/strelica-closed-light.svg" alt="OpenMenu"></button>
<span class="sections">
<a href="/pages/events.html">Dogadjaji</a>
<a href="/pages/projects.html">Projekti</a>
<a href="/pages/blog.html">Blog</a>
<a href="/pages/services.html">Servisi</a>
<a href="/pages/contact.html">Kontakt</a>
</span>
<span class="copyleft">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="/img/cc-light.svg"
alt="CreativeCommons"></a>
<a href=""><img src="/img/w-light.svg" alt="Webring"></a>
<a href="https://gitea.dmz.rs/eline/decentrala-website-static-new"><img src="/img/git-light.svg"
alt="SourceCode"></a>
<a href="https://balkan.fedive.rs/@decentrala"><img src="/img/mastodon-light.svg" alt="Mastodon"></a>
<span>Decentrala &copy; 2023</span>
</span>
</footer>
</body>
</html>

9
poster.html Normal file
View File

@@ -0,0 +1,9 @@
<html><head><link rel="stylesheet" href="styles/poster.css"><head><body><main><h1>DECENTRALA</h1><h2>Plan za Avgust</h2><table><tr><td>UTO</td><td>1.</td><td> Tehno veče</td></tr>
<tr><td>PON</td><td>7.</td><td> Linux ricing</td></tr>
<tr><td>UTO</td><td>8.</td><td> Lambda račun</td></tr>
<tr><td>PON</td><td>14.</td><td> Linux distro diskusija</td></tr>
<tr><td>UTO</td><td>15.</td><td> Pirati 777 mora</td></tr>
<tr><td>PON</td><td>21.</td><td> Python vežbe</td></tr>
<tr><td>UTO</td><td>22.</td><td> Autentifikacija na internetu</td></tr>
<tr><td>PON</td><td>28.</td><td> Kviz</td></tr>
</table><p>Radionice počinju u <strong>19h</strong> u Društvenom centru Krov u <strong>Kraljice Marije 47</strong>.</p><p>Ulaz u zgradu je u prolazu pored Štark prodavnice slatkiša, odmah pored menjačnice. DC Krov je na poslednjem spratu.</p><div id=link>dmz.rs</div></main></body></html>

58
poster.py Normal file
View File

@@ -0,0 +1,58 @@
import csv
import datetime as dt
from dateutil import relativedelta
EVENTS_CSV_PATH = "dogadjaji.csv"
CURRENT_TIME = dt.date.today()
NEXT_MONTH = CURRENT_TIME + relativedelta.relativedelta(months=1, day=1)
DAYS_OF_WEEK_SR = ("PON", "UTO", "SRE", "CET", "PET", "SUB", "NED")
MONTHS_SR = ("Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar")
def load_events(csv_path:str) -> list[dict]:
events = []
with open(csv_path) as csv_file:
csv_reader = csv.reader(csv_file)
next(csv_reader, None)
for event in csv_reader:
event_date = event[0]
event_date_parsed = dt.datetime.strptime(event_date, "%d-%m-%Y").date()
event_time = event[1]
event_title = event[3]
current_event = {"date":event_date_parsed,
"time":event_time,
"title":event_title}
if event_date_parsed >= NEXT_MONTH:
events.append(current_event)
return events
def render_table(events:list[dict])-> str:
html = ""
for event in events:
date = DAYS_OF_WEEK_SR[event["date"].weekday()]
day = event["date"].day
title = event["title"]
html += f"<tr><td>{date}</td><td>{day}.</td><td>{title}</td></tr>\n"
return html
def render_page(table: str) -> str:
head = "<head><link rel=\"stylesheet\" href=\"styles/poster.css\"><head>"
header = "<h1>DECENTRALA</h1>"
subheader = f"<h2>Plan za {MONTHS_SR[NEXT_MONTH.month - 1]}</h2>"
link = "<div id=link>dmz.rs</div>"
p1 = "<p>Radionice počinju u <strong>19h</strong> u Društvenom centru Krov u <strong>Kraljice Marije 47</strong>.</p>"
p2 = "<p>Ulaz u zgradu je u prolazu pored Štark prodavnice slatkiša, odmah pored menjačnice. DC Krov je na poslednjem spratu.</p>"
return f"<html>{head}<body><main>{header}{subheader}<table>{table}</table>{p1}{p2}{link}</main></body></html>"
def main():
events = load_events(EVENTS_CSV_PATH)
table = render_table(events)
page = render_page(table)
f = open("poster.html", "w")
f.write(page)
f.close()
if __name__ == "__main__":
main()

View File

@@ -90,6 +90,6 @@ main.addEventListener("click", (event) => {
}
});
DEBUG;
// DEBUG;
console.log(window.innerWidth);
console.log(window.innerHeight);

69
styles/poster.css Normal file
View File

@@ -0,0 +1,69 @@
html {
}
@font-face {
font-family: Facade;
src: url(../font/Facade-Sud.woff);
}
@font-face {
font-family: jetbrains-mono;
src: url(../font/JetBrainsMono-Regular.ttf);
}
html, body {
margin: 0;
padding: 0;
}
main {
max-width: 1200px;
margin: auto;
font-family: 'jetbrains-mono';
padding: 2.3rem;
}
h1 {
font-family: 'Facade';
text-align: center;
font-size: 5rem;
margin: 0rem;
}
h2 {
text-align: center;
margin-top: 0.0rem;
margin-bottom: 2rem;
font-size: 2rem;
}
p {
font-size: 1.5rem;
}
table {
margin: 4rem 0;
}
td {
font-size: 1.8rem;
padding-top: 0.5rem;
}
td:first-child {
width: 3.5rem;
}
td:nth-child(2) {
padding-right: 1rem;
}
#link {
margin-top: 8rem;
text-align: right;
font-size: 3rem;
}

149
styles/reset.css Normal file
View File

@@ -0,0 +1,149 @@
/* Copyright (c) 2023 Luka Ivanovic */
/* https://github.com/luka-hash/css-reset */
/* This code is licensed under MIT licence */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
}
a,
article,
audio,
blockquote,
body,
canvas,
caption,
code,
dd,
del,
details,
div,
dl,
dt,
em,
fieldset,
figcaption,
figure,
footer,
form,
h1,
h2,
h3,
h4,
h5,
h6,
header,
hgroup,
html,
iframe,
img,
ins,
kbd,
label,
legend,
li,
mark,
menu,
nav,
ol,
output,
p,
pre,
s,
section,
small,
span,
strong,
sub,
summary,
sup,
table,
tbody,
td,
tfoot,
th,
thead,
time,
tr,
ul,
video {
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
article,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
display: block;
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
ol,
ul {
list-style: none;
}
blockquote {
quotes: none;
}
blockquote::before,
blockquote::after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
hyphens: auto;
}

View File

@@ -34,10 +34,12 @@ body {
body {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 5rem 1fr 5rem;
grid-column-gap: 0px;
grid-row-gap: 0px;
grid-template:
"header" 10vh
"main" 1fr
"footer" 10vh
/ 1fr;
gap: 0;
font-family: 'Iosevka';
}
@@ -50,17 +52,17 @@ footer {
}
header {
grid-area: 1 / 1 / 2 / 2;
grid-area: "header";
border-bottom: 2px solid var(--border);
}
footer {
grid-area: 3 / 1 / 4 / 2;
grid-area: "footer";
border-top: 2px solid var(--border);
}
#main {
grid-area: 2 / 1 / 3 / 2;
grid-area: "main";
padding: 3rem 3rem 3rem 3rem;
font-size: 1.3rem;
line-height: 2rem;
@@ -85,7 +87,7 @@ a:focus {
text-decoration: line-through var(--text);
}
.logo {
#logo {
font-size: 3rem;
font-weight: bold;
}
@@ -98,7 +100,7 @@ a:focus {
#mesh {
position: absolute;
bottom: 5rem;
bottom: 10vh;
right: 0;
user-select: none;
pointer-events: none;
@@ -121,6 +123,20 @@ screen and (max-width: 1500px) {
}
}
.links {
display: flex;
}
@media screen and (max-width: 540px) {
#logo {
font-size: 2.2rem;
}
.links {
display: none;
}
}
#sections-button {
display: none;
}
@@ -133,8 +149,8 @@ screen and (max-width: 1500px) {
border: 2px solid var(--border);
background-color: var(--bg);
position: absolute;
bottom: calc(5rem - 2px);
left: 0;
bottom: calc(10vh - 2px);
left: calc(0px - 2px);
align-items: center;
padding: 2rem 3rem;
display: none;