shiori/internal/view/less/bookmark-item.less

270 lines
6.1 KiB
Text
Raw Normal View History

2019-05-27 18:01:53 +08:00
.bookmark {
2019-09-24 12:56:35 +08:00
display : flex;
flex-flow : column nowrap;
min-width : 0;
border : 1px solid var(--border);
2019-05-27 18:01:53 +08:00
background-color: var(--contentBg);
2019-09-24 12:56:35 +08:00
height : 100%;
position : relative;
2019-05-27 18:01:53 +08:00
&:hover,
&:focus {
.bookmark-menu>a {
display: block;
}
}
&.selected {
background-color: var(--selectedBg);
}
.bookmark-selector {
position: absolute;
2019-09-24 12:56:35 +08:00
top : 0;
left : 0;
width : 100%;
height : 100%;
z-index : 9;
2019-05-27 18:01:53 +08:00
}
.bookmark-link {
display: block;
2019-09-24 12:56:35 +08:00
cursor : default;
2019-05-27 18:01:53 +08:00
&[href] {
cursor: pointer;
&:hover,
&:focus {
.title {
color: var(--main);
}
}
}
span.thumbnail {
2019-09-24 12:56:35 +08:00
width : 100%;
height : 200px;
display : block;
background-size : cover;
background-repeat : no-repeat;
2019-05-27 18:01:53 +08:00
background-position: center center;
2019-09-24 12:56:35 +08:00
margin-bottom : 8px;
border-bottom : 1px solid var(--border);
2019-05-27 18:01:53 +08:00
}
.id {
2019-09-24 12:56:35 +08:00
color : var(--color);
border : 1px solid var(--border);
2019-05-27 18:01:53 +08:00
background-color: var(--contentBg);
2019-09-24 12:56:35 +08:00
font-size : 0.7em;
font-weight : bold;
left : -1px;
top : -1px;
position : absolute;
padding : 0px 0.3em;
opacity : 0.7;
2019-05-27 18:01:53 +08:00
}
.title {
text-overflow: ellipsis;
2019-09-24 12:56:35 +08:00
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 : var(--color);
2019-05-27 18:01:53 +08:00
&:first-child {
margin-top: 16px;
}
i {
2019-09-24 12:56:35 +08:00
color : var(--colorLink);
margin-left: 4px;
2019-09-24 12:56:35 +08:00
font-size : 14px;
}
2019-05-27 18:01:53 +08:00
}
.excerpt {
2019-09-24 12:56:35 +08:00
color : var(--color);
margin-top : 8px;
padding : 0 16px;
2019-05-27 18:01:53 +08:00
text-overflow: ellipsis;
2019-09-24 12:56:35 +08:00
word-wrap : break-word;
overflow : hidden;
font-size : 0.9em;
line-height : 1.5em;
max-height : 10.5em;
2019-05-27 18:01:53 +08:00
}
}
.bookmark-tags {
2019-09-24 12:56:35 +08:00
display : flex;
2019-05-27 18:01:53 +08:00
flex-flow: row wrap;
2019-09-24 12:56:35 +08:00
margin : 8px 0 -4px;
padding : 0 8px;
2019-05-27 18:01:53 +08:00
a {
2019-09-24 12:56:35 +08:00
margin : 4px;
padding : 4px 8px;
font-size : 0.8em;
font-weight : 600;
border : 1px solid var(--border);
border-radius : 4px;
color : var(--colorLink);
2019-05-30 17:35:18 +08:00
background-color: var(--contentBg);
2019-05-27 18:01:53 +08:00
&:hover,
&:focus {
color: var(--main);
}
}
}
.bookmark-menu {
2019-09-24 12:56:35 +08:00
padding : 8px 16px 16px;
display : flex;
flex-flow : row nowrap;
min-width : 0;
min-height : 0;
2019-05-27 18:01:53 +08:00
align-items: center;
a {
2019-09-24 12:56:35 +08:00
color : var(--colorLink);
2019-05-27 18:01:53 +08:00
flex-shrink: 0;
2019-09-24 12:56:35 +08:00
opacity : 0.8;
display : none;
font-size : 0.9em;
2019-05-27 18:01:53 +08:00
&:not(:last-child) {
margin-right: 12px;
}
&:hover,
&:focus {
2019-09-24 12:56:35 +08:00
color : var(--main);
2019-05-27 18:01:53 +08:00
opacity: 1;
}
}
.url {
2019-09-24 12:56:35 +08:00
flex : 1 0;
opacity : 1;
display : block;
white-space : nowrap;
overflow : hidden;
2019-05-27 18:01:53 +08:00
text-overflow: ellipsis;
2019-09-24 12:56:35 +08:00
line-height : 21px;
2019-05-27 18:01:53 +08:00
&:not([href]) {
cursor: default;
2019-09-24 12:56:35 +08:00
color : var(--colorLink);
2019-05-27 18:01:53 +08:00
}
}
2019-08-13 11:58:42 +08:00
@media (max-width: 600px) {
a {
display: block;
}
}
2019-05-27 18:01:53 +08:00
}
}
2019-05-27 18:01:53 +08:00
.bookmark.list {
2019-09-24 12:56:35 +08:00
border-top-width : 0;
border-bottom-width: 1px;
2019-09-24 12:56:35 +08:00
padding : 16px 24px 16px 100px;
2019-05-27 18:01:53 +08:00
&:first-child {
border-top-width: 1px;
}
.bookmark-link {
span.thumbnail {
2019-09-24 12:56:35 +08:00
position : absolute;
top : 0;
left : 0;
width : 100px;
height : 100%;
margin-bottom: 0;
border-bottom: 0px;
2019-09-24 12:56:35 +08:00
border-right : 1px solid var(--border);
2019-05-27 18:01:53 +08:00
}
.title {
2019-09-24 12:56:35 +08:00
margin : 0;
padding-left: 24px;
}
}
2019-05-27 18:01:53 +08:00
.excerpt,
>.spacer {
display: none;
}
.bookmark-tags {
2019-09-24 12:56:35 +08:00
padding-left : 16px;
padding-right: 0;
}
.bookmark-menu {
2019-09-24 12:56:35 +08:00
padding : 8px 0 0 24px;
align-items: flex-end;
}
&.no-thumbnail {
2019-09-24 12:56:35 +08:00
padding-left : 16px;
padding-right: 16px;
.bookmark-link .title {
padding : 0;
margin-bottom: 4px;
2019-05-27 18:01:53 +08:00
}
.excerpt {
margin-top : 0;
margin-bottom: 4px;
padding : 0;
display : block;
2019-05-27 18:01:53 +08:00
}
.bookmark-tags {
padding-left: 0;
margin : 0 -4px 0;
2019-05-27 18:01:53 +08:00
}
.bookmark-menu {
2019-09-24 12:56:35 +08:00
padding-top : 0;
padding-left: 0;
2019-05-27 18:01:53 +08:00
}
}
2019-05-27 20:50:50 +08:00
@media (max-width: 600px) {
2019-09-24 12:56:35 +08:00
padding : 8px 16px 8px 70px;
border-width : 0 !important;
border-bottom-width: 1px !important;
2019-05-27 20:50:50 +08:00
.bookmark-link {
span.thumbnail {
width: 70px;
2019-05-27 20:50:50 +08:00
}
.title {
2019-09-24 12:56:35 +08:00
font-size : 1.1em;
font-weight : 500;
2019-05-27 20:50:50 +08:00
padding-left: 16px;
}
}
.bookmark-tags {
padding-left: 8px;
}
.bookmark-menu {
padding-left: 16px;
}
2019-05-27 18:01:53 +08:00
}
}