pyfedi/app/static/structure.scss

480 lines
7.3 KiB
SCSS
Raw Normal View History

/* This file contains SCSS used for creating the general structure of pages. Selectors should be things like body, h1,
nav, etc which are used site-wide */
@import "scss/colours";
@import "scss/mixins";
@import "scss/typography";
@import "scss/controls";
.container {
width: 100%;
padding-right: 0.75rem;
padding-left: 0.75rem;
margin-right: auto;
margin-left: auto;
max-width: inherit;
@include breakpoint(phablet) {
}
@include breakpoint(tablet) {
max-width: 960px;
}
@include breakpoint(laptop) {
max-width: 1200px;
}
@include breakpoint(desktop) {
max-width: 1550px;
}
@include breakpoint(bigbig) {
max-width: 1880px;
}
}
.skip-link {
position: absolute;
top: -40px; /* Adjust as needed to hide the link off-screen */
left: 0;
background-color: #fff; /* Background color to cover the link for screen readers */
z-index: 999; /* Ensure it's above other content */
}
.skip-link:focus {
top: 0; /* Bring the link back into view when it receives focus */
}
.form-group {
margin-bottom: 1.1rem;
}
.card {
max-width: 350px;
margin-left: auto;
margin-right: auto;
2024-01-04 22:08:32 +13:00
2024-01-04 22:24:13 +13:00
.card-body > p > img, .card-body > p > a > img {
2024-01-04 22:21:31 +13:00
max-width: 100%;
2024-01-04 22:08:32 +13:00
}
}
2023-10-03 22:29:13 +13:00
#breadcrumb_nav {
font-size: 87%;
2023-10-03 22:29:13 +13:00
}
@include breakpoint(tablet) {
#breadcrumb_nav {
display: block;
font-size: 87%;
.breadcrumb {
padding: 0;
margin-bottom: 0;
background-color: inherit;
.breadcrumb-item + .breadcrumb-item::before {
content: ">";
}
}
}
}
.community_header {
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
2023-12-29 17:32:35 +13:00
border-radius: 5px 5px 0 0; /* top-left | top-right | bottom-right | bottom-left */
2023-12-22 14:05:39 +13:00
height: 176px;
2023-12-29 17:32:35 +13:00
margin-left: -12px;
margin-right: -12px;
margin-top: -9px;
2023-10-03 22:29:13 +13:00
@include breakpoint(tablet) {
2023-12-22 14:05:39 +13:00
height: 240px;
}
#breadcrumb_nav {
@include breakpoint(tablet) {
2023-12-29 17:32:35 +13:00
padding-left: 13px;
2023-10-03 22:29:13 +13:00
padding-top: 13px;
2023-12-22 14:05:39 +13:00
}
.breadcrumb {
background-color: rgba(0,0,0,0.2);
display: inline-block;
padding: 5px 10px;
2023-12-29 17:32:35 +13:00
@include breakpoint(tablet) {
border-radius: 6px;
}
2023-12-22 14:05:39 +13:00
margin-bottom: 0;
2023-10-03 22:29:13 +13:00
2023-12-22 14:05:39 +13:00
.breadcrumb-item {
color: white;
display: inline-block;
a {
2023-10-03 22:29:13 +13:00
color: white;
}
2023-12-22 14:05:39 +13:00
}
2023-10-03 22:29:13 +13:00
2023-12-22 14:05:39 +13:00
.breadcrumb-item + .breadcrumb-item::before {
content: ">";
color: white;
2023-10-03 22:29:13 +13:00
}
}
}
}
.community_header_no_background, .community_header {
.community_icon {
width: 120px;
height: auto;
}
}
2024-01-08 19:41:32 +13:00
.form-check .form-check-input {
position: relative;
top: 4px;
}
2023-10-10 22:25:37 +13:00
.post_reply_form {
label {
display: none;
}
2023-11-30 23:21:37 +13:00
.form-check {
position: absolute;
bottom: -14px;
left: 122px;
label {
display: inherit;
}
}
}
.add_reply {
.form-control-label {
display: none;
}
.form-check {
position: absolute;
bottom: -14px;
left: 122px;
}
2023-10-10 22:25:37 +13:00
}
2023-11-30 23:21:37 +13:00
.post_list {
.post_teaser {
h3 {
2024-01-07 22:49:08 +13:00
font-size: 110%;
margin-top: 4px;
2023-11-09 22:44:09 +13:00
margin-bottom: 0;
2023-10-07 21:32:19 +13:00
}
2023-10-07 21:32:19 +13:00
.meta_row, .main_row, .utilities_row {
a {
text-decoration: none;
}
}
.thumbnail {
2023-12-22 14:05:39 +13:00
float: right;
padding-left: 0;
padding-right: 0;
2023-12-22 14:05:39 +13:00
img {
2023-12-22 14:05:39 +13:00
height: 60px;
width: 60px;
border-radius: 5px;
object-fit: cover;
margin-left: 5px;
@include breakpoint(tablet) {
height: 70px;
width: 133px;
}
}
}
border-bottom: solid 2px $light-grey;
padding-top: 8px;
padding-bottom: 8px;
}
2023-10-10 22:25:37 +13:00
}
.url_thumbnail {
float: right;
2024-01-05 11:56:18 +13:00
margin-top: -6px;
}
.post_image {
img {
max-width: 100%;
}
}
.render_username {
display: inline;
a img {
width: 20px;
height: 20px;
border-radius: 50%;
vertical-align: bottom;
}
}
.comments > .comment {
margin-left: 0;
2023-11-09 22:44:09 +13:00
border-top: solid 1px $grey;
margin-right: 8px;
&:first-child {
border-top: none;
padding-top: 0;
}
}
.post_body {
img {
max-height: 40vh;
max-width: 100%;
height: auto;
}
}
.comment_body {
img {
max-height: 40vh;
max-width: 100%;
height: auto;
}
}
#replies {
scroll-margin-top: 5em;
}
.post_replies > .col {
padding-right: 5px;
}
2023-11-27 22:05:35 +13:00
.post_type_image {
.post_image {
img {
max-width: 100%;
height: auto;
}
}
}
2023-10-23 17:22:21 +13:00
.voting_buttons {
float: right;
display: block;
2023-11-09 22:44:09 +13:00
width: 55px;
2023-12-22 14:05:39 +13:00
padding: 0 0 5px 5px;
2023-12-24 17:41:34 +13:00
line-height: 30px;
2023-12-22 14:05:39 +13:00
font-size: 14px;
2023-10-23 17:22:21 +13:00
2023-12-24 17:41:34 +13:00
@include breakpoint(laptop) {
line-height: 25px;
}
2023-10-23 17:22:21 +13:00
div {
border: solid 1px $primary-colour;
}
.upvote_button, .downvote_button {
2023-12-30 14:04:18 +13:00
position: relative;
2023-10-23 17:22:21 +13:00
padding-left: 3px;
border-radius: 3px;
cursor: pointer;
&.digits_4 {
width: 68px;
}
&.digits_5 {
width: 76px;
}
&.digits_6 {
width: 84px;
}
&.voted_up {
color: green;
font-weight: bold;
}
&.voted_down {
color: darkred;
font-weight: bold;
}
}
.downvote_button {
margin-top: 5px;
}
2023-12-30 14:04:18 +13:00
.htmx-indicator{
position: absolute;
2024-01-10 13:41:45 +13:00
width: 20px;
height: 20px;
2023-12-30 14:04:18 +13:00
}
.htmx-request .htmx-indicator{
display:inline;
position: absolute;
width: 20px;
height: 20px;
right: 14px;
top: 5px;
2023-12-30 14:06:30 +13:00
opacity: 1!important;
2023-12-30 14:04:18 +13:00
}
.htmx-request.htmx-indicator{
display:inline;
}
2023-10-23 17:22:21 +13:00
a {
text-decoration: none;
}
}
2023-10-10 22:25:37 +13:00
.comment {
clear: both;
margin-bottom: 20px;
2023-11-09 22:44:09 +13:00
margin-left: 15px;
padding-top: 8px;
2023-10-10 22:25:37 +13:00
2023-10-15 21:13:32 +13:00
.limit_height {
position: relative;
&.expanded {
max-height: none;
.show-more {
display: none;
}
}
}
.show-more {
text-decoration: none;
display: block;
text-align: center;
background-color: $dark-grey;
color: white;
margin-bottom: 15px;
}
2023-10-10 22:25:37 +13:00
.comment_author {
img {
width: 20px;
height: 20px;
border-radius: 50%;
vertical-align: bottom;
2023-10-10 22:25:37 +13:00
}
}
.hide_button {
float: right;
display: block;
width: 68px;
2023-10-10 22:25:37 +13:00
padding: 5px;
a {
text-decoration: none;
}
}
.comment_actions {
margin-top: -10px;
2023-12-28 20:00:07 +13:00
position: relative;
a {
text-decoration: none;
}
}
.replies {
margin-top: 15px;
border-left: solid 1px $light-grey;
2023-11-09 22:44:09 +13:00
border-top: solid 1px $light-grey;
}
2023-10-15 21:13:32 +13:00
}
#add_local_community_form {
#url {
width: 297px;
display: inline-block;
padding-left: 3px;
}
}
#reasons {
border: none;
list-style-type: none;
padding: 0;
overflow-y: auto;
2023-12-15 17:35:11 +13:00
height: 230px;
}
2023-11-30 23:21:37 +13:00
.table {
tr th {
vertical-align: middle;
2023-10-15 21:13:32 +13:00
}
2023-12-24 17:41:34 +13:00
}
.show_menu {
display: block!important;
2023-12-27 11:00:30 +13:00
}
.moderator_list {
list-style-type: none;
padding-left: 0;
li {
display: inline-block;
padding-right: 5px;
}
}
2023-12-31 12:09:20 +13:00
fieldset {
legend {
font-weight: bold;
}
2024-01-01 16:26:57 +13:00
}
.profile_action_buttons {
float: right;
}
.preview_image_shown {
z-index: 1;
position: relative;
max-width: 92vw;
height: auto;
cursor: pointer;
@include breakpoint(tablet) {
max-width: 760px;
}
@include breakpoint(laptop) {
max-width: 800px;
}
@include breakpoint(desktop) {
max-width: 850px;
}
@include breakpoint(bigbig) {
max-width: 1180px;
}
}
2024-01-07 18:02:52 +13:00
.mobile_create_post {
float: right;
}
.comment_body {
blockquote {
border-left: 2px solid var(--bs-secondary);
padding: 0.1em 5px;
font-style: italic;
}
}