start
This commit is contained in:
commit
eebfde5c9a
22 changed files with 324 additions and 0 deletions
20
LICENSE
Normal file
20
LICENSE
Normal 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
2
archetypes/default.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
+++
|
||||||
|
+++
|
0
layouts/404.html
Normal file
0
layouts/404.html
Normal file
18
layouts/_default/list.html
Normal file
18
layouts/_default/list.html
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
{{partial "head" .}}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{partial "header" .}}<hr>
|
||||||
|
<main>{{.Content}}</main>
|
||||||
|
<aside>
|
||||||
|
<ul>
|
||||||
|
{{range .Pages}}
|
||||||
|
<li><a href="{{.Permalink}}">{{.Title}}</a></li>
|
||||||
|
{{end}}
|
||||||
|
</ul></aside>
|
||||||
|
</body>
|
||||||
|
<hr>
|
||||||
|
{{partial "footer" .}}
|
||||||
|
</html>
|
25
layouts/_default/rss.xml
Normal file
25
layouts/_default/rss.xml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>{{ .Title }}</title>
|
||||||
|
<link>{{ .Permalink }}</link>
|
||||||
|
<description>{{.Params.description}}</description>
|
||||||
|
<itunes:image href="{{.Params.image}}"/>
|
||||||
|
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||||
|
<language>{{.}}</language>{{end}}
|
||||||
|
{{ with .OutputFormats.Get "RSS" }}
|
||||||
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
|
{{ 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>
|
||||||
|
<itunes:image href="{{.Params.image}}"/>
|
||||||
|
<enclosure url="{{.Params.videoURL}}" />
|
||||||
|
<description>{{- .Content | html -}}</description>
|
||||||
|
</item>
|
||||||
|
{{ end }}
|
||||||
|
</channel>
|
||||||
|
</rss>
|
12
layouts/_default/single.html
Normal file
12
layouts/_default/single.html
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
{{partial "head" .}}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{partial "header" .}}<hr>
|
||||||
|
<main>{{.Content}}</main>
|
||||||
|
</body>
|
||||||
|
<hr>
|
||||||
|
{{partial "footer" .}}
|
||||||
|
</html>
|
23
layouts/articles/rss.xml
Normal file
23
layouts/articles/rss.xml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<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}}
|
||||||
|
{{ with .OutputFormats.Get "RSS" }}
|
||||||
|
{{ printf "<atom:link href=%q rel=\"self\"/>" .Permalink .MediaType | safeHTML }}
|
||||||
|
{{ 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>
|
37
layouts/embed/index.html
Normal file
37
layouts/embed/index.html
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
margin:0;
|
||||||
|
background-color: black;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
video{
|
||||||
|
width:100vw;
|
||||||
|
max-height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<video controls id="main">
|
||||||
|
<source src="">
|
||||||
|
</video>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
//https://davidwalsh.name/query-string-javascript
|
||||||
|
function getUrlParameter(name) {
|
||||||
|
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
|
||||||
|
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
|
||||||
|
var results = regex.exec(location.search);
|
||||||
|
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
||||||
|
};
|
||||||
|
|
||||||
|
var source = document.createElement('source')
|
||||||
|
source.src = '/media/'+getUrlParameter('v');
|
||||||
|
document.getElementById('main').appendChild(source);
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
layouts/index.html
Normal file
13
layouts/index.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
{{partial "head" .}}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{partial "header" .}}<hr>
|
||||||
|
<main>{{.Content}}</main>
|
||||||
|
<aside>{{partial "sidebar" .}}</aside>
|
||||||
|
</body>
|
||||||
|
<hr>
|
||||||
|
{{partial "footer" .}}
|
||||||
|
</html>
|
3
layouts/partials/footer.html
Normal file
3
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<footer>
|
||||||
|
<p><a href="">Freedom</a> created by <a href="https://gabe.rocks">Gabriel</a></p>
|
||||||
|
</footer>
|
3
layouts/partials/head.html
Normal file
3
layouts/partials/head.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<link rel="stylesheet" href="/css/theme.css">
|
||||||
|
<link rel="stylesheet" href="/style.css">
|
||||||
|
<title>{{.Title}}</title>
|
9
layouts/partials/header.html
Normal file
9
layouts/partials/header.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<header>
|
||||||
|
<h1>{{.Site.Title }}</h1>
|
||||||
|
<nav>
|
||||||
|
<a href="/"><h3>Home</h3></a>
|
||||||
|
{{ range .Site.Sections}}
|
||||||
|
<a href="{{.Permalink}}"><h3>{{.Title}}</h3></a>
|
||||||
|
{{end}}
|
||||||
|
</nav>
|
||||||
|
</header>
|
5
layouts/partials/sidebar.html
Normal file
5
layouts/partials/sidebar.html
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<h3>Sidebar</h3>
|
||||||
|
|
||||||
|
<h4>Recent Content</h4>
|
||||||
|
|
||||||
|
<h4>Featured</h4>
|
45
layouts/podcast/rss.xml
Normal file
45
layouts/podcast/rss.xml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<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>
|
||||||
|
{{ with .Site.LanguageCode }}
|
||||||
|
<language>{{.}}</language>
|
||||||
|
{{end}}
|
||||||
|
{{ with .OutputFormats.Get "RSS" }}
|
||||||
|
{{ printf "<link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
|
{{ 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>
|
||||||
|
{{ 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=" {{.Params.audioURL}}"/>
|
||||||
|
</item>
|
||||||
|
{{ end }}
|
||||||
|
</channel>
|
||||||
|
</rss>
|
3
layouts/shortcodes/audio.html
Normal file
3
layouts/shortcodes/audio.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<audio>
|
||||||
|
<source src='{{.Get 0 }}'>
|
||||||
|
</audio>
|
2
layouts/shortcodes/embed.html
Normal file
2
layouts/shortcodes/embed.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<iframe src='{{.Get 0 }}'>
|
||||||
|
</iframe>
|
8
layouts/shortcodes/link-preview.html
Normal file
8
layouts/shortcodes/link-preview.html
Normal 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>
|
||||||
|
|
3
layouts/shortcodes/video.html
Normal file
3
layouts/shortcodes/video.html
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<video controls>
|
||||||
|
<source src='{{.Get 0 }}'>
|
||||||
|
</video>
|
16
layouts/shortcodes/webtorrent-video.html
Normal file
16
layouts/shortcodes/webtorrent-video.html
Normal 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>
|
1
readme.md
Normal file
1
readme.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
More to come
|
55
static/css/theme.css
Normal file
55
static/css/theme.css
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
body{
|
||||||
|
--theme-primary-color:black;
|
||||||
|
--theme-secondary-color:white;
|
||||||
|
--theme-accent-color:gold;
|
||||||
|
background-color: var(--theme-primary-color);
|
||||||
|
color:var(--theme-secondary-color);
|
||||||
|
width:100vw;
|
||||||
|
margin:0;
|
||||||
|
display:flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
main,aside{
|
||||||
|
border:1px solid white;
|
||||||
|
display:flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin:1.5rem;
|
||||||
|
padding:1rem;
|
||||||
|
}
|
||||||
|
main{
|
||||||
|
min-width: 40%;
|
||||||
|
max-width: 60rem;
|
||||||
|
}
|
||||||
|
aside{
|
||||||
|
min-width: 30rem;
|
||||||
|
}
|
||||||
|
header,footer{
|
||||||
|
width:100vw;
|
||||||
|
display:flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
nav{
|
||||||
|
display:flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-left:10%;
|
||||||
|
}
|
||||||
|
nav>a{
|
||||||
|
margin:1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
a,
|
||||||
|
hr{
|
||||||
|
color:var(--theme-accent-color);
|
||||||
|
}
|
||||||
|
hr{
|
||||||
|
width:100%;
|
||||||
|
margin-top:1.5rem;
|
||||||
|
margin-bottom:1.5rem;
|
||||||
|
}
|
21
theme.toml
Normal file
21
theme.toml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# theme.toml template for a Hugo theme
|
||||||
|
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
||||||
|
|
||||||
|
name = "Freedom"
|
||||||
|
license = "MIT"
|
||||||
|
licenselink = "https://codeberg.org/gabe/Freedom/blob/master/LICENSE"
|
||||||
|
description = ""
|
||||||
|
homepage = "https://codeberg.org/gabe/Freedom"
|
||||||
|
tags = []
|
||||||
|
features = []
|
||||||
|
min_version = "0.41.0"
|
||||||
|
|
||||||
|
[author]
|
||||||
|
name = "Gabriel"
|
||||||
|
homepage = "https://gabe.rocks"
|
||||||
|
|
||||||
|
# If porting an existing theme
|
||||||
|
[original]
|
||||||
|
name = ""
|
||||||
|
homepage = ""
|
||||||
|
repo = ""
|
Loading…
Reference in a new issue