mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-12-23 13:59:44 +01:00
refine blockquote & epigraph
This commit is contained in:
parent
d77a621536
commit
bb73762987
3 changed files with 14 additions and 15 deletions
4
assets/scss/vendor/tufte.scss
vendored
4
assets/scss/vendor/tufte.scss
vendored
|
@ -151,7 +151,7 @@ p {
|
||||||
|
|
||||||
/* Chapter Epigraphs */
|
/* Chapter Epigraphs */
|
||||||
div.epigraph {
|
div.epigraph {
|
||||||
margin: 5em 0;
|
margin: 3em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.epigraph > blockquote {
|
div.epigraph > blockquote {
|
||||||
|
@ -185,7 +185,7 @@ blockquote p {
|
||||||
blockquote footer {
|
blockquote footer {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
text-align: right;
|
text-align: right !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol,
|
ol,
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<blockquote cite="{{ .Get "cite" }}">
|
<blockquote cite="{{ .Get "cite" }}">
|
||||||
<p>
|
{{ .Inner | $.Page.RenderString (dict "display" "block") }}
|
||||||
{{ .Inner | markdownify }}
|
<footer>
|
||||||
</p>
|
{{- with .Get "author" -}}{{ . }}{{- end -}}
|
||||||
<footer>{{ .Get "footer" }}{{ with .Get "cite" }}, <cite>{{ . }}</cite>{{ end }}</footer>
|
{{- with .Get "cite" -}}, <cite>{{ . | markdownify }}</cite>{{- end -}}
|
||||||
|
{{- with .Get "detail" -}}, {{ . | markdownify }}{{- end -}}
|
||||||
|
</footer>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
<div class="epigraph">
|
<div class="epigraph">
|
||||||
<blockquote>
|
<blockquote>
|
||||||
{{ $t := .Get "type" }}
|
{{ .Inner | $.Page.RenderString (dict "display" "block") }}
|
||||||
{{ if eq $t "compact" }}{{ .Inner | markdownify }}{{ else }}<p>{{ .Inner | markdownify }}</p>{{ end }}
|
|
||||||
{{ if .IsNamedParams }}
|
{{ if .IsNamedParams }}
|
||||||
<footer>
|
<footer>
|
||||||
{{ with .Get "pre" }}{{ . }}{{ end }}
|
{{- with .Get "author" -}}{{ . }}{{- end -}}
|
||||||
{{ with .Get "link" }}<a href={{ . }}>{{ end }}
|
{{- with .Get "cite" -}}, <cite>{{ . | markdownify }}</cite>{{- end -}}
|
||||||
{{ with .Get "cite" }}<cite>{{ . }}</cite>{{ end }}
|
{{- with .Get "detail" -}}, {{ . | markdownify }}{{- end -}}
|
||||||
</a>
|
</footer>
|
||||||
{{ with .Get "post" }}{{ . }}{{ end }}
|
|
||||||
</footer>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue