www.byjp.me/assets/scss/_single.scss
JP Hastings-Spital 740332509d Article on importing Twitter & Spotify links
Also some improvements to the twitter import.
2024-01-19 17:42:39 +00:00

546 lines
8.2 KiB
SCSS

.post {
width: 100%;
max-width: 800px;
text-align: left;
padding: 20px;
margin: 20px auto;
@media #{$media-size-tablet} {
max-width: 600px;
}
&-date {
&:after {
content: '';
}
}
&-title {
font-size: 2.625rem;
margin: 0 0 20px;
@media #{$media-size-phone} {
font-size: 2rem;
}
a {
text-decoration: none;
}
h1, h2 {
margin: 0;
}
h2 {
color: $light-color-secondary;
font-style: italic;
font-size: 1rem;
font-weight: 600;
}
.subtitle {
font-size: 1.5rem;
}
}
&-tags {
display: block;
margin-bottom: 20px;
font-size: 1rem;
opacity: 0.5;
a {
text-decoration: none;
}
}
&-content {
margin-top: 30px;
}
&-content svg, &-info svg {
display: inline-block;
height: 1em;
vertical-align: -0.125em;
width: 1em;
height: 1em;
}
&-cover {
border-radius: 8px;
margin: 40px -50px;
width: $max-width;
max-width: $max-width;
overflow: hidden;
@media #{$media-size-tablet} {
margin: 20px 0;
width: 100%;
}
}
&-summary {
color: grey;
font-style: italic;
display: none;
}
&-info {
margin: 16px 0;
font-size: 0.8rem;
line-height: normal;
@media (prefers-color-scheme: dark) { color: $dark-color-dim; }
@media (prefers-color-scheme: light) { color: $light-color-dim; }
p {
margin: 0.4em 0;
}
svg {
margin-right: 0.4em;
}
.tag {
margin-right: 0.5em;
a { text-decoration: none; }
}
.feather {
display: inline-block;
vertical-align: -.125em;
width: 1em;
height: 1em;
}
.permalink a {
text-decoration: none;
}
}
&-audio {
display: flex;
justify-content: center;
align-items: center;
padding-top: 20px;
audio {
width: 90%;
}
}
.flag {
border-radius: 50%;
margin: 0 5px;
}
}
.pagination {
margin-top: 20px;
min-width: 50%;
&__title {
display: flex;
text-align: center;
position: relative;
margin: 20px 0;
&-h {
text-align: center;
margin: 0 auto;
padding: 5px 10px;
font-size: 0.8rem;
text-transform: uppercase;
text-decoration: none;
letter-spacing: 0.1em;
z-index: 1;
// Default
background: $light-background;
color: $light-color-secondary;
@media (prefers-color-scheme: dark) {
background: $dark-background;
color: $dark-color-secondary;
}
@media (prefers-color-scheme: light) {
background: $light-background;
color: $light-color-secondary;
}
[data-theme=dark] & {
background: $dark-background;
color: $dark-color-secondary;
}
[data-theme=light] & {
background: $light-background;
color: $light-color-secondary;
}
}
hr {
position: absolute;
left: 0;
right: 0;
width: 100%;
margin-top: 15px;
z-index: 0;
}
}
&__buttons {
display: flex;
align-items: center;
justify-content: center;
a {
text-decoration: none;
font-weight: bold;
}
}
}
.button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 1rem;
font-weight: 600;
border-radius: 8px;
max-width: 40%;
padding: 0;
cursor: pointer;
appearance: none;
// Default
background: $light-background-secondary;
@media (prefers-color-scheme: dark) {
background: $dark-background-secondary;
}
@media (prefers-color-scheme: light) {
background: $light-background-secondary;
}
[data-theme=dark] & {
background: $dark-background-secondary;
}
[data-theme=light] & {
background: $light-background-secondary;
}
+ .button {
margin-left: 10px;
}
a {
display: flex;
padding: 8px 16px;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
&__text {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
&.next .button__icon {
margin-left: 8px;
}
&.previous .button__icon {
margin-right: 8px;
}
}
.book, .film {
max-width: 180px;
// A hack to prevent spoilers from going over the link
position: relative;
z-index: 10;
float: right;
text-align: right;
margin: 0 0 16px 16px;
img {
width: 100%;
height: auto;
}
.authors {
&:has(a)::before {
content: ' by ';
}
a {
&::after {
content: ', ';
}
&:nth-last-child(2)::after {
content: ', and ';
}
&:last-child::after {
content: '';
}
}
}
}
details.spoiler {
position: relative;
p:first-of-type {
margin-top: 0;
}
p:last-of-type {
margin-bottom: 0;
}
&[closed] {
display: inline;
}
& > summary {
span.open { display: none; }
span.closed { display: inline; }
color: $dark-color-secondary;
cursor: pointer;
font-size: small;
}
&[open] > summary {
display: inline;
list-style: none;
&::marker, &::-webkit-details-marker {
display: none;
}
span.open {
transform: rotate(-90deg);
transform-origin: bottom left;
display: block;
position: relative;
top: calc(100% - 1.5em);
}
span.closed { display: none; }
border-left: 1px solid var(--accent);
position: absolute;
height: 100%;
left: -8px;
text-align: right;
}
}
.import-note {
font-style: italic;
border: 0;
opacity: 0.6;
margin: 0;
padding: 0;
font-size: small;
position: relative;
&::before {
content: '';
border-left: 1px solid var(--accent);
position: absolute;
height: 100%;
left: -8px;
}
@media #{$media-size-phone} {
margin: 10px;
padding: 10px;
}
p:first-of-type {
margin-top: 0;
margin-bottom: 4px
}
p:nth-of-type(2) {
margin-top: 4px;
}
p:last-of-type {
margin-bottom: 0;
}
}
.spoiler-explainer {
border: 0;
font-style: italic;
margin: 0;
opacity: 0.6;
font-size: small;
padding: 0px;
position: relative;
svg {
height: 1em;
vertical-align:text-top;
}
&::before {
content: '';
border-left: 1px solid var(--accent);
position: absolute;
height: 100%;
left: -8px;
}
}
.hike-info {
.waypoint {
border-left: 1px solid var(--accent);
padding-left: 12px;
margin-left: 5px;
.description {
font-style: italic;
}
}
}
figure {
clear: both;
}
.side-by-side {
display: flex;
width: 100%;
justify-content: space-between;
& > * {
flex-grow: 1;
&.double {
flex-grow: 2;
}
}
@media #{$media-size-phone} {
flex-direction: column;
}
header {
margin-bottom: 0.5em;
text-decoration: underline;
}
}
.tags {
list-style-type: none;
margin: 0 0 0 2em;
}
.feedlinks {
margin: 0;
list-style: none;
font-size: 1rem;
li {
display: inline-block;
margin-right: 1rem;
vertical-align: middle;
svg {
color: lch(60% 60 var(--accentHue));
margin-right: 0.3rem;
vertical-align: -0.125em;
width: 1em;
height: 1em;
}
a:hover svg {
color: var(--accent);
}
}
}
.interactions {
details {
summary {
margin: 0;
cursor: pointer;
list-style: none;
&::marker, &::-webkit-details-marker {
display: none;
}
margin-bottom: 8px;
}
summary::after {
color: var(--accent);
opacity: 0.8;
content: ' (show)';
}
&[open] summary {
&::after {
content: ' (hide)';
}
}
> * {
margin: 0 0 0 1.8em;
}
}
ul.reactions {
list-style: none;
li {
display: inline-block;
&:not(:first-of-type) {
margin: auto auto auto 0.75em;
}
svg {
margin: 0 0.25em 0 0;
}
}
}
ol.comments {
list-style: none;
li {
margin: 1em 0;
}
.muted {
opacity: 0.6;
}
}
}
.bookmark-of {
font-style: italic;
font-synthesis: none;
}
.post-content {
footer {
text-align: right;
}
svg {
color: var(--accent);
vertical-align:middle;
}
}