bibliogram/src/site/sass/includes/_main.sass

693 lines
14 KiB
Sass
Raw Normal View History

2020-05-04 14:02:35 +00:00
@use "forms"
2020-05-16 09:15:34 +00:00
@use "dimensions" as *
2020-05-04 14:02:35 +00:00
2020-05-09 09:34:00 +00:00
$theme: () !default
2020-02-16 05:28:17 +00:00
@font-face
font-family: "Bariol"
2020-02-16 05:38:52 +00:00
font-display: swap
2020-02-16 05:28:17 +00:00
src: url(/static/fonts/bariol.woff2) format("woff2"), url(/static/fonts/bariol.ttf) format("truetype")
2020-02-16 05:38:52 +00:00
body, input, button, textarea
font-family: "Bariol", sans-serif
2020-01-12 12:50:21 +00:00
body
margin: 0
padding: 0
font-size: 18px
.main-divider
2020-01-27 12:06:44 +00:00
display: flex
flex-direction: column
min-height: 100vh
2020-01-12 12:50:21 +00:00
@media screen and (min-width: $layout-b-min)
display: grid
grid-template-columns: 235px 1fr
.pfp
border-radius: 50%
@mixin link-button
color: hsl(107, 100%, 21.8%)
background: hsl(87, 78.4%, 80%)
padding: 12px
border-radius: 10px
border: 1px solid hsl(106.9, 49.8%, 46.9%)
line-height: 1
text-decoration: none
2020-01-28 10:37:19 +00:00
&.disabled
cursor: default
&:hover:not(.disabled), &:active, &.clicked
2020-01-12 12:50:21 +00:00
color: hsl(106.4, 100%, 12.9%)
background: hsl(102.1, 77.2%, 67.3%)
border-color: hsl(104, 51.4%, 43.5%)
2020-05-05 15:35:18 +00:00
.top-nav
2020-05-10 13:53:00 +00:00
background-color: map-get($theme, "background-power-primary")
2020-05-05 15:35:18 +00:00
position: relative
z-index: 1
2020-05-09 09:34:00 +00:00
box-shadow: map-get($theme, "shadow-down")
border-bottom: map-get($theme, "edge-context-divider")
2020-05-05 15:35:18 +00:00
padding: 6px 12px
justify-content: space-between
align-items: center
display: none
@media screen and (max-width: $layout-a-max)
display: flex
&.always-displayed
display: flex
.logo
width: 48px
height: 48px
.settings
width: 36px
height: 36px
.nav-icon-link
display: flex
2020-01-12 12:50:21 +00:00
.profile-overview
text-align: center
position: relative
line-height: 1
2020-05-09 12:26:50 +00:00
color: map-get($theme, "foreground-primary")
background-color: map-get($theme, "background-timeline-profile")
2020-01-12 12:50:21 +00:00
@media screen and (max-width: $layout-a-max)
2020-05-09 09:34:00 +00:00
border-bottom: map-get($theme, "edge-context-divider")
box-shadow: map-get($theme, "shadow-down")
2020-01-12 12:50:21 +00:00
padding-bottom: 25px
@media screen and (min-width: $layout-b-min)
2020-05-09 09:34:00 +00:00
border-right: map-get($theme, "edge-context-divider")
box-shadow: map-get($theme, "shadow-right")
2020-01-12 12:50:21 +00:00
.profile-sticky
position: sticky
top: 0
2020-01-18 15:38:14 +00:00
height: 100vh
box-sizing: border-box
overflow-y: auto
2020-01-12 12:50:21 +00:00
padding: 10px
white-space: pre-line
overflow-wrap: break-word
2020-01-12 12:50:21 +00:00
2020-01-18 15:38:14 +00:00
@media screen and (max-width: $layout-a-max)
height: unset
2020-01-12 12:50:21 +00:00
2020-05-05 15:35:18 +00:00
a, a:visited
2020-05-09 09:34:00 +00:00
color: map-get($theme, "link-primary")
2020-05-05 15:35:18 +00:00
2020-01-18 15:38:14 +00:00
.pfp
margin: 25px 0
2020-01-12 12:50:21 +00:00
2020-01-18 15:38:14 +00:00
.full-name
margin: 0 0 8px
font-size: 30px
2020-05-09 12:26:50 +00:00
color: map-get($theme, "foreground-header")
2020-01-12 12:50:21 +00:00
2020-01-18 15:38:14 +00:00
.username
margin: 0
font-size: 20px
font-weight: normal
2020-05-09 12:26:50 +00:00
color: map-get($theme, "foreground-header")
2020-01-12 12:50:21 +00:00
.bio
margin: 20px 0px
unicode-bidi: plaintext
2020-01-18 15:38:14 +00:00
.profile-counter
line-height: 1.3
2020-01-12 12:50:21 +00:00
&.not-available
font-style: italic
2020-01-18 15:38:14 +00:00
.count
font-weight: bold
2020-02-03 14:51:11 +00:00
.website
margin: 20px 0px
2020-01-18 15:38:14 +00:00
.links
margin: 15px 0px
2020-01-18 15:38:14 +00:00
display: flex
flex-wrap: wrap
justify-content: center
2020-02-18 00:39:20 +00:00
.validate-feed
margin-left: 2px
> *
2020-05-05 15:35:18 +00:00
margin: 5px 8px
.bibliogram-meta
margin: 20px 10px
2020-05-09 09:34:00 +00:00
border-top: map-get($theme, "edge-context-divider")
2020-05-05 15:35:18 +00:00
@media screen and (max-width: $layout-a-max)
display: none
2020-01-12 12:50:21 +00:00
.timeline
--image-size: 260px
$image-size: var(--image-size)
@media screen and (max-width: $layout-a-max)
2020-01-29 10:08:52 +00:00
--image-size: 150px
2020-01-27 12:06:44 +00:00
flex: 1
2020-01-12 12:50:21 +00:00
2020-01-29 10:08:52 +00:00
@media screen and (max-width: $layout-c-max)
--image-size: calc(33vw - 10px)
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-primary")
padding: 15px 15px 40px
2020-01-12 12:50:21 +00:00
2020-01-27 12:06:44 +00:00
&.no-posts
display: flex
flex-direction: column
justify-content: center
2020-01-12 12:50:21 +00:00
.page-number
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-timeline-page")
2020-01-12 12:50:21 +00:00
line-height: 1
max-width: 600px
margin: 0px auto
padding: 20px 0px // separate margin and padding for better page hash jump locations
text-align: center
position: relative
&::before
position: absolute
display: block
content: ""
left: 0
right: 0
top: 50%
border-top: 1px solid
2020-01-27 12:06:44 +00:00
.number
position: relative
z-index: 1
padding: 10px
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-primary")
2020-01-27 12:06:44 +00:00
2020-01-12 12:50:21 +00:00
.next-page-container
margin: 20px 0px
display: flex
justify-content: center
.next-page
@include link-button
font-size: 18px
2020-01-12 15:39:50 +00:00
text-align: center
2020-01-12 12:50:21 +00:00
.timeline-inner
display: flex
justify-content: center
flex-wrap: wrap
margin: 0 auto
2020-01-29 10:08:52 +00:00
@media screen and (max-width: $layout-c-max)
display: grid
grid-template-columns: repeat(3, 1fr)
justify-content: center
justify-items: center
2020-01-18 15:38:14 +00:00
@mixin sized()
width: $image-size
height: $image-size
.sized-link
2020-01-12 12:50:21 +00:00
$margin: 5px
margin: $margin
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-thumbnail-alt")
border: 0px map-get($theme, "edge-thumbnail-hover")
background-color: map-get($theme, "background-timeline-loading")
2020-01-18 15:38:14 +00:00
text-decoration: none
2020-02-02 11:43:56 +00:00
overflow: hidden
2020-01-18 15:38:14 +00:00
@include sized
2020-01-12 12:50:21 +00:00
&:hover
$border-width: 3px
margin: $margin - $border-width
2020-05-09 09:34:00 +00:00
border-width: $border-width
2020-01-18 15:38:14 +00:00
2020-01-29 10:08:52 +00:00
@media screen and (max-width: $layout-c-max)
$margin: 2px
margin: $margin
&:hover
$border-width: 2px
margin: $margin - $border-width
2020-05-09 09:34:00 +00:00
border-width: $border-width
2020-01-29 10:08:52 +00:00
2020-01-18 15:38:14 +00:00
.sized-image
@include sized
.post-page
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-post-distraction")
2020-01-18 15:38:14 +00:00
2020-02-21 12:35:19 +00:00
.post-page-divider
display: grid
grid-template-columns: 360px auto
max-width: 1200px
margin: 0 auto
min-height: 100vh
2020-01-18 15:38:14 +00:00
2020-02-21 12:35:19 +00:00
@media screen and (max-width: $layout-a-max)
display: flex
flex-direction: column
2020-02-21 12:35:19 +00:00
.description-section
display: grid
2020-03-01 03:43:43 +00:00
align-items: stretch
align-content: stretch
grid-template-rows: auto 1fr
2020-02-21 12:35:19 +00:00
position: sticky
top: 0
height: 100vh
box-sizing: border-box
2020-01-18 15:38:14 +00:00
2020-02-21 12:35:19 +00:00
@media screen and (max-width: $layout-a-max)
2020-03-01 03:43:43 +00:00
display: contents // this is absolutely disgusting
2020-02-21 12:35:19 +00:00
position: inherit
top: inherit
height: inherit
2020-01-18 15:38:14 +00:00
2020-02-21 12:35:19 +00:00
.user-header
display: grid
2020-02-21 12:35:19 +00:00
align-items: center
grid-template-columns: auto 1fr auto
2020-02-21 12:35:19 +00:00
justify-content: center
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-post-header")
2020-02-21 12:35:19 +00:00
padding: 10px
2020-03-01 03:43:43 +00:00
position: sticky
top: 0
2020-05-09 09:34:00 +00:00
border-bottom: map-get($theme, "edge-context-divider")
2020-05-05 15:35:18 +00:00
@media screen and (max-width: $layout-a-max)
2020-05-09 09:34:00 +00:00
box-shadow: map-get($theme, "shadow-down")
2020-01-18 15:38:14 +00:00
.navigate-posts
-webkit-appearance: none
-moz-appearance: none
border: none
margin: 0
padding: 0
cursor: pointer
background: none
2020-01-18 15:38:14 +00:00
.icon
display: block
2020-01-18 15:38:14 +00:00
&.previous
transform: rotate(180deg)
.user-header-inner
2020-03-01 02:35:45 +00:00
grid-row: 1
grid-column: 2
display: flex
align-items: center
justify-content: center
2020-03-01 02:35:45 +00:00
margin: 0px 10px
2020-01-18 15:38:14 +00:00
.pfp
$size: 40px
width: $size
height: $size
margin-right: 10px
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-post-pfp-loading")
.name
font-size: 20px
2020-05-09 12:26:50 +00:00
color: map-get($theme, "foreground-post-header")
text-decoration: none
&:hover
text-decoration: underline
2020-03-01 03:43:43 +00:00
.relative-box
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-post-caption")
2020-05-09 12:26:50 +00:00
color: map-get($theme, "foreground-primary")
2020-03-01 03:43:43 +00:00
@media screen and (min-width: $layout-b-min)
.relative-box
position: relative
2020-05-09 09:34:00 +00:00
box-shadow: map-get($theme, "shadow-down-inset")
2020-03-01 03:43:43 +00:00
.scrolling-box
position: absolute
top: 0
bottom: 0
overflow-y: auto
display: grid
align-items: center
2020-02-21 12:35:19 +00:00
.description
margin: 12px
white-space: pre-line
overflow-wrap: anywhere
font-size: 20px
line-height: 1.4
unicode-bidi: plaintext
2020-03-01 03:43:43 +00:00
@media screen and (min-width: $layout-b-min)
padding-bottom: 20px
2020-03-01 02:35:45 +00:00
@media screen and (max-width: $layout-a-max)
2020-02-21 12:35:19 +00:00
font-size: 18px
.images-gallery
display: flex
flex-direction: column
align-items: center
justify-content: center
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-post-gallery")
2020-02-21 12:35:19 +00:00
padding: 10px
2020-02-21 12:35:19 +00:00
@media screen and (max-width: $layout-a-max)
flex: 1
2020-03-01 03:43:43 +00:00
position: relative
2020-01-18 15:38:14 +00:00
2020-02-21 12:35:19 +00:00
.sized-image, .sized-video
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-gallery-alt")
background-color: map-get($theme, "background-post-loading")
2020-02-21 12:35:19 +00:00
max-height: 94vh
max-width: 100%
2020-01-27 06:03:28 +00:00
2020-02-21 12:35:19 +00:00
&:not(:last-child)
margin-bottom: 10px
2020-01-29 15:20:20 +00:00
2020-02-21 12:35:19 +00:00
.sized-image
width: auto
height: auto
.sized-video
2020-04-16 13:14:36 +00:00
width: auto
height: auto
2020-01-29 15:20:20 +00:00
2020-01-27 06:03:28 +00:00
.error-page
2020-01-28 12:17:32 +00:00
box-sizing: border-box
2020-01-27 06:03:28 +00:00
min-height: 100vh
2020-05-09 09:34:00 +00:00
background: map-get($theme, "background-error-page")
2020-01-27 06:03:28 +00:00
padding: 10px
text-align: center
display: flex
flex-direction: column
justify-content: center
align-items: center
2020-01-30 03:05:43 +00:00
a, a:visited
2020-05-09 09:34:00 +00:00
color: map-get($theme, "link-error-page")
2020-01-30 03:05:43 +00:00
2020-01-28 12:17:32 +00:00
.code, .message, .explanation, .back-link
2020-01-27 06:03:28 +00:00
line-height: 1.2
margin: 0px
.code
font-size: 80px
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-error-code")
2020-01-27 06:03:28 +00:00
margin-bottom: 25px
.message
font-size: 35px
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-error-message")
2020-01-28 12:17:32 +00:00
.explanation
2020-01-30 03:05:43 +00:00
line-height: 1.3
2020-01-28 12:17:32 +00:00
margin-top: 10px
font-size: 20px
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-error-explanation")
2020-01-30 03:05:43 +00:00
white-space: pre-line
2020-01-27 06:03:28 +00:00
.back
2020-01-28 12:17:32 +00:00
margin-top: 15vh
2020-01-27 06:03:28 +00:00
font-size: 25px
2020-01-28 10:37:19 +00:00
.homepage
display: flex
flex-direction: column
min-height: 100vh
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-power-primary")
color: map-get($theme, "foreground-power-primary")
2020-01-28 10:37:19 +00:00
h1
font-size: 48px
margin: 0px
h2
font-size: 32px
margin: 0px
a, a:visited
2020-05-09 09:34:00 +00:00
color: map-get($theme, "link-power")
2020-01-28 10:37:19 +00:00
.banner
2020-05-09 11:37:19 +00:00
padding: 0px 4vw
height: 60vmin
2020-01-28 10:37:19 +00:00
display: flex
justify-content: center
align-items: center
.banner-image
max-width: 100%
@media screen and (max-width: $layout-home-a-max)
2020-05-09 11:37:19 +00:00
height: 35vmin
2020-01-28 10:37:19 +00:00
.go-sections-container
padding: 0px 10px 50px
.go-sections
max-width: 900px
margin: 0px auto
display: grid
grid-gap: 10px
grid-template-columns: repeat(2, 1fr)
justify-items: center
@media screen and (max-width: $layout-home-a-max)
grid-template-columns: 1fr
.title
text-align: center
margin-bottom: 20px
.pair-entry
display: flex
.text, .button
-webkit-appearance: none
2020-01-28 10:37:19 +00:00
-moz-appearance: none
display: flex
2020-04-15 22:36:08 +00:00
padding: 8px
2020-01-28 10:37:19 +00:00
line-height: 1
box-sizing: content-box
font-size: 20px
height: 20px
2020-05-09 09:34:00 +00:00
border: map-get($theme, "edge-go-control")
color: map-get($theme, "foreground-go-control")
2020-01-28 10:37:19 +00:00
.text
border-radius: 6px 0px 0px 6px
border-right: none
max-width: 230px
width: 30vw
2020-05-09 11:14:46 +00:00
background-color: map-get($theme, "background-go-input")
2020-01-28 10:37:19 +00:00
@media screen and (max-width: 520px)
width: 80vw
.button
border-radius: 0px 6px 6px 0px
padding-left: 12px
padding-right: 12px
cursor: pointer
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-power-palest")
2020-01-28 10:37:19 +00:00
&:hover
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-power-pale")
2020-01-28 10:37:19 +00:00
.about-container
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-power-secondary")
color: map-get($theme, "foreground-power-secondary")
2020-01-28 10:37:19 +00:00
padding: 50px 20px
flex: 1
min-height: 60vh
.about
max-width: 700px
margin: 0px auto
line-height: 1.4
font-size: 20px
2020-01-28 11:37:08 +00:00
.example-link
white-space: nowrap
2020-01-28 10:37:19 +00:00
.link-list
2020-05-09 09:34:00 +00:00
color: map-get($theme, "link-power")
.structured-text
a, a:visited
2020-05-09 09:34:00 +00:00
color: map-get($theme, "link-primary")
text-decoration: none
a:link, a:link:visited
text-decoration: underline
.link-to-hashtag
2020-05-09 09:34:00 +00:00
color: map-get($theme, "link-hashtag")
2020-02-05 10:11:00 +00:00
.privacy-policy
max-width: 700px
min-height: 100vh
margin: 0px auto
padding: 0px 10px 80px
font-size: 20px
line-height: 1.4
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-power-tertiary")
color: map-get($theme, "foreground-power-tertiary")
2020-02-05 10:11:00 +00:00
h1, h2, h3
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-header-privacy")
2020-02-05 10:11:00 +00:00
h1
margin: 40px 0px
font-size: 48px
a, a:visited
2020-05-09 09:34:00 +00:00
color: map-get($theme, "link-power")
2020-02-05 10:11:00 +00:00
2020-02-05 12:14:26 +00:00
code
font-size: 0.8em
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-power-quote")
2020-02-05 12:14:26 +00:00
padding: 3px 5px
border-radius: 5px
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-power-secondary")
2020-02-05 12:14:26 +00:00
2020-02-05 10:11:00 +00:00
.return-home
line-height: 1
margin-top: 45px
padding-top: 15px
2020-05-09 09:34:00 +00:00
border-top: map-get($theme, "edge-power-divider")
2020-02-21 12:35:19 +00:00
.post-overlay
position: fixed
top: 0
left: 0
right: 0
bottom: 0
2020-05-09 09:34:00 +00:00
background: map-get($theme, "background-post-overlay")
2020-02-21 12:35:19 +00:00
z-index: 10
2020-03-01 03:43:43 +00:00
overflow-y: scroll
2020-02-21 12:35:19 +00:00
&:not(.loading) > *
min-height: 100vh
&.loading
display: flex
justify-content: center
align-items: center
.loading-inner
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-alert")
2020-02-21 12:35:19 +00:00
font-size: 30px
line-height: 1
padding: 26px
border-radius: 20px
2020-05-09 09:34:00 +00:00
border: map-get($theme, "edge-alert")
2020-02-21 12:35:19 +00:00
font-weight: bold
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-alert")
2020-04-22 11:59:45 +00:00
.article-page
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-primary")
2020-04-22 11:59:45 +00:00
font-size: 22px
line-height: 1.4
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-primary")
2020-04-22 11:59:45 +00:00
min-height: 100vh
2020-05-09 09:34:00 +00:00
h1
2020-04-22 11:59:45 +00:00
text-align: center
margin: 0
font-size: 50px
h2
2020-05-09 09:34:00 +00:00
font-size: 34px
margin: 0
color: map-get($theme, "foreground-header")
header
background-color: map-get($theme, "background-power-secondary")
color: map-get($theme, "foreground-power-primary")
padding: 40px 10px
line-height: 1.2
2020-04-22 11:59:45 +00:00
.article-main
max-width: 800px
margin: 0 auto
padding: 20px 20px 100px
a, a:visited
2020-05-09 09:34:00 +00:00
color: map-get($theme, "link-primary")
code
font-size: 0.8em
letter-spacing: -0.2px
background: map-get($theme, "background-primary-quote")
color: map-get($theme, "foreground-primary-quote")
padding: 0px 4px
border-radius: 2px
2020-05-04 14:02:35 +00:00
.settings-page
2020-05-09 09:34:00 +00:00
background-color: map-get($theme, "background-primary")
color: map-get($theme, "foreground-primary")
h1, legend
color: map-get($theme, "foreground-header")
2020-05-04 14:02:35 +00:00
a, a:visited
2020-05-09 09:34:00 +00:00
color: map-get($theme, "link-primary")
2020-05-04 14:02:35 +00:00
.settings
2020-05-04 15:06:07 +00:00
padding: 0px 10px 50px
2020-05-04 14:02:35 +00:00
max-width: 600px
margin: 0 auto
2020-05-04 15:06:07 +00:00
.status-notice
padding: 15px
font-size: 24px
2020-05-09 15:20:13 +00:00
line-height: 1.36
2020-05-04 15:06:07 +00:00
text-align: center
2020-05-09 09:34:00 +00:00
color: map-get($theme, "foreground-banner")
2020-05-09 15:20:13 +00:00
white-space: pre-line
&.success
background-color: map-get($theme, "background-banner-success")
&.fail
background-color: map-get($theme, "background-banner-fail")
2020-05-04 15:06:07 +00:00
2020-05-04 14:02:35 +00:00
.action-container
margin-top: 20px
display: flex
justify-content: space-between
align-items: center
.save-button
2020-05-09 09:34:00 +00:00
padding: 12px
2020-05-04 14:02:35 +00:00
width: 180px
2020-05-09 09:34:00 +00:00
&:not(:active)
@include forms.curve-out-major
2020-05-04 14:02:35 +00:00
.home-link
font-size: 21px