mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-05-21 14:51:54 +02:00
enh: add video to homepage
This commit is contained in:
parent
c8e2b17d02
commit
30133f50cd
3 changed files with 29 additions and 13 deletions
|
@ -9,20 +9,34 @@
|
||||||
|
|
||||||
<body
|
<body
|
||||||
class="flex flex-col h-screen px-6 m-auto text-lg leading-7 max-w-7xl bg-neutral text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32">
|
class="flex flex-col h-screen px-6 m-auto text-lg leading-7 max-w-7xl bg-neutral text-neutral-900 dark:bg-neutral-800 dark:text-neutral sm:px-14 md:px-24 lg:px-32">
|
||||||
<div id="the-top" class="absolute flex self-center">
|
|
||||||
<a class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 focus:translate-y-0 dark:bg-neutral-600"
|
|
||||||
href="#main-content"><span
|
|
||||||
class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">↓</span>{{ i18n
|
|
||||||
"nav.skip_to_main" }}</a>
|
|
||||||
</div>
|
|
||||||
{{ $header := print "partials/header/" .Site.Params.header.layout ".html" }}
|
{{ $header := print "partials/header/" .Site.Params.header.layout ".html" }}
|
||||||
{{ if templates.Exists $header }}
|
{{ if templates.Exists $header }}
|
||||||
{{ partial $header . }}
|
{{ partial $header . }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ partial "partials/header/basic.html" . }}
|
{{ partial "partials/header/basic.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if .IsHome }}
|
||||||
|
{{ if .Site.Params.homePageVideo }}
|
||||||
|
<style>
|
||||||
|
.video-margin {
|
||||||
|
margin-top: 97vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="absolute top-0 left-0 h-screen w-full">
|
||||||
|
<video class="h-screen w-full object-cover" autoplay loop muted>
|
||||||
|
<source src="{{ .Site.Params.homePageVideo }}" data-src="{{ .Site.Params.homePageVideo }}" type="video/mp4">
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
<div id="the-top" class="absolute flex self-center">
|
||||||
|
<a class="px-3 py-1 text-sm -translate-y-8 rounded-b-lg bg-primary-200 focus:translate-y-0 dark:bg-neutral-600"
|
||||||
|
href="#main-content"><span
|
||||||
|
class="font-bold text-primary-600 ltr:pr-2 rtl:pl-2 dark:text-primary-400">↓</span>{{ i18n
|
||||||
|
"nav.skip_to_main" }}</a>
|
||||||
|
</div>
|
||||||
<div class="relative flex flex-col grow">
|
<div class="relative flex flex-col grow">
|
||||||
<main id="main-content" class="grow">
|
<main id="main-content" class="grow video-margin">
|
||||||
{{ block "main" . }}{{ end }}
|
{{ block "main" . }}{{ end }}
|
||||||
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
|
{{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }}
|
||||||
{{- partial "scroll-to-top.html" . -}}
|
{{- partial "scroll-to-top.html" . -}}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="min-h-[148px]"></div>
|
<div class="mt-10"></div>
|
||||||
<div class="fixed inset-x-0 pl-[24px] pr-[24px] bg-neutral dark:bg-neutral-800" style="z-index:100">
|
<div class="fixed inset-x-0 pl-[24px] pr-[24px] bg-neutral dark:bg-neutral-800" style="z-index:100">
|
||||||
<div class="relative max-w-[64rem] ml-auto mr-auto">
|
<div class="relative ml-auto mr-auto">
|
||||||
{{ partial "partials/header/basic.html" . }}
|
{{ partial "partials/header/basic.html" . }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<article class="max-w-full prose dark:prose-invert">
|
<article class="max-w-full prose dark:prose-invert">
|
||||||
{{ with .Title }}
|
{{ if .Site.Params.homepage.showTitle | default true }}
|
||||||
<header>
|
{{ with .Title }}
|
||||||
<h1>{{ . | emojify }}</h1>
|
<header>
|
||||||
</header>
|
<h1>{{ . | emojify }}</h1>
|
||||||
|
</header>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<section>{{ .Content | emojify }}</section>
|
<section>{{ .Content | emojify }}</section>
|
||||||
</article>
|
</article>
|
||||||
|
|
Loading…
Add table
Reference in a new issue