From abe2ca395ff926f1743f9b1198cab66c470d6417 Mon Sep 17 00:00:00 2001 From: Mary Salehi Date: Fri, 1 Jan 2021 23:09:53 +0000 Subject: [PATCH] [Website] add the initial boilerplate for website --- website/site/archetypes/default.md | 6 + website/site/config.toml | 7 + website/site/content/posts/my-first-post.md | 7 + website/site/public/categories/index.xml | 10 ++ website/site/public/index.xml | 10 ++ website/site/public/sitemap.xml | 17 ++ website/site/public/tags/index.xml | 10 ++ website/site/themes/anybodyhome/LICENSE.md | 20 +++ website/site/themes/anybodyhome/README.md | 36 ++++ .../themes/anybodyhome/archetypes/default.md | 2 + .../site/themes/anybodyhome/layouts/404.html | 0 .../layouts/_default/paginator.html | 10 ++ .../anybodyhome/layouts/_default/single.html | 15 ++ .../anybodyhome/layouts/_default/summary.html | 9 + .../themes/anybodyhome/layouts/index.html | 17 ++ .../anybodyhome/layouts/partials/footer.html | 0 .../anybodyhome/layouts/partials/head.html | 43 +++++ .../anybodyhome/layouts/partials/header.html | 6 + .../layouts/partials/paginator.html | 12 ++ .../themes/anybodyhome/layouts/summary.html | 9 + .../themes/anybodyhome/static/css/styles.css | 162 ++++++++++++++++++ website/site/themes/anybodyhome/theme.toml | 12 ++ 22 files changed, 420 insertions(+) create mode 100644 website/site/archetypes/default.md create mode 100644 website/site/config.toml create mode 100644 website/site/content/posts/my-first-post.md create mode 100644 website/site/public/categories/index.xml create mode 100644 website/site/public/index.xml create mode 100644 website/site/public/sitemap.xml create mode 100644 website/site/public/tags/index.xml create mode 100644 website/site/themes/anybodyhome/LICENSE.md create mode 100644 website/site/themes/anybodyhome/README.md create mode 100644 website/site/themes/anybodyhome/archetypes/default.md create mode 100644 website/site/themes/anybodyhome/layouts/404.html create mode 100644 website/site/themes/anybodyhome/layouts/_default/paginator.html create mode 100644 website/site/themes/anybodyhome/layouts/_default/single.html create mode 100644 website/site/themes/anybodyhome/layouts/_default/summary.html create mode 100644 website/site/themes/anybodyhome/layouts/index.html create mode 100644 website/site/themes/anybodyhome/layouts/partials/footer.html create mode 100644 website/site/themes/anybodyhome/layouts/partials/head.html create mode 100644 website/site/themes/anybodyhome/layouts/partials/header.html create mode 100644 website/site/themes/anybodyhome/layouts/partials/paginator.html create mode 100644 website/site/themes/anybodyhome/layouts/summary.html create mode 100644 website/site/themes/anybodyhome/static/css/styles.css create mode 100644 website/site/themes/anybodyhome/theme.toml diff --git a/website/site/archetypes/default.md b/website/site/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/website/site/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/website/site/config.toml b/website/site/config.toml new file mode 100644 index 0000000..b3940b3 --- /dev/null +++ b/website/site/config.toml @@ -0,0 +1,7 @@ +theme = "anybodyhome" +baseURL = "https://serene-lang.org/" +languageCode = "en-us" +title = "Serene" + +[params] + subtitle = "A Simple programming language" diff --git a/website/site/content/posts/my-first-post.md b/website/site/content/posts/my-first-post.md new file mode 100644 index 0000000..c11c56a --- /dev/null +++ b/website/site/content/posts/my-first-post.md @@ -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. diff --git a/website/site/public/categories/index.xml b/website/site/public/categories/index.xml new file mode 100644 index 0000000..b92677a --- /dev/null +++ b/website/site/public/categories/index.xml @@ -0,0 +1,10 @@ + + + + Categories on My New Hugo Site + http://example.org/categories/ + Recent content in Categories on My New Hugo Site + Hugo -- gohugo.io + en-us + + diff --git a/website/site/public/index.xml b/website/site/public/index.xml new file mode 100644 index 0000000..da90485 --- /dev/null +++ b/website/site/public/index.xml @@ -0,0 +1,10 @@ + + + + My New Hugo Site + http://example.org/ + Recent content on My New Hugo Site + Hugo -- gohugo.io + en-us + + diff --git a/website/site/public/sitemap.xml b/website/site/public/sitemap.xml new file mode 100644 index 0000000..6bf7bad --- /dev/null +++ b/website/site/public/sitemap.xml @@ -0,0 +1,17 @@ + + + + + http://example.org/categories/ + + + + http://example.org/ + + + + http://example.org/tags/ + + + diff --git a/website/site/public/tags/index.xml b/website/site/public/tags/index.xml new file mode 100644 index 0000000..201eda6 --- /dev/null +++ b/website/site/public/tags/index.xml @@ -0,0 +1,10 @@ + + + + Tags on My New Hugo Site + http://example.org/tags/ + Recent content in Tags on My New Hugo Site + Hugo -- gohugo.io + en-us + + diff --git a/website/site/themes/anybodyhome/LICENSE.md b/website/site/themes/anybodyhome/LICENSE.md new file mode 100644 index 0000000..e1265aa --- /dev/null +++ b/website/site/themes/anybodyhome/LICENSE.md @@ -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. diff --git a/website/site/themes/anybodyhome/README.md b/website/site/themes/anybodyhome/README.md new file mode 100644 index 0000000..719016c --- /dev/null +++ b/website/site/themes/anybodyhome/README.md @@ -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" +``` diff --git a/website/site/themes/anybodyhome/archetypes/default.md b/website/site/themes/anybodyhome/archetypes/default.md new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/website/site/themes/anybodyhome/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/website/site/themes/anybodyhome/layouts/404.html b/website/site/themes/anybodyhome/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/website/site/themes/anybodyhome/layouts/_default/paginator.html b/website/site/themes/anybodyhome/layouts/_default/paginator.html new file mode 100644 index 0000000..b0483b7 --- /dev/null +++ b/website/site/themes/anybodyhome/layouts/_default/paginator.html @@ -0,0 +1,10 @@ +{{ if .Paginator.HasPrev }} + + Previous Page + +{{ end }} +{{ if .Paginator.HasNext }} + + Next Page + +{{ end }} diff --git a/website/site/themes/anybodyhome/layouts/_default/single.html b/website/site/themes/anybodyhome/layouts/_default/single.html new file mode 100644 index 0000000..af39af1 --- /dev/null +++ b/website/site/themes/anybodyhome/layouts/_default/single.html @@ -0,0 +1,15 @@ +{{ partial "head.html" . }} +{{ partial "header.html" . }} +{{ $baseurl := .Site.BaseURL }} +
+
+

{{ .Title }}

+ +
+
+
+ {{ .Content }} +
+
+
+{{ partial "footer.html" . }} diff --git a/website/site/themes/anybodyhome/layouts/_default/summary.html b/website/site/themes/anybodyhome/layouts/_default/summary.html new file mode 100644 index 0000000..f9ec1db --- /dev/null +++ b/website/site/themes/anybodyhome/layouts/_default/summary.html @@ -0,0 +1,9 @@ +
+

+ {{ .Title }} +

+ +
+

{{ .Summary }}

+
+
diff --git a/website/site/themes/anybodyhome/layouts/index.html b/website/site/themes/anybodyhome/layouts/index.html new file mode 100644 index 0000000..e646657 --- /dev/null +++ b/website/site/themes/anybodyhome/layouts/index.html @@ -0,0 +1,17 @@ +{{ partial "head.html" . }} + + + +{{ partial "header.html" . }} + +
+ {{ range (.Paginator 5).Pages }} + {{ .Render "summary" }} + {{ end }} +
+ +{{ partial "paginator.html" . }} + +{{ partial "footer.html" . }} + + diff --git a/website/site/themes/anybodyhome/layouts/partials/footer.html b/website/site/themes/anybodyhome/layouts/partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/website/site/themes/anybodyhome/layouts/partials/head.html b/website/site/themes/anybodyhome/layouts/partials/head.html new file mode 100644 index 0000000..1b795d0 --- /dev/null +++ b/website/site/themes/anybodyhome/layouts/partials/head.html @@ -0,0 +1,43 @@ + + + + + + {{ .Site.Title }} + + + + + + + + + + + + + diff --git a/website/site/themes/anybodyhome/layouts/partials/header.html b/website/site/themes/anybodyhome/layouts/partials/header.html new file mode 100644 index 0000000..37fbaac --- /dev/null +++ b/website/site/themes/anybodyhome/layouts/partials/header.html @@ -0,0 +1,6 @@ + diff --git a/website/site/themes/anybodyhome/layouts/partials/paginator.html b/website/site/themes/anybodyhome/layouts/partials/paginator.html new file mode 100644 index 0000000..2fac42a --- /dev/null +++ b/website/site/themes/anybodyhome/layouts/partials/paginator.html @@ -0,0 +1,12 @@ +
+{{ if .Paginator.HasPrev }} + +{{ end }} +{{ if .Paginator.HasNext }} + +{{ end }} +
diff --git a/website/site/themes/anybodyhome/layouts/summary.html b/website/site/themes/anybodyhome/layouts/summary.html new file mode 100644 index 0000000..743b45a --- /dev/null +++ b/website/site/themes/anybodyhome/layouts/summary.html @@ -0,0 +1,9 @@ +
+

{{ .Title }}

+

{{ .Date.Format "2. January, 2006"}}

+
+
+ {{ .Summary }} +
+
+
diff --git a/website/site/themes/anybodyhome/static/css/styles.css b/website/site/themes/anybodyhome/static/css/styles.css new file mode 100644 index 0000000..c145e67 --- /dev/null +++ b/website/site/themes/anybodyhome/static/css/styles.css @@ -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%; +} diff --git a/website/site/themes/anybodyhome/theme.toml b/website/site/themes/anybodyhome/theme.toml new file mode 100644 index 0000000..40e53ee --- /dev/null +++ b/website/site/themes/anybodyhome/theme.toml @@ -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/"