gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

base.css (8549B)


      1 /*
      2 	GoToSocial
      3 	Copyright (C) 2021-2023 GoToSocial Authors admin@gotosocial.org
      4 
      5 	This program is free software: you can redistribute it and/or modify
      6 	it under the terms of the GNU Affero General Public License as published by
      7 	the Free Software Foundation, either version 3 of the License, or
      8 	(at your option) any later version.
      9 
     10 	This program is distributed in the hope that it will be useful,
     11 	but WITHOUT ANY WARRANTY; without even the implied warranty of
     12 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13 	GNU Affero General Public License for more details.
     14 
     15 	You should have received a copy of the GNU Affero General Public License
     16 	along with this program.  If not, see <http://www.gnu.org/licenses/>.
     17 */
     18 
     19 @import "modern-normalize/modern-normalize.css";
     20 
     21 /* noto-sans-regular - latin */
     22 @font-face {
     23   font-family: "Noto Sans";
     24   font-weight: 400;
     25   font-display: swap;
     26   font-style: normal;
     27   src: url('../fonts/noto-sans-v27-latin-regular.woff2') format('woff2'),
     28        url('../fonts/noto-sans-v27-latin-regular.woff') format('woff');
     29 }
     30 
     31 /* noto-sans-700 - latin */
     32 @font-face {
     33   font-family: "Noto Sans";
     34   font-weight: 700;
     35   font-display: swap;
     36   font-style: normal;
     37   src: url('../fonts/noto-sans-v27-latin-700.woff2') format('woff2'),
     38        url('../fonts/noto-sans-v27-latin-700.woff') format('woff');
     39 }
     40 
     41 /* standard border radius for nice squircles */
     42 $br: 0.4rem;
     43 /* border radius for items that are framed/bordered
     44    inside something with $br, eg avatar, header img */
     45 $br-inner: 0.2rem; 
     46 
     47 /* Fork-Awesome 'fa-fw' fixed icon width 
     48    keep in sync with https://github.com/ForkAwesome/Fork-Awesome/blob/a99579ae3e735ee70e51ed62dfcee3172b5b2db7/css/fork-awesome.css#L50
     49 */
     50 $fa-fw: 1.28571429em;
     51 
     52 html, body {
     53 	padding: 0;
     54 	margin: 0;
     55 	background: $bg;
     56 	color: $fg;
     57 	font-family: "Noto Sans", sans-serif;
     58 	scrollbar-color: $orange1 $gray3;
     59 }
     60 
     61 body {
     62 	line-height: 1.5em;
     63 	position: relative;
     64 }
     65 
     66 .hidden {
     67 	display: none;
     68 }
     69 
     70 .page {
     71 	display: grid;
     72 	min-height: 100vh;
     73 
     74 	grid-template-columns: 1fr minmax(auto, 50rem) 1fr;
     75 	grid-template-columns: 1fr min(92%, 50rem) 1fr;
     76 	grid-template-rows: auto 1fr auto;
     77 }
     78 
     79 h1 {
     80 	margin: 0;
     81 	line-height: 2.4rem;
     82 }
     83 
     84 a {
     85 	color: $link-fg;
     86 }
     87 
     88 header, footer {
     89 	grid-column: 1 / span 3;
     90 }
     91 
     92 .content {
     93 	grid-column: 2;
     94 	align-self: start;
     95 }
     96 
     97 header {
     98 	display: flex;
     99 	justify-content: center;
    100 }
    101 
    102 header a {
    103 	display: flex;
    104 	flex-wrap: wrap;
    105 	margin: 1.5rem;
    106 	gap: 1rem;
    107 	justify-content: center;
    108 
    109 	img {
    110 		align-self: center;
    111 		height: 3rem;
    112 	}
    113 
    114 	h1 {
    115 		flex-grow: 1;
    116 		align-self: center;
    117 		text-align: center;
    118 
    119 		font-size: 1.5rem;
    120 		word-wrap: anywhere;
    121 		color: $fg;
    122 	}
    123 }
    124 
    125 .excerpt-top {
    126 	margin-bottom: 2rem;
    127 	font-style: italic;
    128 	font-weight: normal;
    129 	text-align: center;
    130 	font-size: 1.2rem;
    131 
    132 	.count {
    133 		font-weight: bold;
    134 		color: $fg-accent;
    135 	}
    136 }
    137 
    138 main {
    139 	p:first-child {
    140 		margin-top: 0;
    141 	}
    142 
    143 	p:last-child {
    144 		margin-bottom: 0;
    145 	}
    146 }
    147 
    148 .button, button {
    149 	border-radius: 0.2rem;
    150 	color: $button-fg;
    151 	background: $button-bg;
    152 	box-shadow: $boxshadow;
    153 	border: $button-border;
    154 	text-decoration: none;
    155 	font-size: 1.2rem;
    156 	font-weight: bold;
    157 	padding: 0.5rem;
    158 	border: none;
    159 	cursor: pointer;
    160 	text-align: center;
    161 	font-family: 'Noto Sans', sans-serif;
    162 
    163 	&.danger {
    164 		color: $button-danger-fg;
    165 		background: $button-danger-bg;
    166 
    167 		&:hover {
    168 			background: $button-danger-hover-bg;
    169 		}
    170 	}
    171 
    172 	&:disabled {
    173 		color: $white2;
    174 		background: $gray2;
    175 		cursor: auto;
    176 
    177 		&:hover {
    178 			background: $gray3;
    179 		}
    180 	}
    181 
    182 	&:hover {
    183 		background: $button-hover-bg;
    184 	}
    185 }
    186 
    187 .nounderline {
    188 	text-decoration: none;
    189 }
    190 
    191 .accent {
    192 	color: $acc1;
    193 }
    194 
    195 .logo {
    196 	justify-self: center;
    197 	img {
    198 		height: 30vh;
    199 	}
    200 }
    201 
    202 section.apps {
    203 	align-self: start;
    204 
    205 	.applist {
    206 		display: grid;
    207 		grid-template-columns: 1fr 1fr;
    208 		grid-gap: 0.5rem;
    209 		align-content: start;
    210 
    211 		.entry {
    212 			display: grid;
    213 			grid-template-columns: 25% 1fr;
    214 			gap: 1.5rem;
    215 			padding: 0.5rem;
    216 			background: $bg-accent;
    217 			border-radius: 0.5rem;
    218 
    219 			.logo {
    220 				align-self: center;
    221 				width: 100%;
    222 				object-fit: contain;
    223 				flex: 1 1 auto;
    224 			}
    225 
    226 			.logo.redraw {
    227 				fill: $fg;
    228 				stroke: $fg;
    229 			}
    230 
    231 			a {
    232 				font-weight: bold;
    233 			}
    234 
    235 			div {
    236 				padding: 0;
    237 				h3 {
    238 					margin-top: 0;
    239 				}
    240 			}
    241 		}
    242 	}
    243 }
    244 
    245 section.login {
    246 	form {
    247 		display: flex;
    248 		flex-direction: column;
    249 		gap: 1rem;
    250 
    251 
    252 		padding-bottom: 1rem;
    253 		padding-top: 1rem;
    254 
    255 		label, input {
    256 			padding-left: 0.2rem;
    257 		}
    258 
    259 		.labelinput {
    260 			display: flex;
    261 			flex-direction: column;
    262 			gap: 0.4rem;
    263 		}
    264 
    265 		.btn {
    266 			margin-top: 1rem;
    267 		}
    268 	}
    269 }
    270 
    271 section.error {
    272 	word-break: break-word;
    273 	margin-bottom: 0.5rem;
    274 
    275 	pre {
    276 		border: 1px solid #ff000080;
    277 		padding: 0.5rem;
    278 		border-radius: 0.5em;
    279 		background-color: #ff000010;
    280 		font-size: 1.3em;
    281 		white-space: pre-wrap;
    282 	}
    283 }
    284 
    285 section.oob-token {
    286 	code {
    287 		background: $gray1;
    288 		padding: 0.5rem;
    289 		margin: 0;
    290 		border-radius: 0.3rem;
    291 	}
    292 }
    293 
    294 .error-text {
    295 	color: $error1;
    296 	background: $error2;
    297 	border-radius: 0.1rem;
    298 	font-weight: bold;
    299 }
    300 
    301 input, select, textarea, .input {
    302 	box-sizing: border-box;
    303 	border: 0.15rem solid $input-border;
    304 	border-radius: 0.1rem;
    305 	color: $fg;
    306 	background: $input-bg;
    307 	width: 100%;
    308 	font-family: 'Noto Sans', sans-serif;
    309 	font-size: 1rem;
    310 	padding: 0.3rem;
    311 
    312 	&:focus, &:active {
    313 		border-color: $input-focus-border;
    314 	}
    315 
    316 	&:invalid, .invalid & {
    317 		border-color: $input-error-border;
    318 	}
    319 
    320 	&:disabled {
    321 		background: transparent;
    322 	}
    323 }
    324 
    325 ::placeholder {
    326 	opacity: 1;
    327 	color: $fg-reduced
    328 }
    329 
    330 hr {
    331 	color: transparent;
    332 	width: 100%;
    333 	border-bottom: 0.02rem solid $border-accent;
    334 }
    335 
    336 footer {
    337 	align-self: end;
    338 	padding: 2rem 0 1rem 0;
    339 
    340 	display: flex;
    341 	flex-wrap: wrap;
    342 	justify-content: center;
    343 
    344 	div {
    345 		text-align: center;
    346 		padding: 1rem;
    347 		flex-grow: 1;
    348 	}
    349 
    350 	a {
    351 		font-weight: bold;
    352 	}
    353 }
    354 
    355 @media screen and (max-width: 600px) {
    356 	header {
    357 		text-align: center;
    358 	}
    359 
    360 	footer {
    361 		grid-template-columns: 1fr;
    362 
    363 		div {
    364 			text-align: initial;
    365 			width: 100%;
    366 		}
    367 	}
    368 
    369 	section.apps .applist {
    370 		grid-template-columns: 1fr;
    371 	}
    372 }
    373 
    374 .emoji {
    375 	width: 1.45em;
    376 	height: 1.45em;
    377 	margin: -0.2em 0.02em 0;
    378 	object-fit: contain;
    379 	vertical-align: middle;
    380 }
    381 
    382 .monospace {
    383 	font-family: monospace;
    384 }
    385 
    386 .callout {
    387 	margin: 1.5rem 0;
    388 	border: .05rem solid $border-accent;
    389 	border-radius: .2rem;
    390 	padding: 0 .6rem .6rem;
    391 	.callout-title {
    392 		margin: 0 -.6rem;
    393 		padding: .6rem;
    394 		font-weight: bold;
    395 		background-color: $border-accent;
    396 		color: $gray1;
    397 	}
    398 }
    399 
    400 label {
    401 	cursor: pointer;
    402 }
    403 
    404 @media (prefers-reduced-motion) {
    405 	.fa-spin {
    406 		animation: none;
    407 	}
    408 }
    409 
    410 .text-cutoff {
    411 	text-overflow: ellipsis;
    412 	overflow: hidden;
    413 	white-space: nowrap;
    414 }
    415 
    416 .list {
    417 	display: flex;
    418 	flex-direction: column;
    419 
    420 	.header, .entry {
    421 		padding: 0.5rem;
    422 	}
    423 
    424 	.header {
    425 		border: 0.1rem solid transparent !important; /* for alignment with .entry border padding */
    426 		background: $gray1 !important;
    427 		display: flex;
    428 		font-weight: bold;
    429 	}
    430 
    431 	.entries {
    432 		display: flex;
    433 		flex-direction: column;
    434 
    435 		&.scrolling {
    436 			height: 20rem;
    437 			max-height: 20rem;
    438 			overflow: auto;
    439 		}
    440 	}
    441 
    442 	input[type=checkbox] {
    443 		margin-left: 0.5rem;
    444 	}
    445 
    446 	.entry {
    447 		display: flex;
    448 		flex-wrap: wrap;
    449 		background: $list-entry-bg;
    450 		border: 0.1rem solid transparent;
    451 
    452 		&:nth-child(even) {
    453 			background: $list-entry-alternate-bg;
    454 		}
    455 	
    456 		&:hover {
    457 			background: $list-entry-hover-bg;
    458 		}
    459 	
    460 		&:active, &:focus, &:hover, &:target {
    461 			border-color: $fg-accent;
    462 		}
    463 	}
    464 }
    465 
    466 .domain-blocklist {
    467 	box-shadow: $boxshadow;
    468 
    469 	.entry {
    470 		display: grid;
    471 		grid-template-columns: max(30%, 10rem) 1fr;
    472 		gap: 0.5rem;
    473 		align-items: start;
    474 		border: $boxshadow-border;
    475 		border-top-color: transparent;
    476 
    477 		& > div {
    478 			display: flex;
    479 			align-items: center
    480 		}
    481 
    482 		.domain a {
    483 			font-weight: bold;
    484 			text-decoration: none;
    485 			display: inline-block; /* so it wraps properly */
    486 		}
    487 
    488 		.public_comment p {
    489 			margin: 0;
    490 		}
    491 	}
    492 
    493 	.header .domain {
    494 		color: $fg;
    495 	}
    496 }
    497 
    498 .about {
    499 	display: flex;
    500 	flex-direction: column;
    501 	gap: 1rem;
    502 
    503 	h2 {
    504 		margin: 0.5rem 0;
    505 	}
    506 
    507 	ul {
    508 		margin-bottom: 0;
    509 	}
    510 
    511 }
    512 
    513 .account-card {
    514 	display: inline-grid;
    515 	grid-template-columns: auto 1fr;
    516 	grid-template-rows: auto auto;
    517 	text-decoration: none;
    518 	gap: 0.5rem 1rem;
    519 	border-radius: $br;
    520 	padding: 0.5rem;
    521 	min-width: 40%;
    522 	margin-bottom: 0.3rem;
    523 
    524 	background: $list-entry-bg;
    525 
    526 	&:hover {
    527 		background: $list-entry-alternate-bg;
    528 	}
    529 
    530 	h3 {
    531 		align-self: end;
    532 		margin: 0;
    533 		color: $fg;
    534 	}
    535 
    536 	img.avatar {
    537 		border-radius: 0.5rem;
    538 		width: 5rem;
    539 		height: 5rem;
    540 		object-fit: cover;
    541 		grid-row: 1 / span 2;
    542 	}
    543 }
    544 
    545 @media screen and (max-width: 30rem) {
    546 	.domain-blocklist .entry {
    547 		grid-template-columns: 1fr;
    548 		gap: 0;
    549 	}
    550 }