gab-social/app/javascript/styles/gabsocial/containers.scss

837 lines
15 KiB
SCSS
Raw Normal View History

2019-07-02 08:10:25 +01:00
.container-alt {
width: 700px;
2019-09-17 00:31:30 +01:00
margin: 40px auto 0 auto;
2019-07-02 08:10:25 +01:00
@media screen and (max-width: 740px) {
width: 100%;
margin: 0;
}
}
.logo-container {
margin: 100px auto 50px;
@media screen and (max-width: 500px) {
margin: 40px auto 0;
}
h1 {
2019-09-17 00:31:30 +01:00
@include flex(center, center);
2019-07-02 08:10:25 +01:00
img {
height: 42px;
margin-right: 10px;
}
a {
color: $primary-text-color;
text-decoration: none;
outline: 0;
padding: 12px 16px;
font-family: $font-display, sans-serif;
2019-09-17 00:31:30 +01:00
@include flex(center, center);
@include text-sizing(14px, 500, 32px);
2019-07-02 08:10:25 +01:00
}
}
}
.compose-standalone {
.compose-form {
width: 400px;
margin: 0 auto;
padding: 20px 0;
margin-top: 40px;
box-sizing: border-box;
@media screen and (max-width: 400px) {
width: 100%;
margin-top: 0;
padding: 20px;
}
}
}
.account-header {
width: 400px;
margin: 0 auto;
display: flex;
box-sizing: border-box;
2019-09-17 00:31:30 +01:00
padding: 20px 0 0 0;
@include text-sizing(13px, 400, 18px);
@include vertical-margin(40px, -30px);
2019-07-02 08:10:25 +01:00
@media screen and (max-width: 440px) {
width: 100%;
2019-09-17 00:31:30 +01:00
margin: 0 0 10px 0;
padding: 20px 20px 0 20px;
2019-07-02 08:10:25 +01:00
}
.avatar {
margin-right: 8px;
2019-09-17 00:31:30 +01:00
@include size(40px);
2019-07-02 08:10:25 +01:00
img {
display: block;
margin: 0;
border-radius: 4px;
2019-09-17 00:31:30 +01:00
@include size(100%);
2019-07-02 08:10:25 +01:00
}
}
.name {
flex: 1 1 auto;
color: $secondary-text-color;
width: calc(100% - 88px);
.username {
display: block;
font-weight: 500;
2019-09-17 00:31:30 +01:00
@include text-overflow;
2019-07-02 08:10:25 +01:00
}
}
.logout-link {
display: block;
margin-left: 8px;
2019-09-17 00:31:30 +01:00
@include text-sizing(32px, 400, 40px);
2019-07-02 08:10:25 +01:00
}
}
.grid-3 {
display: grid;
grid-gap: 10px;
grid-template-columns: 3fr 1fr;
grid-auto-columns: 25%;
grid-auto-rows: max-content;
.column-0 {
grid-column: 1/3;
grid-row: 1;
}
.column-1 {
grid-column: 1;
grid-row: 2;
}
.column-2 {
grid-column: 2;
grid-row: 2;
}
.column-3 {
grid-column: 1/3;
grid-row: 3;
}
.landing-page__call-to-action {
min-height: 100%;
}
@media screen and (max-width: 738px) {
grid-template-columns: minmax(0, 50%) minmax(0, 50%);
.landing-page__call-to-action {
padding: 20px;
2019-09-17 00:31:30 +01:00
@include flex(center, center);
2019-07-02 08:10:25 +01:00
}
.row__information-board {
width: 100%;
justify-content: center;
align-items: center;
}
}
@media screen and (max-width: $no-gap-breakpoint) {
grid-gap: 0;
grid-template-columns: minmax(0, 100%);
.column-0 {
grid-column: 1;
}
.column-1 {
grid-column: 1;
grid-row: 3;
}
.column-2 {
grid-column: 1;
grid-row: 2;
}
.column-3 {
grid-column: 1;
grid-row: 4;
}
}
}
.public-layout {
.container {
max-width: 960px;
@media screen and (max-width: $no-gap-breakpoint) {
padding: 0;
}
}
.content {
display: block;
margin: 40px 0;
}
.background-svg {
display: block;
position: absolute;
min-height: 580px;
z-index: -1;
2019-09-17 00:31:30 +01:00
@include size(100%);
@include background-image('/landing/wave.svg', cover, bottom);
2019-07-02 08:10:25 +01:00
}
.header {
height: 80px;
padding: 14px 0;
box-sizing: border-box;
2019-09-17 00:31:30 +01:00
@include flex(center, stretch, row, nowrap);
2019-07-02 08:10:25 +01:00
@media screen and (max-width: 1024px) {
padding: 14px 20px;
}
.header-container {
width: 960px;
2019-09-17 00:31:30 +01:00
@include flex(center, stretch, row, nowrap);
&>div {
2019-07-02 08:10:25 +01:00
flex: 1 1 33.3%;
min-height: 1px;
}
}
.nav-left {
2019-09-17 00:31:30 +01:00
@include flex(flex-start, center, row, nowrap);
2019-07-02 08:10:25 +01:00
}
.nav-center {
2019-09-17 00:31:30 +01:00
@include flex(center, stretch, row, nowrap);
2019-07-02 08:10:25 +01:00
}
.nav-right {
2019-09-17 00:31:30 +01:00
@include flex(flex-end, center, row, nowrap);
2019-07-02 08:10:25 +01:00
.simple_form.new_user {
2019-09-17 00:31:30 +01:00
@include flex(flex-start, center, row);
2019-07-02 08:10:25 +01:00
.fields-group {
display: flex;
flex-direction: row;
margin-bottom: 0;
position: relative;
p.hint.subtle-hint {
position: absolute;
top: 30px;
left: 160px;
a {
padding: 4px;
border-radius: 4px;
background-color: $ui-base-color;
}
}
.input {
margin-bottom: 0;
margin-right: 10px;
input {
min-width: 150px;
font-size: 14px;
}
}
}
.actions {
display: flex;
margin-top: 0;
.button {
margin-bottom: 0 !important;
line-height: 38px !important;
border: 1px solid #333 !important;
height: 38px !important;
box-sizing: border-box !important;
padding: 0 18px !important;
text-transform: none !important;
}
}
}
}
.brand {
display: block;
img {
display: block;
position: relative;
bottom: -2px;
2019-09-17 00:31:30 +01:00
@include size(auto, 30px);
2019-07-02 08:10:25 +01:00
@media screen and (max-width: $no-gap-breakpoint) {
height: 20px;
}
}
}
.nav-link {
display: flex;
align-items: center;
padding: 12px 22px;
text-decoration: none;
color: $primary-text-color;
white-space: nowrap;
2019-09-17 00:31:30 +01:00
@include text-sizing(14px, 600, 1, center);
2019-07-02 08:10:25 +01:00
&:hover,
&:focus,
&:active {
text-decoration: underline;
color: $primary-text-color;
}
&--hollow {
background-color: $ui-base-color;
&:hover,
&:focus,
&:active {
color: $gab-brand-default;
}
}
@media screen and (max-width: 550px) {
font-size: 12px;
padding: 12px 10px;
2019-07-02 08:10:25 +01:00
&.optional {
display: none;
}
}
}
.nav-button {
background: $gab-brand-default;
margin: 8px;
margin-left: 0;
border-radius: 4px;
&:hover,
&:focus,
&:active {
text-decoration: none;
background: darken($gab-brand-default, 10%);
}
&--hollow {
background: transparent;
&:hover,
&:focus,
&:active {
background: rgba($gab-brand-default, 0.2);
}
}
}
}
$no-columns-breakpoint: 600px;
.grid {
display: grid;
grid-gap: 10px;
grid-template-columns: minmax(300px, 3fr) minmax(298px, 1fr);
grid-auto-columns: 25%;
grid-auto-rows: max-content;
.column-0 {
grid-row: 1;
grid-column: 1;
}
.column-1 {
grid-row: 1;
grid-column: 2;
}
@media screen and (max-width: $no-columns-breakpoint) {
grid-template-columns: 100%;
grid-gap: 0;
.column-1 {
display: none;
}
}
}
.public-account-header {
overflow: hidden;
margin-bottom: 10px;
box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
&.inactive {
opacity: 0.5;
.public-account-header__image,
.avatar {
filter: grayscale(100%);
}
.logo-button {
background-color: $secondary-text-color;
}
}
&__image {
border-radius: 4px 4px 0 0;
overflow: hidden;
height: 300px;
position: relative;
background: darken($ui-base-color, 12%);
&::after {
box-shadow: inset 0 -1px 1px 1px rgba($base-shadow-color, 0.15);
top: 0;
left: 0;
2019-09-17 00:31:30 +01:00
@include pseudo;
@include size(100%);
2019-07-02 08:10:25 +01:00
}
img {
object-fit: cover;
display: block;
margin: 0;
border-radius: 4px 4px 0 0;
2019-09-17 00:31:30 +01:00
@include size(100%);
2019-07-02 08:10:25 +01:00
}
2019-09-17 00:31:30 +01:00
@include breakpoint(sm) {
2019-07-02 08:10:25 +01:00
height: 200px;
}
}
&--no-bar {
margin-bottom: 0;
.public-account-header__image,
.public-account-header__image img {
border-radius: 4px;
@media screen and (max-width: $no-gap-breakpoint) {
border-radius: 0;
}
}
}
@media screen and (max-width: $no-gap-breakpoint) {
margin-bottom: 0;
box-shadow: none;
&__image::after {
display: none;
}
&__image,
&__image img {
border-radius: 0;
}
}
&__bar {
position: relative;
margin-top: -80px;
2019-09-17 00:31:30 +01:00
@include flex(flex-start);
2019-07-02 08:10:25 +01:00
&::before {
background: lighten($ui-base-color, 4%);
height: 60px;
border-radius: 0 0 4px 4px;
z-index: -1;
2019-09-17 00:31:30 +01:00
@include pseudo;
@include abs-position(auto, 0, 0, 0, false);
2019-07-02 08:10:25 +01:00
}
.avatar {
display: block;
padding-left: 20px - 4px;
flex: 0 0 auto;
2019-09-17 00:31:30 +01:00
@include size(120px);
2019-07-02 08:10:25 +01:00
img {
display: block;
margin: 0;
border: 4px solid lighten($ui-base-color, 4%);
background: darken($ui-base-color, 8%);
2019-09-17 00:31:30 +01:00
@include circle(100%);
2019-07-02 08:10:25 +01:00
}
}
2019-09-17 00:31:30 +01:00
@include breakpoint(sm) {
2019-07-02 08:10:25 +01:00
margin-top: 0;
background: lighten($ui-base-color, 4%);
border-radius: 0 0 4px 4px;
padding: 5px;
&::before {
display: none;
}
.avatar {
2019-09-17 00:31:30 +01:00
padding: 7px 0 7px 10px;
@include size(48px);
2019-07-02 08:10:25 +01:00
img {
border: 0;
border-radius: 4px;
}
@media screen and (max-width: 360px) {
display: none;
}
}
}
@media screen and (max-width: $no-gap-breakpoint) {
border-radius: 0;
}
@media screen and (max-width: $no-columns-breakpoint) {
flex-wrap: wrap;
}
}
&__tabs {
flex: 1 1 auto;
margin-left: 20px;
&__name {
2019-09-17 00:31:30 +01:00
@include vertical-padding(20px 8px);
2019-07-02 08:10:25 +01:00
h1 {
color: $primary-text-color;
text-shadow: 1px 1px 1px $base-shadow-color;
2019-09-17 00:31:30 +01:00
@include text-overflow(nowrap);
@include text-sizing(20px, 500, 27px);
2019-07-02 08:10:25 +01:00
small {
display: block;
color: $primary-text-color;
2019-09-17 00:31:30 +01:00
@include text-overflow;
@include text-sizing(14px, 400);
2019-07-02 08:10:25 +01:00
}
}
}
2019-09-17 00:31:30 +01:00
@include breakpoint(sm) {
2019-07-02 08:10:25 +01:00
margin-left: 15px;
2019-09-17 00:31:30 +01:00
@include flex(space-between, center);
2019-07-02 08:10:25 +01:00
&__name {
2019-09-17 00:31:30 +01:00
@include vertical-padding(0);
2019-07-02 08:10:25 +01:00
h1 {
font-size: 16px;
line-height: 24px;
text-shadow: none;
small {
color: $darker-text-color;
}
}
}
}
&__tabs {
height: 58px;
2019-09-17 00:31:30 +01:00
@include flex(flex-start, stretch);
2019-07-02 08:10:25 +01:00
.details-counters {
display: flex;
flex-direction: row;
min-width: 300px;
}
@media screen and (max-width: $no-columns-breakpoint) {
.details-counters {
display: none;
}
}
.counter {
width: 33.3%;
box-sizing: border-box;
flex: 0 0 auto;
color: $darker-text-color;
padding: 10px;
border-right: 1px solid lighten($ui-base-color, 4%);
cursor: default;
text-align: center;
position: relative;
a {
display: block;
}
&:last-child {
border-right: 0;
}
&::after {
bottom: 0;
left: 0;
width: 100%;
border-bottom: 4px solid $ui-primary-color;
opacity: 0.5;
transition: all 400ms ease;
2019-09-17 00:31:30 +01:00
@include pseudo;
2019-07-02 08:10:25 +01:00
}
&.active {
&::after {
border-bottom: 4px solid $highlight-text-color;
opacity: 1;
}
&.inactive::after {
border-bottom-color: $secondary-text-color;
}
}
&:hover {
&::after {
opacity: 1;
transition-duration: 100ms;
}
}
a {
text-decoration: none;
color: inherit;
}
.counter-label {
font-size: 12px;
display: block;
}
.counter-number {
margin-bottom: 5px;
color: $primary-text-color;
font-family: $font-display, sans-serif;
2019-09-17 00:31:30 +01:00
@include text-sizing(18px, 500);
2019-07-02 08:10:25 +01:00
}
}
.spacer {
flex: 1 1 auto;
height: 1px;
}
&__buttons {
padding: 7px 8px;
}
}
}
&__extra {
display: none;
margin-top: 4px;
.public-account-bio {
border-radius: 0;
box-shadow: none;
background: transparent;
margin: 0 -5px;
.account__header__fields {
border-top: 1px solid lighten($ui-base-color, 12%);
}
.roles {
display: none;
}
}
&__links {
margin-top: -15px;
font-size: 14px;
color: $darker-text-color;
a {
display: inline-block;
color: $darker-text-color;
text-decoration: none;
2019-09-17 00:31:30 +01:00
@include text-sizing(15px, 500);
2019-07-02 08:10:25 +01:00
strong {
font-weight: 700;
color: $primary-text-color;
}
}
}
@media screen and (max-width: $no-columns-breakpoint) {
display: block;
flex: 100%;
}
}
}
2019-09-17 00:31:30 +01:00
.account-section-headline {
2019-07-02 08:10:25 +01:00
border-radius: 4px 4px 0 0;
@media screen and (max-width: $no-gap-breakpoint) {
border-radius: 0;
}
}
.detailed-status__meta {
margin-top: 25px;
}
.public-account-bio {
background: lighten($ui-base-color, 8%);
box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
border-radius: 4px;
overflow: hidden;
margin-bottom: 10px;
@media screen and (max-width: $no-gap-breakpoint) {
box-shadow: none;
margin-bottom: 0;
border-radius: 0;
}
.account__header__fields {
margin: 0;
border-top: 0;
a {
color: lighten($ui-highlight-color, 8%);
}
dl:first-child .verified {
border-radius: 0 4px 0 0;
}
.verified a {
color: $valid-value-color;
}
}
.account__header__content {
padding: 20px;
padding-bottom: 0;
color: $primary-text-color;
}
&__extra,
.roles {
padding: 20px;
font-size: 14px;
color: $darker-text-color;
}
.roles {
padding-bottom: 0;
}
}
.static-icon-button {
color: $action-button-color;
font-size: 18px;
2019-09-17 00:31:30 +01:00
&>span {
@include text-sizing(14px, 500);
2019-07-02 08:10:25 +01:00
}
}
.card-grid {
display: flex;
flex-wrap: wrap;
min-width: 100%;
margin: 0 -5px;
2019-09-17 00:31:30 +01:00
&>div {
2019-07-02 08:10:25 +01:00
box-sizing: border-box;
flex: 1 0 auto;
width: 300px;
padding: 0 5px;
margin-bottom: 10px;
max-width: 33.333%;
@media screen and (max-width: 900px) {
max-width: 50%;
}
2019-09-17 00:31:30 +01:00
@include breakpoint(sm) {
2019-07-02 08:10:25 +01:00
max-width: 100%;
}
}
@media screen and (max-width: $no-gap-breakpoint) {
margin: 0;
border-top: 1px solid lighten($ui-base-color, 8%);
2019-09-17 00:31:30 +01:00
&>div {
2019-07-02 08:10:25 +01:00
width: 100%;
padding: 0;
margin-bottom: 0;
border-bottom: 1px solid lighten($ui-base-color, 8%);
&:last-child {
border-bottom: 0;
}
.card__bar {
background: $ui-base-color;
&:hover,
&:active,
&:focus {
background: lighten($ui-base-color, 4%);
}
}
}
}
}
2019-09-17 00:31:30 +01:00
}