Skip to content

Commit 6461869

Browse files
committed
Merge remote-tracking branch 'philo/1_2_stable'
2 parents 2ed8110 + e7cc819 commit 6461869

File tree

343 files changed

+7232
-4955
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+7232
-4955
lines changed

.dialyzer_ignore.exs

Lines changed: 0 additions & 5 deletions
This file was deleted.

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# VSCode supports `jsonc` for all of its JSON files
22
.vscode/*.json linguist-language=jsonc
33

4+
# tsconfig is actually in `jsonc` format
5+
.tsconfig*.json linguist-language=jsonc
6+
47
# We use PostCSS for CSS files
58
*.css linguist-language=PostCSS

assets/css/application.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@
2727
@import "elements/blocks";
2828
@import "elements/burger";
2929
@import "elements/button";
30+
@import "elements/checkbox";
3031
@import "elements/dropdown";
3132
@import "elements/forms";
3233
@import "elements/header";
3334
@import "elements/layout";
3435
@import "elements/media";
35-
@import "elements/shame";
3636
@import "elements/text";
37+
@import "elements/toggle";
3738

3839
/* Style elements specific to certain pages. */
3940
@import "views/adverts";
@@ -58,4 +59,5 @@
5859
@import "views/search";
5960
@import "views/staff";
6061
@import "views/stats";
62+
@import "views/tag_change";
6163
@import "views/tags";

assets/css/common/measurements.css

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,26 @@ $image-large-size: 512px;
1818
--limited-layout-width: $limited-layout-width;
1919
--min-desktop-thumb-width: $min-desktop-thumb-width;
2020
--border: 1px solid var(--border-color);
21+
--border-radius-toggle: 0.3rem;
22+
--border-radius-inner-toggle: 0.2rem;
23+
--border-radius-checkbox: 0.3rem;
2124
--media-border: 1px solid var(--media-box-color);
2225
--media-over-border: 1px dotted var(--vote-down-color);
26+
--media-box-header-height: 22px;
27+
--media-container-width: 225px;
28+
--media-tiny-container-width: 50px;
29+
--media-small-container-width: 150px;
30+
--media-medium-container-width: 250px;
31+
--media-large-container-width: 500px;
32+
--media-full-container-width: 100%;
33+
--media-featured-width: 326px;
34+
--media-small-header-height: 1rem;
2335
--font-family-base: $font-family-base;
2436
--font-family-monospace: $font-family-monospace;
25-
--padding-small: 0.5em;
26-
--padding-normal: 1em;
37+
--padding-tiny: 0.3rem;
38+
--padding-small: 0.4rem;
39+
--padding-normal: 0.75rem;
40+
--padding-large: 1.5rem;
2741
--centered-margin: 24px;
2842
--normal-margin: 12px;
2943
--image-tiny-size: $image-tiny-size;
@@ -40,6 +54,12 @@ $image-large-size: 512px;
4054
--block-header-height: 32px;
4155
--block-header-sub-height: 26px;
4256
--block-spacing: 6px;
43-
--media-box-header-height: 22px;
4457
--reduced-communication-avatar-size: 50px;
58+
--checkbox-size: 1.25rem;
59+
--checkbox-border-width: 1px;
60+
--toggle-width: 3rem;
61+
--toggle-height: 1.5rem;
62+
--toggle-border-width: 2px;
63+
--transition-animation-duration: 0.15s;
64+
--transition-long-animation-duration: 0.3s;
4565
}

assets/css/elements/base.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ p,
7575

7676
.communication__body__text .paragraph {
7777
margin-bottom: var(--padding-normal);
78+
word-wrap: break-word;
79+
word-break: break-all;
80+
}
81+
82+
@media (max-width: $min-desktop-width) {
83+
.communication__body__text pre {
84+
/* 32px = page padding(4px * 2) + pre padding(10px * 2) + borders(1px * 4) */
85+
max-width: calc(100vw - var(--block-spacing) * 2 - 32px);
86+
}
7887
}
7988

8089
img {
@@ -97,6 +106,7 @@ pre {
97106
border: 1px solid var(--meta-border-color);
98107
max-width: 100%;
99108
overflow: auto hidden;
109+
overflow-x: auto;
100110
}
101111

102112
a,
@@ -125,6 +135,12 @@ table,
125135
width: 100%;
126136
border-collapse: collapse;
127137
border: var(--border);
138+
word-wrap: break-word;
139+
}
140+
141+
.communication__body__text table,
142+
.communication__body__text .table {
143+
word-break: break-all;
128144
}
129145

130146
table th,
@@ -148,6 +164,12 @@ table > tbody,
148164
border: var(--border);
149165
}
150166

167+
@media (max-width: $min-desktop-width) {
168+
.communication__body__text table {
169+
overflow-x: auto;
170+
}
171+
}
172+
151173
/* I know this looks odd, but first one expands to
152174
.table > ...
153175
while the other one does the table verbatim */

assets/css/elements/blocks.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@
8787
background: 0;
8888
}
8989

90-
.block__tagbox {
91-
padding-top: calc(var(--block-spacing) + 5px);
92-
}
93-
9490
.block__header--light,
9591
.block__header--js-tabbed {
9692
background: var(--block-header-light-color);

assets/css/elements/checkbox.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
input[type="checkbox"].fancy-checkbox {
2+
appearance: none;
3+
}
4+
5+
.fancy-checkbox {
6+
display: inline-block;
7+
align-self: center;
8+
width: var(--checkbox-size);
9+
height: var(--checkbox-size);
10+
background: var(--input-color);
11+
border: var(--checkbox-border-width) solid var(--input-border);
12+
border-radius: var(--border-radius-checkbox);
13+
transition:
14+
background var(--transition-animation-duration) ease,
15+
border-color var(--transition-animation-duration) ease;
16+
}
17+
18+
.fancy-checkbox:checked,
19+
.fancy-checkbox:hover {
20+
cursor: pointer;
21+
background: var(--input-color-active);
22+
border-color: var(--input-border-active);
23+
transition:
24+
background var(--transition-animation-duration) ease,
25+
border-color var(--transition-animation-duration) ease;
26+
}
27+
28+
.fancy-checkbox:checked:after {
29+
content: "";
30+
color: var(--foreground-color);
31+
font-family: var(--fa-style-family, "Font Awesome 6 Free");
32+
font-weight: var(--fa-style, 900);
33+
text-align: center;
34+
line-height: calc(var(--checkbox-size) - var(--checkbox-border-width) * 2);
35+
display: block;
36+
position: relative;
37+
left: 0;
38+
}

assets/css/elements/layout.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ nav {
212212

213213
.footercol {
214214
margin-left: 15px;
215+
line-height: 1.35;
216+
}
217+
218+
.footercol a {
219+
margin-left: 1rem;
220+
font-size: 14px;
215221
}
216222
}
217223

@@ -252,6 +258,14 @@ nav {
252258
justify-content: space-between;
253259
}
254260

261+
.flex--gap-small {
262+
gap: var(--padding-small);
263+
}
264+
265+
.flex--gap-normal {
266+
gap: var(--padding-normal);
267+
}
268+
255269
.grid {
256270
display: grid;
257271
}

assets/css/elements/media.css

Lines changed: 84 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,57 @@
1+
.media-list {
2+
display: grid;
3+
grid-template-columns: repeat(auto-fill, minmax(var(--media-container-width), 1fr));
4+
grid-auto-rows: 1fr;
5+
grid-gap: var(--padding-small);
6+
}
7+
8+
/* Ensure the shape of the image list entries is square
9+
plus the media header height. */
10+
11+
.media-list:before {
12+
content: "";
13+
width: 0;
14+
padding-bottom: calc(100% + var(--media-box-header-height));
15+
grid-row: 1 / 1;
16+
grid-column: 1 / 1;
17+
}
18+
19+
@media (max-width: $max-limited-desktop-width) {
20+
.media-list {
21+
grid-template-columns: repeat(auto-fill, minmax(var(--media-small-container-width), 1fr));
22+
}
23+
}
24+
25+
.media-list--small {
26+
grid-template-columns: repeat(auto-fill, minmax(var(--media-small-container-width), 1fr));
27+
}
28+
29+
.media-list--small-fixed-size {
30+
grid-template-columns: repeat(auto-fill, var(--media-small-container-width));
31+
}
32+
33+
.media-list--small-fixed-size.media-list:before {
34+
padding-bottom: 0 !important;
35+
}
36+
37+
.media-grid {
38+
display: grid;
39+
grid-template-columns: 1fr 1fr;
40+
grid-template-rows: auto;
41+
grid-gap: var(--padding-small);
42+
}
43+
144
.media-box {
2-
display: inline-flex;
3-
flex-flow: column;
4-
position: relative;
545
overflow: hidden;
646
border: var(--media-border);
7-
margin: 0 6px 6px 0;
47+
}
48+
49+
/* Shift the image list by 1 element introduced due to
50+
the .media-list:before rule */
51+
52+
.media-box:first-child {
53+
grid-row: 1 / 1;
54+
grid-column: 1 / 1;
855
}
956

1057
.media-box.over {
@@ -47,7 +94,7 @@ a.media-box__header--link:hover {
4794
}
4895

4996
.media-box__header--small {
50-
width: 150px;
97+
width: var(--media-small-container-width);
5198
font-size: 11px;
5299
}
53100

@@ -63,38 +110,59 @@ a.media-box__header--link:hover {
63110
background-color: var(--success-color);
64111
}
65112

66-
/* TODO: properly fix this */
67-
.media-box__content .image-container {
113+
.media-box__content {
68114
width: 100%;
69-
height: 100%;
115+
padding-top: 100%;
116+
position: relative;
117+
overflow: hidden;
118+
}
119+
120+
.media-box__content .image-container {
121+
position: absolute;
122+
inset: 0;
70123
}
71124

72125
.media-box__content--featured {
73-
width: 326px;
74-
height: 326px;
126+
width: var(--media-featured-width);
127+
height: auto;
128+
}
129+
130+
.media-box__content--featured .image-container {
131+
max-height: var(--media-featured-width);
75132
}
76133

77134
.media-box__content--large {
78-
width: 254px;
79-
height: 254px;
135+
max-height: var(--media-medium-container-width);
80136
}
81137

82138
.media-box__content--small {
83-
width: 150px;
84-
height: 150px;
139+
max-height: var(--media-small-container-width);
140+
}
141+
142+
.media--featured {
143+
display: flex;
144+
justify-content: center;
145+
}
146+
147+
.media--featured .media-box {
148+
max-width: var(--media-featured-width);
149+
max-height: calc(var(--media-featured-width) + var(--media-box-header-height));
150+
margin-bottom: var(--padding-small);
85151
}
86152

87153
.media-box__overlay {
88154
display: block;
89155
position: absolute;
90156
z-index: 4;
91-
width: 100%;
157+
min-width: 95%;
92158
text-align: left;
93159
font-weight: bold;
94160
word-wrap: break-word;
161+
line-height: var(--media-box-header-height);
162+
pointer-events: none;
163+
top: 0;
95164
color: var(--image-overlay-color);
96165
background: var(--image-overlay-background-color);
97-
pointer-events: none;
98166
}
99167

100168
.thumb_small .media-box__overlay {

assets/css/elements/shame.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)