From e6b1e72ef7558c318e8240991be7fa12d2e5e8c1 Mon Sep 17 00:00:00 2001 From: Facinorous Date: Tue, 29 Nov 2022 18:45:15 -0500 Subject: [PATCH 1/3] - Fix txtPrimary & txtSecondary class positions - Add linkPrimary class for link colour --- .github/README.md | 1 + tailwind.config.js | 3 ++- tailwind.css | 2 +- views/view.pug | 10 +++++----- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/README.md b/.github/README.md index e179b447..31354bc8 100644 --- a/.github/README.md +++ b/.github/README.md @@ -290,6 +290,7 @@ If you want to customize the font or colours of the viewer page, create a file i | **`bgViewer`** | Background colour for the viewer element | | **`txtPrimary`** | Primary text colour; this should be your main brand colour. | | **`txtSecondary`** | Secondary text colour; this is used for the file details. | +| **`linkPrimary`** | Primary link colour | | **`linkHover`** | Colour of the `hover` effect for links | | **`linkActive`** | Colour of the `active` effect for links | | **`borderHover`** | Colour of the `hover` effect for borders; this is used for the underlining links. | diff --git a/tailwind.config.js b/tailwind.config.js index fa3e321f..d3d380dc 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -18,10 +18,11 @@ const defaults = { bgViewer: '#151515', // Text colours - txtPrimary: '#FD842D', + txtPrimary: '#BDBDBD', txtSecondary: '#BDBDBD', // Links + linkPrimary: '#FD842D', linkHover: '#FD710D', linkActive: '#DE5E02', diff --git a/tailwind.css b/tailwind.css index adb200cd..319e20e9 100644 --- a/tailwind.css +++ b/tailwind.css @@ -13,7 +13,7 @@ @apply no-underline hover_no-underline active_no-underline visited_no-underline /* regular, visited */ - text-primary visited_text-primary + text-link visited_text-link border-b-2 visited_border-b-2 border-transparent visited_border-transparent rounded-sm visited_rounded-sm diff --git a/views/view.pug b/views/view.pug index c6aefa50..f0a6725e 100644 --- a/views/view.pug +++ b/views/view.pug @@ -21,10 +21,10 @@ html * { display: none !important; } meta(http-equiv='refresh' content=`0; url='${resourceAttr.src}'`) - body.font-main.text-secondary.bg-page + body.font-main.bg-page .w-full.h-full.flex.justify-center.items-center.text-center .bg-viewer.rounded-24 - h4.mx-4.mt-6.mb-4.text-3xl.font-main!=title + h4.mx-4.mt-6.mb-4.text-3xl.font-main.text-primary!=title figure.block.mx-10.my-4.flex.flex-col.align-items-center if fileIs.video video.res-media(controls loop muted playsinline preload='metadata')&attributes(resourceAttr) @@ -36,10 +36,10 @@ html code!=mimetype figcaption br - span.text-2xl Uploaded by #[strong!=uploader] + span.text-2xl.text-primary Uploaded by #[strong!=uploader] br - span #{timestamp} (#{size}) + span.text-secondary #{timestamp} (#{size}) br span: a.link(href='#' onclick=`window.location = '${resourceAttr.src}?download=yes'; return false;` download=title) Download if showAd - .mx-4.mb-8.text-footer: p Image hosted by #[a.link(href='https://github.com/tycrek/ass' target='_blank'): strong ass], the superior self-hosted ShareX server + .mx-4.mb-8.text-footer.text-secondary: p Image hosted by #[a.link(href='https://github.com/tycrek/ass' target='_blank'): strong ass], the superior self-hosted ShareX server From 093f84b6fb785ac1a2fa4ab7c1a9c3ecd237eb95 Mon Sep 17 00:00:00 2001 From: tycrek Date: Sat, 24 Dec 2022 19:12:14 -0700 Subject: [PATCH 2/3] fix: added missing link variable to Tailwind theme --- tailwind.config.js | 1 + tailwind.css | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tailwind.config.js b/tailwind.config.js index d3d380dc..eea89bd0 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -53,6 +53,7 @@ module.exports = { colors: { 'primary': theme.txtPrimary || defaults.txtPrimary, 'secondary': theme.txtSecondary || defaults.txtSecondary, + 'link-primary': theme.linkPrimary || defaults.linkPrimary, 'link-hover': theme.linkHover || defaults.linkHover, 'link-active': theme.linkActive || defaults.linkActive, }, diff --git a/tailwind.css b/tailwind.css index 319e20e9..4a529832 100644 --- a/tailwind.css +++ b/tailwind.css @@ -13,7 +13,7 @@ @apply no-underline hover_no-underline active_no-underline visited_no-underline /* regular, visited */ - text-link visited_text-link + text-link-primary visited_text-link-primary border-b-2 visited_border-b-2 border-transparent visited_border-transparent rounded-sm visited_rounded-sm From 77870d122828204e13a9e70132cea24b80fccb63 Mon Sep 17 00:00:00 2001 From: tycrek Date: Sat, 24 Dec 2022 19:12:25 -0700 Subject: [PATCH 3/3] style: make `txtSecondary` darker --- tailwind.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tailwind.config.js b/tailwind.config.js index eea89bd0..81e6b341 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -19,7 +19,7 @@ const defaults = { // Text colours txtPrimary: '#BDBDBD', - txtSecondary: '#BDBDBD', + txtSecondary: '#8D8D8D', // Links linkPrimary: '#FD842D',