shiori/view/less/stylesheet.less

397 lines
10 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-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;
background-color: @contentBg;
border: 1px solid @border;
padding: 16px;
text-align: center;
}
#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 {
font-weight: 100;
color: @main;
}
}
#input-area {
padding: 8px;
border-bottom: 1px solid @border;
.input-field {
display: flex;
align-items: baseline;
padding: 8px;
p {
2018-05-18 15:07:15 +08:00
color: @colorLight;
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;
border: 1px solid @border;
flex: 1 0;
font-size: 0.9em;
}
a {
display: block;
cursor: pointer;
2018-05-18 15:07:15 +08:00
color: @colorLight;
2018-02-22 17:48:36 +08:00
text-align: center;
font-size: 0.9em;
flex: 1 0;
i {
margin-right: 8px;
2018-05-18 15:07:15 +08:00
color: @colorLight;
2018-02-22 17:48:36 +08:00
}
&:hover {
color: @main;
}
}
}
}
#button-area {
display: flex;
flex-flow: row nowrap;
padding: 16px;
a {
2018-05-18 15:07:15 +08:00
color: @colorLink;
2018-02-22 17:48:36 +08:00
text-transform: uppercase;
2018-05-18 15:07:15 +08:00
background-color: @contentBg;
2018-02-22 17:48:36 +08:00
flex: 1 0;
text-align: center;
&.button {
cursor: pointer;
&:hover {
color: @accent;
}
}
}
}
}
}
2018-05-18 15:07:15 +08:00
#index-page {
2018-02-11 22:00:56 +08:00
display: flex;
2018-05-18 15:07:15 +08:00
flex-flow: row nowrap;
width: 100vw;
height: 100vh;
background-color: @bg;
min-width: 0;
min-height: 0;
overflow: hidden;
#sidebar {
2018-02-11 22:00:56 +08:00
display: flex;
2018-05-18 15:07:15 +08:00
flex-flow: column nowrap;
flex-shrink: 0;
background-color: @darkBg;
min-width: 0;
min-height: 0;
overflow: hidden;
2018-02-11 22:00:56 +08:00
#logo {
2018-05-18 15:07:15 +08:00
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: @colorLight;
2018-02-11 22:00:56 +08:00
&:hover {
2018-05-18 15:07:15 +08:00
background-color: @color;
}
&.active {
background-color: @color;
color: @main;
2018-02-11 22:00:56 +08:00
}
}
2018-05-18 15:07:15 +08:00
}
#body {
flex: 1 0;
display: flex;
flex-flow: column nowrap;
min-width: 0;
min-height: 0;
overflow: hidden;
#header {
background-color: @contentBg;
border-bottom: 1px solid @border;
2018-02-11 22:00:56 +08:00
display: flex;
flex-flow: row nowrap;
2018-05-18 15:07:15 +08:00
color: @color;
align-items: center;
min-width: 0;
min-height: 0;
overflow: hidden;
flex-shrink: 0;
2018-02-11 22:00:56 +08:00
input {
flex: 1 0;
2018-05-18 15:07:15 +08:00
line-height: 60px;
padding: 0 16px;
font-size: 1em;
border-right: 1px solid @border;
2018-02-11 22:00:56 +08:00
}
2018-02-14 19:50:53 +08:00
a {
2018-05-18 15:07:15 +08:00
width: 60px;
line-height: 60px;
text-align: center;
color: @colorLink;
&:hover,
&:focus {
2018-02-14 19:50:53 +08:00
color: @main;
}
}
}
2018-05-18 15:07:15 +08:00
#grid {
overflow-y: auto;
display: grid;
grid-template-rows: auto;
grid-template-columns: repeat(4, 1fr);
grid-gap: 16px;
2018-05-19 14:36:51 +08:00
padding: 16px 16px 0;
>div:last-child {
grid-column-start: 1;
grid-column-end: -1;
height: 1px;
}
2018-05-18 15:07:15 +08:00
.bookmark {
2018-02-22 17:48:36 +08:00
display: flex;
2018-05-18 15:07:15 +08:00
flex-flow: column nowrap;
min-width: 0;
border: 1px solid @border;
background-color: @contentBg;
height: 100%;
2018-05-19 14:36:51 +08:00
&:hover,
&:focus {
2018-05-18 15:07:15 +08:00
.bookmark-menu>a {
display: block;
}
2018-02-23 15:30:58 +08:00
}
2018-05-18 15:07:15 +08:00
.bookmark-content {
display: block;
position: relative;
flex: 1;
2018-05-19 14:36:51 +08:00
cursor: default;
&[href] {
cursor: pointer;
&:hover,
&:focus {
.title {
color: @main;
}
2018-05-18 15:07:15 +08:00
}
}
img {
max-width: 100%;
2018-05-19 14:36:51 +08:00
margin-bottom: 8px;
2018-05-18 15:07:15 +08:00
}
.title {
2018-05-19 14:36:51 +08:00
text-overflow: ellipsis;
word-wrap: break-word;
overflow: hidden;
2018-05-18 15:07:15 +08:00
font-size: 1.2em;
2018-05-19 14:36:51 +08:00
line-height: 1.3em;
max-height: 5.2em;
2018-05-18 15:07:15 +08:00
font-weight: 600;
padding: 0 16px;
color: @color;
&:first-child {
2018-05-19 14:36:51 +08:00
margin-top: 16px;
2018-05-18 15:07:15 +08:00
}
}
.excerpt {
color: @color;
2018-05-19 14:36:51 +08:00
padding: 8px 16px 0;
2018-05-18 15:07:15 +08:00
text-overflow: ellipsis;
word-wrap: break-word;
overflow: hidden;
font-size: 0.9em;
line-height: 1.5em;
max-height: 12em;
}
}
.bookmark-menu {
padding: 8px 16px 16px;
display: flex;
flex-flow: row nowrap;
min-width: 0;
min-height: 0;
align-items: center;
a {
color: @colorLink;
flex-shrink: 0;
opacity: 0.8;
display: none;
font-size: 0.9em;
&:not(:last-child) {
margin-right: 12px;
}
&:hover,
&:focus {
color: @main;
opacity: 1;
}
}
.url {
flex: 1 0;
opacity: 1;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 21px;
}
2018-02-11 22:00:56 +08:00
}
}
}
2018-02-25 22:39:46 +08:00
}
2018-02-11 22:00:56 +08:00
}
2018-02-17 22:49:16 +08:00
#cache-page {
display: flex;
flex-flow: column nowrap;
align-items: center;
2018-02-23 15:30:58 +08:00
height: auto;
min-height: 100vh;
2018-02-17 22:49:16 +08:00
a {
color: @main;
&:visited {
color: @main;
}
&:hover {
text-decoration: underline;
}
}
>* {
width: 100%;
max-width: 864px;
}
#menu {
display: flex;
flex-flow: row nowrap;
max-width: 864px;
border-bottom: 1px solid @border;
a {
flex: 1 0;
font-size: 0.9em;
text-align: center;
2018-05-18 15:07:15 +08:00
color: @colorLink;
2018-02-17 22:49:16 +08:00
padding: 16px;
i {
margin-right: 4px;
}
cursor: pointer;
&:not(:last-child) {
border-right: 1px solid @border;
}
&:visited {
2018-05-18 15:07:15 +08:00
color: @colorLink
2018-02-17 22:49:16 +08:00
}
&:hover {
color: @main;
text-decoration: none;
}
}
}
#metadata {
padding: 32px;
border-bottom: 1px solid @border;
a {
font-size: 0.9em;
display: block;
}
h3 {
font-size: 2em;
margin: 8px 0;
}
p {
font-size: 0.9em;
2018-05-18 15:07:15 +08:00
color: @color;
2018-02-17 22:49:16 +08:00
}
}
#content {
padding: 16px 32px 32px;
* {
margin-top: 16px;
line-height: 180%;
overflow: auto;
}
pre,
code {
font-family: 'Ubuntu Mono', 'Courier New', Courier, monospace;
}
}
&.dark-mode {
background-color: #222;
color: white;
#menu a {
color: white;
&:visited {
color: white;
}
&:hover {
color: @main;
text-decoration: none;
}
}
#metadata p {
color: white;
}
}
2018-02-11 22:00:56 +08:00
}