1
0

Api Theme and Example content

This commit is contained in:
Siroco 2020-10-21 12:47:37 +02:00
commit 91aeba8307
26 changed files with 164 additions and 0 deletions

6
archetypes/default.md Normal file
View File

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

10
config.toml Normal file
View 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"]

View 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

View File

@ -0,0 +1,8 @@
---
title: "Creditos"
date: 2020-10-21T10:29:45+02:00
featuredImage: "image.jpg"
---
Aquí el texto de créditos

View File

@ -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}

View File

@ -0,0 +1 @@
{"Target":"scss/main.min.b67e46bdef4830eb2e3f962611e06061ad2ad3f280cd18b0a311bdb26eb4f36d.css","MediaType":"text/css","Data":{"Integrity":"sha256-tn5Gve9IMOsuP5YmEeBgYa0q0/KAzRiwoxG9sm60820="}}

View File

@ -0,0 +1 @@
body{background-color:#000;color:#fff}

View File

@ -0,0 +1 @@
{"Target":"style.main.min.1eafb71a8980a5d4fbac77f97fe92147921ccc14d41574db0d9d441526d2498c.css","MediaType":"text/css","Data":{"Integrity":"sha256-Hq+3GomApdT7rHf5f+khR5IczBTUFXTbDZ1EFSbSSYw="}}

View File

@ -0,0 +1,3 @@
body {
background-color: #000;
color: #fff; }

View File

@ -0,0 +1 @@
{"Target":"scss/main.css","MediaType":"text/css","Data":{}}

20
themes/api-theme/LICENSE Normal file
View 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.

View File

@ -0,0 +1,2 @@
+++
+++

Binary file not shown.

View 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;}
}
}

View File

@ -0,0 +1 @@
<h1>No disponible</h1>

View File

@ -0,0 +1,3 @@
{
"data" : {{ block "response" .}}{{ end }}
}

View 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>

View File

@ -0,0 +1,3 @@
{
"name": "{{ .Title }}", "featuredImage": "{{ .Params.featuredImage }}", "content": {{ .Content | jsonify }}
}

View File

@ -0,0 +1,7 @@
{{ define "response" }}
[
{{ range $index, $e := .Data.Pages }}
{{ if $index }}, {{ end }}{{ .Render "item" }}
{{ end }}
]
{{ end }}

View File

@ -0,0 +1,9 @@
{{ define "main" }}
<h3>Items</h3>
<ul class="posts">
{{ range .Data.Pages }}
<li>{{ .Title }}</li>
{{ end }}
</ul>
{{ end }}

View 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 }}

View File

@ -0,0 +1,2 @@
{{ $style := resources.Get "scss/main.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href={{ $style.RelPermalink }} integrity="{{ $style.Data.Integrity }}">

View 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 = ""