matrix-public-archive/public/css/room-directory.css

412 lines
7.8 KiB
CSS

.RoomDirectoryView {
overflow: hidden;
}
.RoomDirectoryView_header {
overflow: hidden;
display: flex;
justify-content: center;
padding-left: 10px;
padding-bottom: 80px;
padding-right: 10px;
background: url('../img/matrix-lines-hero-sprite.svg'),
linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
background-size: cover, 400% 400%;
background-position: 100% 50%, 0% 50%;
animation: Gradient 10s ease infinite;
color: #ffffff;
}
@media (prefers-reduced-motion) {
.RoomDirectoryView_header {
animation: none;
}
}
@keyframes Gradient {
0% {
background-position: 100% 50%, 0% 50%;
}
50% {
background-position: 100% 50%, 100% 50%;
}
100% {
background-position: 100% 50%, 0% 50%;
}
}
.RoomDirectoryView_headerForm {
display: inline-flex;
flex-direction: column;
align-items: center;
padding-top: 80px;
filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));
/* We're not changing transform on this element but this hints the browser to create a
* new layer which will be much easier to composite on top of our animating background.
* Related: https://web.dev/animations-guide/#force
*/
will-change: transform;
}
.RoomDirectoryView_matrixLogo {
width: 100%;
max-width: 170px;
padding: 9px;
border: 2px solid transparent;
border-radius: 8px;
color: #ffffff;
}
.RoomDirectoryView_matrixLogo:focus {
background-color: rgba(255, 255, 255, 0.03);
border: 2px solid rgba(213, 231, 246, 0.5);
outline: none;
}
.RoomDirectoryView_subHeader {
margin-top: 9px;
margin-bottom: 26px;
font-weight: normal;
font-size: 16px;
}
.RoomDirectoryView_search {
position: relative;
width: 100%;
max-width: 370px;
}
.RoomDirectoryView_searchIcon {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 14px;
color: rgba(255, 255, 255, 0.75);
margin-left: 9px;
margin-right: 9px;
}
.RoomDirectoryView_searchInput {
display: block;
width: 100%;
height: 32px;
padding-left: 32px;
padding-right: 8px;
background: rgba(255, 255, 255, 0.25);
border-radius: 8px;
border: 2px solid transparent;
transition: border-color 0.2s ease;
font-size: 14px;
color: #ffffff;
}
.RoomDirectoryView_searchInput:hover {
border: 2px solid rgba(213, 231, 246, 0.3);
}
.RoomDirectoryView_searchInput:focus {
border: 2px solid rgba(213, 231, 246, 0.5);
outline: none;
}
.RoomDirectoryView_searchInput::placeholder {
color: #eeeeee;
}
.RoomDirectoryView_homeserverSelectSection {
display: flex;
align-items: center;
margin-top: 16px;
}
.RoomDirectoryView_homeserverSelector {
margin-left: 1ch;
padding: 2px 6px;
padding-right: 2px;
background: rgba(255, 255, 255, 0.2);
border-radius: 4px;
border: 2px solid transparent;
transition: border-color 0.2s ease;
color: #ffffff;
}
.RoomDirectoryView_homeserverSelector:hover {
border: 2px solid rgba(213, 231, 246, 0.3);
}
.RoomDirectoryView_homeserverSelector:focus {
border: 2px solid rgba(213, 231, 246, 0.5);
outline: none;
}
.RoomDirectoryView_homeserverSelector > * {
color: initial;
}
.RoomDirectoryView_notificationToast {
position: fixed;
top: 20px;
left: 20px;
max-width: 450px;
margin-right: 20px;
padding: 20px;
background: hsl(207deg 36% 18% / 90%);
border-radius: 8px;
color: #fff;
}
.RoomDirectoryView_notificationToastTitle {
margin-top: 0;
margin-bottom: 0;
font-size: 14px;
font-weight: bold;
}
.RoomDirectoryView_notificationToastDescription {
margin-top: 1em;
margin-bottom: 0;
}
.RoomDirectoryView_mainContent {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 160px;
}
.RoomDirectoryView_paginationButtonCombo {
margin-top: 20px;
}
.RoomDirectoryView_paginationButtonCombo > .RoomDirectoryView_paginationButton:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.RoomDirectoryView_paginationButtonCombo > .RoomDirectoryView_paginationButton:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.RoomDirectoryView_paginationButtonCombo
> .RoomDirectoryView_paginationButton
+ .RoomDirectoryView_paginationButton {
border-left: 0;
}
.RoomDirectoryView_paginationButton {
display: inline-block;
padding: 16px 24px;
background-color: transparent;
border: 1px solid #dee2e6;
border-radius: 4px;
color: #2774c2;
line-height: 24px;
text-decoration: none;
}
.RoomDirectoryView_paginationButton:hover,
.RoomDirectoryView_paginationButton:focus {
background-color: #2774c2;
color: #ffffff;
outline: none;
}
@media (min-width: 750px) {
.RoomDirectoryView_paginationButton {
padding: 12px 18px;
}
}
.RoomDirectoryView_paginationButton:not([href]) {
background-color: transparent;
border: 1px solid #dee2e6;
color: #abb5be;
}
.RoomDirectoryView_roomList {
display: grid;
gap: 20px;
width: 100%;
max-width: 1180px;
padding-left: 20px;
padding-right: 20px;
margin-top: 20px;
margin-bottom: 0;
}
.RoomDirectoryView_roomListError {
display: block;
width: 100%;
max-width: 1180px;
padding-left: 20px;
padding-right: 20px;
margin-top: 20px;
line-height: 1.5;
}
.RoomDirectoryView_codeBlock {
overflow: auto;
padding: 0.5em 0.8em;
background-color: #f6f6f6;
border: 1px solid rgb(233, 233, 233);
border-radius: 4px;
}
@media (min-width: 750px) {
.RoomDirectoryView_roomList {
grid-template-columns: repeat(2, 1fr);
margin-top: 40px;
padding-left: 40px;
padding-right: 40px;
}
.RoomDirectoryView_roomListError {
margin-top: 40px;
padding-left: 40px;
padding-right: 40px;
}
}
@media (min-width: 1100px) {
.RoomDirectoryView_roomList {
grid-template-columns: repeat(3, 1fr);
}
}
.RoomCardView {
overflow: hidden;
display: flex;
flex-direction: column;
margin: 0;
padding: 20px;
list-style: none;
border: 1px solid rgba(54, 139, 214, 30%);
border-radius: 8px;
}
.RoomCardView_header {
display: flex;
align-items: top;
text-decoration: none;
}
.RoomCardView_headerTitle {
overflow: hidden;
display: -webkit-box;
max-height: 48px;
margin-top: 0;
margin-left: 8px;
margin-bottom: 0;
font-size: 16px;
line-height: 24px;
font-weight: normal;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
}
.RoomCardView_alias {
overflow: hidden;
display: inline-block;
width: 100%;
margin-left: 2px;
white-space: nowrap;
color: #4396cf;
line-height: 1.8em;
text-overflow: ellipsis;
text-decoration: none;
}
.RoomCardView_topic {
overflow: hidden;
display: -webkit-box;
height: 2.4em;
margin-top: 8px;
margin-bottom: 8px;
line-height: 1.2em;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
}
.RoomCardView_footer {
display: flex;
/**
* In order to keep the footer items at the bottom, fill the remaining card
* space and align the footerInner to the bottom
*/
flex-grow: 1;
align-items: flex-end;
width: 100%;
margin-top: 16px;
}
.RoomCardView_footerInner {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.RoomCardView_viewButtonWrapperLink {
/**
* Add some extra hitbox padding to the link so you don't have to be so
* accurate
*/
padding: 16px;
margin: -16px;
}
.RoomCardView_viewButtonWrapperLink:focus {
outline: none;
}
.RoomCardView_viewButton {
display: inline-block;
padding: 4px 16px;
background-color: transparent;
/* Always make a pill shape */
border-radius: 9999px;
border: 1px solid #2774c2;
color: #2774c2;
line-height: 24px;
text-decoration: none;
cursor: pointer;
}
@media (max-width: 750px) {
.RoomCardView_viewButton {
padding: 8px 32px;
}
}
.RoomCardView_viewButtonWrapperLink:hover > .RoomCardView_viewButton,
.RoomCardView_viewButtonWrapperLink:focus > .RoomCardView_viewButton {
background-color: #2774c2;
color: #ffffff;
}