You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sessioncommunities.online/output/index.css

814 lines
16 KiB
CSS

:root {
--body-margin: 8px; /* Default value in browsers */
--max-font-size-unitless: 18;
--min-font-size-unitless: 12;
/* Measurements of the width of all columns
except name and description on smaller screens */
--collapsed-static-column-width-px: 300px;
--collapsed-static-column-width: calc(
( 300 / var(--min-font-size-unitless) ) * 1rem
);
/* Measurements of the width of all columns
except name and description on wider screens */
--expanded-static-column-width-px: 800px;
--expanded-static-column-width: calc(
( 800 / var(--max-font-size-unitless) ) * 1rem
);
/* Space left for the name and description columns,
in the collapsed and expanded cases. */
--collapsed-dynamic-columns-width:
calc(
100vw
- var(--collapsed-static-column-width)
- 2 * var(--body-margin);
);
--expanded-dynamic-columns-width:
calc(
100vw
- var(--expanded-static-column-width)
);
/* Default for wide screens. */
--dynamic-columns-width: var(--expanded-dynamic-columns-width);
}
:root {
--cell-padding-h: 0.5em;
--cell-padding-v: 0.5em;
--cell-padding: var(--cell-padding-h) var(--cell-padding-v);
--cell-padding-small:
calc( var(--cell-padding-h) / 2 ) calc( var(--cell-padding-v) / 2 );
}
html {
font-size: clamp(12px, 2vw, var(--max-font-size-unitless) * 1px);
height: 100%;
}
body {
margin: 0;
height: 100%;
}
#toggle-theme-switch {
display: none;
}
#theming-root {
display: flex;
flex-direction: column;
width: 100%;
min-height: 100%;
margin: 0;
background-color: var(--secondary-color);
color: var(--primary-color);
}
#toggle-theme-switch:not(:checked) ~ #theming-root {
--primary-color: hsl(0, 0%, 100%);
--secondary-color: hsl(0, 0%, 0%);
--secondary-color-heading: hsl(0, 0%, 17%);
--secondary-color-shaded: hsl(0, 0%, 9%);
--anchor-color: hsl(210, 100%, 60%);
--color-http: hsl(0, 0%, 17%);
--color-https: hsl(195, 53%, 21%);
}
#toggle-theme-switch:checked ~ #theming-root {
--primary-color: hsl(0, 0%, 0%);
--secondary-color: hsl(0, 0%, 100%);
--secondary-color-heading: hsl(0, 0%, 83%);
--secondary-color-shaded: hsl(0, 0%, 91%);
--anchor-color: hsl(210, 100%, 40%);
--color-http: hsl(0, 0%, 83%);
--color-https: hsl(195, 53%, 79%);
}
a, .anchorstyle {
color: var(--anchor-color);
text-decoration: underline;
}
.clickable {
cursor: pointer;
}
/* Enumerate elements with transitions to improve performance on Chromium. */
/*
#theming-root, th, tr, .protocol-indicator, .copy_button,
.td_description::after,
#details-modal, #details-modal .themed-button,
a, .anchorstyle {
transition: color 2.5s linear, background-color 2s linear;
}
*/
html.js .noscript, .hidden {
display: none;
}
.badge {
display: inline-block;
border-radius: 1em;
padding-block: 0.1em;
padding-inline: 0.5em;
margin-block: 0.1em;
margin-inline: 0.2em;
border: #0004 outset 1px;
/* box-shadow: 0.05em 0.05em 0.1em 0 #4444;*/
}
#tbl_communities .room-label, #details-modal .room-label, .sample-search {
color: black;
}
#tbl_communities .room-label {
opacity: 0.75;
}
.room-label-user, .sample-search-tag {
background-color: greenyellow;
}
.room-label-reserved, .sample-search-tag-reserved {
background-color: yellow;
}
.room-label-warning {
background-color: pink;
}
.sample-search-plain {
background-color: lightgrey;
}
.sample-search-language {
background-color: whitesmoke;
}
#tbl_communities .room-label:not(.room-label-highlighted) {
background-color: transparent;
color: var(--primary-color);
}
gap {
flex-grow: 1000;
}
header {
display: flex;
direction: row;
/* Push items as far apart as possible */
justify-content: space-between;
padding-top: var(--body-margin);
padding-inline: var(--body-margin);
}
#header-start, #header-end {
display: flex;
gap: 0.5em;
}
#headline {
text-align: center;
flex-grow: 1;
}
#search-container {
display: flex;
flex-direction: column;
max-height: 10rem;
justify-content: center;
box-sizing: border-box;
overflow: hidden;
transition: max-height 0.5s;
}
#search-container > * {
margin-bottom: 1rem;
}
.collapsed {
max-height: 0 !important;
}
#search-container.collapsed > * {
display: none !important;
}
#search {
display: flex;
justify-content: center;
align-items: baseline;
margin-inline: 1rem;
}
#search-bar {
height: 1.25rem;
color: var(--primary-color);
background-color: var(--secondary-color);
border: 1px var(--primary-color) solid;
text-align: right;
padding: 0.1rem 0.25rem;
}
#search-bar.search-no-results {
color: red;
}
#search-bar:placeholder-shown ~ .btn-clear-search {
visibility: hidden;
}
.btn-clear-search {
margin-right: 1rem;
font-size: 1.5rem;
padding: 0.25rem 1rem;
}
#sample-searches {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-inline: 1rem;
justify-content: center;
row-gap: 0.25rem;
}
/* --- Table --- */
#tbl_communities {
margin: 0 auto;
}
/* Cells in general */
#tbl_communities th {
white-space: nowrap;
}
#tbl_communities :is(th, td) {
padding: var(--cell-padding-v) var(--cell-padding-h);
}
#tbl_communities th.sortable {
position: relative;
padding-right: calc( 1.35em + var(--cell-padding-h) );
}
#tbl_communities th.sortable::after {
position: absolute;
right: calc( var(--cell-padding-h) );
top: 50%;
transform: translateY(-50%);
/* content: "\25C7"; */ /* White diamond */
/* content: "\2195"; */ /* Up-down arrow */
/* content: "\25A1"; */ /* White square */
/* content: "\25B8"; */ /* Small right pointing triangle */
content: "\2B25"; /* Black medium diamond */
color: grey;
font-size: 1.3em;
}
#tbl_communities[data-sort-asc=true] th[data-sort=true]::after {
content: "\25B2"; /* Black up pointing triangle */
color: initial;
font-size: 1em;
}
#tbl_communities[data-sort-asc=false] th[data-sort=true]::after {
content: "\25BC"; /* Black up pointing triangle */
color: initial;
font-size: 1em;
}
#tbl_communities th {
background-color: var(--secondary-color-heading);
}
#tbl_communities tr {
background-color: var(--row-color);
}
#tbl_communities tr:nth-child(even) {
background-color: var(--secondary-color);
--row-color: var(--secondary-color);
}
#tbl_communities tr:nth-child(odd) {
background-color: var(--secondary-color-shaded);
--row-color: var(--secondary-color-shaded);
}
/* Particular columns */
.td_identifier {
font-family: monospace;
}
#th_name, .td_name {
width: calc(
0.375 * (
var(--dynamic-columns-width)
)
);
max-width: calc(
0.375 * (
var(--dynamic-columns-width)
)
);
overflow: hidden;
text-overflow: ellipsis;
}
.td_name-inner {
/* Block padding for inline element does not change flow, only clickbox */
padding-block: calc( var(--cell-padding-v) );
}
.td_language {
text-align: center;
font-size: 1.5em;
}
.td_language:empty::after {
content: "\2753";
}
.td_description {
position: relative;
overflow: hidden;
text-overflow: ellipsis;
/* Prevents middle alignment with table-cell. */
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
}
#th_description, .td_description {
width: calc(
0.625 * (
var(--dynamic-columns-width)
)
);
max-width: calc(
0.625 * (
var(--dynamic-columns-width)
)
);
}
.td_description::after {
/* Cover overflowing description lines with internal border. */
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: var(--cell-padding-h);
content: "";
background-color: var(--row-color);
}
.td_users {
text-align: center;
/* font-weight: bold; */
}
.td_preview {
text-align: center;
}
.protocol-indicator {
display: inline-block;
font-family: monospace;
border-radius: 4px;
padding: .25em .05em;
width: 6ch;
text-align: center;
text-shadow: 0 0 0.5em #0003;
}
a[href^="http:"] .protocol-indicator {
background-color: var(--color-http);
}
a[href^="https:"] .protocol-indicator {
background-color: var(--color-https);
}
a[href^="http:"] .protocol-indicator::after {
content: "HTTP";
}
a[href^="https:"] .protocol-indicator::after {
content: "HTTPS";
}
.td_qr_code {
padding: var(--cell-padding-small) !important;
}
.td_server_icon {
text-align: center;
padding: var(--cell-padding-small) !important;
font-size: 1.1em;
}
.td_server_icon-circle {
display: flex;
align-items: center;
justify-content: center;
width: 2em;
height: 2em;
border-radius: 100%;
font-family: sans-serif;
margin: 0 auto;
color: white;
text-shadow: 0 0 0.25em #000a;
box-shadow: 0 0 0.05em #777;
background-size: cover;
}
.td_server_icon-circle span {
position: relative;
top: 0.05em;
}
.td_join_url {
font-family: monospace;
white-space: nowrap;
font-size: .8em;
}
.join_url {
overflow: hidden;
text-overflow: ellipsis;
max-width: 20vw;
/* Apply margin against copy button or link. */
/* URL now guaranteed to have interactive element to right when present. */
margin-right: 1em;
}
.join_url_container {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
}
.copy_button {
font-size: 1.1em;
background-color: var(--secondary-color);
color: var(--primary-color);
padding: var(--cell-padding);
border-radius: 10%;
cursor: pointer;
}
/* --- Footer --- */
#footer-divider {
width: 90%;
}
footer {
display: flex;
flex-direction: column;
align-items: center;
max-width: 100%;
text-align: center;
padding-bottom: var(--body-margin);
padding-inline: var(--body-margin);
}
footer p {
width: 75%;
margin: .5em;
text-align: center;
}
footer nav :is(a, span) {
display: inline-block;
padding: .5em;
white-space: nowrap;
}
#more-sites-info-button {
font-size: 1.25em;
}
/* --- QR code modals --- */
#details-modal {
padding: 0;
width: 80vw;
--modal-height: calc(80vh - 8em);
height: var(var(--modal-height));
color: var(--primary-color);
background-color: var(--secondary-color);
--icon-size: 4rem;
}
#details-modal-contents {
display: flex;
flex-direction: column;
box-sizing: border-box;
}
#details-modal-flow {
display: flex;
flex-direction: column;
padding: 3em;
height: var(--modal-height);
overflow: auto;
box-sizing: border-box;
justify-content: space-between;
gap: 1em;
}
#details-modal-close {
position: absolute;
cursor: pointer;
top: 0rem;
right: 0rem;
font-size: 3.5rem;
width: 5rem;
height: 5.5rem;
text-align: center;
}
#details-modal-close-hint {
position: absolute;
bottom: 1rem;
right: 1rem;
opacity: 0.5;
font-style: italic;
}
#details-modal-panes {
display: flex;
flex-direction: row;
}
#details-modal-panes, .details-modal-pane {
/* Jank overlap with actions when overflows */
/* height: 100%; */
}
#details-modal-start {
display: flex;
flex-direction: column;
margin-right: 1em;
}
#details-modal-end {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#details-modal-title > * {
display: inline-block;
}
#details-modal-title {
margin-bottom: calc( var(--icon-size) * 0.1 );
}
#details-modal-community-icon-wrapper {
position: relative;
box-sizing: border-box;
--strip: calc( var(--icon-size) / 25 );
--padding-size: calc( var(--icon-size) - 1 * var(--strip) );
top: calc(var(--icon-size) * 0.5 - 0.6rem);
width: var(--icon-size);
height: var(--icon-size);
margin-right: calc( var(--icon-size) * 0.3 );
/* box-shadow: var(--primary-color) 0 0 calc( var(--icon-size) / 10 ); */
border: var(--primary-color) var(--strip) solid;
padding: var(--strip);
border-radius: 100%;
}
#details-modal-community-icon-wrapper[data-has-icon="false"] {
display: none;
}
#details-modal-community-icon-wrapper[data-icon-safety="-1"] {
display: none;
}
#details-modal-community-icon-wrapper:is([data-has-icon="false"], [data-icon-safety="-1"]) #details-modal-community-icon {
display: none;
}
#details-modal-community-icon {
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
border-radius: inherit;
transition: filter 0.15s, opacity 0.15s;
}
#details-modal-community-icon[data-icon-safety="-1"]:not(#details-modal-community-icon-wrapper:hover > *) {
opacity: 0.5;
filter: blur(3px);
}
#details-modal-start #details-modal-description-inner:empty::after {
content: "No description";
font-style: italic;
}
#details-modal-start #details-modal-language-flag:empty::after {
content: "Unknown";
font-style: italic;
}
#details-modal-end #details-modal-qr-code {
aspect-ratio: 1;
width: 15em;
height: 15em;
margin: 1em;
}
#details-modal-end #details-modal-qr-code-label {
text-align: center;
}
#details-modal-actions {
display: flex;
width: 100%;
flex-direction: row;
flex-wrap: wrap;
gap: .5em;
row-gap: .5em;
}
#details-modal .themed-button {
color: var(--primary-color);
background-color: var(--secondary-color);
border-radius: 10%;
padding: var(--cell-padding-small);
}
#details-modal-qr-code-label-name {
display: block;
}
/* <Snackbar> */
/* The snackbar - position it at the bottom and in the middle of the screen */
#copy-snackbar {
visibility: hidden; /* Hidden by default. Visible on click */
background-color: #333; /* Black background color */
color: #fff; /* White text color */
text-align: center; /* Centered text */
border-radius: 2px; /* Rounded corners */
padding: 16px;
position: fixed; /* Move along as viewport scrolls */
z-index: 1; /* Add a z-index if needed */
left: 50%; /* Offset the snackbar by half the viewport width */
transform: translateX(-50%); /* Push the snackbar back by half its width */
bottom: 0;
opacity: 0;
transition: bottom 0.5s, opacity 0.5s;
}
/* Show the snackbar when clicking on a button (class added with JavaScript) */
#copy-snackbar.show {
visibility: visible; /* Show the snackbar */
bottom: 30px; /* 30px from the bottom */
opacity: 1;
}
/* Responsive properties */
.td_name .room-label:nth-of-type(5) ~ .room-label {
display: none;
}
@media (max-width: 1600px) {
.td_name .room-label:nth-of-type(4) ~ .room-label {
display: none;
}
}
@media (max-width: 1500px) {
.td_name .room-label:nth-of-type(3) ~ .room-label {
display: none;
}
}
@media (max-width: 1400px) {
.td_name .room-label:nth-of-type(2) ~ .room-label {
display: none;
}
}
@media (max-width: 1200px) {
.td_name .room-label:nth-of-type(1) ~ .room-label {
display: none;
}
}
.td_name .room-label:not(.room-label-showcased) {
display: none;
}
@media (max-width: 1050px) {
/* Only current width breakpoint; */
/* Would follow w4 and precede w6. */
.show-from-w5 {
display: none;
}
#th_preview, .td_preview {
display: none;
}
:root {
--dynamic-columns-width: var(--collapsed-dynamic-columns-width);
}
}
@media (max-height: 1100px) {
#details-modal-language, #details-modal-users, #details-modal-created {
display: inline-block;
text-align: center;
}
#details-modal-room-info > * {
margin-block: 0.5em;
}
:is(#details-modal-language, #details-modal-users)::after {
content: "•"; /* bullet */
margin-inline: 1em;
}
}
@media (max-width: 1000px) {
#details-modal-pane-selection {
display: inline-flex;
flex-direction: row;
/* Stick to the right */
margin: 0 0 0 auto;
}
#details-modal-panes[data-pane="0"] > .details-modal-pane:not([data-pane="0"]),
#details-modal-panes[data-pane="1"] > .details-modal-pane:not([data-pane="1"]) {
display: none;
}
#details-modal-panes[data-pane="0"] ~ #details-modal-actions .details-modal-pane-button[data-pane="0"],
#details-modal-panes[data-pane="1"] ~ #details-modal-actions .details-modal-pane-button[data-pane="1"] {
display:none
}
#details-modal-panes {
flex-direction: column;
align-items: stretch;
flex-grow: 500;
}
#details-modal-panes > gap {
display: none;
}
#details-modal #details-modal-qr-code {
width: 30vh;
height: 30vh;
}
#details-modal-qr-code-label-name {
display: inline;
}
}
@media (max-width: 500px) {
#th_qr_code, .td_qr_code {
display: none;
}
#th_description, .td_description {
display: none;
}
#th_name, .td_name {
max-width: var(--dynamic-columns-width);
width: var(--dynamic-columns-width);
}
:root {
/* ! For when descriptions don't wrap and 100vw doesn't work. */
--dynamic-columns-width: 13rem;
}
}