summaryrefslogtreecommitdiffstats
path: root/templates/55/ad-hominem/css/_languages.less
blob: 651c237b4b70f7ac5f5ae2e6870c03f77729b10c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
/**
 * This file provides styles for the Languages list, 
 * both for the side- and the toolbar.
 * This overrides some of the styles in the languages plugin.
 */

#tbLanguages, #sbLanguages {
	
	ul {
		& {
			margin-left: .5em;
		}
		li {
			& {
				list-style: none inside;
			}
			a  {
				& {
					display: grid;
					grid-template-columns: 1.25em auto;
					align-items: center;
					gap: .4em;
					padding: .125em;
					line-height: 1.2em;
				}
				&::before {
					content: attr(lang);
					display: inline-block;
					text-align: center;
					place-self: stretch;
					border: @ini_text solid 1px;
					font-size: small;
					border-radius: 1.5pt;
					font-family: @ini_mono_fonts;
					font-size: .75rem;
					color: @ini_text;
				}
				&.wikilink1 {
					& {
						color: @ini_link;
					}
					&:hover {
						text-decoration: none;
					}
					&:hover span {
						text-decoration: underline;
					}
				}
				&.wikilink2 {
					& {
						border-bottom: transparent 0 none;
					}
					&:hover {
						text-decoration: none;
					}
					bdi {
						color: @ini_missing;
						text-decoration: underline;
						text-decoration-style: dotted;
					}
				}
				&.wikilink2:hover span {
					text-decoration-style: solid;
				}
			}
		}
	}
}
	
#tbLanguages {
	
	& {
		display: grid;
		place-items: center;
		grid-template-rows: auto 0;
		height: 100%;
	}
	button {
		& {
			padding: .25em;
			font-size: 1rem;
			border: transparent 1px solid;
			background-color: transparent;
			color: @ini_link;
			cursor: pointer;
			border-radius: .25em;
		}
		&:hover {
			background-color: @ini_background_alt;
			border-color: @ini_border;
			text-decoration: underline;
		}
		svg {
			width: 1.8rem; height: 1.8rem;
			fill: @ini_link;
		}
		svg text {
			fill: @ini_background_site;
			text-transform: uppercase;
		}
	}
	#langMenuWrapper {
		& {
			position: relative;
			left: 2rem; top: .5rem;
		}
		#langMenu {
			& {
				position: absolute;
				right: 0;
				background-color: @ini_background_site;
				border: @ini_border solid 1px;
				box-shadow: 0 0 8px rgba(0,0,0,.2);
				border-radius: 2pt;
				padding: .25em;
				z-index: 12;
			}
			&:before {
				content: '';
				position: absolute;
				top: 0;
				height: 1em;
				right: 16%;
				width: 1em;
				margin-left: -.5em;
				background-color: @ini_background_site;
				box-shadow: 0 0 8px rgba(0,0,0,.2);
				-webkit-clip-path: polygon(-8px -8px,calc(100% + 8px) -8px,calc(100% + 8px) calc(100% + 8px));
				clip-path: polygon(-8px -8px,calc(100% + 8px) -8px,calc(100% + 8px) calc(100% + 8px));
				transform: translateY(-50%) rotate(-45deg);
				border: @ini_border solid 1px;
			}
			li a {
				& {
					font-size: 1rem;
					padding: .25em;
					min-width: 6.5em;
					width: max-content;
				}
			}
		}
	}
}

#sbLanguages {
	& {
		margin: 1em .25em 0 1em;
	}
	h3 a.wikilink2 {
		color: @ini_missing;
	}
	ul {
		padding-left: 0 !important;
	}
}

/* dark mode overrides: */
@media (prefers-color-scheme: dark) {
	
	body.darkmode {

		#tbLanguages, #sbLanguages {
			ul li a {
				&::before { border-color: @ini_text_dark; color: @ini_text_dark; }
				&.wikilink1 { color: @ini_link_dark; }
				&.wikilink2 bdi { color: @ini_missing_dark; }
			}
		}

		#tbLanguages {
			button {
				& { color: @ini_link_dark; }
				&:hover { background-color: @ini_background_alt_dark; border-color: @ini_border_dark; }
				svg { fill: @ini_link_dark; }
				svg text { fill: @ini_background_site_dark; }
			}
			#langMenuWrapper #langMenu {
				& {
					background-color: @ini_background_site_dark;
					border-color: @ini_border_dark;
					box-shadow: 1pt 1pt 5pt rgba(0,0,0,0.4);;
				}
				&:before {
					background-color: @ini_background_site_dark;
					box-shadow: 1pt 1pt 5pt rgba(0,0,0,0.4);;
					border-color: @ini_border_dark;
				}
			}
		}
		#sbLanguages h3 a.wikilink2 {
			color: @ini_missing_dark;
		}
	}
}

@media (max-width: 950px) {

	/* touchup for the languages list in menu mode */
	#sbLanguages {
		margin: .5em .25em 0 .5em;
	}
}