Api Theme and Example content
This commit is contained in:
commit
91aeba8307
6
archetypes/default.md
Normal file
6
archetypes/default.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
title: "{{ replace .Name "-" " " | title }}"
|
||||
date: {{ .Date }}
|
||||
draft: true
|
||||
---
|
||||
|
10
config.toml
Normal file
10
config.toml
Normal file
@ -0,0 +1,10 @@
|
||||
baseURL = "http://api.beire.soinumapa.net"
|
||||
languageCode = "es"
|
||||
title = "Beire - Backend static API"
|
||||
theme = "api-theme"
|
||||
|
||||
[outputFormats.api]
|
||||
mediatype ="application/json"
|
||||
|
||||
[outputs]
|
||||
section = ["api"]
|
19
content/items/home/index.md
Normal file
19
content/items/home/index.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
title: "Beire : Mar de tierra"
|
||||
date: 2020-10-18
|
||||
type: image
|
||||
slug: home
|
||||
featuredImage: "image.jpg"
|
||||
|
||||
---
|
||||
|
||||
Un texto de contenido
|
||||
|
||||
## Con un lindo markkdown
|
||||
|
||||
"Unas comillas" y 'Otras comillas" y así hasta el inforínicos
|
||||
..
|
||||
|
||||
#as0dfa0iasdf
|
||||
|
||||
¿¡asd¡'¡'asdf¡'ads
|
8
content/pages/creditos.md
Normal file
8
content/pages/creditos.md
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "Creditos"
|
||||
date: 2020-10-21T10:29:45+02:00
|
||||
featuredImage: "image.jpg"
|
||||
---
|
||||
|
||||
Aquí el texto de créditos
|
||||
|
@ -0,0 +1 @@
|
||||
body{background:#4fa3cb;color:#fff;font-family:roboto,arial,sans-serif}a{text-decoration:none;font-weight:700;color:#fff}h1,h2{text-align:center}h1{font-size:5em;font-size:10vw}h2{font-family:serif}ul{list-style:none;width:80%;margin:auto}ul li{float:left;min-width:200px;padding:5px;background:#fff;color:#4fa3cb;text-align:center;border-radius:10px}ul li a{color:#4fa3cb}
|
@ -0,0 +1 @@
|
||||
{"Target":"scss/main.min.b67e46bdef4830eb2e3f962611e06061ad2ad3f280cd18b0a311bdb26eb4f36d.css","MediaType":"text/css","Data":{"Integrity":"sha256-tn5Gve9IMOsuP5YmEeBgYa0q0/KAzRiwoxG9sm60820="}}
|
@ -0,0 +1 @@
|
||||
body{background-color:#000;color:#fff}
|
@ -0,0 +1 @@
|
||||
{"Target":"style.main.min.1eafb71a8980a5d4fbac77f97fe92147921ccc14d41574db0d9d441526d2498c.css","MediaType":"text/css","Data":{"Integrity":"sha256-Hq+3GomApdT7rHf5f+khR5IczBTUFXTbDZ1EFSbSSYw="}}
|
@ -0,0 +1,3 @@
|
||||
body {
|
||||
background-color: #000;
|
||||
color: #fff; }
|
@ -0,0 +1 @@
|
||||
{"Target":"scss/main.css","MediaType":"text/css","Data":{}}
|
20
themes/api-theme/LICENSE
Normal file
20
themes/api-theme/LICENSE
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 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
themes/api-theme/archetypes/default.md
Normal file
2
themes/api-theme/archetypes/default.md
Normal file
@ -0,0 +1,2 @@
|
||||
+++
|
||||
+++
|
BIN
themes/api-theme/assets/scss/.main.scss.swp
Normal file
BIN
themes/api-theme/assets/scss/.main.scss.swp
Normal file
Binary file not shown.
27
themes/api-theme/assets/scss/main.scss
Normal file
27
themes/api-theme/assets/scss/main.scss
Normal file
@ -0,0 +1,27 @@
|
||||
$background: #4fa3cb;
|
||||
$primary: #fff;
|
||||
|
||||
body {
|
||||
background:$background;
|
||||
color:$primary;
|
||||
font-family:"Roboto", arial, sans-serif;
|
||||
}
|
||||
|
||||
a { text-decoration:none; font-weight:bold; color:$primary;}
|
||||
|
||||
h1,
|
||||
h2 {text-align:center;}
|
||||
|
||||
h1 { font-size:5em; font-size:10vw; }
|
||||
|
||||
h2 { font-family:serif; }
|
||||
|
||||
ul {
|
||||
list-style:none;
|
||||
width:80%;
|
||||
margin:auto;
|
||||
li {
|
||||
float:left; min-width:200px; padding:5px; background:$primary; color:$background; text-align:center; border-radius:10px;
|
||||
a { color:$background;}
|
||||
}
|
||||
}
|
1
themes/api-theme/layouts/404.html
Normal file
1
themes/api-theme/layouts/404.html
Normal file
@ -0,0 +1 @@
|
||||
<h1>No disponible</h1>
|
3
themes/api-theme/layouts/_default/baseof.api.json
Normal file
3
themes/api-theme/layouts/_default/baseof.api.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"data" : {{ block "response" .}}{{ end }}
|
||||
}
|
11
themes/api-theme/layouts/_default/baseof.html
Normal file
11
themes/api-theme/layouts/_default/baseof.html
Normal 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>
|
3
themes/api-theme/layouts/_default/item.api.json
Normal file
3
themes/api-theme/layouts/_default/item.api.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "{{ .Title }}", "featuredImage": "{{ .Params.featuredImage }}", "content": {{ .Content | jsonify }}
|
||||
}
|
7
themes/api-theme/layouts/_default/list.api.json
Normal file
7
themes/api-theme/layouts/_default/list.api.json
Normal file
@ -0,0 +1,7 @@
|
||||
{{ define "response" }}
|
||||
[
|
||||
{{ range $index, $e := .Data.Pages }}
|
||||
{{ if $index }}, {{ end }}{{ .Render "item" }}
|
||||
{{ end }}
|
||||
]
|
||||
{{ end }}
|
9
themes/api-theme/layouts/_default/list.html
Normal file
9
themes/api-theme/layouts/_default/list.html
Normal file
@ -0,0 +1,9 @@
|
||||
{{ define "main" }}
|
||||
<h3>Items</h3>
|
||||
|
||||
<ul class="posts">
|
||||
{{ range .Data.Pages }}
|
||||
<li>{{ .Title }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
0
themes/api-theme/layouts/_default/single.html
Normal file
0
themes/api-theme/layouts/_default/single.html
Normal file
7
themes/api-theme/layouts/index.html
Normal file
7
themes/api-theme/layouts/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<h1>Hugo API Service</h1>
|
||||
<h2>Developed for render content on Angular</h2>
|
||||
<ul>
|
||||
<li><a href="/items/index.json">Items</a></li>
|
||||
</ul>
|
||||
{{ end }}
|
0
themes/api-theme/layouts/partials/footer.html
Normal file
0
themes/api-theme/layouts/partials/footer.html
Normal file
2
themes/api-theme/layouts/partials/head.html
Normal file
2
themes/api-theme/layouts/partials/head.html
Normal file
@ -0,0 +1,2 @@
|
||||
{{ $style := resources.Get "scss/main.scss" | toCSS | minify | fingerprint }}
|
||||
<link rel="stylesheet" href={{ $style.RelPermalink }} integrity="{{ $style.Data.Integrity }}">
|
0
themes/api-theme/layouts/partials/header.html
Normal file
0
themes/api-theme/layouts/partials/header.html
Normal file
21
themes/api-theme/theme.toml
Normal file
21
themes/api-theme/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 = "Api Theme"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
|
||||
description = ""
|
||||
homepage = "http://example.com/"
|
||||
tags = []
|
||||
features = []
|
||||
min_version = "0.41.0"
|
||||
|
||||
[author]
|
||||
name = ""
|
||||
homepage = ""
|
||||
|
||||
# If porting an existing theme
|
||||
[original]
|
||||
name = ""
|
||||
homepage = ""
|
||||
repo = ""
|
Loading…
Reference in New Issue
Block a user