Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Commit

Permalink
Changes in layouts, also added a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
edubxb committed Dec 4, 2017
1 parent 2d5f67c commit a55a4df
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 41 deletions.
8 changes: 4 additions & 4 deletions layouts/_default/li.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{{ if .Params.featured }}
<article class="{{ .Section }} featured">
{{ else }}
<article class="{{ .Section }}">
<article class="post {{ .Section }}">
{{ end }}
<div class="inner">
<a class="post-link" href="{{ .Permalink }}"></a>
{{ if .Params.image }}
<figure class="post-image">
<a href="{{ .Permalink }}"><img src="{{ .Site.BaseURL }}{{ .Params.image }}" alt="" /></a>
<a href="{{ .Permalink }}"><img src="/images/{{ .Params.image }}" alt="" /></a>
</figure>
{{ end }}
<span class="post-meta">
<span class="post-date">{{ .Date.Format "2 Jan 2006" }}</span>
</span>
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<p class="post-excerpt">{{ .Description }}&hellip;</p>
<span class="post-more"><a href="{{ .Permalink }}">Read More <i class="icon-arrow-right"></i></a></span>
<p class="post-excerpt">{{ .Summary }}</p>
<span class="post-more"><a href="{{ .Permalink }}">Seguir leyendo <i class="fa fa-angle-right"></i></a></span>
</div>
</article>
25 changes: 13 additions & 12 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,36 @@

<header class="post-header">
<span class="post-meta">
<span class="post-date">{{ .Date.Format "2 Jan 2006" }}</span> <span class="reading-time">| <span class="estimated-reading-time">{{ .ReadingTime }} min.</span> (<span class="word-count">{{ .WordCount }}</span> words)</span></span>
<span class="post-date">{{ .Date.Format "2 Jan 2006" }}</span> <span class="reading-time">| <span class="estimated-reading-time">{{ .ReadingTime }} min.</span> (<span class="word-count">{{ .WordCount }}</span> palabras)</span></span>
</span>
<div class="clear"></div>
<h1 class="post-title">{{ .Title }}</h1>
</header>

<section class="post-content">
{{if .Params.audio }}
<audio controls="" class="podcast-player">
<source src="{{ $.Site.Params.podcast.audioBaseUrl }}{{ .Params.audio }}" type="audio/mpeg" />
<a href="{{ $.Site.Params.podcast.audioBaseUrl }}{{ .Params.audio }}">{{ .Title }}</a>
</audio>
{{ end }}
{{ .Content }}
</section>

<footer class="post-footer">
<div class="post-tags">
{{if .Params.tags }}
{{ range $index, $tag := .Params.tags }}
<a href="{{ $baseurl }}tags/{{ $tag | urlize }}/">{{ $tag }}</a>
<a href="{{ $baseurl }}tags/{{ $tag | urlize }}.html">{{ $tag }}</a>
{{ end }}
{{ end }}
</div>
<div class="post-share">
<a class="icon-twitter" href="https://twitter.com/share?text={{ .Title }}&url={{ .Permalink }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<a class="fa fa-twitter" href="https://twitter.com/share?text={{ .Title }}&url={{ .Permalink }}" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<span>Twitter</span>
</a>
<a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<span>Facebook</span>
</a>
<a class="icon-gplus" href="https://plus.google.com/share?url={{ .Permalink }}" onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
<span>Google+</span>
<a class="fa fa-linkedin" href="https://www.linkedin.com/shareArticle?mini=true&url={{ .Permalink }}&title={{ .Title }}&summary={{ .Summary }}" onclick="window.open(this.href, 'linkedin-share', 'width=550,height=550');return false;">
<span>LinkedIn</span>
</a>
</div>
</footer>
Expand All @@ -48,21 +51,19 @@ <h1 class="post-title">{{ .Title }}</h1>
{{ if .NextInSection }}
<a class="post-nav-item post-nav-next" href="{{ .NextInSection.Permalink }}">
<section class="post-nav-teaser">
<span class="post-nav-icon"><i class="icon-arrow-left"></i></span>
<span class="post-nav-icon"><i class="fa fa-chevron-left"></i></span>
<span class="post-nav-info">
<h4 class="post-nav-title">{{ .NextInSection.Title }}</h4>
<p class="post-nav-excerpt">{{ .NextInSection.Description }}&hellip;</p>
</span>
</section>
</a>
{{ end }}
{{ if .PrevInSection }}
<a class="post-nav-item post-nav-prev" href="{{ .PrevInSection.Permalink }}">
<section class="post-nav-teaser">
<span class="post-nav-icon"><i class="icon-arrow-right"></i></span>
<span class="post-nav-icon"><i class="fa fa-chevron-right"></i></span>
<span class="post-nav-info">
<h4 class="post-nav-title">{{ .PrevInSection.Title }}</h4>
<p class="post-nav-excerpt">{{ .PrevInSection.Description }}&hellip;</p>
</span>
</section>
</a>
Expand Down
4 changes: 2 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1 class="header-name">{{ .Site.Title }}</h1>
</a>
</div>
{{ if .Site.Params.cover }}
<div class="header-cover blured-image" style="background-color: darkgreen; background-image: url(/images/cover.low.jpg)" data-src="{{ .Site.Params.cover }}"></div>
<div class="header-cover blured-image" style="background-color: #19a0d7; background-image: url(/images/cover.low.jpg)" data-src="{{ .Site.Params.cover }}"></div>
{{ end }}
</header>

Expand All @@ -21,7 +21,7 @@ <h1 class="header-name">{{ .Site.Title }}</h1>
<div class="post-list">
<div id="push">

{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ $paginator := .Paginate (where .Site.Pages "Section" "in" .Site.Params.mainSections) }}

{{ range $index, $page := $paginator.Pages }}
{{ .Render "li" }}
Expand Down
19 changes: 13 additions & 6 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
<div id="body-class" style="display: none;"></div>
<footer id="footer">
<section class="credits">
<span class="credits-theme">Theme <a href="https://github.com/zenithar/hugo-theme-bleak" target="_blank" rel="nofollow">Bleak</a> by <a href="http://zutrinken.com" target="_blank" rel="nofollow">zutrinken</a></span>
<span class="credits-software">Published with <a href="http://gohugo.io" target="_blank" rel="nofollow">Hugo</a></span>
<span class="credits-theme">Tema basado en <a
href="https://github.com/zenithar/hugo-theme-bleak"
target="_blank" rel="nofollow">Bleak</a> por <a href="http://zutrinken.com" target="_blank" rel="nofollow">zutrinken</a></span>
{{ if .Site.Params.license }}
<span class="credits-license"><i class="fa fa-copyright"></i> 2013-{{ now.Year }} {{ .Site.Title }} — Licencia {{ htmlUnescape .Site.Params.license | safeHTML }}</span>
{{ end }}
<span class="credits-software">Publicado con <a href="http://gohugo.io" target="_blank" rel="nofollow">Hugo</a></span>

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 21, 2018

Contributor

This does not look like english

</section>
</footer>
{{ partial "subscription.html" . }}
{{ partial "navigation.html" . }}
{{ partial "toc.html" . }}
{{ if .Params.showToc }}
{{ partial "toc.html" . }}
{{ end }}
<div class="overlay"></div>
</div>
</section>

<script async src="{{ .Site.BaseURL }}js/main.js"></script>

<script async src="/js/main.js"></script>

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 20, 2018

Contributor

With this commit you just reverted the fix from:
#24

{{ if .Site.Params.googleAnalyticsUserID }}
{{with .Site.Params.googleAnalyticsUserID }}
<script>
Expand Down Expand Up @@ -40,6 +47,6 @@
{{ end }}
{{ end }}

<noscript><link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css"></noscript>
<noscript><link rel="stylesheet" href="/css/main.css"></noscript>

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 21, 2018

Contributor

This broke subdirectories support.

</body>
</html>
41 changes: 30 additions & 11 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,13 @@

<title>{{ if ne .URL "/" }} {{ .Title }} &middot; {{ end }} {{ .Site.Title }}</title>

<link rel="preload" href="{{ .Site.BaseURL }}js/main.js" as="script" />
<link rel="preload" href="{{ .Site.BaseURL }}css/main.css" as="style" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Aldrich" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="preload" href="/js/main.js" as="script" />
<link rel="preload" href="/css/main.css" as="style" />
{{ range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
{{ end }}

{{ if .Description }}
<meta name="description" content="{{ .Description }}" />
Expand Down Expand Up @@ -151,15 +156,29 @@
{{ end }}
</a>
</div>
<div class="nav-menu">
<a class="rss" href="{{.RSSLink}}">
<i class="icon-rss"></i>
</a>
{{ if .IsPage }}
<a class="menu" data-action="toc" data-target="toc"><i class="icon-location"></i></a>
{{ end }}
{{ if .Site.Menus.main }}
<a class="menu" data-action="menu" data-target="menu"><i class="icon-menu"></i></a>
<div id="main-menu" class="nav-menu">
{{ if .Site.Menus.subscription }}
<a class="menu subscription" data-action="subscription"
data-target="subscription" title="Suscríbete al Podcast">Suscríbete</a>

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 21, 2018

Contributor

This does not look like english

{{ end }}
<a class="nav-social" target="_blank" href="https://twitter.com/{{ .Site.Params.twitter }}" title="Entre Dev Y Ops en Twitter"><i class="fa fa-twitter"></i></a>
<a class="nav-social" target="_blank" href="https://github.com/{{ .Site.Params.github }}" title="Entre Dev Y Ops en GitHub"><i class="fa fa-github"></i></a>
<a id="search-button" onclick="$('#search-form').toggle();" title="Buscar"><i class="fa fa-search"></i></a>
<form id="search-form" method="get" role="search" action="https://google.es/search">
<input type="hidden" name="as_sitesearch" value="{{ .Site.BaseURL }}">
<input type="text" name="q" maxlength="255" placeholder="Buscar..." class="form-control">

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 21, 2018

Contributor

This does not look like english

<input type="submit" value="Buscar">
</form>
{{ if .IsPage }}
{{ if .Params.showToc }}
{{ if .TableOfContents }}
<a class="menu" data-action="toc" data-target="toc" title="Tabla de contenidos"><i class="fa fa-location-arrow"></i></a>

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 21, 2018

Contributor

This does not look like english

{{ end }}
{{ end }}
{{ end }}
{{ if .Site.Menus.main }}
<a id="main-menu-button" class="menu" data-action="menu" data-target="menu"
title="Menú"><i class="fa fa-navicon"></i></a>
{{ end }}
</div>
</nav>
8 changes: 6 additions & 2 deletions layouts/partials/navigation.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ if .Site.Menus.main }}
<div id="menu" data-target="menu">
<div class="menu-header">
<span class="menu-label">Menu</span>
<span class="menu-label">Menú</span>

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 21, 2018

Contributor

This does not look like english

<a class="menu-close" data-action="menu" data-target="menu"></a>
</div>

Expand All @@ -13,7 +13,11 @@
<a class="home current js-ajax-link" href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
<li class="menu-list-item menu-list-social">
<a href="https://twitter.com/{{ .Site.Params.twitter }}" title="Entre Dev Y Ops en Twitter"><i class="fa fa-twitter"></i></a>
<a href="https://github.com/{{ .Site.Params.github }}" title="Entre Dev Y Ops en GitHub"><i class="fa fa-github"></i></a>
</li>
</div>

</div>
{{ end }}
{{ end }}
6 changes: 3 additions & 3 deletions layouts/partials/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<div class="inner">
{{if .paginator.HasPrev}}
{{ $prevUrl := delimit (slice .site.BaseURL .paginator.Prev.URL) "" }}
<a class="pagination-item pagination-next" href="{{ $prevUrl }}"><i class="icon-arrow-left"></i> <span>Newer Posts</span></a>
<a class="pagination-item pagination-next" href="{{ $prevUrl }}"><i class="fa fa-chevron-left"></i> <span>Anterior</span></a>
{{end}}
<span class="pagination-info">Page {{ .paginator.PageNumber }} of {{.paginator.TotalPages}}</span>
<span class="pagination-info">Página {{ .paginator.PageNumber }} de {{.paginator.TotalPages}}</span>
{{if .paginator.HasNext}}
{{ $nextUrl := delimit (slice .site.BaseURL .paginator.Next.URL) "" }}
<a class="pagination-item pagination-prev" href="{{ $nextUrl }}"><span>Older Posts</span> <i class="icon-arrow-right"></i></a>
<a class="pagination-item pagination-prev" href="{{ $nextUrl }}"><span>Siguiente</span> <i class="fa fa-chevron-right"></i></a>

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 21, 2018

Contributor

This does not look like english

{{end}}
<div class="clear"></div>
</div>
Expand Down
19 changes: 19 additions & 0 deletions layouts/partials/subscription.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ if .Site.Menus.subscription }}
<div id="subscription" data-target="subscription">
<div class="menu-header">
<span class="menu-label">Suscríbete</span>

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 21, 2018

Contributor

This does not look like english

<a class="menu-close" data-action="subscription" data-target="subscription"></a>
</div>

<div class="menu-list">
{{ range .Site.Menus.subscription }}
{{ $currentNode := . }}
<li class="menu-list-item">
{{ .Pre }}
<a target="_blank" href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</div>

</div>
{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/toc.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ if .IsPage }}
<div id="tocMenu" data-target="toc">
<div class="menu-header">
<span class="menu-label">Menu</span>
<span class="menu-label">Tabla de contenidos</span>

This comment has been minimized.

Copy link
@NicoHood

NicoHood May 21, 2018

Contributor

This does not look like english

<a class="menu-close" data-action="toc" data-target="toc"></a>
</div>
<div id="toc" class="menu-list">
Expand Down

0 comments on commit a55a4df

Please sign in to comment.