1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-17 18:53:15 +00:00
Files
xslt-lab/site/layouts/_default/baseof.html
T
alexandrev-tibco c48acd1a8c Add sticky sidebar ad to blog articles, fix EA script loading
- Article pages (single.html): two-column grid layout — article + 160px
  sidebar with sticky EA ad (id="xsltplayground-blog")
- Non-article pages (home, list): keep existing sticky header bar
  (id="xsltplayground-blog-header")
- Move EA script to <head> in baseof.html so it loads on all pages
  regardless of placement; remove script tag from ethicalads partial
- has-ethicalads body class now only applied on non-article pages
  (no 64px header-offset shift on article pages)
- Sidebar hidden on viewports <= 860px (mobile/tablet)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-02 16:22:52 +02:00

50 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.subtitle }}{{ end }}">
<link rel="canonical" href="{{ .Permalink }}">
<meta property="og:title" content="{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}">
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.subtitle }}{{ end }}">
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
{{ partial "schema-app.html" . }}
{{ partial "adsense/head.html" . }}
{{- if and .Site.Params.ethicalads.publisher (ne hugo.Environment "development") -}}
<script async src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script>
{{- end -}}
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
</head>
{{- $ethicalAds := and .Site.Params.ethicalads.publisher (ne hugo.Environment "development") -}}
{{- $ethicalAdsHeader := and $ethicalAds (not .IsPage) -}}
<body{{ if $ethicalAdsHeader }} class="has-ethicalads"{{ end }}>
{{- if $ethicalAdsHeader -}}{{ partial "ethicalads.html" . }}{{- end -}}
<header class="site-header">
<div class="container header-grid">
<div>
<a class="brand" href="{{ "/" | relURL }}">{{ .Site.Title }}</a>
<p class="tagline">{{ .Site.Params.subtitle }}</p>
</div>
<nav>
<ul class="nav">
{{ range .Site.Menus.main }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
</div>
</header>
<main class="container">
{{ block "main" . }}{{ end }}
</main>
<footer class="site-footer">
<div class="container footer-grid">
<p>Built with Hugo · {{ now.Format "2006-01-02" }}</p>
<p class="muted">Repo: <a href="https://github.com/alexandrev/xslt-lab">alexandrev/xslt-lab</a></p>
</div>
</footer>
</body>
</html>