From 47dc3ae938e1124541593342138fa0e5ef3e6fdd Mon Sep 17 00:00:00 2001 From: Marc Riera Irigoyen Date: Tue, 13 Mar 2018 21:38:44 +0100 Subject: [PATCH] Add theme data --- archetypes/default.md | 2 + i18n/ca.toml | 11 + i18n/en.toml | 11 + i18n/es.toml | 11 + layouts/404.html | 3 + layouts/_default/list.html | 25 ++ layouts/_default/single.html | 9 + layouts/index.html | 3 + layouts/partials/footer.html | 12 + layouts/partials/header.html | 63 ++++ layouts/partials/menu.html | 32 ++ layouts/partials/pagination.html | 16 + layouts/partials/tags.html | 5 + layouts/shortcodes/summary.html | 3 + static/css/style.css | 512 +++++++++++++++++++++++++++++++ theme.toml | 8 + 16 files changed, 726 insertions(+) create mode 100644 archetypes/default.md create mode 100644 i18n/ca.toml create mode 100644 i18n/en.toml create mode 100644 i18n/es.toml create mode 100644 layouts/404.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/menu.html create mode 100644 layouts/partials/pagination.html create mode 100644 layouts/partials/tags.html create mode 100644 layouts/shortcodes/summary.html create mode 100644 static/css/style.css create mode 100644 theme.toml diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/i18n/ca.toml b/i18n/ca.toml new file mode 100644 index 0000000..a6f114f --- /dev/null +++ b/i18n/ca.toml @@ -0,0 +1,11 @@ +[menu] +other = "Menú" + +[readMore] +other = "Llegeix més" + +[newer] +other = "Més recent" + +[older] +other = "Més antic" diff --git a/i18n/en.toml b/i18n/en.toml new file mode 100644 index 0000000..5b35ba9 --- /dev/null +++ b/i18n/en.toml @@ -0,0 +1,11 @@ +[menu] +other = "Menu" + +[readMore] +other = "Read more" + +[newer] +other = "Newer" + +[older] +other = "Older" diff --git a/i18n/es.toml b/i18n/es.toml new file mode 100644 index 0000000..b8edb79 --- /dev/null +++ b/i18n/es.toml @@ -0,0 +1,11 @@ +[menu] +other = "Menú" + +[readMore] +other = "Leer más" + +[newer] +other = "Más reciente" + +[older] +other = "Más antiguo" diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..b1ccd45 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,3 @@ +{{ partial "header.html" . }} + Page not found. +{{ partial "footer.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..6b6b0a3 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,25 @@ +{{ partial "header.html" . }} + + {{ range sort .Paginator.Pages }} +
+

{{ .Title }}

+
+ {{ .Summary | plainify | safeHTML }} + ... + +
+
+ {{ if .Params.tags }} + {{ partial "tags" .Params.tags }} + {{ end }} + {{ end }} + {{ partial "pagination.html" . }} + +{{ partial "footer.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..2bb9b3d --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,9 @@ +{{ partial "header.html" . }} +{{ if not .Date.IsZero }} +

{{ .Date.Format "02-01-2006" }}

+{{ end }} +{{ .Content }} +{{ if .Params.tags }} + {{ partial "tags" .Params.tags }} +{{ end }} +{{ partial "footer.html" . }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..16f6ffc --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,3 @@ +{{ partial "header.html" . }} +{{ .Content }} +{{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..4010777 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..cd92436 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,63 @@ + + + + {{ .Title }} - {{ .Site.Title }} + + + + {{ .Hugo.Generator }} + + + + {{ if isset .Site.Params "mathjax"}} + + {{end}} + + + + +
+ +
+ + + + +
{{ .Site.Params.Description }}
+ + +
+ +
+ {{ if .IsTranslated }} + + {{ end }} +
+ + {{ partial "menu.html" . }} + + {{ if isset .Params "image"}} + + {{end}} +
+
+

{{ .Title }}

+
+
+ +
+
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html new file mode 100644 index 0000000..7c67cb2 --- /dev/null +++ b/layouts/partials/menu.html @@ -0,0 +1,32 @@ + diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html new file mode 100644 index 0000000..9caef8d --- /dev/null +++ b/layouts/partials/pagination.html @@ -0,0 +1,16 @@ +{{ $pag := .Paginator }} +{{ if gt $pag.TotalPages 1 }} + +{{ end }} diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html new file mode 100644 index 0000000..908c55e --- /dev/null +++ b/layouts/partials/tags.html @@ -0,0 +1,5 @@ +

+ Tags: {{ range . }} + {{ . }} + {{ end }} +

diff --git a/layouts/shortcodes/summary.html b/layouts/shortcodes/summary.html new file mode 100644 index 0000000..9de6169 --- /dev/null +++ b/layouts/shortcodes/summary.html @@ -0,0 +1,3 @@ +
+ {{ .Inner }} +
diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..2f6d9af --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,512 @@ +@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i,500,500i,600,600i,700,700i'); + +html { + background: #222222; +} + +html, +body, +h1, +h2, +h3, +h4, +h5, +h6 { + color: #BBBBBB; + font-family: 'Open Sans', sans-serif; +} + +#container { + background: #292929; + margin: auto; + border-style: solid; + border-radius: 10px; + border-color: #252525; +} + +#header-left { + padding-top: 15px; + float: left; + width: 60%; +} + +#header-right { + padding-top: 15px; + float: right; + width: 40%; +} + +#site-logo { + float: left; + height: 100px; + width: 100px; + padding: 0 20px 0 20px; +} + +#site-title, +a:link, +a:active, +a:visited { + color: #BBBBBB; +} + +a:hover { + color: #208DCC; +} + +#site-title { + padding: 10px 20px 0 0; + font-weight: 600; + font-size: 36px; +} + +a:link, +a:active, +a:visited, +a:hover { + text-decoration: none; +} + +p a:link, +p a:active, +p a:visited, +p a:hover { + color: #208DCC; +} + +#footer { + background: #3E3E3E; + color: #BBBBBB; + padding: 10px 20px 10px 20px; + clear: both; + font-size: 12px; +} + +nav { + clear: both; + text-align: right; +} + +nav ul { + list-style-type: none; + padding: 0; +} + +nav ul.first > li { + display: block; + text-align: left; +} + +nav ul li a { + display: block; + font-size: 90%; +} + +nav a:link, +nav a:active, +nav a:visited, +nav a:hover { + text-decoration: none; +} + +nav a:link, +nav a:active, +nav a:visited { + color: #BBBBBB; +} + +nav a:hover { + color: #208DCC; +} + +nav a.selected { + color: #208DCC; +} + +#content, +#page-title { + padding: 10px 20px 10px 20px; +} + +#content { + margin-bottom: 20px; +} + +#page-title h1 { + margin: 0; +} + +h1 { + font-size: 150%; + font-weight: 600; +} + +h2 { + font-size: 140%; + font-weight: 600; +} + +h3 { + font-size: 130%; +} + +h4 { + font-size: 120%; +} + +h5 { + font-size: 110%; +} + +h6 { + font-size: 100%; +} + +#article p, #article ol li, #article ul li { + text-align: justify; +} + +#article blockquote { + font-family: 'Lora', serif; + font-style: italic; + font-size: 1.05em; + line-height: 1.5em; +} + +#article dl dt { + font-weight: bold; +} + +#article dl dt em { + font-weight: normal; +} + +#article .timestamp, +#article .tags, +#article .tags a:link, +#article .tags a:active, +#article .tags a:visited, +#article .tags a:hover { + color: #777; +} + +#article .timestamp { + padding-bottom: 1em; +} + +hr { + border-bottom: 0; + border-left: 0; + border-right: 0; + margin: 2.5em 0; +} + +span.upper { + text-transform: uppercase; +} + +img.right { + float: right; + margin: 0 0 1em 1em; +} + +img.left { + float: left; + margin: 0 1em 1em 0; +} + +img { + margin: auto; + max-width:100%; + max-height:100%; + display: block; +} + +#featured-image img { + max-width:100%; + max-height:100%; + display: block; +} + + + +ul.pagination { + padding: 0; + list-style-type: none; + text-align: center; +} + +.pagination li { + display: inline; + margin: 10px; +} + +.pagination .active a:link, +.pagination .active a:active, +.pagination .active a:visited, +.pagination .active a:hover, +.pagination .disabled a:link, +.pagination .disabled a:active, +.pagination .disabled a:visited, +.pagination .disabled a:hover, +.pagination .previous-disabled, +.pagination .next-disabled { + color: #555; + text-decoration: none; +} + +table, +th, +td { + border: 1px solid grey; + border-collapse: collapse; + margin: auto; + text-align: center; +} + +th { + display:none; +} + +table img { + display: inline; + vertical-align: middle; + padding: 2px 2px 2px 2px; + box-sizing: border-box; +} + +#page-title-container { + background: #3E3E3E; + border-top: 1px solid #444444; + border-bottom: 1px solid #444444; + display: block; +} + +#paginator-page { + margin-bottom: 30px; + text-align: justify; +} + +#paginator-page-footer { + margin-top: 10px; + display: block; + height: 45px; + /*border-bottom: 1px solid #444444;*/ +} + +#paginator-page-footer .timestamp { + display: inline; + line-height: 35px; +} + +#paginator-page-button { + float: right; + padding: 5px 10px; + background: #208DCC; + margin: 1px 1px 1px 1px; +} + +#paginator-page-button:hover { + background: #006DAC; + border: 1px solid #004D8C; + margin: 0px 0px 0px 0px; +} + +#paginator-page-button a:link, +#paginator-page-button a:active, +#paginator-page-button a:visited { + color: #FFF; +} + +#paginator-page-button a:hover { + color: #DDD; +} + +.language-selector { + display: inline; + list-style-type: none; + float: right; + margin-right: 30px; + font-size: 90%; +} + +.language-selector li { + display: inline; + margin: .5em; +} + +.language-selector .selected, +.first .selected { + color: #208DCC; +} + +form label { + display: block; +} + +form textarea, +form input { + margin-top: 10px; + margin-bottom: 20px; + width: 100%; + display: block; + box-sizing: border-box; +} + +form textarea { + height: 160px; + width: 100%; + resize: none; +} + +@media screen and (max-width: 779px) { + +#header-left { + display: block; + float: none; + width: 100%; + text-align: center; +} + +#header-right { + display: block; + float: none; + width: 100%; + text-align: center; +} + +#site-logo, +#site-title { + display: block; + float: none; + margin: auto; +} + +#site-title, +#site-slogan { + padding: 0px 5px; +} + +.language-selector { + text-align: center; + float: none; +} + +nav { + text-align: center; + margin-bottom: 20px; +} + +.burger-button { + display: block; + background: #3E3E3E; + font-size: 100%; + padding: 5px 20px 5px 20px; + margin-top: 20px; + cursor: pointer; +} + +#menu-entries { + display: none; +} + +.burger-toggle:checked ~ #menu-entries { + display: block; +} + +.burger-toggle:checked ~ .burger-button { + color: #DDDDDD; + background: #208DCC; +} + +nav ul.first > li a, +nav ul.second > li a { + display: block; + padding: 5px 20px 5px 20px; + background: #3E3E3E; +} + +nav ul.first > li a:hover, +nav ul.second > li a:hover, +.burger-button:hover { + color: #DDDDDD; + background: #208DCC; +} + +nav ul.first { + margin-top: 0px; +} + +nav ul.second > li a { + padding-left: 40px; +} + +} + +@media (min-width: 780px) { + #container { + max-width: 1200px; + } + + .burger-button { + display: none; + } + + nav ul.second, + nav ul.third { + display: none; + } + + nav ul.first > li { + display: inline-block; + position: relative; + padding-right: 1.25em; + } + + nav ul.second, + nav ul.third { + position: absolute; + background: #000000; + width: 160px; + box-shadow: 1px 1px 1px 0px rgba(0,0,0,0.25); + } + + nav ul.second { + z-index: 2; + } + + nav ul.third { + z-index: 3; + } + + nav ul.second li { + position: relative; + } + + nav ul.third { + left: 212px; + top: -1px; + } + + nav ul.first li:hover ul.second, + nav ul.second li:hover ul.third { + display: block; + } + + nav ul.second li a, + nav ul.third li a { + padding: 0.75em 1em; + } + + #article { + position: relative; + } + + #summary { + display: block; + position: absolute; + top: 0px; + left: 608px; + width: 342px; + } +} diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..cbb9295 --- /dev/null +++ b/theme.toml @@ -0,0 +1,8 @@ +name = "Kozmo Dark" +license = "GPL" +licenselink = "https://github.com/MarcRiera/Kozmo-Dark/master/LICENSE" +description = "A clean dark theme for Hugo websites" +homepage = "https://github.com/MarcRiera/Kozmo-Dark" +tags = ["clean", "dark"] +features = ["responsive", "404", "blog", "multilingual"] +min_version = 0.18