mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-31 03:09:06 -04:00
367 lines
6.5 KiB
SCSS
367 lines
6.5 KiB
SCSS
.post-content {
|
|
img {
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
// The rich text editor on the post form (PostEditor island).
|
|
.post-editor {
|
|
.post-editor-tabs {
|
|
display: flex;
|
|
gap: 2px;
|
|
}
|
|
|
|
.post-editor-tab {
|
|
background: transparent;
|
|
border: 1px solid transparent;
|
|
border-radius: 2px 2px 0 0;
|
|
padding: 6px 16px;
|
|
color: rgba(65, 63, 59, .75);
|
|
|
|
&.active {
|
|
background: #fff;
|
|
border-color: rgba(65, 63, 59, .35);
|
|
border-bottom-color: #fff;
|
|
margin-bottom: -1px;
|
|
color: #212121;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
|
|
.post-editor-panel {
|
|
border: 1px solid rgba(65, 63, 59, .35);
|
|
border-radius: 0 2px 2px 2px;
|
|
background: #fff;
|
|
}
|
|
|
|
.post-editor-toolbar {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 6px 8px;
|
|
background: #f4f2ef;
|
|
border-bottom: 1px solid rgba(65, 63, 59, .15);
|
|
}
|
|
|
|
.post-editor-block {
|
|
width: auto;
|
|
}
|
|
|
|
.post-editor-content {
|
|
min-height: 320px;
|
|
padding: 16px 20px;
|
|
outline: none;
|
|
|
|
&:focus-visible {
|
|
box-shadow: inset 0 0 0 2px #2f4365;
|
|
}
|
|
|
|
> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.post-editor-raw {
|
|
border: 0;
|
|
font-family: monospace;
|
|
}
|
|
}
|
|
|
|
// The photo that leads a post's page.
|
|
.post-card-photo {
|
|
img {
|
|
display: block;
|
|
width: 100%;
|
|
max-height: 260px;
|
|
object-fit: cover;
|
|
}
|
|
}
|
|
|
|
// "More from this author" in the post sidebar.
|
|
.more-from-author {
|
|
.post-compact {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.post-compact-photo {
|
|
width: 56px;
|
|
height: 56px;
|
|
flex: none;
|
|
object-fit: cover;
|
|
border-radius: 2px;
|
|
}
|
|
}
|
|
|
|
// The choices in the card photo dialog.
|
|
.card-photo-choices {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
gap: 16px;
|
|
padding: 16px;
|
|
background: #f4f2ef;
|
|
border: 1px solid rgba(65, 63, 59, .15);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.card-photo-choice {
|
|
position: relative;
|
|
cursor: pointer;
|
|
|
|
input {
|
|
position: absolute;
|
|
opacity: 0;
|
|
inset: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.card-photo-polaroid {
|
|
display: block;
|
|
padding: 6px 6px 0;
|
|
background: #fff;
|
|
font-size: 12px;
|
|
box-shadow: 0 1px 3px rgba(65, 63, 59, .25);
|
|
outline: 3px solid transparent;
|
|
outline-offset: 2px;
|
|
|
|
img {
|
|
display: block;
|
|
width: 100%;
|
|
height: 90px;
|
|
object-fit: cover;
|
|
}
|
|
|
|
span {
|
|
display: block;
|
|
padding: 6px 2px 8px;
|
|
}
|
|
}
|
|
|
|
input:checked + .card-photo-polaroid {
|
|
outline-color: #212121;
|
|
}
|
|
|
|
.card-photo-star {
|
|
color: #57803c;
|
|
}
|
|
|
|
.card-photo-tick {
|
|
display: none;
|
|
position: absolute;
|
|
top: 14px;
|
|
left: 14px;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
background: #212121;
|
|
color: #fff;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
letter-spacing: .04em;
|
|
}
|
|
|
|
input:checked ~ .card-photo-tick {
|
|
display: inline-flex;
|
|
}
|
|
|
|
input:focus-visible + .card-photo-polaroid {
|
|
outline-color: #2f4365;
|
|
}
|
|
}
|
|
|
|
.card-photo-preview {
|
|
display: flex;
|
|
gap: 16px;
|
|
align-items: flex-start;
|
|
|
|
img {
|
|
width: 200px;
|
|
height: 130px;
|
|
flex: none;
|
|
object-fit: cover;
|
|
border-radius: 2px;
|
|
}
|
|
}
|
|
|
|
.post-card-photo-change {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
padding: 8px 16px 0;
|
|
}
|
|
|
|
.post-editor {
|
|
.post-editor-preview {
|
|
min-height: 320px;
|
|
padding: 16px 20px;
|
|
}
|
|
}
|
|
|
|
// Saving and publishing, always in reach at the foot of the editor page.
|
|
.post-save-bar {
|
|
position: sticky;
|
|
bottom: 0;
|
|
z-index: 10;
|
|
margin-top: 24px;
|
|
padding: 12px 16px;
|
|
background: #fff;
|
|
border-top: 1px solid rgba(65, 63, 59, .35);
|
|
box-shadow: 0 -2px 6px rgba(0, 0, 0, .08);
|
|
}
|
|
|
|
// The editor page: the form, its sidebar and the save bar share one width.
|
|
.post-edit-page {
|
|
max-width: 1140px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
// Links to crops, members and plantings in the editor, and the list for choosing them.
|
|
.post-editor-content .link-chip {
|
|
padding: 0 8px;
|
|
border: 1px solid rgba(65, 63, 59, .15);
|
|
border-radius: 999px;
|
|
background: #e8f5e9;
|
|
color: #413f3b;
|
|
font-weight: 600;
|
|
cursor: default;
|
|
|
|
&.ProseMirror-selectednode {
|
|
outline: 2px solid #2f4365;
|
|
}
|
|
}
|
|
|
|
.link-suggestions {
|
|
z-index: 1080;
|
|
width: 340px;
|
|
max-height: 340px;
|
|
overflow-y: auto;
|
|
background: #fff;
|
|
border: 1px solid rgba(65, 63, 59, .15);
|
|
border-radius: 4px;
|
|
|
|
.link-suggestions-group {
|
|
padding: 6px 14px;
|
|
background: #f4f2ef;
|
|
border-bottom: 1px solid rgba(65, 63, 59, .15);
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
letter-spacing: .06em;
|
|
text-transform: uppercase;
|
|
color: #413f3b;
|
|
}
|
|
|
|
.link-suggestions-item {
|
|
padding: 8px 14px;
|
|
cursor: pointer;
|
|
|
|
&.active,
|
|
&:hover {
|
|
background: #f4f2ef;
|
|
}
|
|
}
|
|
|
|
.link-suggestions-hint {
|
|
padding: 8px 14px;
|
|
border-top: 1px solid rgba(65, 63, 59, .15);
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
|
|
// Photos placed in a post's text, on the post page.
|
|
.post-content .post-figure {
|
|
margin: 22px 0;
|
|
padding: 8px 8px 0;
|
|
background: #fff;
|
|
box-shadow: 0 1px 3px rgba(65, 63, 59, .25);
|
|
max-width: 720px;
|
|
|
|
img {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
.post-figure-caption {
|
|
margin: 0;
|
|
padding: 8px 4px 10px;
|
|
font-size: 13px;
|
|
color: #413f3b;
|
|
}
|
|
|
|
&.post-figure-half {
|
|
max-width: 350px;
|
|
}
|
|
|
|
// Two pair photos in a row sit side by side.
|
|
&.post-figure-pair {
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
width: calc(50% - 10px);
|
|
max-width: 350px;
|
|
margin-right: 16px;
|
|
}
|
|
}
|
|
|
|
// A photo in the editor: the polaroid, with its controls beside it.
|
|
.photo-figure {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 20px;
|
|
align-items: flex-start;
|
|
margin: 20px 0 8px;
|
|
|
|
&.photo-figure-selected .photo-figure-picture {
|
|
outline: 2px solid #2f4365;
|
|
outline-offset: 4px;
|
|
}
|
|
|
|
.photo-figure-picture {
|
|
flex: 1 1 320px;
|
|
max-width: 460px;
|
|
}
|
|
|
|
.photo-figure-half,
|
|
.photo-figure-pair {
|
|
max-width: 230px;
|
|
}
|
|
|
|
.photo-figure-polaroid {
|
|
padding: 8px 8px 0;
|
|
background: #fff;
|
|
box-shadow: 0 1px 3px rgba(65, 63, 59, .25);
|
|
|
|
img {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.photo-figure-missing {
|
|
padding: 40px 0;
|
|
text-align: center;
|
|
background: #f4f2ef;
|
|
}
|
|
|
|
.photo-figure-caption {
|
|
padding: 8px 4px 10px;
|
|
font-size: 13px;
|
|
color: #413f3b;
|
|
}
|
|
|
|
.photo-figure-size {
|
|
display: flex;
|
|
flex: 1;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.photo-figure-controls {
|
|
flex: 1 1 220px;
|
|
padding: 12px 14px;
|
|
background: #f4f2ef;
|
|
border: 1px solid rgba(65, 63, 59, .15);
|
|
border-radius: 2px;
|
|
}
|
|
}
|