various fixes; added button style for main menu

This commit is contained in:
Gabriele Musco 2021-12-27 08:46:31 +01:00
parent ae8c44e50b
commit 56637b5d7f
No known key found for this signature in database
GPG Key ID: 0587A5D65B5DC99E
2 changed files with 72 additions and 46 deletions

View File

@ -58,10 +58,6 @@ summaryLength = 70 # number of words for article summaries
fitImageInArticlePreview = false # make article preview images fit the article preview instead of getting cropped fitImageInArticlePreview = false # make article preview images fit the article preview instead of getting cropped
articleSummary = true # show a summary in article preview; default true articleSummary = true # show a summary in article preview; default true
navtype = "standard" # changes the style of the pagination, available styles are: "standard", "circles"
enableShadow = false
fontFamily = "JetBrains Mono" # changes the font, default "JetBrains Mono" fontFamily = "JetBrains Mono" # changes the font, default "JetBrains Mono"
titleFontFamily = "JetBrains Mono" # font used for titles and headings titleFontFamily = "JetBrains Mono" # font used for titles and headings
monospaceFontFamily = "JetBrains Mono" # changes the monospace font for code, default "JetBrains Mono" monospaceFontFamily = "JetBrains Mono" # changes the monospace font for code, default "JetBrains Mono"
@ -78,6 +74,9 @@ summaryLength = 70 # number of words for article summaries
tagsInArticlePreview = true # enable tags list in the article preview card 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 discreteCards
bigArticleTitle = false # makes the title in the single article view bigger 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
menuStyle = "standard" # changes the style of the main site navigation menu, available styles are: "standard", "buttons"
enableSearch = true # enable search page enableSearch = true # enable search page
searchbarEverywhere = true # if the searchbar should be shown in every page; requires enableSearch searchbarEverywhere = true # if the searchbar should be shown in every page; requires enableSearch

View File

@ -133,6 +133,30 @@ body {
} }
} }
@mixin roundButtonLike {
display: inline-block;
border-radius: $border_radius;
background-color: var(--default_hl_bg);
color: var(--default_fg);
padding: ($content_spacing / 2);
margin: ($content_spacing / 6) 0;
transition: background-color .15s ease-in-out !important;
border-bottom: none;
&:hover, &:focus {
background-color: var(--default_accent);
}
box-shadow: $shadow;
}
@mixin buttonLike {
{{ if eq (site.Params.navtype | default "standard") "circles" }}
@include roundButtonLike;
{{ else }}
@include linkLike;
{{ end }}
font-size: #{1.2 * $base_font_size};
}
a { a {
@include linkLike; @include linkLike;
} }
@ -520,21 +544,6 @@ ul.list {
} }
} }
@mixin roundButtonLike {
display: inline-block;
border-radius: $border_radius;
background-color: var(--default_hl_bg);
color: var(--default_fg);
padding: ($content_spacing / 2);
margin: ($content_spacing / 6) 0;
transition: background-color .15s ease-in-out !important;
border-bottom: none;
&:hover, &:focus {
background-color: var(--default_accent);
}
box-shadow: $shadow;
}
.loadMoreButton { .loadMoreButton {
text-align: center; text-align: center;
font-size: 1.2em; font-size: 1.2em;
@ -605,6 +614,29 @@ header {
font-size: .9em; font-size: .9em;
ul { ul {
li { li {
{{ if eq .Site.Params.menuStyle "buttons" }}
margin: 5px 2px;
margin-right: 5px;
&:last-child {
margin-right: none;
}
a {
{{ if eq (site.Params.navtype | default "standard") "circles" }}
@include roundButtonLike;
{{ else }}
font-family: "Symbols Nerd Font", $main_font;
background-color: var(--default_hl_bg);
transition: background-color .15s ease-in-out;
&:hover, &:active {
background-color: var(--default_accent);
}
{{ end }}
box-sizing: border-box;
color: var(--default_fg);
margin: 0;
padding: 8px 15px;
}
{{ else }}
border-right: 1px solid var(--default_accent); border-right: 1px solid var(--default_accent);
&:last-child { &:last-child {
border-right: none; border-right: none;
@ -616,6 +648,7 @@ header {
text-decoration: underline; text-decoration: underline;
} }
} }
{{ end }}
} }
} }
} }
@ -629,15 +662,6 @@ a.discreteTag {
@include roundButtonLike; @include roundButtonLike;
} }
@mixin buttonLike {
{{ if eq (site.Params.navtype | default "standard") "circles" }}
@include roundButtonLike;
{{ else }}
@include linkLike;
{{ end }}
font-size: #{1.2 * $base_font_size};
}
.cactus-button, .cactus-login-buttons > button { .cactus-button, .cactus-login-buttons > button {
font-family: $main_font; font-family: $main_font;
padding: 0; padding: 0;
@ -670,11 +694,11 @@ input, textarea, textarea.cactus-editor-textarea {
border-radius: 0 !important; border-radius: 0 !important;
{{ end }} {{ end }}
box-sizing: border-box; box-sizing: border-box;
max-width: 100%;
min-width: 10px;
font-family: "Symbols Nerd Font", $main_font; font-family: "Symbols Nerd Font", $main_font;
background-color: var(--default_hl_bg) !important; background-color: var(--default_hl_bg) !important;
color: var(--default_fg); color: var(--default_fg);
max-width: 100%;
min-width: 10px;
padding: 12px; padding: 12px;
border: 2px solid transparent !important; border: 2px solid transparent !important;
border-color: transparent; border-color: transparent;
@ -822,23 +846,27 @@ input, textarea, textarea.cactus-editor-textarea {
display: none; display: none;
position: absolute; position: absolute;
z-index: 99999; z-index: 99999;
right: 6px; right: 15px;
padding: 12px; padding: 2px 5px;
width: 120px; width: 120px;
{{ if eq .Site.Params.navtype "circles" }} {{ if eq .Site.Params.navtype "circles" }}
border-radius: $border_radius; border-radius: $border_radius;
{{ end }} {{ end }}
border: 2px solid var(--default_accent); border: 2px solid var(--default_stroke);
background-color: var(--default_hl_bg); background-color: var(--default_hl_bg);
flex-direction: column; flex-direction: column;
li { li {
border-right: none !important; border-right: none !important;
display: block; display: block;
text-align: center; text-align: center;
margin: 0;
a { a {
box-shadow: none;
box-sizing: border-box;
display: block; display: block;
width: 100%; width: 100%;
padding: 0; padding: 10px;
margin: 3px 0;
} }
} }
} }
@ -1120,7 +1148,7 @@ header.jumbotronContainer {
margin-bottom: 0; margin-bottom: 0;
padding: 0 15px; padding: 0 15px;
box-shadow: $shadow; box-shadow: $shadow;
> *:last-child, > *:first-child { > *:first-child {
padding-bottom: 15px; padding-bottom: 15px;
padding-top: 15px; padding-top: 15px;
} }
@ -1138,7 +1166,6 @@ header.jumbotronContainer {
li { li {
border-right: none; border-right: none;
a { a {
padding: 6px;
display: block; display: block;
} }
} }