Files
trpic/web/styles/preview/preview.css

227 lines
3.7 KiB
CSS

#preview {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
justify-content: left;
align-items: start;
overflow: hidden;
scrollbar-width: none;
z-index: 5;
}
#preview-view {
position: relative;
width: 100%;
height: 100vh;
}
#sidebar {
position: relative;
width: 0px;
height: 100vh;
background-color: rgba(40, 40, 40);
color: white;
justify-content: left;
overflow-x: hidden;
scrollbar-gutter: stable;
scrollbar-width: thin;
}
@media (max-width: 640px) {
#sidebar.open {
min-width: 100vw;
}
#nav-controls.min-hide {
display: none;
}
}
@media (min-width: 640px) {
#sidebar {
transition: width .3s ease-out;
}
}
#sidebar-content {
padding: 4em 1em 0em 1.5em;
min-width: 12em;
}
#sidebar-content a {
color: aquamarine;
text-decoration: none;
}
#sidebar-content a:hover {
color: rgb(60, 190, 150);
text-decoration: none;
}
#sidebar-content span::before, #sidebar-content #img-id {
display: block;
color: #aaa;
font-size: .8em;
}
#sidebar-content span::after {
content: "";
display: block;
margin: 0 0 1.2rem 0;
}
#sidebar-content p {
margin: 0;
line-break: anywhere;
color: white;
-webkit-user-select: text;
-ms-user-select: text;
user-select: text;
}
#preview-header {
position: absolute;
z-index: 10;
top: 0;
gap: 2em;
height: 4em;
width: 100%;
color: white;
fill: white;
box-sizing: border-box;
padding: .5em;
display: flex;
justify-content: space-between;
background-image: linear-gradient(to top, transparent, hsla(0, 0%, 0%, 0.5));
align-items: center;
}
#image-info {
overflow: hidden;
text-overflow: ellipsis;
min-width: 35vw;
}
#image-info * {
height: 1.6em;
white-space: nowrap;
margin-left: .8em;
}
#image-index {
font-weight: bold;
}
#controls {
display: flex;
}
#controls button {
min-width: 1.6rem;
min-height: 1.6rem;
padding: .5em;
border-radius: 50%;
background: none;
color: white;
fill: currentColor;
border: none;
box-sizing: content-box;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.1s ease-out;
}
#controls button:hover {
background-color: rgba(105, 105, 105, 0.5);
}
#controls svg {
width: 24px;
height: 24px;
}
#image-wrapper {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
cursor: grab;
}
#preview-img {
width: min(90%, 90svw);
height: min(90%, 90svh);
object-fit: contain;
transform-origin: center center;
transition: transform 0.1s ease-out;
cursor: grab;
pointer-events: none;
}
#image-wrapper:active #preview-img,
#image-wrapper.dragging #preview-img,
#image-wrapper.dragging {
cursor: grabbing;
}
#nav-controls {
position: absolute;
bottom: 0;
width: 100%;
display: flex;
justify-content: space-between;
box-sizing: border-box;
z-index: 1;
pointer-events: none;
}
#nav-controls span {
width: 10vw;
height: 100vh;
font-size: 24px;
font-weight: bold;
color: grey;
background: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
#next-btn:hover {
background-image: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.5));
}
#prev-btn:hover {
background-image: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.5));
}
#img-artwork::before { content: "作品链接" }
#img-author::before { content: "作者" }
#img-source::before { content: "来源" }
#img-tag::before { content: "标签" }
#img-info::before { content: "图片信息" }
#img-source > div, #img-author > p {
margin: 0 0 .5em 0;
}
#sidebar-content a {
font-size: .8em;
margin: 0 .5em 0 0;
white-space: pre;
}
.desc, .time {
font-size: .8em;
}