diff --git a/README.md b/README.md index d57a3cc..ecf3217 100644 --- a/README.md +++ b/README.md @@ -69,10 +69,10 @@ summaryLength = 70 # number of words for article summaries contentWidth = "1000px" # maximum width of the site content, css syntax - discreteCards = false # enable discrete card style; default false - discreteTags = false # enable discrete tag style; default false + paperCards = false # enable paper card style; default false + buttonTags = false # enable button tag style; default false tagsInArticlePreview = true # enable tags list in the article preview card - gridView = false # show post list as a grid. goes well with discreteCards + gridView = false # show post list as a grid. goes well with paperCards bigArticleTitle = false # makes the title in the single article view bigger navtype = "standard" # changes the style of the pagination, available styles are: "standard", "circles" enableShadow = false # shows a shadow around some elements diff --git a/assets/scss/style.scss b/assets/scss/style.scss index b944772..31618af 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -372,13 +372,13 @@ h6 {font-size: 0.7 * $base_font_size * $title_font_mult;} display: block; padding-bottom: 25px; - &.discrete { + {{ if (.Site.Params.paperCards | default false) }} background-color: var(--default_hl_bg); border-radius: $border_radius; box-shadow: $shadow; padding: 20px; padding-top: 1px; - } + {{ end }} &.single { {{ if (.Site.Params.bigArticleTitle | default false) }} @@ -396,18 +396,16 @@ h6 {font-size: 0.7 * $base_font_size * $title_font_mult;} grid-template-columns: 1fr; &.gridView { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); - .card { - &.discrete { - } - } } } // only hide hr in cards if they are in the article list // cards in list are divs, cards as in full-blown articles use the article tag -.postlistitem.card.discrete { - hr { display: none; } -} +{{ if (.Site.Params.paperCards | default false) }} + .postlistitem.card { + hr { display: none; } + } +{{ end}} .postlistitem.card div { img { @@ -538,10 +536,10 @@ ul.list { margin: 0; } } - &.discrete { + {{ if (.Site.Params.paperCards | default false) }} border-radius: $border_radius; padding: 0; - } + {{ end }} } } @@ -659,7 +657,7 @@ header { margin: $content_spacing 0; } -a.discreteTag { +a.buttonTag { @include roundButtonLike; } @@ -686,10 +684,7 @@ a.discreteTag { } input, textarea, textarea.cactus-editor-textarea { - {{ if or - (site.Params.discreteCards | default false) - (eq (site.Params.navtype | default "standard") "circles") - }} + {{ if (site.Params.paperCards | default false) }} @include buttonLike; {{ else }} border-radius: 0 !important; @@ -717,7 +712,7 @@ input, textarea, textarea.cactus-editor-textarea { } .cactus-login-form { - {{ if (site.Params.discreteCards | default false) }} + {{ if (.Site.Params.paperCards | default false) }} border-radius: $border_radius; {{ else }} border-radius: 0; @@ -782,7 +777,7 @@ input, textarea, textarea.cactus-editor-textarea { width: 450px; max-width: 100%; padding: 24px; - {{ if site.Params.discreteCards }} + {{ if (.Site.Params.paperCards | default false) }} border-radius: $border_radius; {{ end }} h1, h2, h3, h4 { diff --git a/data/colors.yml b/data/colors.yml index aafbc36..2f144fc 100644 --- a/data/colors.yml +++ b/data/colors.yml @@ -2,7 +2,7 @@ default: dark # light auto_switch: false # set to true to respect the user preference dark: bg: '#242629' # main site background - hl_bg: '#34363b' # card and circle navigation background color for discrete card mode + hl_bg: '#34363b' # card and circle navigation background color for paper card mode fg: 'white' # font color dim_fg: '#bababa' # will be used for secondary information like dates and tags stroke: '#4f4f4f' # stroke/border color used mostly in the icon menu tooltip diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1f08e6d..2b60730 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "main" }} {{- partial "inject/content-before.html" . -}} -
+

{{ .Title }}

{{ if (.Params.showDate | default true) }}

@@ -20,14 +20,14 @@

{{ .Content }}
{{ if .Params.tags }} - {{ if not .Site.Params.discreteCards }}
{{ end }} + {{ if not .Site.Params.paperCards }}
{{ end }}

{{ i18n "tagsColumn" }} {{ range sort .Params.tags }} #{{ . }} {{ end }} diff --git a/layouts/partials/article_card.html b/layouts/partials/article_card.html index 75b6d9a..0dcafd0 100644 --- a/layouts/partials/article_card.html +++ b/layouts/partials/article_card.html @@ -1,4 +1,4 @@ -

+

{{ .Title }} diff --git a/layouts/partials/featured_articles.html b/layouts/partials/featured_articles.html index afe7ab7..4dfdf2d 100644 --- a/layouts/partials/featured_articles.html +++ b/layouts/partials/featured_articles.html @@ -1,7 +1,7 @@