mirror of https://github.com/onweru/compose.git

weru
13.55.2024 20909d29d9a8f59f4a60d4a46fe0ab2efc0b43ae
fix semantic html errors #120
5 files modified
68 ■■■■ changed files
layouts/_default/baseof.html 36 ●●●● patch | view | raw | blame | history
layouts/_default/term.html 2 ●●● patch | view | raw | blame | history
layouts/blog/list.html 2 ●●● patch | view | raw | blame | history
layouts/partials/head/index.html 24 ●●●● patch | view | raw | blame | history
layouts/partials/nav.html 4 ●●●● patch | view | raw | blame | history
layouts/_default/baseof.html
@@ -1,9 +1,11 @@
{{ $config := site.Params }}
{{ $context := . }}
{{- $config := site.Params }}
{{- $context := . }}
{{- $item_type := "http://schema.org/WebPage" }}
{{- $lang := site.Language.Lang }}
{{- $is_dark := $config.enableDarkMode }}
{{- $default_mode := $config.defaultLightingMode -}}
<!doctype html>
<html lang="{{ site.Language.Lang }}"{{ with $config.enableDarkMode }} class="dark"{{ end }}{{ with $config.defaultLightingMode }}
  data-mode="{{ . }}"
{{ end }}>
<html lang={{ $lang }}{{ with $is_dark }} class=dark{{ end }}{{ with $default_mode }} data-mode={{ . }}{{ end }} itemscope itemtype={{ $item_type }}>
<head>
  {{- partial "head/index" . }}
</head>
@@ -11,22 +13,22 @@
  <header class="nav_header">
    {{- partial "nav" . }}
  </header>
  {{ if or (eq .Section $config.blogDir) (eq .Type "search" ) }}
  {{- if or (eq .Section $config.blogDir) (eq .Type "search" ) }}
    {{- block "main" . }}{{ end }}
  {{ else }}
  {{- else }}
  <div class="main wrap pt-4">
    {{ $docSections := $config.docSections }}
    {{- $docSections := $config.docSections }}
    {{- with $docSections }}{{- else }}
      {{- $docSections = "docs" }}
    {{- end }}
    {{ $uniqueHomepage := .IsHome }}
    {{ if $config.uniqueHomepage }}
      {{ if .IsHome }}
        {{ $uniqueHomepage = true }}
      {{ end }}
    {{ else }}
      {{ $uniqueHomepage = false }}
    {{ end }}
    {{- $uniqueHomepage := .IsHome }}
    {{- if $config.uniqueHomepage }}
      {{- if .IsHome }}
        {{- $uniqueHomepage = true }}
      {{- end }}
    {{- else }}
      {{- $uniqueHomepage = false }}
    {{- end }}
    {{- if and (in $docSections .Section) (ne $uniqueHomepage true) }}
      {{- partial "document" . }}
    {{- else }}
@@ -35,7 +37,7 @@
      </div>
    {{- end -}}
  </div>
  {{ end }}
  {{- end }}
  {{- partial "scripts/translations" . -}}
  {{- partialCached "footer" . -}}
  {{- partialCached "sprites" . -}}
layouts/_default/term.html
@@ -20,7 +20,7 @@
    <a href="{{ $value.Permalink }}" {{ if eq $index 0 }} class=grid-reverse {{ end }}>
      <div class="article_thumb" style="background-image: url({{ $bg }})"></div>
      <div class="article_meta {{ if eq $index 0 }} center_y {{ end }}">
        <time class="post_date">{{ dateFormat "January 02, 2006" $value.Date }}</time>
        <div class="post_date">{{ dateFormat "January 02, 2006" $value.Date }}</div>
        <h3 class="article_title">{{ $value.Title }}</h3>
        <div class="article_excerpt {{ if eq $index 0 }} visible {{ end }}">
        <p>{{ $value.Summary | truncate 100 }}</p>
layouts/blog/list.html
@@ -22,7 +22,7 @@
    <a href="{{ $value.Permalink }}" {{ if eq $index 0 }} class="grid-reverse" {{ end }}>
      <div class="article_thumb" style="background-image: url({{ $bg }});"></div>
      <div class="article_meta {{ if eq $index 0 }} center_y {{ end }}">
        <time class="post_date">{{ dateFormat "January 02, 2006" $value.Date }}</time>
        <div class="post_date">{{ dateFormat "January 02, 2006" $value.Date }}</div>
        <h3 class="article_title">{{ $value.Title }}</h3>
        <div class="article_excerpt {{ if eq $index 0 }} visible {{ end }}">
        <p>{{ truncate 100 $value.Summary }}</p>
layouts/partials/head/index.html
@@ -16,29 +16,29 @@
{{- end }}
<title>{{ if and $t (ne (trim (lower $s) "") (trim (lower $t) "")) }}{{ $t }} | {{ end }}{{ $s }}</title>
{{- partial "opengraph" . }}
{{- partial "opengraph" . -}}
{{- $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") -}}
{{- $styles := resources.Get "sass/main.sass" | resources.ExecuteAsTemplate "main.sass" . | resources.ToCSS $options | resources.Fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}">
{{- $sp := site.Params }}
{{- with $sp.customCSS }}
{{- $config := site.Params }}
{{- with $config.customCSS }}
  {{- range . -}}
  <link rel="stylesheet" href="{{ . }}">
  {{- end }}
{{- end }}
{{ with $sp.metaThemeColor }}
{{- with $config.metaThemeColor }}
  <meta name="theme-color" content="{{.}}">
{{ end }}
{{- end }}
{{ if .Description }}
{{- if .Description }}
  <meta name="description" content="{{ .Description }}">
{{ else if .IsPage }}
  <meta name="description" content="{{ .Summary | plainify }}">
{{ else if $sp.Description }}
  <meta name="descripion" content="{{ $sp.Description }}">
{{ end }}
{{- else if .IsPage }}
  <meta name="description" content="{{ plainify .Summary }}">
{{- else if $config.Description }}
  <meta name="descripion" content="{{ $config.Description }}">
{{- end }}
{{- partial "head/liteyoutube" . }}
{{- partialCached "hooks/head" . }}
{{- partialCached "hooks/head" . -}}
layouts/partials/nav.html
@@ -7,9 +7,9 @@
        <picture data-lit="{{ $litPath }}" data-dark="{{ $darkPath }}">
            <img src="{{ $litPath }}" alt="{{ site.Title }} Logo">
        </picture>
        <label class="nav_toggle toggle" title='{{ T "site_menu" }}' role="button">
        <div class="nav_toggle toggle" title='{{ T "site_menu" }}'>
            {{ partial "sprite" (dict "icon" "harmburger") }}
        </label>
        </div>
    </a>
    <ul class="nav_body">
        <li class="nav-item">