Merge pull request '[Website] add the initial boilerplate for website' (#5) from website into master
Reviewed-on: Serene/Serene#5
This commit is contained in:
commit
962689f4a6
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
date: {{ .Date }}
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
theme = "anybodyhome"
|
||||||
|
baseURL = "https://serene-lang.org/"
|
||||||
|
languageCode = "en-us"
|
||||||
|
title = "Serene"
|
||||||
|
|
||||||
|
[params]
|
||||||
|
subtitle = "A Simple programming language"
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
title: "Welcome to Serene's website"
|
||||||
|
date: 2021-01-01T22:08:28Z
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
|
|
||||||
|
We’ll have posts available here about important news and features.
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?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 My New Hugo Site</title>
|
||||||
|
<link>http://example.org/categories/</link>
|
||||||
|
<description>Recent content in Categories on My New Hugo Site</description>
|
||||||
|
<generator>Hugo -- gohugo.io</generator>
|
||||||
|
<language>en-us</language><atom:link href="http://example.org/categories/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<channel>
|
||||||
|
<title>My New Hugo Site</title>
|
||||||
|
<link>http://example.org/</link>
|
||||||
|
<description>Recent content on My New Hugo Site</description>
|
||||||
|
<generator>Hugo -- gohugo.io</generator>
|
||||||
|
<language>en-us</language><atom:link href="http://example.org/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?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>http://example.org/categories/</loc>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>http://example.org/</loc>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>http://example.org/tags/</loc>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
</urlset>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?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 My New Hugo Site</title>
|
||||||
|
<link>http://example.org/tags/</link>
|
||||||
|
<description>Recent content in Tags on My New Hugo Site</description>
|
||||||
|
<generator>Hugo -- gohugo.io</generator>
|
||||||
|
<language>en-us</language><atom:link href="http://example.org/tags/index.xml" rel="self" type="application/rss+xml" />
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -0,0 +1,20 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2016 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.
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Anybody Home?
|
||||||
|
|
||||||
|
![anybodyhome](https://github.com/lasseborly/anybodyhome/blob/master/images/screenshot.png "Anybody Home?")
|
||||||
|
|
||||||
|
A simple theme for simple people with simple needs.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
* __Blog only__ - Only a list of the 10 most recent posts and added pagination. There is no other pages than the main page and the post page.
|
||||||
|
* [__Highlight.js__](https://highlightjs.org/) - For all of you code needs.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
From the root of you Hugo site clone the theme into `themes/anybodyhome` by running:
|
||||||
|
|
||||||
|
`git clone https://github.com/lasseborly/anybodyhome.git themes/anybodyhome`
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
To use Anybody Home? you must first, from the root of your Hugo site, run either:
|
||||||
|
|
||||||
|
`hugo -t anybodyhome`
|
||||||
|
|
||||||
|
or set in you `config.toml`.
|
||||||
|
|
||||||
|
`theme = "anybodyhome"`
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
You can set the normal Hugo site variables in your `config.toml` but there is also some custom Anybody Home? variables you can set. This is an example of a full `config.toml`.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
theme = "anybodyhome"
|
||||||
|
baseurl = "https://hugosite.com"
|
||||||
|
languageCode = "en-us"
|
||||||
|
title = "Anybody Home?"
|
||||||
|
|
||||||
|
[params]
|
||||||
|
subtitle = "A Simple Theme"
|
||||||
|
```
|
|
@ -0,0 +1,2 @@
|
||||||
|
+++
|
||||||
|
+++
|
|
@ -0,0 +1,10 @@
|
||||||
|
{{ if .Paginator.HasPrev }}
|
||||||
|
<a href="{{ .Paginator.Prev.URL }}">
|
||||||
|
Previous Page
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Paginator.HasNext }}
|
||||||
|
<a href="{{ .Paginator.Next.URL }}">
|
||||||
|
Next Page
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,15 @@
|
||||||
|
{{ partial "head.html" . }}
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
{{ $baseurl := .Site.BaseURL }}
|
||||||
|
<div id="post">
|
||||||
|
<section>
|
||||||
|
<h2>{{ .Title }}</h2>
|
||||||
|
<time>{{ .Date.Format "2. January, 2006"}}</time>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<article>
|
||||||
|
{{ .Content }}
|
||||||
|
</article>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
{{ partial "footer.html" . }}
|
|
@ -0,0 +1,9 @@
|
||||||
|
<section class="summary">
|
||||||
|
<h2>
|
||||||
|
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||||
|
</h2>
|
||||||
|
<time>{{ .Date.Format "2. January, 2006"}}</time>
|
||||||
|
<article>
|
||||||
|
<p>{{ .Summary }}</p>
|
||||||
|
</article>
|
||||||
|
</section>
|
|
@ -0,0 +1,17 @@
|
||||||
|
{{ partial "head.html" . }}
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
|
<main>
|
||||||
|
{{ range (.Paginator 5).Pages }}
|
||||||
|
{{ .Render "summary" }}
|
||||||
|
{{ end }}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
{{ partial "paginator.html" . }}
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
|
||||||
|
</body>
|
|
@ -0,0 +1,43 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<base href="{{ .Site.BaseURL }}">
|
||||||
|
|
||||||
|
<title>{{ .Site.Title }}</title>
|
||||||
|
|
||||||
|
<link
|
||||||
|
rel="canonical"
|
||||||
|
href="{{ .Permalink }}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<link
|
||||||
|
href="{{ .RSSLink }}"
|
||||||
|
rel="alternate"
|
||||||
|
type="application/rss+xml"
|
||||||
|
title="{{ .Site.Title }}"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
type="text/css"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
type="text/css"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js">
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
hljs.initHighlightingOnLoad();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
type="text/css"
|
||||||
|
href="/css/styles.css"
|
||||||
|
/>
|
||||||
|
</head>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<section id="header">
|
||||||
|
<h1>
|
||||||
|
<a href="{{.Site.BaseURL}}">{{.Site.Title}}</a>
|
||||||
|
</h1>
|
||||||
|
<h2>{{.Site.Params.subtitle}}</h2>
|
||||||
|
</section>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<section id="paginator">
|
||||||
|
{{ if .Paginator.HasPrev }}
|
||||||
|
<a id="previous" href="{{ .Paginator.Prev.URL }}">
|
||||||
|
Previous Page
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Paginator.HasNext }}
|
||||||
|
<a id="next" href="{{ .Paginator.Next.URL }}">
|
||||||
|
Next Page
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</section>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<section id="main">
|
||||||
|
<h1 id="title">{{ .Title }}</h1>
|
||||||
|
<h4 id="date">{{ .Date.Format "2. January, 2006"}}</h4>
|
||||||
|
<div>
|
||||||
|
<article id="content">
|
||||||
|
{{ .Summary }}
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</section>
|
|
@ -0,0 +1,162 @@
|
||||||
|
@import 'https://fonts.googleapis.com/css?family=Lobster|Quicksand|Cutive+Mono';
|
||||||
|
|
||||||
|
body {
|
||||||
|
width: 600px;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 400;
|
||||||
|
font-family: 'Quicksand', sans-serif;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media(max-device-width: 667px) {
|
||||||
|
body {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 80px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #336699;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #C0C0C0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
line-height: 1.4;
|
||||||
|
text-align: justify;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media(max-device-width: 667px) {
|
||||||
|
p {
|
||||||
|
font-size: 3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
section#header {
|
||||||
|
margin: 40px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
section#header h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
text-align: center;
|
||||||
|
font-family: 'Lobster', cursive;
|
||||||
|
margin: 0 0 9px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media(max-device-width: 667px) {
|
||||||
|
section#header h1 {
|
||||||
|
font-size: 6em;
|
||||||
|
margin: 0 0 30px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
section#header h2 {
|
||||||
|
font-family: 'Cutive Mono', monospace;
|
||||||
|
font-size: 0.8em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media(max-device-width: 667px) {
|
||||||
|
section#header h2 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
section.summary {
|
||||||
|
padding: 0 0 0 10px;
|
||||||
|
border-left: 1px solid black;
|
||||||
|
margin: 0 0 60px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media(max-device-width: 667px) {
|
||||||
|
section.summary {
|
||||||
|
padding: 0 0 0 0;
|
||||||
|
border-left: 0px solid black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
section.summary article {
|
||||||
|
margin: 15px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
section h2 {
|
||||||
|
font-size: 1.3em;
|
||||||
|
font-family: 'Lobster', cursive;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media(max-device-width: 667px) {
|
||||||
|
section h2 {
|
||||||
|
font-size: 4em;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
section h2 a {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
section time {
|
||||||
|
font-family: 'Cutive Mono', monospace;
|
||||||
|
margin: 0 0 0 2px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
section article {
|
||||||
|
margin: 15px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
section#paginator {
|
||||||
|
margin: 0 0 140px 0;
|
||||||
|
font-family: 'Lobster', cursive;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media(max-device-width: 667px) {
|
||||||
|
section#paginator {
|
||||||
|
font-size: 5em;
|
||||||
|
padding-bottom: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
section#paginator #next {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
#post {
|
||||||
|
margin: 0 0 100px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.videoWrapper {
|
||||||
|
position: relative;
|
||||||
|
padding-bottom: 56.25%; /* 16:9 */
|
||||||
|
padding-top: 25px;
|
||||||
|
height: 0;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
.videoWrapper iframe {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
name = "Anybody Home"
|
||||||
|
license = "MIT"
|
||||||
|
licenselink = "https://github.com/lasseborly/anybodyhome/blob/master/LICENSE.md"
|
||||||
|
description = "A simple theme for simple people with simple needs"
|
||||||
|
homepage = "https://github.com/lasseborly/anybodyhome/"
|
||||||
|
tags = ["clean", "simple"]
|
||||||
|
features = ["highlightjs", "Blog only"]
|
||||||
|
min_version = 0.16
|
||||||
|
|
||||||
|
[author]
|
||||||
|
name = "Lasse Borly"
|
||||||
|
homepage = "https://lasseborly.com/"
|
Loading…
Reference in New Issue