shiori/view/less/stylesheet.less

739 lines
19 KiB
Text
Raw Normal View History

2018-05-25 14:14:24 +08:00
:root {
--bg: #EEE;
--sidebarBg: #292929;
--contentBg: #FFF;
--selectedBg: #fcd2cf;
--border: #E5E5E5;
--color: #232323;
--colorLink: #999;
--colorSidebar: #FFF;
--main: #F44336;
}
&.night {
--bg: #1F1F1F;
--contentBg: #292929;
--selectedBg: #300603;
--border: #191919;
--color: #FFF;
.yla-dialog {
color: var(--color);
background-color: var(--bg);
>.yla-dialog__header {
background-color: var(--contentBg);
border-bottom: 1px solid var(--border);
}
>.yla-dialog__body {
>input,
>textarea {
color: var(--color);
border-color: var(--border);
background-color: var(--contentBg);
}
}
>.yla-dialog__footer {
border-color: var(--border);
}
}
}
2018-02-11 22:00:56 +08:00
* {
border-width: 0;
box-sizing: border-box;
font-family: "Source Sans Pro", sans-serif;
margin: 0;
padding: 0;
text-decoration: none;
2018-02-25 22:39:46 +08:00
hyphens: auto;
2018-02-11 22:00:56 +08:00
}
2018-05-18 15:07:15 +08:00
a {
cursor: pointer;
}
2018-02-12 22:06:53 +08:00
.spacer {
flex: 1 0;
}
2018-03-10 11:39:38 +08:00
.noscroll {
overflow: hidden;
}
2018-05-24 00:12:16 +08:00
body {
overflow-x: hidden;
}
2018-05-22 21:13:28 +08:00
.page {
display: flex;
2018-05-24 00:12:16 +08:00
flex-flow: column nowrap;
2018-05-25 14:14:24 +08:00
background-color: var(--bg);
2018-05-22 21:13:28 +08:00
min-width: 0;
2018-05-24 00:12:16 +08:00
min-height: 100vh;
2018-05-22 21:13:28 +08:00
#sidebar {
2018-05-24 00:12:16 +08:00
position: fixed;
top: 0;
left: 0;
bottom: 0;
2018-05-22 21:13:28 +08:00
display: flex;
flex-flow: column nowrap;
flex-shrink: 0;
2018-05-25 14:14:24 +08:00
background-color: var(--sidebarBg);
2018-05-22 21:13:28 +08:00
min-width: 0;
min-height: 0;
2018-05-24 00:12:16 +08:00
z-index: 10;
overflow: auto;
2018-05-22 21:13:28 +08:00
#logo {
width: 60px;
line-height: 60px;
text-align: center;
font-size: 2em;
2018-05-25 14:14:24 +08:00
color: var(--contentBg);
background-color: var(--main);
2018-05-24 00:12:16 +08:00
flex-shrink: 0;
2018-05-22 21:13:28 +08:00
}
>a {
width: 60px;
line-height: 60px;
text-align: center;
display: block;
2018-05-25 14:14:24 +08:00
color: var(--colorSidebar);
2018-05-24 00:12:16 +08:00
flex-shrink: 0;
2018-06-06 22:48:46 +08:00
>span {
display: block;
height: 0;
line-height: 0;
overflow: hidden;
}
2018-05-22 23:35:16 +08:00
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
background-color: #232323;
2018-05-22 21:13:28 +08:00
}
}
}
#body {
flex: 1 0;
display: flex;
flex-flow: column nowrap;
min-width: 0;
min-height: 0;
2018-05-24 00:12:16 +08:00
margin-left: 60px;
2018-05-22 21:13:28 +08:00
}
2018-05-24 00:12:16 +08:00
@media (max-width: 600px) {
&.night #sidebar {
border-right-width: 0;
2018-05-25 14:14:24 +08:00
border-bottom: 1px solid var(--border);
2018-05-24 00:12:16 +08:00
}
#sidebar {
position: static;
flex-flow: row nowrap;
#logo,
.spacer {
display: none;
}
a {
margin: auto;
}
}
#body {
margin-left: 0;
}
}
2018-05-22 21:13:28 +08:00
}
2018-02-22 17:48:36 +08:00
#login-page {
display: flex;
flex-flow: column nowrap;
align-items: center;
height: 100vh;
2018-05-25 14:14:24 +08:00
background-color: var(--bg);
2018-02-22 17:48:36 +08:00
justify-content: center;
2018-05-24 00:12:16 +08:00
padding: 16px;
2018-02-22 17:48:36 +08:00
>.error-message {
width: 100%;
max-width: 400px;
2018-05-23 21:14:26 +08:00
font-size: 0.9em;
2018-05-25 14:14:24 +08:00
background-color: var(--contentBg);
border: 1px solid var(--border);
2018-02-22 17:48:36 +08:00
padding: 16px;
2018-05-24 00:12:16 +08:00
margin-bottom: 16px;
2018-02-22 17:48:36 +08:00
text-align: center;
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-02-22 17:48:36 +08:00
}
#login-box {
width: 100%;
max-width: 400px;
2018-05-25 14:14:24 +08:00
background-color: var(--contentBg);
2018-02-22 17:48:36 +08:00
display: flex;
flex-flow: column nowrap;
2018-05-25 14:14:24 +08:00
border: 1px solid var(--border);
2018-02-22 17:48:36 +08:00
#logo-area {
display: flex;
align-items: center;
flex-flow: column nowrap;
padding: 16px;
2018-05-25 14:14:24 +08:00
border-bottom: 1px solid var(--border);
2018-05-24 00:12:16 +08:00
flex-shrink: 0;
2018-02-22 17:48:36 +08:00
#logo {
font-size: 3em;
font-weight: 100;
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-02-22 17:48:36 +08:00
span {
margin-right: 8px;
}
}
#tagline {
2018-05-23 21:14:26 +08:00
font-size: 0.9em;
font-weight: 500;
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-02-22 17:48:36 +08:00
}
}
#input-area {
padding: 8px;
2018-05-25 14:14:24 +08:00
border-bottom: 1px solid var(--border);
2018-02-22 17:48:36 +08:00
.input-field {
display: flex;
align-items: baseline;
padding: 8px;
p {
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-02-22 17:48:36 +08:00
font-size: 0.9em;
margin-right: 16px;
min-width: 65px;
}
input {
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-02-22 17:48:36 +08:00
padding: 8px;
2018-05-25 14:14:24 +08:00
background-color: var(--contentBg);
border: 1px solid var(--border);
2018-02-22 17:48:36 +08:00
flex: 1 0;
font-size: 0.9em;
}
a {
display: block;
cursor: pointer;
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-02-22 17:48:36 +08:00
text-align: center;
font-size: 0.9em;
flex: 1 0;
i {
margin-right: 8px;
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-02-22 17:48:36 +08:00
}
2018-05-23 21:14:26 +08:00
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-02-22 17:48:36 +08:00
}
}
}
}
#button-area {
display: flex;
flex-flow: row nowrap;
padding: 16px;
2018-05-23 21:14:26 +08:00
justify-content: center;
2018-02-22 17:48:36 +08:00
a {
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-02-22 17:48:36 +08:00
text-transform: uppercase;
text-align: center;
2018-05-23 21:14:26 +08:00
font-size: 0.9em;
font-weight: 600;
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-02-22 17:48:36 +08:00
}
}
}
}
}
2018-05-18 15:07:15 +08:00
#index-page {
2018-05-22 23:35:16 +08:00
.header {
2018-05-25 14:14:24 +08:00
background-color: var(--contentBg);
border-bottom: 1px solid var(--border);
2018-02-11 22:00:56 +08:00
display: flex;
2018-05-22 21:13:28 +08:00
flex-flow: row nowrap;
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-05-22 21:13:28 +08:00
align-items: center;
2018-05-18 15:07:15 +08:00
min-width: 0;
min-height: 0;
overflow: hidden;
2018-05-22 21:13:28 +08:00
flex-shrink: 0;
2018-05-24 00:12:16 +08:00
position: fixed;
left: 60px;
top: 0;
right: 0;
z-index: 11;
2018-05-22 23:35:16 +08:00
}
#header {
2018-05-22 21:13:28 +08:00
input {
flex: 1 0;
2018-05-18 15:07:15 +08:00
line-height: 60px;
2018-05-22 21:13:28 +08:00
padding: 0 16px;
2018-05-24 00:12:16 +08:00
min-width: 0;
2018-05-22 21:13:28 +08:00
font-size: 1em;
2018-05-25 14:42:19 +08:00
color: var(--color);
2018-05-25 14:14:24 +08:00
background-color: var(--contentBg);
border-right: 1px solid var(--border);
2018-05-18 15:07:15 +08:00
}
2018-05-22 21:13:28 +08:00
a {
2018-05-18 15:07:15 +08:00
width: 60px;
line-height: 60px;
text-align: center;
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-05-24 00:12:16 +08:00
flex-shrink: 0;
2018-05-22 21:13:28 +08:00
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-02-11 22:00:56 +08:00
}
}
2018-05-18 15:07:15 +08:00
}
2018-05-22 23:35:16 +08:00
#batch-edit {
height: 61px;
flex-shrink: 0;
padding: 16px;
font-size: 0.9em;
>*:not(:last-child) {
margin-right: 32px;
}
p {
font-weight: 600;
flex: 1 0;
}
a {
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-05-22 23:35:16 +08:00
&.disabled {
opacity: 0.5;
cursor: default;
}
&:hover:not(.disabled),
&:focus:not(.disabled) {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-05-22 23:35:16 +08:00
}
i {
margin-right: 6px;
}
}
#cancel-edit {
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-05-22 23:35:16 +08:00
padding: 4px;
2018-05-25 14:14:24 +08:00
border: 1px solid var(--border);
2018-05-22 23:35:16 +08:00
border-radius: 4px;
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-05-22 23:35:16 +08:00
}
i {
margin: 0;
}
}
}
2018-05-24 13:58:56 +08:00
#grid {
display: grid;
grid-template-rows: auto;
grid-template-columns: repeat(4, 1fr);
grid-gap: 16px;
padding: 16px 16px 0;
2018-05-24 00:12:16 +08:00
margin-top: 60px;
2018-05-24 13:58:56 +08:00
position: relative;
.bookmark {
display: flex;
flex-flow: column nowrap;
min-width: 0;
2018-05-25 14:14:24 +08:00
border: 1px solid var(--border);
background-color: var(--contentBg);
2018-05-24 13:58:56 +08:00
height: 100%;
position: relative;
&:hover,
&:focus {
.bookmark-menu>a {
2018-05-22 21:13:28 +08:00
display: block;
2018-05-18 15:07:15 +08:00
}
2018-05-24 13:58:56 +08:00
}
&.selected {
2018-05-25 14:14:24 +08:00
background-color: var(--selectedBg);
2018-05-24 13:58:56 +08:00
}
.bookmark-selector {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
2018-05-24 22:53:34 +08:00
z-index: 9;
2018-05-24 13:58:56 +08:00
}
.bookmark-link {
display: block;
cursor: default;
&[href] {
cursor: pointer;
&:hover,
&:focus {
.title {
2018-05-25 14:14:24 +08:00
color: var(--main);
}
}
}
2018-05-24 13:58:56 +08:00
img {
width: 100%;
max-height: 13em;
object-fit: cover;
margin-bottom: 8px;
}
.title {
text-overflow: ellipsis;
word-wrap: break-word;
overflow: hidden;
font-size: 1.2em;
line-height: 1.3em;
max-height: 5.2em;
font-weight: 600;
padding: 0 16px;
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-05-24 13:58:56 +08:00
&:first-child {
margin-top: 16px;
2018-05-18 15:07:15 +08:00
}
2018-05-22 21:13:28 +08:00
}
2018-05-24 13:58:56 +08:00
.excerpt {
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-05-24 13:58:56 +08:00
margin-top: 8px;
padding: 0 16px;
text-overflow: ellipsis;
word-wrap: break-word;
overflow: hidden;
font-size: 0.9em;
line-height: 1.5em;
max-height: 10.5em;
}
2018-05-22 21:13:28 +08:00
}
2018-05-24 13:58:56 +08:00
.bookmark-tags {
2018-05-22 21:13:28 +08:00
display: flex;
2018-05-24 13:58:56 +08:00
flex-flow: row wrap;
margin: 4px 0 -4px;
padding: 0 8px;
2018-05-22 21:13:28 +08:00
a {
2018-05-24 13:58:56 +08:00
margin: 4px;
padding: 4px 8px;
font-size: 0.8em;
font-weight: 600;
2018-05-25 14:14:24 +08:00
border: 1px solid var(--border);
2018-05-24 13:58:56 +08:00
border-radius: 4px;
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-05-22 21:13:28 +08:00
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-05-21 14:28:08 +08:00
}
}
2018-05-22 21:13:28 +08:00
}
2018-05-24 13:58:56 +08:00
.bookmark-menu {
padding: 8px 16px 16px;
display: flex;
flex-flow: row nowrap;
min-width: 0;
min-height: 0;
align-items: center;
a {
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-05-24 13:58:56 +08:00
flex-shrink: 0;
opacity: 0.8;
display: none;
font-size: 0.9em;
&:not(:last-child) {
margin-right: 12px;
2018-05-22 21:13:28 +08:00
}
2018-05-24 13:58:56 +08:00
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-05-24 13:58:56 +08:00
opacity: 1;
2018-05-22 21:13:28 +08:00
}
2018-05-24 13:58:56 +08:00
@media (max-width: 800px) {
display: block;
&:not(:last-child) {
margin-right: 24px;
2018-05-21 17:37:48 +08:00
}
}
2018-05-21 14:28:08 +08:00
}
2018-05-24 13:58:56 +08:00
.url {
flex: 1 0;
opacity: 1;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 21px;
2018-05-22 21:13:28 +08:00
}
2018-05-21 14:28:08 +08:00
}
2018-05-24 13:58:56 +08:00
}
.pagination-box {
grid-column-start: 1;
grid-column-end: -1;
display: flex;
flex-flow: row nowrap;
a {
padding: 8px;
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-05-24 13:58:56 +08:00
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-05-24 13:58:56 +08:00
}
2018-05-24 00:12:16 +08:00
}
2018-05-24 13:58:56 +08:00
input {
width: 40px;
padding: 8px;
text-align: center;
font-size: 0.9em;
2018-05-25 14:14:24 +08:00
color: var(--color);
border: 1px solid var(--border);
background-color: var(--contentBg);
2018-05-24 13:58:56 +08:00
margin: 0 8px;
2018-05-24 00:12:16 +08:00
}
2018-05-24 13:58:56 +08:00
p {
font-size: 0.9em;
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-05-24 13:58:56 +08:00
line-height: 37px;
font-weight: 600;
&:last-of-type::before {
content: "/";
margin-right: 8px;
}
2018-05-24 00:12:16 +08:00
}
2018-05-24 13:58:56 +08:00
}
#grid-padding {
grid-column-start: 1;
grid-column-end: -1;
min-height: 1px;
}
&.list {
grid-gap: 0;
grid-template-columns: 1fr;
max-width: 1280px;
.pagination-box {
margin-top: 16px;
&:first-of-type {
margin-top: 0;
margin-bottom: 16px;
}
2018-05-24 00:12:16 +08:00
}
2018-05-24 13:58:56 +08:00
.bookmark {
border-top-width: 0;
border-bottom-width: 1px;
padding: 16px 24px 16px 100px;
&:nth-child(2) {
border-top-width: 1px;
}
.bookmark-link {
img {
position: absolute;
top: 0;
left: 0;
width: 100px;
height: 100%;
margin-bottom: 0;
}
.title {
margin: 0;
padding-left: 24px;
white-space: nowrap;
}
}
.excerpt,
>.spacer {
display: none;
}
.bookmark-tags {
order: 5;
padding-left: 16px;
padding-right: 0;
margin-right: -4px;
}
.bookmark-menu {
padding: 4px 0 0 24px;
align-items: flex-end;
}
2018-05-24 00:12:16 +08:00
}
2018-05-24 13:58:56 +08:00
#grid-padding {
min-height: 16px
2018-05-24 00:12:16 +08:00
}
2018-02-11 22:00:56 +08:00
}
2018-05-24 13:58:56 +08:00
@media (min-width: 2001px) {
grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 2000px) and (min-width: 1601px) {
grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 1600px) and (min-width: 1301px) {
grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1300px) and (min-width: 1001px) {
grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1000px) and (min-width: 601px) {
grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 600px) {
grid-template-columns: 1fr;
}
2018-02-25 22:39:46 +08:00
}
2018-05-24 00:12:16 +08:00
@media (max-width: 600px) {
.header {
position: static;
}
#batch-edit {
>*:not(:last-child) {
margin-right: 32px;
}
span {
display: none;
}
}
2018-05-24 13:58:56 +08:00
#grid {
2018-05-24 00:12:16 +08:00
margin-top: 0;
}
}
2018-02-11 22:00:56 +08:00
}
2018-02-17 22:49:16 +08:00
#cache-page {
2018-05-22 21:13:28 +08:00
#sidebar {
#toggle-font {
font-weight: 600;
font-size: 1.2em;
&.serif {
font-family: "Source Serif Pro", serif;
}
2018-02-17 22:49:16 +08:00
}
}
2018-05-22 21:13:28 +08:00
#body {
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-05-22 21:13:28 +08:00
overflow-y: auto;
align-items: center;
2018-05-24 00:12:16 +08:00
padding: 16px 16px 0;
2018-05-22 21:13:28 +08:00
&.serif * {
font-family: "Source Serif Pro", serif;
}
#header {
display: grid;
grid-template-rows: auto;
grid-template-columns: 1fr 1fr;
2018-05-22 23:39:36 +08:00
width: 100%;
2018-05-22 21:13:28 +08:00
max-width: 840px;
grid-gap: 12px;
2018-05-24 00:12:16 +08:00
margin-bottom: 16px;
2018-05-25 14:14:24 +08:00
background-color: var(--contentBg);
2018-05-22 21:13:28 +08:00
padding: 20px;
2018-05-25 14:14:24 +08:00
border: 1px solid var(--border);
2018-05-22 21:13:28 +08:00
#title {
grid-column-start: 1;
grid-column-end: -1;
font-size: 40px;
font-weight: 700;
word-break: break-word;
hyphens: none;
2018-02-17 22:49:16 +08:00
}
2018-05-22 21:13:28 +08:00
#time {
font-size: 16px;
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-02-17 22:49:16 +08:00
}
2018-05-22 21:13:28 +08:00
#url {
font-size: 16px;
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-05-22 21:13:28 +08:00
text-align: right;
justify-self: end;
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-05-22 21:13:28 +08:00
}
2018-02-17 22:49:16 +08:00
}
2018-05-24 00:12:16 +08:00
@media (max-width: 800px) {
grid-template-columns: 1fr;
#url {
justify-self: start;
}
}
2018-02-17 22:49:16 +08:00
}
2018-05-22 21:13:28 +08:00
#content {
2018-05-22 23:39:36 +08:00
width: 100%;
2018-05-22 21:13:28 +08:00
max-width: 840px;
grid-gap: 12px;
2018-05-25 14:14:24 +08:00
background-color: var(--contentBg);
2018-05-22 21:13:28 +08:00
padding: 20px;
2018-05-25 14:14:24 +08:00
border: 1px solid var(--border);
2018-05-22 21:13:28 +08:00
* {
font-size: 18px;
line-height: 180%;
&:not(:last-child) {
margin-bottom: 20px;
}
2018-02-17 22:49:16 +08:00
}
2018-05-22 21:13:28 +08:00
a {
2018-05-25 14:14:24 +08:00
color: var(--color);
2018-05-22 21:13:28 +08:00
text-decoration: underline;
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-05-22 21:13:28 +08:00
}
}
pre,
code {
font-family: 'Ubuntu Mono', 'Courier New', Courier, monospace;
2018-02-17 22:49:16 +08:00
}
ol,
ul {
padding-left: 16px;
}
2018-02-17 22:49:16 +08:00
}
2018-05-22 21:13:28 +08:00
#body-padding {
width: 100%;
min-height: 16px;
2018-02-17 22:49:16 +08:00
}
}
2018-05-24 00:12:16 +08:00
}
2018-06-06 22:48:46 +08:00
#submit-page {
background-color: transparent;
.yla-dialog__header {
text-align: center;
}
&:not(.iframe) {
background-color: var(--bg);
.yla-dialog__overlay {
background-color: transparent;
.yla-dialog {
border: 1px solid var(--border);
}
}
}
}
2018-05-24 00:12:16 +08:00
.yla-tooltip {
@media (max-width: 800px) {
display: none;
}
2018-05-24 13:39:36 +08:00
}
#dialog-tags {
.yla-dialog__body {
grid-template-columns: 1fr 1fr;
a {
display: flex;
flex-flow: row nowrap;
align-items: baseline;
span {
&:last-child {
font-size: 0.9em;
2018-05-25 14:14:24 +08:00
color: var(--colorLink);
2018-05-24 13:39:36 +08:00
margin-left: 8px;
&::before {
content: "(";
margin-right: 2px;
}
&::after {
content: ")";
margin-left: 2px;
}
}
}
&:hover,
&:focus {
2018-05-25 14:14:24 +08:00
color: var(--main);
2018-05-24 13:39:36 +08:00
}
}
}
2018-02-11 22:00:56 +08:00
}