1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-18 19:43:16 +00:00

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>
This commit is contained in:
alexandrev-tibco
2026-05-02 16:22:52 +02:00
parent a07f9df934
commit c48acd1a8c
4 changed files with 60 additions and 20 deletions
+6 -2
View File
@@ -12,11 +12,15 @@
<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") -}}
<body{{ if $ethicalAds }} class="has-ethicalads"{{ end }}>
{{ partial "ethicalads.html" . }}
{{- $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>