This commit is contained in:
2023-12-18 16:51:47 +01:00
commit 88741b2303
36 changed files with 1490 additions and 0 deletions

16
web/data/articles.html Normal file
View File

@@ -0,0 +1,16 @@
{{define "articlesHTML"}}
<ol reversed>
{{range .articles}}
<li>
<div class="article_content">
<a href="/{{.ID}}/{{.Slug}}">
{{.Title}}</a></div>
<div class="timestamp">{{.SourceName}} - {{ .FormatedCreatedAt }}</div>
</li>
<br><br>
{{else}}
Nema članaka za izabrani datum.
{{end}}
</ol>
{{end}}

13
web/data/footer.html Normal file
View File

@@ -0,0 +1,13 @@
{{define "footerHTML"}}
<footer>
SN
<div>
<nav>
<a href="{{.previous}}">&lt;----</a> |
<a href="/">Početna</a> |
<a href="{{.next}}">----&gt;</a>
</nav>
</div>
</footer>
{{end}}

56
web/data/head.html Normal file
View File

@@ -0,0 +1,56 @@
{{define "headHTML"}}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta property="og:site_name" content="starenovine">
<meta name="twitter:card" content="preview">
<meta property="og:title" content="{{.title}}">
<meta name="description" content="stare novine omogucavaju citanje svih vijesti iz bosne i hercegovine, hrvatske, srbije, crne gore, kosova na bosanskom, crnogorskom, hrvatskom, srpskom jeziku na svim uredjajima koliko god stari bili">
<meta property="og:url" content="https://www.starenovine.com">
<title>{{.title}} - stare novine</title>
<link rel="canonical" href="https://www.starenovine.com/">
<style type="text/css">
body {
font-family: monospace;
font-size: 1.5em;
width: 90%;
max-width: 98vw;
}
h1#title {
margin-block-end: 0;
font-size: 1.7em;
}
.timestamp {
font-size: 0.8em;
color: gray;
}
.single_timestamp {
font-size: 0.77em;
margin-bottom: 0.7em;
color: gray;
}
#logo {
font-size: 2vw;
background: white;
}
pre.article_content {
background: white;
}
html {
margin: 0 auto;
max-width: 98vw;
overflow-x: hidden;
}
</style>
</head>
{{end}}

20
web/data/header.html Normal file
View File

@@ -0,0 +1,20 @@
{{define "headerHTML"}}
<header>
<pre id="logo">
_____ ______ ____ ____ ___ ____ ___ __ __ ____ ____ ___
/ ___/| | / || \ / _]| \ / \ | | || || \ / _]
( \_ | || o || D ) / [_ | _ || || | | | | | _ | / [_
\__ ||_| |_|| || / | _]| | || O || | | | | | | || _]
/ \ | | | | _ || \ | [_ | | || || : | | | | | || [_
\ | | | | | || . \| || | || | \ / | | | | || |
\___| |__| |__|__||__|\_||_____||__|__| \___/ \_/ |____||__|__||_____|
</pre>
<br>
<nav>
<a href="{{.previous}}">&lt;----</a> |
<a href="/">Početna</a> |
<a href="{{.next}}">----&gt;</a>
</nav>
</header>
{{end}}

View File

@@ -0,0 +1,11 @@
{{define "singleArticleHTML"}}
{{with .article }}
<div class="article_content">
<h1 id="title">{{.Title}}</h1>
<div class="single_timestamp">{{.SourceName}} - {{ .FormatedCreatedAt }}</div>
<div class="article_body">
{{.Content}}
</div>
<br><br>
{{end}}
{{end}}