Add a menu in the top right of the post index page that lets you select the thumbnail size. This menu is currently hidden until the new thumbnails have been generated. On desktop, there are five thumbnail sizes: * Small: 150x150 (https://danbooru.donmai.us/posts?size=150) * Medium: 180x180 (https://danbooru.donmai.us/posts?size=180) * Large: 225x225 (https://danbooru.donmai.us/posts?size=225) * Huge: 270x270 (https://danbooru.donmai.us/posts?size=270) * Gigantic: 360x360 (https://danbooru.donmai.us/posts?size=360) On mobile, there are four sizes: * Small: 150x150 / 3 posts per row (https://danbooru.donmai.us/posts?size=150) * Medium: 180x180 / 2 posts per row (https://danbooru.donmai.us/posts?size=180) * Large: 225x225 / 2 posts per row (https://danbooru.donmai.us/posts?size=225) * Huge: 360x360 / 1 posts per row (https://danbooru.donmai.us/posts?size=360) There are two extra sizes that aren't listed in the menu: * 225x360 (https://danbooru.donmai.us/posts?size=225w) * 270x360 (https://danbooru.donmai.us/posts?size=270w) These sizes are good for tall thumbnails, but not so much for wide thumbnails. They aren't listed because in practice they're a bit too big. The 225x225 and 270x270 sizes are really just 360x360 thumbnails scaled down in HTML. This means 225x225 and 360x360 thumbnails both use the same amount of bandwidth. Thumbnail size is currently a per-search option, not a persistent account-level setting. This changes the HTML structure of thumbnails somewhat, so this may break userscripts and custom CSS.
123 lines
4.0 KiB
SCSS
123 lines
4.0 KiB
SCSS
@import "../../javascript/src/styles/base/000_vars.scss";
|
|
|
|
article.post-preview {
|
|
display: inline-block;
|
|
position: relative;
|
|
overflow: hidden;
|
|
|
|
.post-preview-link {
|
|
display: inline-block;
|
|
position: relative;
|
|
|
|
.post-animation-icon {
|
|
color: var(--preview-icon-color);
|
|
background: var(--preview-icon-background);
|
|
}
|
|
}
|
|
|
|
&.captioned {
|
|
height: auto;
|
|
vertical-align: text-top;
|
|
}
|
|
|
|
&.post-preview-compact {
|
|
width: auto;
|
|
height: auto;
|
|
}
|
|
|
|
.desc {
|
|
font-size: var(--text-sm);
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.post-preview-image {
|
|
width: auto;
|
|
height: auto;
|
|
}
|
|
|
|
@media screen and (min-width: 660px) {
|
|
.post-preview-225 .post-preview-image { max-height: 225px; }
|
|
.post-preview-270 .post-preview-image { max-height: 270px; }
|
|
}
|
|
|
|
.post-preview {
|
|
img {
|
|
border: 2px solid transparent;
|
|
}
|
|
|
|
&.post-status-has-children img {
|
|
border-color: var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-has-parent img {
|
|
border-color: var(--preview-has-parent-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-has-parent img {
|
|
border-color: var(--preview-has-children-color) var(--preview-has-parent-color) var(--preview-has-parent-color) var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-deleted img {
|
|
border-color: var(--preview-deleted-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-deleted img {
|
|
border-color: var(--preview-has-children-color) var(--preview-deleted-color) var(--preview-deleted-color) var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-has-parent.post-status-deleted img {
|
|
border-color: var(--preview-has-parent-color) var(--preview-deleted-color) var(--preview-deleted-color) var(--preview-has-parent-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-has-parent.post-status-deleted img {
|
|
border-color: var(--preview-has-children-color) var(--preview-deleted-color) var(--preview-deleted-color) var(--preview-has-parent-color);
|
|
}
|
|
|
|
/* Pending and flagged posts have blue borders (except in the modqueue). */
|
|
&.post-status-pending:not(.mod-queue-preview) img,
|
|
&.post-status-flagged:not(.mod-queue-preview) img {
|
|
border-color: var(--preview-pending-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-pending:not(.mod-queue-preview) img,
|
|
&.post-status-has-children.post-status-flagged:not(.mod-queue-preview) img {
|
|
border-color: var(--preview-has-children-color) var(--preview-pending-color) var(--preview-pending-color) var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-has-parent.post-status-pending:not(.mod-queue-preview) img,
|
|
&.post-status-has-parent.post-status-flagged:not(.mod-queue-preview) img {
|
|
border-color: var(--preview-has-parent-color) var(--preview-pending-color) var(--preview-pending-color) var(--preview-has-parent-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-has-parent.post-status-pending:not(.mod-queue-preview) img,
|
|
&.post-status-has-children.post-status-has-parent.post-status-flagged:not(.mod-queue-preview) img {
|
|
border-color: var(--preview-has-children-color) var(--preview-pending-color) var(--preview-pending-color) var(--preview-has-parent-color);
|
|
}
|
|
}
|
|
|
|
/* Flagged posts have red borders for approvers. */
|
|
body[data-current-user-can-approve-posts="true"] .post-preview {
|
|
&.post-status-flagged img {
|
|
border-color: var(--preview-flagged-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-flagged img {
|
|
border-color: var(--preview-has-children-color) var(--preview-flagged-color) var(--preview-flagged-color) var(--preview-has-children-color);
|
|
}
|
|
|
|
&.post-status-has-parent.post-status-flagged img {
|
|
border-color: var(--preview-has-parent-color) var(--preview-flagged-color) var(--preview-flagged-color) var(--preview-has-parent-color);
|
|
}
|
|
|
|
&.post-status-has-children.post-status-has-parent.post-status-flagged img {
|
|
border-color: var(--preview-has-children-color) var(--preview-flagged-color) var(--preview-flagged-color) var(--preview-has-parent-color);
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 660px) {
|
|
.post-preview-image {
|
|
border: none !important;
|
|
}
|
|
}
|