Add post: 暗黑能天使
This commit is contained in:
51
layouts/partials/widgets/about.html
Normal file
51
layouts/partials/widgets/about.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<div class="mb-12 flex flex-col items-center justify-center md:flex-row">
|
||||
{{ $img := partial "utils/get-image" (dict "context" . "url" .Params.avatar "keyword" "*avatar*") }}
|
||||
{{ with $img }}
|
||||
<div class="md:ms-0 md:me-8 md:pe-8 md:border-e mx-auto w-48 flex-none">
|
||||
<img src="{{ . }}" class="rounded-full" alt="Avatar" />
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="mt-4 w-full grow md:mt-0">
|
||||
<h1 class="py-4 text-3xl">{{ .Title }}</h1>
|
||||
<div class="w-3/12 border-b xl:w-2/12"></div>
|
||||
|
||||
<div class="flex items-center pt-4">
|
||||
{{ with or (.Params.role) (.Params.organizations) }}
|
||||
<i class="fas fa-user"></i>
|
||||
{{ end }}
|
||||
<div class="flex flex-wrap">
|
||||
{{ with .Params.role }}
|
||||
<span class="ps-4">{{ . | markdownify }}</span>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.organization }}
|
||||
<a href="{{ .url }}" class="ps-4">{{ .name | markdownify }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ with .Params.bio }}
|
||||
<div class="py-8 text-lg leading-normal">
|
||||
{{ . | markdownify }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="md:ms-8 flex items-end justify-center md:flex-col">
|
||||
{{ $brand := $.Param "social" }}
|
||||
{{ range $brand }}
|
||||
{{/* Deprecation warning(v1.0.0) starts */}}
|
||||
{{ if .icon_pack }}
|
||||
{{ warnf "Param 'icon_pack' in %q is deprecated and will be removed in Eureka v1.0.0. Please use 'iconPack' instead." $.File.Path }}
|
||||
{{ end }}
|
||||
{{ $iconPack := .iconPack | default .icon_pack }}
|
||||
{{/* Deprecation warning(v1.0.0) ends */}}
|
||||
{{ $src := print $iconPack " fa-" .icon }}
|
||||
<div class="mx-2 mb-2 mt-4 md:mx-0 md:mt-2">
|
||||
<a href="{{ .url }}"><i class="{{ print $src }}"></i></a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="prose">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
1
layouts/partials/widgets/blank.html
Normal file
1
layouts/partials/widgets/blank.html
Normal file
@@ -0,0 +1 @@
|
||||
{{ .Content }}
|
||||
30
layouts/partials/widgets/experience.html
Normal file
30
layouts/partials/widgets/experience.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{{ range .Params.experiences }}
|
||||
<div class="mb-6">
|
||||
<div
|
||||
class="bg-secondary-bg prose dark:border-tertiary-bg rounded border p-6 transition duration-200 ease-in-out hover:shadow-lg"
|
||||
>
|
||||
<h3 class="">{{ .title }}</h3>
|
||||
<div class="flex flex-col md:flex-row md:justify-between">
|
||||
<div>
|
||||
{{ if .organization.url }}
|
||||
<a href="{{ .organization.url }}" class="no-underline">
|
||||
{{ .organization.name | markdownify }}
|
||||
</a>
|
||||
{{ else }}
|
||||
<span>{{ .organization.name | markdownify }}</span>
|
||||
{{ end }}
|
||||
|
||||
{{ if and .organization.name .location }}
|
||||
<span class="ms-2 me-2">·</span>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<span>{{ .location | markdownify }} </span>
|
||||
</div>
|
||||
<div class="shrink-0">{{ .dates | markdownify }}</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-5">{{ .writeup | markdownify }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
52
layouts/partials/widgets/pages.html
Normal file
52
layouts/partials/widgets/pages.html
Normal file
@@ -0,0 +1,52 @@
|
||||
{{ if not .Params.widget.sidebar.position }}
|
||||
<h2 class=" font-bold text-3xl my-4">{{ .Params.Title }}</h2>
|
||||
{{ end }}
|
||||
{{ if eq .Params.style "plain" }}
|
||||
{{ partial "widgets/pages-plain" . }}
|
||||
{{ else if eq .Params.style "masonry" }}
|
||||
{{ partial "widgets/pages-masonry" . }}
|
||||
{{ else }}
|
||||
{{ partial "widgets/pages-card" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/widgets/pages-get" }}
|
||||
{{- $section := .Site.GetPage .Params.section }}
|
||||
{{ $pages := $section.Pages }}
|
||||
{{ $count := .Params.count | default 5 }}
|
||||
{{ with $count }}
|
||||
{{ $pages = first $count $pages }}
|
||||
{{ end }}
|
||||
{{ return $pages }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/widgets/pages-plain" }}
|
||||
{{ $pages := partial "widgets/pages-get" . }}
|
||||
{{ partial "components/summary-list-plain" $pages }}
|
||||
<div class="pt-2 hover:text-eureka">
|
||||
{{ partial "widgets/pages-readmore" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/widgets/pages-card" }}
|
||||
{{ $pages := partial "widgets/pages-get" . }}
|
||||
<div class="overflow-hidden">
|
||||
{{ partial "components/summary-list-card" $pages }}
|
||||
<div class="px-8 pt-2 hover:text-eureka">
|
||||
{{ partial "widgets/pages-readmore" . }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/widgets/pages-masonry" }}
|
||||
<div class="pb-2 text-right hover:text-eureka">
|
||||
{{ partial "widgets/pages-readmore" . }}
|
||||
</div>
|
||||
{{ $pages := partial "widgets/pages-get" . }}
|
||||
{{ partial "components/summary-list-masonry" $pages }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "partials/widgets/pages-readmore" }}
|
||||
{{- $section := .Site.GetPage .Params.section }}
|
||||
<a href="{{ $section.Permalink }}" class="font-semibold">{{ i18n "readMore" }}</a>
|
||||
<i class='fas {{ cond (eq .Site.Language.LanguageDirection "rtl") "fa-caret-left" "fa-caret-right" }} ms-1'></i>
|
||||
{{ end }}
|
||||
21
layouts/partials/widgets/vintage.html
Normal file
21
layouts/partials/widgets/vintage.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<div class="grid grid-cols-9 grid-rows-5 h-(screen-16)">
|
||||
{{- $imgLeft := partial "utils/get-image" (dict "context" . "url" .Params.imgLeft)}}
|
||||
{{- with $imgLeft }}
|
||||
<div class="col-start-2 col-span-4 row-start-3 row-span-2 bg-local bg-cover z-10 shadow-2xl"
|
||||
style="background-image: url({{ . }});"></div>
|
||||
{{- end }}
|
||||
|
||||
<div class="col-start-3 col-span-5 row-start-2 row-span-3 z-20">
|
||||
<div class="flex flex-col items-center justify-center min-h-full">
|
||||
<div class="bg-white bg-opacity-75 shadow-2xl -m-12 p-12">
|
||||
<span class="font-bold text-black text-opacity-75 text-2xl md:text-3xl">{{ .Params.slogan }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- $imgRight := partial "utils/get-image" (dict "context" . "url" .Params.imgRight)}}
|
||||
{{- with $imgRight }}
|
||||
<div class="col-start-5 col-span-4 row-start-2 row-span-2 bg-local bg-cover shadow-2xl"
|
||||
style="background-image: url({{ . }});">
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user