diff --git a/assets/css/main.less b/assets/css/main.less index 90e4a8e..01a871d 100644 --- a/assets/css/main.less +++ b/assets/css/main.less @@ -67,12 +67,16 @@ html{ background-color: @gb-dm-bg0; + scrollbar-color: @gb-dm-fg3 transparent; + scrollbar-width: thin; } body{ background-color: @gb-dm-bg0; color: @gb-dm-fg0; margin: 0; + scrollbar-color: @gb-dm-fg3 transparent; + scrollbar-width: thin; } .container{ @@ -102,10 +106,28 @@ main{ } } -pre{ - overflow: auto; +h2{ + text-decoration: underline; + &:not(:first-child){ + margin-top: 2em; + } +} +h3{ + color: @gb-dm-fg3; } +p{ + line-height: 1.3em; +} + +li{ + margin: 0.5em 0; +} + +//pre{ +// overflow: auto; +//} + article{ background-color: @gb-dm-bg1; margin: 1em; @@ -178,10 +200,16 @@ a:active, a:hover{ // margin-bottom: 0; //} -p code{ +p code, li code{ display: inline-block; background-color: @gb-dm-bg2; - padding: .2em; + padding: 0 0.3em; + border-radius: 1em; + box-shadow: 0px 0px 1px 0px @gb-dm-dark-red; + transition: box-shadow .2s ease; + &:hover{ + box-shadow: 0px 0px 1px 0px @gb-dm-dark-green; + } } @@ -198,11 +226,29 @@ pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } code.sourceCode > span { color: inherit; text-decoration: inherit; } -div.sourceCode { margin: 1em 0; } -pre.sourceCode { margin: 0; } -@media screen { -div.sourceCode { overflow: auto; } +div.sourceCode, article > pre { + margin: 1em 0; + padding: 0; + background-color: @gb-dm-bg0-hard; + border-radius: 1em; + box-shadow: 0px 0px 1px 0px @gb-dm-dark-red; + transition: box-shadow .2s ease; + overflow: hidden; + &:hover{ + box-shadow: 0px 0px 1px 0px @gb-dm-dark-green; + } + pre.sourceCode{ + padding: 1em; + margin: 0; + overflow: auto; + scrollbar-width: thin; + } } +article>pre{ + padding: 1em; + overflow: auto; +} +pre.sourceCode { margin: 0; } @media print { pre > code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } @@ -240,7 +286,7 @@ code span.cn { color: #880000; } /* Constant */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */ -code span.dt { color: #902000; } /* DataType */ +code span.dt { color: @gb-dm-dark-red; } /* DataType */ code span.dv { color: #40a070; } /* DecVal */ code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.ex { color: @gb-dm-dark-blue; } /* Extension */ diff --git a/build.sh b/build.sh index 653d713..637e62c 100755 --- a/build.sh +++ b/build.sh @@ -20,12 +20,15 @@ blog(){ makeIntro(){ local file="$1" local output="tmp/intros/$file" + local rssoutput="tmp/rss/$file" # We delete tmp each time the build script runs, so if the file exists, we have already generated one this time [ -f "$output" ] && return 1 mkdir -p "${output%/*}" + mkdir -p "${rssoutput%/*}" local info="$(sed -n '/---/,/---/p' "$file" | sed '/^$/,$d' | sed -n '1,/---/p' | sed '/^---$/d')" local slug=$(getBlogSlug "$file") local date="$(echo "$info" | yq -r .date)" + local rfc822="$(date --utc -d "$date" "+%a, %d %b %Y %H:%M:%S") UT" local tags="$(echo "$info" | yq -r 'if ( .tags | type ) == "array" then .tags else [ .tags ] end | join("\n")' | awk '{print "
$description
" > "$output" + echo "