Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix mismatched theme options #176

Merged
merged 4 commits into from
Dec 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
6 changes: 4 additions & 2 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ const defaults = {
bgViewer: '#151515',

// Text colours
txtPrimary: '#FD842D',
txtSecondary: '#BDBDBD',
txtPrimary: '#BDBDBD',
txtSecondary: '#8D8D8D',

// Links
linkPrimary: '#FD842D',
linkHover: '#FD710D',
linkActive: '#DE5E02',

Expand Down Expand Up @@ -52,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,
},
Expand Down
2 changes: 1 addition & 1 deletion tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -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-primary visited_text-link-primary
border-b-2 visited_border-b-2
border-transparent visited_border-transparent
rounded-sm visited_rounded-sm
Expand Down
10 changes: 5 additions & 5 deletions views/view.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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