forked from nutomic/lemmy
Refactoring thumbnails. Fixes #564
- Adding a default discussion thumbnail - Adding a cropping max-height, and consistent width. - Getting rid of hover overlays, in favor of top right content-type icon.
This commit is contained in:
parent
6365439c16
commit
5623f11b05
3 changed files with 558 additions and 473 deletions
19
ui/assets/css/main.css
vendored
19
ui/assets/css/main.css
vendored
|
@ -131,8 +131,13 @@ blockquote {
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail {
|
.thumbnail {
|
||||||
max-height: 62px;
|
object-fit: cover;
|
||||||
max-width: 400px;
|
max-height: 80px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg.thumbnail {
|
||||||
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-s-hows {
|
.no-s-hows {
|
||||||
|
@ -188,6 +193,16 @@ hr {
|
||||||
border: unset;
|
border: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mini-overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 2px;
|
||||||
|
background: rgba(0,0,0,.4);
|
||||||
|
border-bottom-left-radius: 0.25rem !important;
|
||||||
|
border-top-right-radius: 0.25rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
.link-overlay:hover {
|
.link-overlay:hover {
|
||||||
transition: .1s;
|
transition: .1s;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
1008
ui/src/components/post-listing.tsx
vendored
1008
ui/src/components/post-listing.tsx
vendored
File diff suppressed because it is too large
Load diff
4
ui/src/components/symbols.tsx
vendored
4
ui/src/components/symbols.tsx
vendored
|
@ -15,6 +15,10 @@ export class Symbols extends Component<any, any> {
|
||||||
xmlnsXlink="http://www.w3.org/1999/xlink"
|
xmlnsXlink="http://www.w3.org/1999/xlink"
|
||||||
>
|
>
|
||||||
<defs>
|
<defs>
|
||||||
|
<symbol id="icon-bubble2" viewBox="0 0 32 32">
|
||||||
|
<title>bubble2</title>
|
||||||
|
<path d="M16 6c-1.717 0-3.375 0.271-4.928 0.804-1.46 0.502-2.76 1.211-3.863 2.108-2.069 1.681-3.209 3.843-3.209 6.088 0 1.259 0.35 2.481 1.039 3.63 0.711 1.185 1.781 2.268 3.093 3.133 0.949 0.625 1.587 1.623 1.755 2.747 0.056 0.375 0.091 0.753 0.105 1.129 0.233-0.194 0.461-0.401 0.684-0.624 0.755-0.755 1.774-1.172 2.828-1.172 0.168 0 0.336 0.011 0.505 0.032 0.655 0.083 1.325 0.126 1.99 0.126 1.717 0 3.375-0.271 4.928-0.804 1.46-0.502 2.76-1.211 3.863-2.108 2.069-1.681 3.209-3.843 3.209-6.088s-1.14-4.407-3.209-6.088c-1.104-0.897-2.404-1.606-3.863-2.108-1.553-0.534-3.211-0.804-4.928-0.804zM16 2v0c8.837 0 16 5.82 16 13s-7.163 13-16 13c-0.849 0-1.682-0.054-2.495-0.158-3.437 3.437-7.539 4.053-11.505 4.144v-0.841c2.142-1.049 4-2.961 4-5.145 0-0.305-0.024-0.604-0.068-0.897-3.619-2.383-5.932-6.024-5.932-10.103 0-7.18 7.163-13 16-13z"></path>
|
||||||
|
</symbol>
|
||||||
<symbol id="icon-image" viewBox="0 0 32 32">
|
<symbol id="icon-image" viewBox="0 0 32 32">
|
||||||
<title>image</title>
|
<title>image</title>
|
||||||
<path d="M29.996 4c0.001 0.001 0.003 0.002 0.004 0.004v23.993c-0.001 0.001-0.002 0.003-0.004 0.004h-27.993c-0.001-0.001-0.003-0.002-0.004-0.004v-23.993c0.001-0.001 0.002-0.003 0.004-0.004h27.993zM30 2h-28c-1.1 0-2 0.9-2 2v24c0 1.1 0.9 2 2 2h28c1.1 0 2-0.9 2-2v-24c0-1.1-0.9-2-2-2v0z"></path>
|
<path d="M29.996 4c0.001 0.001 0.003 0.002 0.004 0.004v23.993c-0.001 0.001-0.002 0.003-0.004 0.004h-27.993c-0.001-0.001-0.003-0.002-0.004-0.004v-23.993c0.001-0.001 0.002-0.003 0.004-0.004h27.993zM30 2h-28c-1.1 0-2 0.9-2 2v24c0 1.1 0.9 2 2 2h28c1.1 0 2-0.9 2-2v-24c0-1.1-0.9-2-2-2v0z"></path>
|
||||||
|
|
Loading…
Reference in a new issue