mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 07:18:57 +00:00
✨ Feat: add unified custom template entry file layouts/partials/custom.html
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{{- partial "init/index.html" . -}}
|
||||
{{- partial "custom.html" . -}}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html itemscope itemtype="http://schema.org/WebPage" lang="{{ .Site.LanguageCode }}">
|
||||
@@ -14,6 +15,8 @@
|
||||
{{- partial "head/meta.html" . -}}
|
||||
{{- partial "head/link.html" . -}}
|
||||
{{- partial "head/seo.html" . -}}
|
||||
{{- /* Custom head */ -}}
|
||||
{{- block "custom-head" . }}{{ end -}}
|
||||
</head>
|
||||
<body data-header-desktop="{{ .Site.Params.header.desktopMode }}" data-header-mobile="{{ .Site.Params.header.mobileMode }}">
|
||||
{{- /* Check theme isDark before body rendering */ -}}
|
||||
|
||||
@@ -306,3 +306,6 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "plugin/analytics.html" . -}}
|
||||
|
||||
{{- /* Custom Assets */ -}}
|
||||
{{- block "custom-assets" . }}{{ end -}}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- /*
|
||||
In order to avoid upgrade conflicts and to easily reference theme components,
|
||||
It's recommended to copy this file from the theme to your project and rewrite it.
|
||||
*/ -}}
|
||||
|
||||
{{- define "custom-head" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-profile" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-aside" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-footer" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-widgets" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-assets" -}}
|
||||
{{- end -}}
|
||||
@@ -3,9 +3,12 @@
|
||||
{{- if ne $footerConfig.enable false -}}
|
||||
<footer class="footer">
|
||||
<div class="footer-container">
|
||||
{{- /* Custom Content */ -}}
|
||||
{{- /* TODO remove Custom Content */ -}}
|
||||
{{- partial (.Scratch.Get "customFilePath").footer . -}}
|
||||
|
||||
{{- /* Custom Footer */ -}}
|
||||
{{- block "custom-footer" . }}{{ end -}}
|
||||
|
||||
{{- /* Powered by Hugo and Theme - FixIt */ -}}
|
||||
{{- if ne $footerConfig.powered.enable false -}}
|
||||
<div class="footer-line powered{{ with $footerConfig.order.powered }} order-{{ . }}{{ end }}">
|
||||
|
||||
@@ -108,6 +108,9 @@
|
||||
</h3>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Custom Content */ -}}
|
||||
{{- /* TODO remove Custom Content */ -}}
|
||||
{{- partial (.Scratch.Get "customFilePath").profile . -}}
|
||||
|
||||
{{- /* Custom Profile */ -}}
|
||||
{{- block "custom-profile" . }}{{ end -}}
|
||||
</div>
|
||||
|
||||
@@ -49,11 +49,15 @@
|
||||
{{- if .Dark -}}
|
||||
{{- $style = printf "%v--bg-progress-dark: %v;" $style .Dark -}}
|
||||
{{- end -}}
|
||||
<div class="reading-progress-bar" {{ printf "style=\"%v\"" $style | safeHTMLAttr }}></div>
|
||||
<div class="reading-progress-bar" {{ printf `style="%v"` $style | safeHTMLAttr }}></div>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Custom widgets */ -}}
|
||||
{{- block "custom-widgets" . }}{{ end -}}
|
||||
|
||||
<noscript>
|
||||
<div class="noscript-warning">{{ T "baseof.noscript" }}</div>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
{{- /* EOF */ -}}
|
||||
|
||||
@@ -12,8 +12,12 @@
|
||||
<aside class="aside-collection animate__animated animate__fadeIn animate__faster" aria-label="{{ T "collections" }}">
|
||||
{{- /* Collection List */ -}}
|
||||
{{- partial "single/collection-list.html" . -}}
|
||||
{{- /* Custom part for aside */ -}}
|
||||
|
||||
{{- /* TODO remove Custom part for aside */ -}}
|
||||
{{- partial (.Scratch.Get "customFilePath").aside . -}}
|
||||
|
||||
{{- /* Custom Aside */ -}}
|
||||
{{- block "custom-aside" . }}{{ end -}}
|
||||
</aside>
|
||||
|
||||
<article class="page single">
|
||||
|
||||
Reference in New Issue
Block a user