From 3faa0e498c50a384d6ec1ffe98231ad4e0562a89 Mon Sep 17 00:00:00 2001 From: Vrifox Date: Sun, 11 Oct 2020 18:33:06 +0200 Subject: [PATCH] update --- scss/blog.scss | 7 +- scss/import/blog.scss | 42 ++-- scss/import/colors.scss | 12 +- scss/import/edit-warning.scss | 6 + scss/import/globaltopbar.scss | 360 ++++++++++------------------------ scss/import/wiki.scss | 11 -- scss/wiki.scss | 7 +- 7 files changed, 143 insertions(+), 302 deletions(-) create mode 100644 scss/import/edit-warning.scss diff --git a/scss/blog.scss b/scss/blog.scss index 8813a04..82c65e0 100644 --- a/scss/blog.scss +++ b/scss/blog.scss @@ -1,17 +1,18 @@ // -// Settings +// settings // $type: blog; // -// Import +// import // @import 'import/colors.scss'; @import 'import/blog-meta.scss'; +@import 'import/edit-warning.scss'; @import 'import/blog.scss'; -@import 'import/globaltopbar.scss'; +@import 'import/globaltopbar.scss'; // @natenom: remove this to disable globaltopbar diff --git a/scss/import/blog.scss b/scss/import/blog.scss index 05d7be8..f6c6b33 100644 --- a/scss/import/blog.scss +++ b/scss/import/blog.scss @@ -5,7 +5,6 @@ body { position: relative; - top: 32px !important; // WordPress nach unten verlegen, damit Topbar besser wird h1, h2 { font-size: 3rem !important; // smaller @@ -26,29 +25,26 @@ body { ul.primary-menu { li.menu-item { a { - color: $blau-light !important; + color: $nom-blue-light !important; } } } } } } - .search-modal { - top: 32px; // Suchleiste nach unten versetzen, damit sie unter der Topbar angezeigt werden - } } .menu-modal { - top: 32px; // Menu oben nach unten versetzen, damit sie unter der Topbar angezeigt werden .menu-modal-inner { .menu-wrapper { .menu-top, .menu-bottom { - nav.expanded-menu { + nav.expanded-menu, + nav.mobile-menu { ul.modal-menu { li.menu-item { .ancestor-wrapper { a { - color: $blau-light !important; + color: $nom-blue-light !important; } } } @@ -66,7 +62,7 @@ body { .entry-categories { .entry-categories-inner { a { - color: $blau-light; + color: $nom-blue-light; } } } @@ -91,15 +87,15 @@ body { padding-top: 40px; // Abstand zw. Artikelbildern und Inhalt verkleinern .entry-content { a { - color: $blau-light !important; + color: $nom-blue-light !important; } .wp-block-quote { - border-color: $blau-light; + border-color: $nom-blue-light; } .read-more-button-wrap { a.more-link { .faux-button { // Button: "Weiterlesen" - background: $blau; + background: $nom-blue; color: rgb(245, 245, 255); font-weight: initial; padding: 10px 40px; // Groesse aendern @@ -107,7 +103,7 @@ body { transition: background .2s; &:hover { text-decoration: none; - background: $blau-dark; + background: $nom-blue-dark; } } } @@ -119,7 +115,7 @@ body { nav.pagination { .nav-links { a { - color: $blau-light; + color: $nom-blue-light; } } } @@ -131,7 +127,7 @@ body { .footer-menu { .menu-item { a { - color: $blau-light !important; + color: $nom-blue-light !important; } } } @@ -143,7 +139,7 @@ body { .widget-content { .tagcloud { a.tag-cloud-link { - color: $grau !important; + color: $grey !important; } } } @@ -154,7 +150,7 @@ body { .menu { .menu-item { a { - color: $blau-light !important; + color: $nom-blue-light !important; } } } @@ -208,7 +204,7 @@ body.post-template-default { .post-meta { .post-tags { .meta-text { - color: $grau !important; + color: $grey !important; } } } @@ -218,7 +214,7 @@ body.post-template-default { .pagination-single-inner { .previous-post, .next-post { - color: $blau-light !important; + color: $nom-blue-light !important; } } } @@ -229,13 +225,13 @@ body.post-template-default { footer.comment-footer-meta { .comment-reply { a.comment-reply-link { // Button: "Kommentieren" - background: $blau ; + background: $nom-blue ; color: rgb(245, 245, 255); font-weight: initial; text-transform: none; transition: background .2s; &:hover { - background: $blau-dark; + background: $nom-blue-dark; text-decoration: none; } } @@ -268,14 +264,14 @@ body.post-template-default { } .form-submit { .submit { // Button "Kommentar abschicken" - background: $blau; + background: $nom-blue; color: rgb(245, 245, 255); font-weight: initial; padding: 10px 40px; // Groesse aendern text-transform: none; // nicht unterstrichen transition: background .2s; &:hover { - background: $blau-dark; + background: $nom-blue-dark; text-decoration: none; } } diff --git a/scss/import/colors.scss b/scss/import/colors.scss index bb10632..4eb3c97 100644 --- a/scss/import/colors.scss +++ b/scss/import/colors.scss @@ -1,4 +1,8 @@ -$blau: rgb(70, 136, 222); -$blau-dark: rgb(50, 116, 202); -$blau-light: rgb(110, 176, 255); // #6db0ff -$grau: rgb(155, 155, 170); +$blog_body-bg: rgb(33, 39, 48); + +// nom == natenom +$nom-blue: rgb(70, 136, 222); // #4588de +$nom-blue-dark: rgb(50, 116, 202); +$nom-blue-light: rgb(110, 176, 255); // #6db0ff +$grey: rgb(155, 155, 170); +$grey-light: rgb(155, 155, 170); diff --git a/scss/import/edit-warning.scss b/scss/import/edit-warning.scss new file mode 100644 index 0000000..e1025aa --- /dev/null +++ b/scss/import/edit-warning.scss @@ -0,0 +1,6 @@ +/* + * + * Don't edit this css file, instead edit the scss. + * https://git.vrifox.cc/vrifox/natenom-superscss + * + */ diff --git a/scss/import/globaltopbar.scss b/scss/import/globaltopbar.scss index 42e4a32..43c3e6b 100644 --- a/scss/import/globaltopbar.scss +++ b/scss/import/globaltopbar.scss @@ -1,38 +1,37 @@ + +// +// settings +// + +$gtb_height: 32px; // gtb == globaltopbar + +// +// globaltopbar +// + @media screen { - -body { - padding-top: 32px; -} - -#page { - top: 32px; -} - -.header-main { - min-height: 48px; -} - #global__header { - background-color: #212730; - border-bottom: 3px #4588de solid; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + background: $blog_body-bg; + border-bottom: 3px $nom-blue solid; box-sizing: border-box; display: flex; font-family: Arial, Helvetica, sans-serif; - font-size:14px; - text-align: left; - top: -32px; + font-size: 14px; left: 0; line-height: 1.5; margin: 0; overflow-x: auto; overflow-y: hidden; position: absolute; + text-align: left; + transition: background .2s, color .2s; + top: -$gtb_height; vertical-align: middle; - width: 100%; white-space: nowrap; - z-index:999999; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; + width: 100%; + z-index: 9999; ul { display: flex; flex: 1; @@ -41,7 +40,7 @@ body { display: flex; margin: 0; a { - color: #bbb; + color: $grey-light; font-size: 14px; font-weight: normal; margin: 0 1px; @@ -50,7 +49,7 @@ body { &:hover, &:active, &:focus { - background: #4588de; + background: $nom-blue; color: #fff; text-decoration: none; } @@ -63,250 +62,95 @@ body { } } -@if $type == wiki { - @media only screen and (min-width: 601px) { - /* changes specific for www.dokuwiki.org */ - #dokuwiki__header { - padding-top: 3em; +@media print { + body { + #dokuwiki__site { + .site { + #global__header { + display: none; + } + } } - #dokuwiki__usertools { - top: 3em; + } +} + +// +// globaltopbar blog +// + +@if $type == blog { + + body { + top: $gtb_height; // WordPress nach unten verschieben, damit globaltopbar sichtbar wird + header { + .search-modal { + top: $gtb_height; // Suchleiste nach unten versetzen, damit sie unter der Topbar angezeigt werden + } + } + .menu-modal { + top: $gtb_height; // Menu oben nach unten versetzen, damit sie unter der Topbar angezeigt werden + } + } + +} + +// +// globaltopbar wiki +// + +@if $type == wiki { + + body { + margin-top: $gtb_height; // DokuWiki nach unten verschieben, damit globaltopbar sichtbar wird + overflow-x: hidden; + #dokuwiki__site { + .site { + #dokuwiki__header { + .group { + .tools { + #dokuwiki__usertools { + top: 15px + $gtb_height; // 'em' and 'px' are incompatible units + } + } + } + } + #global__header { + top: 0; + ul { + padding: 0; + } + } + } + } + } + + @media only screen and (min-width: 601px) { + body { + #dokuwiki__site { + .site { + #dokuwiki__header { + padding-top: 3em; + .group { + .tools { + #dokuwiki__usertools { + top: 12px + $gtb_height; // 'em' and 'px' are incompatible units + } + } + } + } + } + } } /* changes specific for bugs.dokuwiki.org */ div#container div#showtask { top: 40px; } } -} -@media only screen and (max-width: 600px) { - body { - @if $type == wiki { + @media only screen and (max-width: 600px) { + body { padding-top: 0; } } - #global__header { - position: absolute; - overflow: auto; - } - .global__header-right { - left: 0; - position: relative; - } - - .header-main { - margin-top: 0px; - } -} - -@media print { - #global__header { - display: none; - } -} - - - - - -// -// -// - - - - - -@media screen { - - - -#global__header { -position: absolute; -top: 0; -left: 0; -text-align: left; -vertical-align: middle; -line-height: 1.5; -background-color: #212730; -width: 100%; -margin: 0; --moz-box-sizing: border-box; --webkit-box-sizing: border-box; -box-sizing: border-box; -white-space: none; -overflow-x: auto; -overflow-y: hidden; -display: flex; -border-bottom: 3px #4588de solid; -} - - #global__header h2 { - position: absolute; -/* left: -99999em;*/ - top: 0; - overflow: hidden; - display: inline; - } - - #global__header ul, - #global__header li { - margin: 0; - padding: 0; - list-style: none; - display: flex; - line-height: 1.5; - } - - #global__header ul { - flex: 1; - } - - - #global__header a { - color: #bbb; - text-decoration: none; - font-size: 14px; - padding: 4px 8px; -margin: 0 1px; - font-weight: normal; - } - #global__header a:hover, - #global__header a:active, - #global__header a:focus { - color: #fff; - text-decoration: underline; - background: #4588de; - text-decoration: none; - - } - - #global__header form { - float: right; - margin: 0 0 0 20px; - } - - #global__header input { - background-color: #333; - background-image: none; - border: 1px solid #bbb; - color: #fff; - box-shadow: none; - border-radius: 2px; - margin: 0; - line-height: normal; - padding: 1px 0 1px 0; - height: auto; - } - - #global__header input.button { - border: none; - color: #bbb; - } - #global__header input.button:hover, - #global__header input.button:active, - #global__header input.button:focus { - color: #fff; - text-decoration: underline; - } - - /* new wg qrcode */ - .global__header-right { - justify-content: flex-end; - } - - .global__header-qr:hover:after { - right: 0; - } - - .global__header-qr:after { - content: ''; - /*background: url(https://wiki.natenom.de/.cdn/getmumble/qrcode_www.natenom.com_de_meinmumbleserver);*/ - position: fixed; - background-size: cover; - height: 111px; - top: 31px; - width: 111px; - right: -150px; - transition: 1s all; - box-shadow: 0 0 8px rgba(0,0,0,0.5); - } - /* end: new wg qrcode */ - -} /* /@media */ - - -@media only screen and (min-width: 601px) { - /* changes specific for www.dokuwiki.org */ - #dokuwiki__header { - padding-top: 3em; - } - #dokuwiki__usertools { - top: 3em; - } - /* changes specific for bugs.dokuwiki.org */ - div#container div#showtask { - top: 40px; - } -} /* /@media */ - -@media only screen and (max-width: 600px) { - body { - padding-top: 0; - } - - #global__header { - position: static; -/* white-space: normal;*/ - overflow: auto; - } - - #global__header form { - float: none; - display: block; - margin: 0 0 .4em; - } - - .global__header-right { - position: relative; - left: 0; - } -} /* /@media */ - -@media print { - #global__header { - display: none; - } -} /* /@media */ - -#global__header a#global__header__link-donate { -color: #c16666; -display: none; -} - -#global__header a#global__header__link-donate:hover { -background: #c16666; -color: #fff; -} - -/* topbar oben */ -#global__header { -position: absolute; -white-space: nowrap; -} - - -#dokuwiki__site { -margin-top: 32px !important; -} - - - #dokuwiki__usertools { -top: calc(2em + 32px) !important; -} -@only screen and (min-width: 601px) { -#dokuwiki__usertools { -top: calc(3em + 32px) !important; -} } diff --git a/scss/import/wiki.scss b/scss/import/wiki.scss index 97e007f..7bbac6c 100644 --- a/scss/import/wiki.scss +++ b/scss/import/wiki.scss @@ -35,12 +35,6 @@ min-height: 22px; /* make sure icons are not cut off (most icons are 16x16) */ } - /* for IE7 */ - *+html .dokuwiki .topbar ul li, - *+html .dokuwiki .topbar ul li a { - display: inline; - } - /* changes specific for the default "dokuwiki" template, other templates need other changes! */ #dokuwiki__header { @@ -50,11 +44,6 @@ top: 2em; } - /* IE8 needs this in the default template */ - .dokuwiki .topbar ul li img { - max-width: none; - } - } /* /@media */ diff --git a/scss/wiki.scss b/scss/wiki.scss index 4734fa5..6497400 100644 --- a/scss/wiki.scss +++ b/scss/wiki.scss @@ -1,16 +1,17 @@ // -// Settings +// settings // $type: wiki; // -// Import +// import // @import 'import/colors.scss'; +@import 'import/edit-warning.scss'; @import 'import/wiki.scss'; -@import 'import/globaltopbar.scss'; +@import 'import/globaltopbar.scss'; // @natenom: remove this to disable globaltopbar