shiori/view/less/stylesheet.less

699 lines
20 KiB
Text
Raw Normal View History

2018-02-11 22:00:56 +08:00
@import "variable";
* {
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-22 21:13:28 +08:00
.page {
display: flex;
flex-flow: row nowrap;
width: 100vw;
height: 100vh;
background-color: @bg;
min-width: 0;
min-height: 0;
overflow: hidden;
#sidebar {
display: flex;
flex-flow: column nowrap;
flex-shrink: 0;
background-color: @sidebarBg;
min-width: 0;
min-height: 0;
overflow: hidden;
#logo {
width: 60px;
line-height: 60px;
text-align: center;
font-size: 2em;
color: @contentBg;
background-color: @main;
}
>a {
width: 60px;
line-height: 60px;
text-align: center;
display: block;
color: @colorSidebar;
2018-05-22 23:35:16 +08:00
&:hover,
&:focus {
2018-05-22 21:13:28 +08:00
background-color: @color;
}
&.active {
background-color: @color;
color: @main;
}
}
}
#body {
flex: 1 0;
display: flex;
flex-flow: column nowrap;
min-width: 0;
min-height: 0;
2018-05-22 23:35:16 +08:00
overflow-x: hidden;
overflow-y: auto;
2018-05-22 21:13:28 +08:00
}
&.night {
#sidebar {
border-right: 1px solid @nightBorder;
}
background-color: @nightBg;
.yla-dialog {
color: @nightColor;
background-color: @nightBg;
>.yla-dialog__header {
background-color: @nightContentBg;
border-bottom: 1px solid @nightBorder;
}
>.yla-dialog__body {
>input,
>textarea {
color: @nightColor;
border-color: @nightBorder;
background-color: @nightContentBg;
}
}
>.yla-dialog__footer {
border-color: @nightBorder;
}
}
}
}
2018-02-22 17:48:36 +08:00
#login-page {
display: flex;
flex-flow: column nowrap;
align-items: center;
height: 100vh;
2018-05-18 15:07:15 +08:00
background-color: @bg;
2018-02-22 17:48:36 +08:00
justify-content: center;
>.error-message {
width: 100%;
margin: 16px 16px 0;
max-width: 400px;
2018-05-23 21:14:26 +08:00
font-size: 0.9em;
2018-02-22 17:48:36 +08:00
background-color: @contentBg;
border: 1px solid @border;
padding: 16px;
text-align: center;
2018-05-23 21:14:26 +08:00
color: @main;
2018-02-22 17:48:36 +08:00
}
#login-box {
width: 100%;
margin: 16px;
max-width: 400px;
background-color: @contentBg;
display: flex;
flex-flow: column nowrap;
border: 1px solid @border;
#logo-area {
display: flex;
align-items: center;
flex-flow: column nowrap;
padding: 16px;
border-bottom: 1px solid @border;
#logo {
font-size: 3em;
font-weight: 100;
color: @main;
span {
margin-right: 8px;
}
}
#tagline {
2018-05-23 21:14:26 +08:00
font-size: 0.9em;
font-weight: 500;
2018-02-22 17:48:36 +08:00
color: @main;
}
}
#input-area {
padding: 8px;
border-bottom: 1px solid @border;
.input-field {
display: flex;
align-items: baseline;
padding: 8px;
p {
2018-05-21 21:26:18 +08:00
color: @color;
2018-02-22 17:48:36 +08:00
font-size: 0.9em;
margin-right: 16px;
min-width: 65px;
}
input {
2018-05-18 15:07:15 +08:00
color: @color;
2018-02-22 17:48:36 +08:00
padding: 8px;
2018-05-23 21:14:26 +08:00
background-color: @contentBg;
2018-02-22 17:48:36 +08:00
border: 1px solid @border;
flex: 1 0;
font-size: 0.9em;
}
a {
display: block;
cursor: pointer;
2018-05-21 21:26:18 +08:00
color: @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-21 21:26:18 +08:00
color: @color;
2018-02-22 17:48:36 +08:00
}
2018-05-23 21:14:26 +08:00
&:hover,
&:focus {
2018-02-22 17:48:36 +08:00
color: @main;
}
}
}
}
#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-18 15:07:15 +08:00
color: @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 {
color: @main;
}
}
}
}
&.night {
background-color: @nightBg;
>.error-message {
border-color: @nightBorder;
background-color: @nightContentBg;
}
#login-box {
border-color: @nightBorder;
background-color: @nightContentBg;
#logo-area {
border-color: @nightBorder;
}
#input-area {
border-color: @nightBorder;
.input-field {
p {
color: @nightColor;
2018-02-22 17:48:36 +08:00
}
2018-05-23 21:14:26 +08:00
input {
border-color: @nightBorder;
background-color: @nightContentBg;
color: @nightColor;
}
a {
color: @nightColor;
i {
color: @nightColor;
}
&:hover,
&:focus {
color: @main;
}
}
}
}
#button-area a {
&:hover,
&:focus {
color: @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-22 21:13:28 +08:00
background-color: @contentBg;
border-bottom: 1px solid @border;
2018-02-11 22:00:56 +08:00
display: flex;
2018-05-22 21:13:28 +08:00
flex-flow: row nowrap;
color: @color;
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-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;
font-size: 1em;
background-color: @contentBg;
border-right: 1px solid @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-22 21:13:28 +08:00
color: @colorLink;
&:hover,
&:focus {
2018-05-18 15:07:15 +08:00
color: @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 {
color: @colorLink;
&.disabled {
opacity: 0.5;
cursor: default;
}
&:hover:not(.disabled),
&:focus:not(.disabled) {
color: @main;
}
i {
margin-right: 6px;
}
}
#cancel-edit {
color: @color;
padding: 4px;
border: 1px solid @border;
border-radius: 4px;
&:hover,
&:focus {
color: @main;
}
i {
margin: 0;
}
}
}
2018-05-22 21:13:28 +08:00
#content {
overflow-y: auto;
#grid {
display: grid;
grid-template-rows: auto;
grid-template-columns: repeat(4, 1fr);
grid-gap: 16px;
padding: 16px 16px 0;
.bookmark {
display: flex;
flex-flow: column nowrap;
min-width: 0;
border: 1px solid @border;
2018-05-21 21:26:18 +08:00
background-color: @contentBg;
2018-05-22 21:13:28 +08:00
height: 100%;
2018-05-22 23:35:16 +08:00
position: relative;
2018-05-18 15:07:15 +08:00
&:hover,
&:focus {
2018-05-22 21:13:28 +08:00
.bookmark-menu>a {
2018-05-18 15:07:15 +08:00
display: block;
}
2018-05-22 21:13:28 +08:00
}
2018-05-22 23:35:16 +08:00
&.selected {
background-color: @selectedBg;
}
.bookmark-selector {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 101;
}
.bookmark-link {
2018-05-22 21:13:28 +08:00
display: block;
cursor: default;
&[href] {
cursor: pointer;
&:hover,
&:focus {
.title {
2018-05-19 14:36:51 +08:00
color: @main;
}
2018-05-18 15:07:15 +08:00
}
2018-05-22 21:13:28 +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;
color: @color;
&:first-child {
margin-top: 16px;
2018-05-18 15:07:15 +08:00
}
}
2018-05-22 21:13:28 +08:00
.excerpt {
color: @color;
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-18 15:07:15 +08:00
}
.bookmark-tags {
display: flex;
flex-flow: row wrap;
margin: 4px 0 -4px;
padding: 0 8px;
a {
margin: 4px;
padding: 4px 8px;
font-size: 0.8em;
font-weight: 600;
border: 1px solid @border;
border-radius: 4px;
color: @colorLink;
&:hover,
&:focus {
color: @main;
}
}
}
2018-05-22 21:13:28 +08:00
.bookmark-menu {
padding: 8px 16px 16px;
2018-05-18 15:07:15 +08:00
display: flex;
flex-flow: row nowrap;
2018-05-22 21:13:28 +08:00
min-width: 0;
min-height: 0;
align-items: center;
2018-05-18 15:07:15 +08:00
a {
color: @colorLink;
2018-05-22 21:13:28 +08:00
flex-shrink: 0;
opacity: 0.8;
display: none;
font-size: 0.9em;
&:not(:last-child) {
margin-right: 12px;
}
2018-05-18 15:07:15 +08:00
&:hover,
&:focus {
color: @main;
2018-05-22 21:13:28 +08:00
opacity: 1;
2018-05-18 15:07:15 +08:00
}
}
2018-05-22 21:13:28 +08:00
.url {
flex: 1 0;
opacity: 1;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 21px;
2018-05-18 15:07:15 +08:00
}
2018-05-22 21:13:28 +08:00
}
}
.pagination-box {
grid-column-start: 1;
grid-column-end: -1;
display: flex;
flex-flow: row nowrap;
a {
padding: 8px;
color: @colorLink;
&:hover,
&:focus {
color: @main;
2018-05-21 14:28:08 +08:00
}
}
2018-05-22 21:13:28 +08:00
input {
width: 40px;
padding: 8px;
text-align: center;
font-size: 0.9em;
color: @color;
border: 1px solid @border;
background-color: @contentBg;
margin: 0 8px;
2018-05-21 14:28:08 +08:00
}
2018-05-22 21:13:28 +08:00
p {
font-size: 0.9em;
color: @colorLink;
line-height: 37px;
font-weight: 600;
&:last-of-type::before {
content: "/";
margin-right: 8px;
2018-05-21 17:37:48 +08:00
}
2018-05-22 21:13:28 +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;
}
}
.bookmark {
border-top-width: 0;
border-bottom-width: 1px;
padding: 16px 24px 16px 100px;
&:nth-child(2) {
2018-05-22 21:13:28 +08:00
border-top-width: 1px;
}
.bookmark-link {
2018-05-22 21:13:28 +08:00
img {
position: absolute;
top: 0;
left: 0;
width: 100px;
height: 100%;
margin-bottom: 0;
2018-05-21 17:37:48 +08:00
}
2018-05-22 21:13:28 +08:00
.title {
margin: 0;
padding-left: 24px;
2018-05-22 21:13:28 +08:00
white-space: nowrap;
2018-05-21 17:37:48 +08:00
}
}
.excerpt,
>.spacer {
display: none;
}
.bookmark-tags {
order: 5;
padding-left: 16px;
padding-right: 0;
margin-right: -4px;
2018-05-21 17:37:48 +08:00
}
2018-05-22 21:13:28 +08:00
.bookmark-menu {
padding: 4px 0 0 24px;
align-items: flex-end;
2018-05-21 14:28:08 +08:00
}
}
2018-05-22 21:13:28 +08:00
#grid-padding {
min-height: 16px
}
2018-05-21 14:28:08 +08:00
}
2018-02-11 22:00:56 +08:00
}
2018-02-25 22:39:46 +08:00
}
2018-05-21 21:26:18 +08:00
&.night {
2018-05-22 23:35:16 +08:00
.header {
2018-05-22 21:13:28 +08:00
color: @nightColor;
border-color: @nightBorder;
background-color: @nightContentBg;
2018-05-22 23:35:16 +08:00
}
#header input {
color: @nightColor;
border-color: @nightBorder;
background-color: @nightContentBg;
}
#batch-edit #cancel-edit {
color: @nightColor;
border-color: @nightBorder;
&:hover,
&:focus {
color: @main;
2018-05-22 21:13:28 +08:00
}
}
#content {
#grid {
.bookmark {
2018-05-21 21:26:18 +08:00
border-color: @nightBorder;
background-color: @nightContentBg;
2018-05-22 23:35:16 +08:00
&.selected {
background-color: @nightSelectedBg;
}
.title,
.excerpt {
color: @nightColor;
2018-05-21 21:26:18 +08:00
}
.bookmark-tags a {
2018-05-22 21:13:28 +08:00
border-color: @nightBorder;
}
}
.pagination-box {
input {
color: @nightColor;
border-color: @nightBorder;
background-color: @nightContentBg;
}
2018-05-21 21:26:18 +08:00
}
}
}
}
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 {
color: @color;
overflow-y: auto;
align-items: center;
padding: 16px 32px 0;
&.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;
margin-bottom: 32px;
background-color: @contentBg;
padding: 20px;
border: 1px solid @border;
#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;
color: @colorLink;
2018-02-17 22:49:16 +08:00
}
2018-05-22 21:13:28 +08:00
#url {
font-size: 16px;
color: @colorLink;
text-align: right;
justify-self: end;
&:hover,
&:focus {
color: @main;
}
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;
background-color: @contentBg;
padding: 20px;
border: 1px solid @border;
* {
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 {
color: @color;
text-decoration: underline;
&:hover,
&:focus {
color: @main;
}
}
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-22 21:13:28 +08:00
&.night {
#body {
2018-05-21 21:26:18 +08:00
color: @nightColor;
2018-05-22 21:13:28 +08:00
#header {
border-color: @nightBorder;
background-color: @nightContentBg;
}
#content {
border-color: @nightBorder;
background-color: @nightContentBg;
a {
color: @nightColor;
&:hover,
&:focus {
color: @main;
}
}
}
2018-05-21 21:26:18 +08:00
}
}
2018-02-11 22:00:56 +08:00
}