From 7316238f16655bd127b04476bbf7864b27f940f9 Mon Sep 17 00:00:00 2001 From: Sivaldo Date: Sat, 13 Jun 2026 19:20:23 -0300 Subject: Commit inicial --- layouts/txts/single.html | 224 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 layouts/txts/single.html (limited to 'layouts/txts/single.html') diff --git a/layouts/txts/single.html b/layouts/txts/single.html new file mode 100644 index 0000000..d8f7eb1 --- /dev/null +++ b/layouts/txts/single.html @@ -0,0 +1,224 @@ +{{ define "title" }}{{ .Title }} · {{ .Site.Title }}{{ end }} + +{{ define "header" }} + {{ $discSlug := .RelPermalink | strings.TrimSuffix "/" | path.Dir | path.Base }} + direito + {{ range $.Site.Sections }} + {{ if and (eq .Section "txts") (eq (.RelPermalink | strings.TrimSuffix "/" | path.Base) $discSlug) }} + / + {{ .Title }} + {{ end }} + {{ end }} + / + {{ .Title }} +{{ end }} + +{{ define "main" }} +{{ $slug := .File.BaseFileName }} +{{ $discSlug := .RelPermalink | strings.TrimSuffix "/" | path.Dir | path.Base }} + +{{/* Encontra quiz do assunto (exercício, não simulado) */}} +{{ $quizPage := false }} +{{ range $.Site.RegularPages }} + {{ if eq .Section "quizzes" }} + {{ $parent := .File.Dir | strings.TrimSuffix "/" | path.Base }} + {{ if and (eq $parent $discSlug) (eq .File.BaseFileName $slug) }} + {{ if not (or (.Params.simulado) (in (.File.BaseFileName | lower) "simulado")) }} + {{ $quizPage = . }} + {{ end }} + {{ end }} + {{ end }} +{{ end }} + +
+
+ {{ range $.Site.Sections }} + {{ if and (eq .Section "txts") (eq (.RelPermalink | strings.TrimSuffix "/" | path.Base) $discSlug) }} + {{ .Title }} + {{ end }} + {{ end }} + assunto +
+

{{ .Title }}

+ + {{/* Colapsáveis: guia de estudo e materiais do assunto */}} + {{ $hasExtras := or .Params.guide (or .Params.files (or .Params.videos .Params.audios)) }} + {{ if $hasExtras }} +
+ {{ partial "disc-extras.html" . }} +
+ {{ end }} + + + +
{{ .Content }}
+ + {{/* Notas de rodapé — renderizadas pelo Hugo automaticamente no .Content; + o floater (footnotes.js) intercepta os links #fn: e mostra tooltip */}} + + {{/* Questões do assunto — quiz inline embutido */}} + {{ if $quizPage }} +
+
+ exercícios deste assunto + modo completo → +
+
+ +
+ + +
+ + {{ end }} + + {{ if .Params.references }} +
+
referências
+
+ {{ range .Params.references }}

{{ . }}

{{ end }} +
+
+ {{ end }} +
+ +{{ end }} -- cgit v1.2.3