mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-29 00:00:36 +00:00
fix: add column size attribute (#278)
This commit is contained in:
parent
6a827d20f9
commit
bf9cf7578a
@ -1,4 +1,11 @@
|
|||||||
<div class="gblog-columns flex flex-wrap flex-mobile-column">
|
{{- $size := default "regular" (.Get "size" | lower) }}
|
||||||
|
|
||||||
|
{{- if not (in (slice "regular" "large" "small") $size) }}
|
||||||
|
{{- $size = "regular" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="gblog-columns gblog-columns--{{ $size }} flex flex-gap flex-mobile-column">
|
||||||
{{ range split .Inner "<--->" }}
|
{{ range split .Inner "<--->" }}
|
||||||
<div class="gblog-columns__content gblog-markdown--nested flex-even">
|
<div class="gblog-columns__content gblog-markdown--nested flex-even">
|
||||||
{{ . | $.Page.RenderString }}
|
{{ . | $.Page.RenderString }}
|
||||||
|
@ -79,6 +79,15 @@
|
|||||||
|
|
||||||
.flex-mobile-column {
|
.flex-mobile-column {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
|
&.gblog-columns {
|
||||||
|
margin: $padding-32 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gblog-columns__content {
|
||||||
|
min-width: auto;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.gblog-footer {
|
.gblog-footer {
|
||||||
|
@ -72,13 +72,25 @@
|
|||||||
|
|
||||||
// {{< columns >}}
|
// {{< columns >}}
|
||||||
.gblog-columns {
|
.gblog-columns {
|
||||||
margin-left: -$padding-16;
|
&--regular > :first-child {
|
||||||
margin-right: -$padding-16;
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--small > :first-child {
|
||||||
|
flex: 0.35;
|
||||||
|
min-width: $body-min-width * 0.35;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--large > :first-child {
|
||||||
|
flex: 1.65;
|
||||||
|
min-width: $body-min-width * 1.65;
|
||||||
|
}
|
||||||
|
|
||||||
&__content {
|
&__content {
|
||||||
|
flex: 1 1;
|
||||||
margin: $padding-16 0;
|
margin: $padding-16 0;
|
||||||
min-width: $body-min-width * 0.66;
|
min-width: $body-min-width * 0.66;
|
||||||
padding: 0 $padding-16;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gblog-post__anchor {
|
.gblog-post__anchor {
|
||||||
|
Loading…
Reference in New Issue
Block a user