This commit is contained in:
Gabriel 2022-08-17 14:47:54 -04:00
commit d80d36151b
25 changed files with 388 additions and 0 deletions

20
LICENSE Normal file
View file

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2022 YOUR_NAME_HERE
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2
archetypes/default.md Normal file
View file

@ -0,0 +1,2 @@
+++
+++

0
layouts/404.html Normal file
View file

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
</div>
{{- partial "footer.html" . -}}
</body>
</html>

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
{{partial "head" .}}
<body>
{{partial "profile" .}}
<aside id="posts">
{{range .Pages}}
{{partial "post" .}}
<hr>
{{end}}
</aside>
</body>
</html>

20
layouts/_default/rss.xml Normal file
View file

@ -0,0 +1,20 @@
<rss version="2.0">
<channel>
<title>{{.Title}}</title>
<link>{{ .Permalink }}</link>
<description>{{.Params.description}}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}
{{ range .Pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{- .Summary | html -}}</description>
<content:encoded>{{- .Content | html -}}</content:encoded>
</item>
{{ end }}
</channel>
</rss>

View file

@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
{{partial "head" .}}
<body>
{{partial "profile" .}}
</body>
</html>

13
layouts/index.html Normal file
View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
{{partial "head" .}}
<body>
{{partial "profile" .}}
<aside id="posts">
{{range first 10 .Site.RegularPages}}
{{partial "post" .}}
<hr>
{{end}}
</aside>
</body>
</html>

View file

View file

@ -0,0 +1,7 @@
<head>
<meta charset="utf-8" />
<title>{{.Title}}</title>
<link rel="stylesheet" href="/css/theme.css">
<link rel="stylesheet" href="/style2.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

View file

View file

@ -0,0 +1,9 @@
<nav>{{ range .Site.Sections }}
<a href="{{.Permalink}}">
<img src="{{.Params.icon}}">
<h2>{{.Title}}</h2>
{{if .Params.icon}}
{{end}}
</a>
{{end}}
</nav>

View file

@ -0,0 +1,10 @@
<article class="post">
<a href="{{.Permalink}}"><h2>{{.Title}}</h2></a>
{{if .Date }}
<p>{{.Date | time.Format "Jan 02 2006"}}</p>
{{end}}
{{if .Params.video}}<video controls autoplay muted loop><source src="{{.Params.video}}"></video>{{end}}
{{if .Params.audio}}<audio controls><source src="{{.Params.audio}}"></audio>{{end}}
{{if .Params.image}}<img src="{{.Params.image}}">{{end}}
<p>{{.Summary}}</p>
</article>

View file

@ -0,0 +1,37 @@
<main id="profile">
<div>
<a href="/">
<img id='profilephoto' src="{{.Site.Data.details.profilephoto}}">
</a>
<div>
<h1><a href="/">{{.Site.Data.details.name}}</a></h1>
<p>{{.Site.Data.details.bio}}</p>
{{if .Site.Data.details.contact}}
{{range .Site.Data.details.contact}}
<a href="{{.value}}">{{.name}}</a>
{{end}}
{{end}}
</div>
</div>
{{ if .Site.Data.details.links }}
<div>
<h3>Links:</h3>
</div>
<div>
{{range .Site.Data.details.links}}
<a href="{{.linkurl}}">{{.linkname}}</a><br>
{{end}}
</div>
{{end}}
{{partial "nav" .}}
{{ if .Content}}
<article>
{{.Content}}
</article>
<hr>
<div>
<p><a href="">Valor</a> made by <a href="https://gabe.rocks">Gabriel</a></p>
</div>
{{end}}
</main>

40
layouts/podcast/rss.xml Normal file
View file

@ -0,0 +1,40 @@
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<description>{{.Params.description}}</description>
{{ if .Params.image}}
<image href=" {{.Params.image}}"/>
<itunes:image href=" {{.Params.image}}"/>
{{else}}
<image href="/logo.png"/>
<itunes:image href="/logo.png"/>
{{end}}
<generator>Hugo -- gohugo.io</generator>
<language>en-ca</language>
{{ range .Pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}
<author>{{.}}
{{ with $.Site.Author.name }}
({{.}})
{{end}}
</author>
{{end}}
<guid>{{ .Permalink }}</guid>
{{ if .Params.image}}
<image href="{{.Params.image}}"/>
<itunes:image href="{{.Params.image}}"/>
{{else}}
<image href="/logo.png"/>
<itunes:image href="/logo.png"/>
{{end}}
<description>{{- .Summary | html -}}</description>
<enclosure url="{{.Site.BaseURL}}{{.Params.audio}}"/>
</item>
{{ end }}
</channel>
</rss>

View file

@ -0,0 +1,3 @@
<audio controls>
<source src='{{.Get 0 }}'>
</audio>

View file

@ -0,0 +1,2 @@
<iframe src='{{.Get 0 }}'>
</iframe>

View file

@ -0,0 +1,14 @@
{{ if .Get "href"}}
<a href='{{.Get "href"}}'>
{{end}}
<img
src='{{.Get "src"}}'
{{if .Get "alt"}}
alt='{{.Get "alt"}}'
{{end}}
{{if .Get "float"}}
style='float:{{.Get "float"}}'
{{end}}>
{{ if .Get "href"}}
</a>
{{end}}

View file

@ -0,0 +1,8 @@
<a href="{{ .Get 0 }}" class="link-preview">
<img src='{{.Get 3}}'>
<div>
<h3>{{ .Get 1 }}</h3>
<p>{{.Get 2 }}</p>
</div>
</a>

View file

@ -0,0 +1,3 @@
<video controls>
<source src='{{.Get 0 }}'>
</video>

View file

@ -0,0 +1,16 @@
<script src="/webtorrent.js"></script>
<div id="wtmedia">
</div>
<script>
const client = new WebTorrent(tracker=false,dht=true,webSeeds=true);
const magnetURI = '{{.Get 0}}';
client.add(magnetURI, function (torrent) {
// Got torrent metadata!
console.log('Client is downloading:', torrent.infoHash)
torrent.files.forEach(function (file) {
// Display the file by appending it to the DOM. Supports video, audio, images, and
// more. Specify a container element (CSS selector or reference to DOM node).
file.appendTo('#wtmedia')
})
})
</script>

View file

@ -0,0 +1,3 @@
<a href="https://webring.yesterweb.org/noJS/index.php?d=prev&url=https://yesterweb.org/">Previous</a>
<a href="https://webring.yesterweb.org/noJS/index.php?d=rand&url=https://yesterweb.org/">Random</a>
<a href="https://webring.yesterweb.org/noJS/index.php?d=next&url=https://yesterweb.org/">Next</a>

1
readme.md Normal file
View file

@ -0,0 +1 @@
More to come

128
static/css/theme.css Normal file
View file

@ -0,0 +1,128 @@
body{
--theme-primary-color:black;
--theme-secondary-color: white;
--theme-accent:rgb(29, 148, 196);
--theme-accent2:gold;
--theme-accent3:rgb(211, 43, 43);
color:var(--theme-secondary-color);
background-color: var(--theme-primary-color);
display:flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: flex-start;
justify-content: space-evenly;
width:100vw;
margin:0;
padding:0;
overflow-x: hidden;
}
a,a:visited,hr{
color:var(--theme-accent2);
}
hr{
width:100%;
color:var(--theme-accent);
margin-top:1rem;
margin-bottom:1rem;
}
iframe,
video,
img,
audio{
max-width:100%;
max-height: 30vh;
margin:1.5rem;
}
#profile{
padding:1rem;
margin-bottom:1rem;
min-width: 20vw;
}
#posts{
padding:1rem;
margin-bottom:1rem;
min-width: 20vw;
}
#profile{
max-width:50rem;
}
#posts{
width:40vw;
}
.post{
padding:1rem;
}
#post>img
#profile{
display:flex;
flex-direction: column;
}
#profilephoto{
margin:1rem;
max-width: 10rem;
}
#profile>nav,
#profile>div{
width:100%;
display:flex;
flex-direction: row;
align-items: flex-start;
justify-content:space-evenly;
flex-wrap: wrap;
}
#profile>#details{
flex-direction: column;
}
nav{
display:flex;
flex-direction: row;
align-items: baseline;
justify-content:space-evenly;
}
nav>a{
margin:1.5rem;
}
@media screen and (orientation: portrait){
body{
flex-direction: column;
font-size:1rem;
}
#profile,#posts{
max-height: none;
width:92vw;
overflow-y:initial;
}
}
article{
display:flex;
flex-direction: column;
align-items: center;
}
article p,
article h3,
article ul,
article ol,
article table{
text-align: left;
width:100%;
}
article img{
}

21
theme.toml Normal file
View file

@ -0,0 +1,21 @@
# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
name = "Valor"
license = "MIT"
licenselink = "https://codeberg.org/gabe/Valor/blob/master/LICENSE"
description = ""
homepage = "https://codeberg.org/gabe/Valor"
tags = []
features = []
min_version = "0.41.0"
[author]
name = "Gabriel"
homepage = "https://gabe.rocks"
# If porting an existing theme
[original]
name = ""
homepage = ""
repo = ""