mirror of https://gitlab.com/tildes/tildes.git
Browse Source
Add monthly donation goal to home page sidebar
Add monthly donation goal to home page sidebar
This uses the data in the financials table to generate a donation goal meter at the top of the home page's sidebar. It uses the new-ish HTML <meter> element, which will automatically change colors as it hits different thresholds.merge-requests/85/head
Deimos
5 years ago
7 changed files with 116 additions and 14 deletions
-
26tildes/scss/modules/_donation.scss
-
9tildes/scss/modules/_site-footer.scss
-
1tildes/scss/styles.scss
-
34tildes/scss/themes/_theme_base.scss
-
2tildes/tildes/templates/base.jinja2
-
23tildes/tildes/templates/home.jinja2
-
35tildes/tildes/views/topic.py
@ -0,0 +1,26 @@ |
|||||
|
// Copyright (c) 2019 Tildes contributors <code@tildes.net> |
||||
|
// SPDX-License-Identifier: AGPL-3.0-or-later |
||||
|
|
||||
|
.donation-goal { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; |
||||
|
|
||||
|
padding: 0.4rem 0.4rem 0; |
||||
|
margin: 1rem 0; |
||||
|
border: 1px solid; |
||||
|
border-color: inherit; |
||||
|
|
||||
|
font-size: 0.6rem; |
||||
|
text-align: center; |
||||
|
|
||||
|
header { |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
|
||||
|
meter { |
||||
|
width: 100%; |
||||
|
height: 0.4rem; |
||||
|
margin: 0.4rem 0 0.2rem; |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue