From e00bd709892987c3415e95b548341b0ab0e6eda8 Mon Sep 17 00:00:00 2001 From: Vrifox Date: Sun, 4 Oct 2020 18:28:14 +0200 Subject: [PATCH] =?UTF-8?q?more=20no-js=20fixes;=20global=20$font-family?= =?UTF-8?q?=20variable=20instead=20of=20@mixin=20(more=20flexible=20and=20?= =?UTF-8?q?less=20bulkier);=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/theme-gitea-vrifox-backend.css | 43 +++++---- public/css/theme-gitea-vrifox-frontend.css | 64 ++++++++----- source/partials/_main.scss | 2 +- source/partials/_nav.scss | 2 +- source/partials/repository.scss | 106 ++++++++++++++------- source/partials/user.scss | 4 +- source/theme-gitea-vrifox-backend.scss | 12 ++- source/theme-gitea-vrifox-frontend.scss | 12 ++- 8 files changed, 153 insertions(+), 92 deletions(-) diff --git a/public/css/theme-gitea-vrifox-backend.css b/public/css/theme-gitea-vrifox-backend.css index ec1c8cb..1961a35 100644 --- a/public/css/theme-gitea-vrifox-backend.css +++ b/public/css/theme-gitea-vrifox-backend.css @@ -10,7 +10,7 @@ body { background: #28283c; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } a { color: white; @@ -28,7 +28,7 @@ body > .full.height::first-line, border-bottom: 0; font-size: 1em; min-height: 64px; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .ui.main.menu #navbar { width: 1127px; padding: 0; } @@ -95,7 +95,7 @@ body > .full.height::first-line, box-shadow: none; color: #f5f5ff; transition: background .2s, color .2s; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .header-wrapper .repo-header .repo-buttons .button:hover { background: #32324b; color: white; } @@ -110,7 +110,7 @@ body > .full.height::first-line, .repository .header-wrapper .tabs.container .menu.navbar .item { color: #d7d7e1; transition: color .2s; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .header-wrapper .tabs.container .menu.navbar .item:hover { color: white; } .repository .header-wrapper .tabs.container .menu.navbar .item.active { @@ -145,7 +145,7 @@ body > .full.height::first-line, border: 0; box-shadow: none; } .repository .container .repository-summary .repository-menu { - background: #32324b; } + background: #3c3c5a !important; } .repository .container .repository-summary .repository-menu .item a { color: #f5f5ff !important; } .repository .container .repository-summary .repository-menu .item a:hover { @@ -164,7 +164,7 @@ body > .full.height::first-line, .repository .container .secondary.menu .item #clone-panel #repo-clone-ssh { color: #f5f5ff; box-shadow: none !important; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .container .secondary.menu .item #clone-panel #repo-clone-https:not(.blue), .repository .container .secondary.menu .item #clone-panel #repo-clone-ssh:not(.blue) { background: #3c3c5a; } @@ -180,7 +180,7 @@ body > .full.height::first-line, background: #28283c; border: 2px solid #3c3c5a; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .container .secondary.menu .item #clone-panel input#repo-clone-url:focus { background: #32324b; border: 2px solid #3c3c5a; @@ -253,7 +253,7 @@ body > .full.height::first-line, background: #32324b; border: 0; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .container .non-diff-file-content .table { background: #1e1e2d; border: 0; @@ -262,19 +262,19 @@ body > .full.height::first-line, /* repository: releases */ .repository.release .container .header { background: transparent; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository.release .container #release-list { border-top: 1px solid #3c3c5a; } /* repository: activity */ .repository.commits .container h2.header { - font-family: monospace, 'Lucida Console', 'Monaco' !important; + font-family: monospace, "Lucida Console", "Monaco"; background: transparent; } .repository.commits .container h2.header .filter .button { background: #3c3c5a; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository.commits .container h2.header .filter .button:hover { background: #32324b; } .repository.commits .container h2.header .filter .menu { @@ -287,28 +287,31 @@ body > .full.height::first-line, background: #32324b; } .repository.commits .container .segment { + background: #1e1e2d; border: 0; } .repository.commits .container .segment .text { background: #1e1e2d; } + .repository.commits .container .segment h4.header { + background: #1e1e2d; } /* repository: commits */ -.repository.commits .secondary.menu { +.repository.commits .container .secondary.menu { margin-left: -15px; } - .repository.commits .secondary.menu .item .button { + .repository.commits .container .secondary.menu .item .button { background: #3c3c5a; color: #f5f5ff; } - .repository.commits .secondary.menu .item .button:hover { + .repository.commits .container .secondary.menu .item .button:hover { background: #32324b; } -.repository.commits .header form .search.input input { +.repository.commits .container .header form .search.input input { background: #28283c; border: 0; color: #f5f5ff; } - .repository.commits .header form .search.input input:focus { + .repository.commits .container .header form .search.input input:focus { background: #32324b; color: white; } -.repository.commits .header form .checkbox label { +.repository.commits .container .header form .checkbox label { color: #f5f5ff; } /* repository: branches */ @@ -432,7 +435,7 @@ body > .full.height::first-line, background: #464669; box-shadow: none; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository.file .container .non-diff-file-content .file-header .file-header-right .file-actions .buttons .button:hover { background: #3c3c5a; } @@ -524,7 +527,7 @@ body > .full.height::first-line, overflow-y: hidden; } .user .container .grid .secondary.menu .item { color: #d7d7e1; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .user .container .grid .secondary.menu .item:hover { color: white; } .user .container .grid .secondary.menu .item.active { @@ -556,7 +559,7 @@ body > .full.height::first-line, border-top: 1px solid #3c3c5a; } .user .container .grid .repository.list .item .header a.name { - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .user .container .grid .repository.list .item .header a.name i.archive.icon { color: #d7d7e1 !important; } diff --git a/public/css/theme-gitea-vrifox-frontend.css b/public/css/theme-gitea-vrifox-frontend.css index 061fa52..e5cbb3e 100644 --- a/public/css/theme-gitea-vrifox-frontend.css +++ b/public/css/theme-gitea-vrifox-frontend.css @@ -10,7 +10,7 @@ body { background: #28283c; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } a { color: white; @@ -28,7 +28,7 @@ body > .full.height::first-line, border-bottom: 0; font-size: 1em; min-height: 64px; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .ui.main.menu #navbar { width: 1127px; padding: 0; } @@ -101,7 +101,7 @@ body > .full.height::first-line, box-shadow: none; color: #f5f5ff; transition: background .2s, color .2s; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .header-wrapper .repo-header .repo-buttons .button:hover { background: #32324b; color: white; } @@ -116,7 +116,7 @@ body > .full.height::first-line, .repository .header-wrapper .tabs.container .menu.navbar .item { color: #d7d7e1; transition: color .2s; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .header-wrapper .tabs.container .menu.navbar .item:hover { color: white; } .repository .header-wrapper .tabs.container .menu.navbar .item.active { @@ -125,6 +125,8 @@ body > .full.height::first-line, color: #f5f5ff; } .repository .header-wrapper .tabs.container .menu.navbar .item.active span.label { background: #32324b; } + .repository .header-wrapper .tabs.container .menu.navbar .item svg { + display: none; } .repository .header-wrapper .tabs.container .menu.navbar .item span.label { background: #3c3c5a; } @@ -153,13 +155,15 @@ body > .full.height::first-line, height: initial; overflow: auto; } .repository .container .repository-summary .repository-menu { - background: #32324b; } + background: #3c3c5a !important; } .repository .container .repository-summary .repository-menu .item a { color: #f5f5ff !important; } .repository .container .repository-summary .repository-menu .item a:hover { color: white !important; } + .repository .container .repository-summary .repository-menu .item a svg { + display: none; } .repository .container .repository-summary .language-stats-details { - background: #3c3c5a; + background: #32324b; padding: 0; } .repository .container .repository-summary .language-stats-details .horizontal.list .item { padding: 10px; @@ -171,6 +175,9 @@ body > .full.height::first-line, .repository .container .repository-summary .language-stats { display: none; } +.repository .container .secondary.menu .item.choose.reference { + display: none; } + .repository .container .secondary.menu .item .blue.buttons .button { background: #3c3c5a; box-shadow: none; @@ -182,7 +189,7 @@ body > .full.height::first-line, .repository .container .secondary.menu .item #clone-panel #repo-clone-ssh { color: #f5f5ff; box-shadow: none !important; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .container .secondary.menu .item #clone-panel #repo-clone-https:not(.blue), .repository .container .secondary.menu .item #clone-panel #repo-clone-ssh:not(.blue) { background: #3c3c5a; } @@ -198,7 +205,7 @@ body > .full.height::first-line, background: #28283c; border: 2px solid #3c3c5a; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .container .secondary.menu .item #clone-panel input#repo-clone-url:focus { background: #32324b; border: 2px solid #3c3c5a; @@ -273,7 +280,7 @@ body > .full.height::first-line, background: #32324b; border: 0; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository .container .non-diff-file-content .table { background: #1e1e2d; border: 0; @@ -282,19 +289,21 @@ body > .full.height::first-line, /* repository: releases */ .repository.release .container .header { background: transparent; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository.release .container #release-list { border-top: 1px solid #3c3c5a; } /* repository: activity */ .repository.commits .container h2.header { - font-family: monospace, 'Lucida Console', 'Monaco' !important; + font-family: monospace, "Lucida Console", "Monaco"; background: transparent; } + .repository.commits .container h2.header .filter:hover .menu { + display: block; } .repository.commits .container h2.header .filter .button { background: #3c3c5a; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository.commits .container h2.header .filter .button:hover { background: #32324b; } .repository.commits .container h2.header .filter .menu { @@ -307,28 +316,33 @@ body > .full.height::first-line, background: #32324b; } .repository.commits .container .segment { + background: #1e1e2d; border: 0; } .repository.commits .container .segment .text { background: #1e1e2d; } + .repository.commits .container .segment h4.header { + background: #1e1e2d; } + .repository.commits .container .segment #app { + display: none; } /* repository: commits */ -.repository.commits .secondary.menu { - margin-left: -15px; } - .repository.commits .secondary.menu .item .button { - background: #3c3c5a; - color: #f5f5ff; } - .repository.commits .secondary.menu .item .button:hover { - background: #32324b; } +.repository.commits .container .secondary.menu .item .button { + background: #3c3c5a; + color: #f5f5ff; } + .repository.commits .container .secondary.menu .item .button:hover { + background: #32324b; } + .repository.commits .container .secondary.menu .item .button .text { + display: none; } -.repository.commits .header form .search.input input { +.repository.commits .container .header form .search.input input { background: #28283c; border: 0; color: #f5f5ff; } - .repository.commits .header form .search.input input:focus { + .repository.commits .container .header form .search.input input:focus { background: #32324b; color: white; } -.repository.commits .header form .checkbox label { +.repository.commits .container .header form .checkbox label { color: #f5f5ff; } /* repository: branches */ @@ -452,7 +466,7 @@ body > .full.height::first-line, background: #464669; box-shadow: none; color: #f5f5ff; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .repository.file .container .non-diff-file-content .file-header .file-header-right .file-actions .buttons .button:hover { background: #3c3c5a; } @@ -547,7 +561,7 @@ body > .full.height::first-line, overflow-y: hidden; } .user .container .grid .secondary.menu .item { color: #d7d7e1; - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .user .container .grid .secondary.menu .item:hover { color: white; } .user .container .grid .secondary.menu .item.active { @@ -586,7 +600,7 @@ body > .full.height::first-line, border-top: 1px solid #3c3c5a; } .user .container .grid .repository.list .item .header a.name { - font-family: monospace, 'Lucida Console', 'Monaco' !important; } + font-family: monospace, "Lucida Console", "Monaco"; } .user .container .grid .repository.list .item .header a.name i.archive.icon { color: #d7d7e1 !important; } diff --git a/source/partials/_main.scss b/source/partials/_main.scss index 08ae36f..70eef65 100644 --- a/source/partials/_main.scss +++ b/source/partials/_main.scss @@ -10,7 +10,7 @@ body { background: rgb(40, 40, 60); color: rgb(245, 245, 255); - @include font-family(); + font-family: $font-family; } a { color: rgb(255, 255, 255); diff --git a/source/partials/_nav.scss b/source/partials/_nav.scss index 55c82f6..ab0cb66 100644 --- a/source/partials/_nav.scss +++ b/source/partials/_nav.scss @@ -3,7 +3,7 @@ border-bottom: 0; font-size: 1em; min-height: 64px; - @include font-family(); + font-family: $font-family; #navbar { width: 1127px ; padding: 0; diff --git a/source/partials/repository.scss b/source/partials/repository.scss index 2727c80..f018f57 100644 --- a/source/partials/repository.scss +++ b/source/partials/repository.scss @@ -28,7 +28,7 @@ box-shadow: none; color: rgb(245, 245, 255); transition: background .2s, color .2s; - @include font-family(); + font-family: $font-family; &:hover { background: rgb(50, 50, 75); color: rgb(255, 255, 255); @@ -52,7 +52,7 @@ .item { color: rgb(215, 215, 225); transition: color .2s; - @include font-family(); + font-family: $font-family; &:hover { color: rgb(255, 255, 255); } @@ -64,6 +64,11 @@ background: rgb(50, 50, 75); } } + svg { + @if $nojavascript == true { + display: none; + } + } span.label { background: rgb(60, 60, 90); } @@ -108,19 +113,24 @@ overflow: auto; } .repository-menu { - background: rgb(50, 50, 75); + background: rgb(60, 60, 90) !important; .item { a { color: rgb(245, 245, 255) !important; &:hover { color: rgb(255, 255, 255) !important; } + svg { + @if $nojavascript == true { + display: none; + } + } } } } .language-stats-details { @if $nojavascript == true { - background: rgb(60, 60, 90); + background: rgb(50, 50, 75); padding: 0; } .horizontal.list { @@ -150,6 +160,11 @@ } .secondary.menu { .item { + &.choose.reference { + @if $nojavascript == true { + display: none; + } + } .blue.buttons { .button { background: rgb(60, 60, 90); @@ -165,7 +180,7 @@ #repo-clone-ssh { color: rgb(245, 245, 255); box-shadow: none !important; - @include font-family(); + font-family: $font-family; &:not(.blue) { background: rgb(60, 60, 90); &:hover { @@ -181,7 +196,7 @@ background: rgb(40, 40, 60); border: 2px solid rgb(60, 60, 90); color: rgb(245, 245, 255); - @include font-family(); + font-family: $font-family; &:focus { background: rgb(50, 50, 75); border: 2px solid rgb(60, 60, 90); @@ -293,7 +308,7 @@ background: rgb(50, 50, 75); border: 0; color: rgb(245, 245, 255); - @include font-family(); + font-family: $font-family; } .table { background: rgb(30, 30, 45); @@ -310,7 +325,7 @@ .container { .header { background: transparent; - @include font-family(); + font-family: $font-family; } #release-list { border-top: 1px solid rgb(60, 60, 90); @@ -323,13 +338,20 @@ .repository.commits { .container { h2.header { - @include font-family(); + font-family: $font-family; background: transparent; .filter { + &:hover { + .menu { + @if $nojavascript == true { + display: block; + } + } + } .button { background: rgb(60, 60, 90); color: rgb(245, 245, 255); - @include font-family(); + font-family: $font-family; &:hover { background: rgb(50, 50, 75); } @@ -348,10 +370,19 @@ } } .segment { + background: rgb(30, 30, 45); border: 0; .text { background: rgb(30, 30, 45); } + h4.header { // »There has not been any commit activity in this period.« + background: rgb(30, 30, 45); + } + #app { + @if $nojavascript == true { + display: none; + } + } } } } @@ -359,34 +390,43 @@ /* repository: commits */ .repository.commits { - .secondary.menu { - margin-left: -15px; - .item { - .button { - background: rgb(60, 60, 90); - color: rgb(245, 245, 255); - &:hover { - background: rgb(50, 50, 75); - } + .container { + .secondary.menu { + @if $nojavascript == false { + margin-left: -15px; } - } - } - .header { - form { - .search.input { - input { - background: rgb(40, 40, 60); - border: 0; + .item { + .button { + background: rgb(60, 60, 90); color: rgb(245, 245, 255); - &:focus { + &:hover { background: rgb(50, 50, 75); - color: rgb(255, 255, 255); + } + .text { + @if $nojavascript == true { + display: none; + } } } } - .checkbox { - label { - color: rgb(245, 245, 255); + } + .header { + form { + .search.input { + input { + background: rgb(40, 40, 60); + border: 0; + color: rgb(245, 245, 255); + &:focus { + background: rgb(50, 50, 75); + color: rgb(255, 255, 255); + } + } + } + .checkbox { + label { + color: rgb(245, 245, 255); + } } } } @@ -597,7 +637,7 @@ background: rgb(70, 70, 105); box-shadow: none; color: rgb(245, 245, 255); - @include font-family(); + font-family: $font-family; &:hover { background: rgb(60, 60, 90); } diff --git a/source/partials/user.scss b/source/partials/user.scss index 4e4395d..5b32d7c 100644 --- a/source/partials/user.scss +++ b/source/partials/user.scss @@ -33,7 +33,7 @@ overflow-y: hidden; .item { color: rgb(215, 215, 225); - @include font-family(); + font-family: $font-family; &:hover { color: rgb(255, 255, 255); } @@ -96,7 +96,7 @@ } .header { a.name { - @include font-family(); + font-family: $font-family; i.archive.icon { color: rgb(215, 215, 225) !important; } diff --git a/source/theme-gitea-vrifox-backend.scss b/source/theme-gitea-vrifox-backend.scss index 7512335..6d1c160 100644 --- a/source/theme-gitea-vrifox-backend.scss +++ b/source/theme-gitea-vrifox-backend.scss @@ -2,10 +2,6 @@ /* DON'T EDIT THIS FILE; EDIT THE SCSS/SASS INSTEAD */ /* ------------------------------------------------ */ -@mixin font-family() { - font-family: monospace, 'Lucida Console', 'Monaco' !important; -} - // // Settings // @@ -13,8 +9,14 @@ $singleuser: false; // disables functions, that are not necessary if you are the only user (or at least as »frontend«) $nojavascript: false; // disables or corrects functions, that would not work with disabled javascript (e.g. throught content security policy) -@import 'partials/main'; +$font-family: monospace, 'Lucida Console', 'Monaco'; +// +// +// + + +@import 'partials/main'; @import 'partials/nav'; diff --git a/source/theme-gitea-vrifox-frontend.scss b/source/theme-gitea-vrifox-frontend.scss index 96ae3a9..d3d7f3b 100644 --- a/source/theme-gitea-vrifox-frontend.scss +++ b/source/theme-gitea-vrifox-frontend.scss @@ -2,10 +2,6 @@ /* DON'T EDIT THIS FILE; EDIT THE SCSS/SASS INSTEAD */ /* ------------------------------------------------ */ -@mixin font-family() { - font-family: monospace, 'Lucida Console', 'Monaco' !important; -} - // // Settings // @@ -13,8 +9,14 @@ $singleuser: true; // disables functions, that are not necessary if you are the only user (or at least as »frontend«) $nojavascript: true; // disables or corrects functions, that would not work with disabled javascript (e.g. throught content security policy) -@import 'partials/main'; +$font-family: monospace, 'Lucida Console', 'Monaco'; +// +// +// + + +@import 'partials/main'; @import 'partials/nav';