...
 
Commits (5)
Biblioteca Hugo Theme
\ No newline at end of file
# Biblioteca Hugo Theme
This is the repository for the **free theme** (as in gratis) for the [Hugo static site generator](https://gohugo.io/ "Hugo official website"). To ensure that this project continues being *gratis*, I decided to licence it under the [Unlicense](https://unlicense.org/ "Unlicense official website"), go and take a look, hope you feel like you want to use that kind of licensing for your own projects.
It would be nice if you could add a link to this repository on your site if you use this theme, that way we can reach an even bigger audience, but that's completely up to you. If you do add a link, don't hesitate to send a PR adding your site to the [SHOWCASE.md file](SHOWCASE.md "Page with a list of sites using this theme").
This theme was started by [@joanca](https://gitlab.com/joanca/ "joanca's gitlab profile").
## Philosophy
This is an **opinionated theme** and a living software project that is and will be free software. It must follow the following principles:
1. **a11y compliant**: this theme must be a reference whenever we speak about web accessibility. I'm working on a way to do some automatic accesibility testing when submitting a PR.
2. **blazing fast**: by default this theme should be very fast, loading just the necessary stuff. Every script that you need to add to this theme **must** be only available in the DOM of the site, if explicitly stated on the `config.yaml` file.
3. You want to add another principle? Let's discuss!
Ok, but what is an opinionated theme? we enforce our principles, so our code must be able to detect that. If we want to be accessible, we enforce that by design, so our theme will continue to be accessible. That means, for example, that we replaced the default `youtube` shortcode of Hugo, with a [custom one that embeds a video in a different way](/layouts/shortcodes/youtube.html "custom shortcode for embedding youtube videos"). This shortcode will **fail at compile time** if you don't provide a `title` for your video and you must set the `id` as a key/value pair.
So in other words, an opinionated theme is a theme that will force you to follow some design decisions to mantain a standard on how to use it when writing content using it. It also applies to adding new functionalities.
# Showcase your site!
This page is to showcase all the sites that are currently using the theme **biblioteca**. Don't hesitate to send a PR to add your site to this page!
- [koan](https://koan.cl "Blog in spanish about accessibility and software ethics"): a site in spanish, by the author of this theme, were we talk about accessibility issues and a bit about software ethics.
\ No newline at end of file
@import 'reset';
@import 'general';
@import 'posts';
\ No newline at end of file
@import 'posts';
@import 'videos';
\ No newline at end of file
section.video-container {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
.video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<html lang="es">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
......@@ -19,6 +19,9 @@
<link rel="canonical" href="{{ .Permalink }}" />
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
</head>
<body>
{{ block "main" . }}
......
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Contenido reciente {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ range .Pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{- .Content | html -}}</description>
</item>
{{ end }}
</channel>
</rss>
\ No newline at end of file
<section class="video-container">
<iframe
class="video"
src="https://www.youtube.com/embed/{{.Get "id" }}"
srcdoc="<style>*{padding:0;margin:0;overflow:hidden}html,body{height:100%}img,span{position:absolute;width:100%;top:0;bottom:0;margin:auto}span{height:1.5em;text-align:center;font:48px/1.5 sans-serif;color:white;text-shadow:0 0 0.5em black}</style><a href=https://www.youtube.com/embed/{{.Get "id" }}?autoplay=1><img src=https://img.youtube.com/vi/{{.Get "id" }}/hqdefault.jpg alt='Video {{.Get "title" }}'><span></span></a>"
frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
title="{{.Get "title" }}"
></iframe>
</section>
\ No newline at end of file