diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..cd9caef --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,4 @@ +[2021.07.28] + - Added the possibility of loading a config.cfg file like 'saait' does + - Renamed generate.sh to gensite + - Renamed create.sh to mkpage diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f442032 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +PREFIX ?= /usr/local +DESTDIR ?= + +install: + install -m0755 gensite $(DESTDIR)$(PREFIX)/bin/gensite + install -m0755 mkpage $(DESTDIR)$(PREFIX)/bin/mkpage + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/gensite + rm -f $(DESTDIR)$(PREFIX)/bin/mkpage diff --git a/generate.sh b/gensite similarity index 91% rename from generate.sh rename to gensite index 5ae7ac5..8fe0846 100755 --- a/generate.sh +++ b/gensite @@ -1,26 +1,23 @@ #!/bin/sh -# site title (part of ${pagetitle} probably). -sitetitle="" -# site language. -sitelang="en" -# main site domain. -sitedomain="" -# relative site url, can be "/blog" or something. -siteurlrel="" -# full site url. -siteurlfull="${sitedomain}${siteurlrel}" -# site keywords (global default), don't use too many. -sitekeywords="" -# site description (global default). -sitedescription="" -# site mail used for contact "mail link". -sitemail="" -# site author (global). -siteauthor="" -# site last updated (default use date when script was run). -siteupdated=$(date "+%Y-%m-%dT%H:%M:%SZ") -# site owner's projects url (can be github or anything) -siteprojects="" + +if ! [ -f "$PWD/config.cfg" ];then + cat << EOF > config.cfg + sitetitle="" + sitelang="" + sitedomain="" + siteurlrel="" + siteurlfull="" + sitekeywords="" + sitedescription="" + sitemail="" + siteauthor="" + siteupdated=$(date +%Y-%m-%dT%H:%M:%SZ) + siteprojects="" +EOF +else + source $PWD/config.cfg +fi + # directories containing content and metadata. # NOTE: it's recommended to use absolute paths here, use "." for current directory. pagesdir="pages" @@ -31,12 +28,12 @@ markdown="smu" #gnudate(fmt,date) gnudate() { - date "+$1" -d "$2" + date "+$1" -d "$2" >/dev/null 2&>1 } #bsddate(fmt,date) bsddate() { - date -j "+$1" "$(printf '%s' "$2" | tr -Cd '[:digit:]')" + date -j "+$1" "$(printf '%s' "$2" | tr -Cd '[:digit:]')" >/dev/null 2&>1 } # added for compatibility with GNU and BSD date. diff --git a/create.sh b/mkpage similarity index 100% rename from create.sh rename to mkpage diff --git a/output/style.css b/output/style.css index da65229..f86c4fe 100644 --- a/output/style.css +++ b/output/style.css @@ -1,579 +1,349 @@ -@charset "UTF-8"; /* - * Make web 2.0 websites without JavaScript!! - * Developers : KiddyTheKid & Nova - * Licensed under GNU Affero General Public License version 3 - * Version : 1.1.2 + * envs.net - CSS Style + * © 2019-2021 + * */ -@keyframes anim-nova-toggle { - from { - max-height: 0px; } - to { - max-height: 500px; } } -@font-face { - font-family: 'Oswald'; - src: url("fonts/Oswald-Regular.ttf") format("truetype"); - font-weight: normal; - font-style: normal; } +@import "https://envs.net/fonts/jetbrains-mono/font.css"; -@font-face { - font-family: 'Oswald Bold'; - src: url("fonts/Oswald-Bold.ttf") format("truetype"); - font-weight: normal; - font-style: bold; } +* { font-family: 'JetBrains Mono', 'monospace'; } -@font-face { - font-family: 'Oswald Extra Light'; - src: url("fonts/Oswald-ExtraLight.ttf") format("truetype"); - font-weight: normal; - font-style: normal; } -@font-face { - font-family: 'Oswald Light'; - src: url("fonts/Oswald-Light.ttf") format("truetype"); - font-weight: normal; - font-style: normal; } - -@font-face { - font-family: 'Oswald Medium'; - src: url("fonts/Oswald-Medium.ttf") format("truetype"); - font-weight: normal; - font-style: normal; } - -@font-face { - font-family: 'Oswald Semi Bold'; - src: url("fonts/Oswald-SemiBold.ttf") format("truetype"); - font-weight: normal; - font-style: bold; } - -* { - font-family: 'Oswald','monospace'; - margin: 0; - padding: 0; } - *:root { - background: #000000; - color: #A9A9A9; } - -address, area, article, aside, audio, blockquote, datalist, -dl, details, fieldset, figure, form, input, iframe, meter, -nav, ol, optgroup, option, output, p, pre, progress, ruby, -section { - margin-bottom: 1rem; } - -.container { - position: relative; - width: 100%; - max-width: 960px; - margin: 0 auto; - padding: 0 20px; - box-sizing: border-box; } - @media (min-width: 400px) { - .container { - width: 85%; - padding: 0; } } - @media (min-width: 550px) { - .container { - width: 80%; } } -.row .col { - width: 100%; - float: left; - box-sizing: border-box; } - @media (min-width: 550px) { - .row .col { - margin-left: 4%; } - .row .col:first-child, .row .col:first-child { - margin-left: 0; } } -@media (min-width: 550px) { - .row .one { - width: 4.66666666667%; } - .row .two { - width: 13.3333333333%; } - .row .three { - width: 22%; } - .row .four { - width: 30.6666666667%; } - .row .five { - width: 39.3333333333%; } - .row .six { - width: 48%; } - .row .seven { - width: 56.6666666667%; } - .row .eight { - width: 65.3333333333%; } - .row .nine { - width: 74.0%; } - .row .ten { - width: 82.6666666667%; } - .row .eleven { - width: 91.3333333333%; } - .row .twelve { - width: 100%; - margin-left: 0; } - .row .fill-one { - margin-left: 8.66666666667%; } - .row .fill-two { - margin-left: 17.3333333333%; } - .row .fill-three { - margin-left: 26%; } - .row .fill-four { - margin-left: 34.6666666667%; } - .row .fill-five { - margin-left: 43.3333333333%; } - .row .fill-six { - margin-left: 52%; } - .row .fill-seven { - margin-left: 60.6666666667%; } - .row .fill-eight { - margin-left: 69.3333333333%; } - .row .fill-nine { - margin-left: 78.0%; } - .row .fill-ten { - margin-left: 86.6666666667%; } - .row .fill-eleven { - margin-left: 95.3333333333%; } } - -blockquote { - padding: 1.5rem; - background: #111111; - border-left: 5px solid #222222; } - blockquote *:last-child { - padding-bottom: 0; - margin-bottom: 0; } - -fieldset { - margin-top: 1rem; - padding: 2rem; - border: 1px solid #222222; - border-radius: 4px; } - -input { - font-family: "Oswald", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - padding: 6px 12px; - margin-bottom: .5rem; - background: #111111; - color: #eeeeee; - border: 1px solid #222222; - border-radius: 4px; - box-shadow: none; - box-sizing: border-box; } - -img { - margin-bottom: 1rem; - max-width: 100%; } - -ol { - padding-left: 2rem; } - ol ul { - margin-bottom: 0; } - ol ol { - margin-bottom: 0; } - -pre { - font-family: Consolas, monaco, "Ubuntu Mono", "Liberation Mono", "Courier New", Courier, monospace; - background: #111111; - border: 1px solid #222222; - border-radius: 4px; - padding: 3px 6px; - font-size: 0.9em; - padding: 1rem 1.4rem; - max-width: 100%; - overflow: auto; } - pre code { - background: inherit; - font-size: inherit; - color: inherit; - border: 0; - padding: 0; - margin: 0; } - -table { - margin-bottom: 1rem; - border-collapse: collapse; - width: 100%; } - table caption { - font-weight: bold; - margin-bottom: .5rem; } - -textarea { - margin-bottom: 1rem; - max-width: 100%; - padding: 6px 12px; - margin-bottom: .5rem; - background: #111111; - color: #eeeeee; - border: 1px solid #222222; - border-radius: 4px; - box-shadow: none; - box-sizing: border-box; } - -ul { - margin-bottom: 1rem; - padding-left: 2rem; } - ul ul { - margin-bottom: 0; } - ul ol { - margin-bottom: 0; } - -video { - margin-bottom: 1rem; } - -html { - font-family: "Oswald", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; } - -select { - font-family: "Oswald", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - padding: 6px 12px; - margin-bottom: .5rem; - background: #111111; - color: #eeeeee; - border: 1px solid #222222; - border-radius: 4px; - box-shadow: none; - box-sizing: border-box; } - -button { - font-family: "Oswald", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-size: 1rem; - display: inline-block; - padding: 6px 12px; - text-align: center; - text-decoration: none; - white-space: nowrap; - background: #FFFFFF; - color: #000000; - border: 0; - border-radius: 4px; - box-sizing: border-box; - cursor: pointer; - color: #000000; } - button:focus { - background: #FFFFFF; } - button:enabled:hover { - background: #FFFFFF; } +body, input, select, textarea { + color: #333; + font-size: 10pt; + line-height: 1.65em; + letter-spacing: -0.015em; +} body { - margin: 0 auto; - padding: 2rem; - border-radius: 6px; - overflow-x: hidden; - word-break: break-word; - overflow-wrap: break-word; - color: #eeeeee; - font-size: 1.03rem; - line-height: 1.5; } - body::selection { - background: #FFFFFF; - color: #FFFFFF; } + background: #000000; +} -h1 { - line-height: 1; - color: #ffffff; - padding-top: .875rem; - padding-bottom: 2px; - margin-bottom: 8px; - border-bottom: 1px solid #111111; - font-size: 2.25rem; } +footer { + position: fixed; + text-align: center; + bottom: 0; + width: 100%; + padding: 1em; + background: #000000; +} -h2 { - line-height: 1; - color: #ffffff; - padding-top: .875rem; - padding-bottom: 2px; - margin-bottom: 8px; - border-bottom: 1px solid #111111; - font-size: 1.85rem; } +#main { + float: left; + margin: 0 0 2em 4em; + padding-bottom: 4em; +} -h3 { - line-height: 1; - color: #ffffff; - padding-top: .875rem; - color: #ffffff; - padding-bottom: 2px; - margin-bottom: 8px; - border-bottom: 1px solid #111111; - font-size: 1.55rem; } +#header_sub { margin-left: 6em; } -h4 { - line-height: 1; - color: #ffffff; - padding-top: .875rem; - margin-bottom: .3rem; - font-size: 1.25rem; } +#sidebar { + float: right; + padding: 0 2.5em 2.5em 0; +} -h5 { - line-height: 1; - color: #ffffff; - padding-top: .875rem; - margin-bottom: .3rem; - font-size: 1rem; } - -h6 { - line-height: 1; - color: #ffffff; - padding-top: .875rem; - margin-bottom: .3rem; - font-size: .875rem; } +#left_box { + float: left; + padding-right: 1em; +} a { - color: #FFFFFF; } - a:hover { - color: #FFFFFF; } - a button { - font-size: 1rem; - display: inline-block; - padding: 6px 12px; - text-align: center; - text-decoration: none; - white-space: nowrap; - background: #FFFFFF; - color: #000000; - border: 0; - border-radius: 4px; - box-sizing: border-box; - cursor: pointer; - color: #000000; } - a button[disabled] { - cursor: default; - opacity: .5; - cursor: not-allowed; } + outline: none; + border-bottom-color: transparent; + text-decoration: none; + color: #10A0A0; +} +a:hover { border-bottom: dotted 1px; } -abbr { - cursor: help; } - abbr:hover { - cursor: help; } +summary.menu { outline: none; } +summary.menu:hover { + cursor: pointer; + color: #10A0A0; +} -header { - background: #111111; - border-bottom: 1px solid #222222; - padding: 2rem 1.5rem; - margin: -2rem calc(0px - (50vw - 50%)) 2rem; - padding-left: calc(50vw - 50%); - padding-right: calc(50vw - 50%); } - header h1 { - padding-bottom: 0; - border-bottom: 0; } - header h2 { - padding-bottom: 0; - border-bottom: 0; } - header h3 { - padding-bottom: 0; - border-bottom: 0; } - header > *:first-child { - margin-top: 0; - padding-top: 0; } - header > *:last-child { - margin-bottom: 0; } - -input[type="submit"] { - font-size: 1rem; - display: inline-block; - padding: 6px 12px; - text-align: center; - text-decoration: none; - white-space: nowrap; - background: #FFFFFF; - color: #000000; - border: 0; - border-radius: 4px; - box-sizing: border-box; - cursor: pointer; - color: #000000; } - input[type="submit"]:focus { - background: #FFFFFF; } - input[type="submit"]:enabled:hover { - background: #FFFFFF; } - -input[type="reset"] { - font-size: 1rem; - display: inline-block; - padding: 6px 12px; - text-align: center; - text-decoration: none; - white-space: nowrap; - background: #FFFFFF; - color: #000000; - border: 0; - border-radius: 4px; - box-sizing: border-box; - cursor: pointer; - color: #000000; } - input[type="reset"]:focus { - background: #FFFFFF; } - input[type="reset"]:enabled:hover { - background: #FFFFFF; } - -input[type="button"] { - font-size: 1rem; - display: inline-block; - padding: 6px 12px; - text-align: center; - text-decoration: none; - white-space: nowrap; - background: #FFFFFF; - color: #000000; - border: 0; - border-radius: 4px; - box-sizing: border-box; - cursor: pointer; - color: #000000; } - input[type="button"]:focus { - background: #FFFFFF; } - input[type="button"]:enabled:hover { - background: #FFFFFF; } - -button[disabled] { - cursor: default; - opacity: .5; - cursor: not-allowed; } - -input[type="submit"][disabled] { - cursor: default; - opacity: .5; - cursor: not-allowed; } - -input[type="reset"][disabled] { - cursor: default; - opacity: .5; - cursor: not-allowed; } - -input[type="button"][disabled] { - cursor: default; - opacity: .5; - cursor: not-allowed; } - -.button:focus { - background: #FFFFFF; } - -.button:enabled:hover { - background: #FFFFFF; } +blockquote { + border-left: solid 4px #e5e5e5; + font-style: italic; + margin: 0; + padding: 0 0 1.5em 4em; +} code { - font-family: Consolas, monaco, "Ubuntu Mono", "Liberation Mono", "Courier New", Courier, monospace; - background: #111111; - border: 1px solid #222222; - border-radius: 4px; - padding: 3px 6px; - font-size: 0.9em; } - code pre { - display: inline; - background: inherit; - font-size: inherit; - color: inherit; - border: 0; - padding: 0; - margin: 0; } + font-family: monospace; + background: #e5e5e5; + color: #333; +} -kbd { - font-family: Consolas, monaco, "Ubuntu Mono", "Liberation Mono", "Courier New", Courier, monospace; - background: #111111; - border: 1px solid #222222; - border-radius: 4px; - padding: 3px 6px; - font-size: 0.9em; - border-bottom: 3px solid #222222; } +pre { + margin-bottom: 0; + padding: 0; +} +pre.clean { + margin: 0; + padding: 0; +} -samp { - font-family: Consolas, monaco, "Ubuntu Mono", "Liberation Mono", "Courier New", Courier, monospace; - background: #111111; - border: 1px solid #222222; - border-radius: 4px; - padding: 3px 6px; - font-size: 0.9em; } +pre.banner { + line-height: 1.2em; + margin-bottom: 1em; + padding: 0; +} -.nova-menu-button { - padding: .6rem 1rem; - background: #111111; - border: 1px solid #222222; - border-radius: 4px; - display: block; - position: relative; - text-align: center; } - .nova-menu-button summary::marker { - content: '' !important; - display: none !important; } - @media (min-width: 550px) { - .nova-menu-button { - display: none; } } -.nova-menu-list { - display: none; - position: relative; - text-align: center; - padding-left: 0; - overflow: hidden; } - .nova-menu-list li { - display: block; - position: relative; } - @media (min-width: 550px) { - .nova-menu-list { - display: block; - text-align: left; } - .nova-menu-list li { - display: inline-block; - position: relative; - margin: auto 12px; } } -.nova-menu-button[open] + .nova-menu-list { - display: block; - max-height: 0px; - padding-bottom: 15px; - background: #111111; - border: 1px solid #222222; - border-radius: 4px; - animation-name: anim-nova-toggle; - animation-duration: 1s; - animation-fill-mode: forwards; } -dt { - font-weight: bold; } +h1, h2, h3, h4, h5, h6 { + display: block; + line-height: 0; + margin: 0; + padding: 0.8em 0 0.4em 0; +} -dd::before { - content: '→ '; } - -hr { - border: 0; - border-bottom: 1px solid #222222; - margin: 1rem auto; } - -legend { - padding: auto .5rem; } - -td { - border: 1px solid #222222; - text-align: left; - padding: .5rem; } - -th { - border: 1px solid #222222; - text-align: left; - padding: .5rem; - background: #111111; } - -tr:nth-child(even) { - background: #111111; } +hr.half { + width:50%; + text-align:left; + margin-left:0; +} li { - margin-top: .4rem; } + margin: 0; + padding: 0; +} -mark { - padding: 3px 6px; - background: #FFFFFF; - color: #FFFFFF; } +ol, ul { + margin: 0; + padding: 0 0 0 2em; +} -.container:after, .row:after { - content: ""; - display: table; - clear: both; } +.ol.userlist, ul.userlist { + list-style-type: none; + margin: 0; + padding: 0 0 0 1.2em; +} -.full-width { - width: 100%; - box-sizing: border-box; } -.nova-brand-logo { - display: block; - position: relative; - text-align: center; } - .nova-brand-logo img { - width: 85%; } - @media (min-width: 550px) { - .nova-brand-logo { - width: 120px; } } +table { + border-collapse: collapse; + width: 100%; +} + +tr, th, td { + text-align: left; + padding: 0; +} + +.table_pkg tbody tr:nth-child(even) { + background: #e5e5e5; +} + +.tw20 { width: 20px; } +.tw25 { width: 25px; } +.tw80 { width: 80px; } +.tw100 { width: 100px; } +.tw110 { width: 110px; } +.tw130 { width: 130px; } +.tw140 { width: 140px; } +.tw160 { width: 160px; } +.tw280 { width: 280px; } + + +form { + margin: 0; + padding: 0; +} + +textarea { + padding: 0.3em 1em 0.3em 1em; + margin: 0 0 -0.5em 0; + border: solid 1px #333; + border-radius: 10px; +} + +input { + margin: 0; + padding: 0; +} + +input[type=button], input[type=submit], input[type=text] { + background-color: #e5e5e5; + color: #333; + border-radius: 10px; + border: solid 1px #333; + text-decoration: none; + padding: 0.3em 1em 0.3em 1em; +} + +input[type=button]:hover, input[type=submit]:hover { + background-color: #211921; + color: #ddd; +} + +input[type=file] { + color: #333; + background-color: #f5f5f5; + padding: 0.3em 1em 0.3em 0; +} + +button { + border-radius: 10px; + border: none; + text-decoration: none; + background-color: #e5e5e5; + color: #333; +} +button:hover { + background-color: #211921; + color: #FFF5EE; +} + + +.clean { margin: 0; padding: 0; } + +.clear { clear:both; } + +.mark { color: #10A0A0; } + +.alert { + color: #333; + background: #e5e5e5; + margin: 0 0 1.5em 0; + padding: 0.5em 1em 1.5em 1em; +} + +.block { + border-left: solid 4px #e5e5e5; + margin: 0.8em 0 1em 0; + padding: 0.8em 0 0.8em 4em; +} + +.center { + position: absolute; + top: 50%; + left: 50%; + transform: translateX(-50%) translateY(-50%); +} + +.button_back { + float: left; + margin-top: 1em; + margin-left: 0.4em; + position: fixed; + top: 0; + left: 0; +} + +p { + color: #ffffff; +} +dd,dt { + color: #ffffff; +} + +/* + * LIGHT MODE + */ +body.light-mode { + background: #f5f5f5; + color: #333; +} +body.light-mode footer { + border-top: solid 2px #e5e5e5; + background: #f5f5f5; +} +body.light-mode blockquote { + border-left: solid 4px #e5e5e5; +} +body.light-mode code { + color: #333; + background: #e5e5e5; +} +body.light-mode .table_pkg tbody tr:nth-child(even) { + background: #e5e5e5; +} +body.light-mode input[type=button], body.light-mode input[type=submit], body.light-mode input[type=text] { + background-color: #e5e5e5; + color: #333; + border: solid 1px #333; +} +body.light-mode input[type=button]:hover, body.light-mode input[type=submit]:hover { + background-color: #211921; + color: #FFF5EE; +} +body.light-mode input[type=file] { + color: #333; + background-color: #f5f5f5; +} +body.light-mode textarea { + background: #e5e5e5; + color: #333; + border: solid 1px #333; +} +body.light-mode button { + background-color: #e5e5e5; + color: #333; +} +body.light-mode button:hover { + background-color: #211921; + color: #FFF5EE; +} +body.light-mode .alert { + color: #333; + background: #e5e5e5; +} +body.light-mode .block, body.light-mode .block_head { + border-left: solid 4px #e5e5e5; +} + + +/* + * DARK MODE + */ +body.dark-mode { + color: #FFF5EE; + background: #040304; +} +body.dark-mode footer { + border-top: solid 2px #211921; + background: #040304; +} +body.dark-mode blockquote { + border-left: solid 4px #211921; +} +body.dark-mode code { + color: #ddd; + background: #211921; +} +body.dark-mode .table_pkg tbody tr:nth-child(even) { + background: #211921; +} +body.dark-mode input[type=button], body.dark-mode input[type=submit], body.dark-mode input[type=text] { + background-color: #211921; + color: #ddd; + border: solid 1px #ddd; +} +body.dark-mode input[type=button]:hover, body.dark-mode input[type=submit]:hover { + background-color: #e5e5e5; + color: #333; +} +body.dark-mode input[type=file] { + color: #ddd; + background-color: #040304; +} +body.dark-mode textarea { + color: #ddd; + background: #211921; + border: solid 1px #ddd; +} +body.dark-mode button { + background-color: #211921; + color: #ddd; +} +body.dark-mode button:hover { + background-color: #e5e5e5; + color: #333; +} +body.dark-mode .alert { + color: #ddd; + background: #211921; +} +body.dark-mode .block, body.dark-mode .block_head { + border-left: solid 4px #211921; +}