Skip to content

Commit

Permalink
Update tranquilpeak
Browse files Browse the repository at this point in the history
  • Loading branch information
yamila-moreno committed Jun 13, 2024
1 parent f0e9e54 commit 4772d2e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 6 deletions.
5 changes: 0 additions & 5 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Tranquilpeak
# Version : 0.3.1-BETA
# Author : Thibaud Leprêtre

# I STRONGLY recommend you to use a CDN to speed up loading of pages.
# There is many free CDN like Cloudinary or you can also use indirectly
# by using services like Google Photos.

# If you want to store images yourself, please read this guidelines:
# For users, if you only use this theme, put your images directly in `source/assets/images` folder
# But if you want to add local images, you can put your images directly in `source/assets/images` folder
Expand Down
62 changes: 62 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{- $.Scratch.Set "isTypeInMainSections" false -}}
{{- if .IsPage -}}
{{- if in site.Params.mainSections .Type -}}
{{- $.Scratch.Set "isTypeInMainSections" true -}}
{{- end -}}
{{- end -}}
{{- if and (and ($.Scratch.Get "isTypeInMainSections") (lt .Site.Params.sidebarBehavior 3)) (or (and .Site.Params.clearReading (not .Params.clearReading)) .Params.clearReading) -}}
{{- .Scratch.Set "sidebarBehavior" (add .Site.Params.sidebarBehavior 3) -}}
{{- else -}}
{{- .Scratch.Set "sidebarBehavior" .Site.Params.sidebarBehavior -}}
{{- end -}}
<!-- Fix hugo 0.17 expects ".Site.Author.gravatarEmail" whereas hugo 0.18 expects ".Site.Author.gravataremail" -->
{{- if .Site.Author.gravatarEmail -}}
{{- .Scratch.Set "gravatarEmail" .Site.Author.gravatarEmail -}}
{{- end -}}
{{- if .Site.Author.gravataremail -}}
{{- .Scratch.Set "gravatarEmail" .Site.Author.gravataremail -}}
{{- end -}}
{{- if .Scratch.Get "gravatarEmail" -}}
{{- .Scratch.Set "authorPicture" (printf "https://www.gravatar.com/avatar/%s" (urlize (md5 (.Scratch.Get "gravatarEmail")))) -}}
{{- else if .Site.Author.picture -}}
{{- .Scratch.Set "authorPicture" (absURL .Site.Author.picture) -}}
{{- end -}}
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
{{ partial "head_start.html" . }}
{{ partial "schema.html" . }}
{{ partial "meta.html" . }}
<title>{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}</title>

<link rel="icon" href="{{ with .Site.Params.favicon }}{{ . | absURL }}{{ else }}/favicon.png{{ end }}">
{{ with .OutputFormats.Get "RSS" }}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ .RelPermalink }}">
{{ end }}

{{ with .Site.Author.googleplus }}
<link rel="publisher" href="https://plus.google.com/{{ . | urlize }}">
{{ end }}

<link rel="canonical" href="{{ .Permalink }}">

<!--EXTERNAL STYLES-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" integrity="sha512-H9jrZiiopUdsLpg94A333EfumgUBpO9MdbxStdeITo+KEIMaNfHNvwyjjDJb+ERPaRS6DpyRlKbvPUasNItRyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
{{ if .Site.Params.comment.gitalk.enable }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/gitalk/1.7.2/gitalk.css" integrity="sha512-MLcK/YRapzET1qTBXrOiZE6bGBgtATMo2bIyalVJ8EKDEGNoeA3SPQkvWAR0zNS650YG13ocXBMeioDuZcSRuQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
{{ end }}
<!--EXTERNAL STYLES END-->
<!--STYLES-->
<link rel="stylesheet" href="{{ "css/style-h6ccsoet3mzkbb0wngshlfbaweimexgqcxj0h5hu4h82olsdzz6wmqdkajm.min.css" | absURL }}" />
<!--STYLES END-->
{{ range .Site.Params.customCSS }}
{{ if isset . "href" }}
<link {{ if not (isset . "rel") }}rel="stylesheet" {{ end }}{{ range $key, $value := . }} {{ if eq $key "href" }}{{ (printf "%s=\"%s\"" $key ($value | absURL)) | safeHTMLAttr }}{{ else }}{{ (printf "%s=\"%s\"" $key (string $value)) | safeHTMLAttr }}{{ end }}{{ end }}>
{{ else }}
<link rel="stylesheet" href="{{ . | absURL }}">
{{ end }}
{{ end }}

{{ partial "head_end.html" . }}
</head>

0 comments on commit 4772d2e

Please sign in to comment.