main
html 63 lines 2.75 KB
Raw
1 {{- define "main" -}}
2 <header class="page-header">
3 {{- partial "breadcrumbs.html" . }}
4 <h1>{{ .Title }}</h1>
5 {{- with .Description }}
6 <div class="post-description">{{ . }}</div>
7 {{- else }}
8 <div class="post-description">All {{ .Pages.Len }} weekly issue{{ if ne .Pages.Len 1 }}s{{ end }} in this topic.</div>
9 {{- end }}
10 </header>
11
12 {{/* RSS Subscribe Link */}}
13 <div class="topic-subscribe" style="margin: 1.5rem 0; padding: 1rem 1.5rem; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; gap: 1rem; background: var(--code-bg);">
14 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 11a9 9 0 0 1 9 9"/><path d="M4 4a16 16 0 0 1 16 16"/><circle cx="5" cy="19" r="1"/></svg>
15 <div>
16 <strong>Subscribe to {{ .Title }}</strong>
17 <div style="font-size: 0.9em; opacity: 0.8;">Get updates whenever new issues are published in this topic.</div>
18 </div>
19 <a href="{{ .RelPermalink }}index.xml" style="margin-left: auto; padding: 0.5rem 1rem; background: var(--primary); color: var(--theme); border-radius: 6px; text-decoration: none; font-weight: 500;">Subscribe via RSS</a>
20 </div>
21
22 {{/* Editorial Stance */}}
23 {{- with .Params.editorial_stance }}
24 <section class="topic-editorial" style="margin: 1.5rem 0;">
25 <h2>What This Topic Covers</h2>
26 <p>{{ . }}</p>
27 </section>
28 {{- end }}
29
30 {{- if .Content }}
31 <div class="post-content md-content">
32 {{ .Content }}
33 </div>
34 {{- end }}
35
36 {{/* Prediction Accuracy */}}
37 <section class="topic-predictions" style="margin: 2rem 0; padding: 1.5rem; border: 1px solid var(--border); border-radius: 8px;">
38 <h2>Prediction Accuracy</h2>
39 {{- if .Params.prediction_accuracy }}
40 <div style="display: flex; align-items: center; gap: 1rem;">
41 <span style="font-size: 2rem; font-weight: 700;">{{ .Params.prediction_accuracy }}%</span>
42 <span>of predictions in this topic were confirmed in follow-up issues.</span>
43 </div>
44 {{- else }}
45 <p style="opacity: 0.7; font-style: italic;">Prediction tracking for this topic is not yet available. As more weekly issues are published, accuracy data will appear here.</p>
46 {{- end }}
47 </section>
48
49 {{/* Recent Weekly Issues */}}
50 <section class="taxonomy-grid" aria-label="{{ .Title }} pages" style="margin-top: 2rem;">
51 <h2>Recent Issues ({{ .Pages.Len }})</h2>
52 {{- range .Pages.ByDate.Reverse }}
53 <article class="home-report-card taxonomy-card">
54 <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
55 <p>{{ .Params.summary | default .Summary }}</p>
56 <div class="home-report-meta">
57 <span>{{ .Date.Format "2006-01-02" }}</span>
58 <span>{{ .Type | humanize }}</span>
59 </div>
60 </article>
61 {{- end }}
62 </section>
63 {{- end -}}