diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d25399f59daa041b4f77e357eca91a8ed2137ec8..a2051d6b49171e5c867899b88065f848afd98ecc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,6 @@ # All available Hugo versions are listed here: https://gitlab.com/pages/hugo/container_registry image: registry.gitlab.com/pages/hugo/hugo_extended -variables: - GIT_SUBMODULE_STRATEGY: recursive - - .job_templae: &script before_script: - apk add --update npm nodejs diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000000000000000000000000000000000..92c7b2c63cfb10656376e78ff5c4e51b4f09b742 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ + +[submodule "themes/docsy"] + path = themes/docsy + url = https://github.com/google/docsy.git diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000000000000000000000000000000000000..e89c200fc819986f967e4db848b507505e7668be --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,50 @@ +{{ $links := .Site.Params.links }} +<footer class="bg-dark py-5 row d-print-none"> + <div class="container-fluid mx-sm-5"> + <div class="row"> + <div class="col-6 col-sm-4 text-xs-center order-sm-2"> + {{ with $links }} + {{ with index . "user"}} + {{ template "footer-links-block" . }} + {{ end }} + {{ end }} + </div> + <div class="col-6 col-sm-4 text-right text-xs-center order-sm-3"> + {{ with $links }} + {{ with index . "developer"}} + {{ template "footer-links-block" . }} + {{ end }} + {{ end }} + </div> + <div class="col-12 col-sm-4 text-center py-2 order-sm-2"> + <p> + {{ with $links }} + {{ with index . "image"}} + {{ template "footer-center-block" .}} + {{ end }} + {{ end }} + </p> + {{ with .Site.Params.copyright }}<small class="text-white">© {{ now.Year}} {{ .}} {{ T "footer_all_rights_reserved" }}</small>{{ end }} + {{ if not .Site.Params.ui.footer_about_disable }} + <!-- {{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }} --> + {{ end }} + </div> + </div> + </div> +</footer> + +{{ define "footer-links-block" }} +<ul class="list-inline mb-0"> + {{ range . }} + <li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="{{ .name }}" aria-label="{{ .name }}"> + <a class="text-white" target="_blank" rel="noopener" href="{{ .url }}" aria-label="{{ .name }}"> + <i class="{{ .icon }}"></i> + </a> + </li> + {{ end }} +</ul> +{{ end }} + +{{ define "footer-center-block" }} + <a class="text-white" href="{{ .image_url }}">{{ .text }}</a> +{{ end }} diff --git a/layouts/shortcodes/blocks/cover.html b/layouts/shortcodes/blocks/cover.html new file mode 100644 index 0000000000000000000000000000000000000000..f7a540b4ae865c662558f81ad9e796ca8758b193 --- /dev/null +++ b/layouts/shortcodes/blocks/cover.html @@ -0,0 +1,50 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +{{ $blockID := printf "td-cover-block-%d" .Ordinal }} +{{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" }} +{{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" }} +{{ $col_id := .Get "color" | default "dark" }} +{{ $image_anchor := .Get "image_anchor" | default "smart" }} +{{ $logo_anchor := .Get "logo_anchor" | default "smart" }} +{{/* Height can be one of: auto, min, med, max, full. */}} +{{ $height := .Get "height" | default "max" }} +{{ $byline := .Get "byline" | default "" }} +{{ with $promo_image }} +{{ $promo_image_big := (.Fill (printf "1920x1080 %s" $image_anchor)) }} +{{ $promo_image_small := (.Fill (printf "960x540 %s" $image_anchor)) }} +<link rel="preload" as="image" href="{{ $promo_image_small }}" media="(max-width: 1200px)"> +<link rel="preload" as="image" href="{{ $promo_image_big }}" media="(min-width: 1200px)"> +<style> +#{{ $blockID }} { + background-image: url({{ $promo_image_small }}); +} +@media only screen and (min-width: 1200px) { + #{{ $blockID }} { + background-image: url({{ $promo_image_big }}); + } +} +</style> +{{ end }} +<section id="{{ $blockID }}" class="row td-cover-block td-cover-block--height-{{ $height }} js-td-cover td-overlay td-overlay--dark -bg-{{ $col_id }}"> + <div class="container td-overlay__inner"> + <div class="row"> + <div class="col-12"> + <div class="text-center"> + {{ with .Get "title" }}<h1 class="display-1 mt-0 mt-md-5 pb-4">{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}<img class="td-cover-logo" src="{{ $logo_image_resized }}" alt="{{ $title | html }} Logo">{{ end }}{{ $title | html }}</h1>{{ end }} + {{ with .Get "subtitle" }}<p class="display-2 text-uppercase mb-0">{{ . | html }}</p>{{ end }} + <div class="pt-3 lead"> + {{ if eq .Page.File.Ext "md" }} + {{ .Inner | markdownify }} + {{ else }} + {{ .Inner | htmlUnescape | safeHTML }} + {{ end }} + </div> + </div> + </div> + </div> + </div> + {{ if $byline }} + <div class="byline"> + <small>{{ $byline }}</small> + </div> + {{ end }} +</section> diff --git a/themes/docsy b/themes/docsy new file mode 160000 index 0000000000000000000000000000000000000000..c9e2c5af976fdc6f8d3c376e89ee38b61f8d2b79 --- /dev/null +++ b/themes/docsy @@ -0,0 +1 @@ +Subproject commit c9e2c5af976fdc6f8d3c376e89ee38b61f8d2b79