mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-22 13:49:23 +01:00
Make 'Read more' buttons look more consistent everywhere
Too many cooks spoil the broth
This commit is contained in:
parent
f6ab5e9afa
commit
cd3ab50a18
3 changed files with 64 additions and 44 deletions
|
@ -107,24 +107,20 @@
|
||||||
--inset-offset: 16px;
|
--inset-offset: 16px;
|
||||||
inset-block-end: var(--inset-offset);
|
inset-block-end: var(--inset-offset);
|
||||||
inset-inline-end: var(--inset-offset);
|
inset-inline-end: var(--inset-offset);
|
||||||
color: var(--link-color);
|
color: var(--text-color);
|
||||||
background-color: var(--bg-faded-blur-color);
|
background-color: var(--bg-faded-color);
|
||||||
backdrop-filter: blur(8px);
|
border: 1px dashed var(--link-color);
|
||||||
border: 1px solid var(--outline-color);
|
box-shadow: 0 0 0 1px var(--bg-color), 0 -5px 10px var(--bg-color),
|
||||||
|
0 -5px 15px var(--bg-color), 0 -5px 20px var(--bg-color);
|
||||||
padding: 0.5em 0.75em;
|
padding: 0.5em 0.75em;
|
||||||
border-radius: 10em;
|
border-radius: 10em;
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
box-shadow: inset 0 0 0 1px var(--bg-color);
|
transition: transform 0.2s ease-out;
|
||||||
text-shadow: 0 -1px var(--bg-color);
|
|
||||||
transition-property: transform, background-color, border-color;
|
|
||||||
transition-duration: 0.2s;
|
|
||||||
transition-timing-function: ease-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:is(:hover, :focus):after {
|
&:is(:hover, :focus):after {
|
||||||
border-color: var(--link-color);
|
color: var(--link-color);
|
||||||
background-color: var(--bg-color);
|
|
||||||
transform: translate(2px, 0);
|
transform: translate(2px, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1536,26 +1532,52 @@ a.card:is(:hover, :focus):visited {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
#filtered-status-peek .status-link {
|
#filtered-status-peek {
|
||||||
|
.status-link {
|
||||||
|
margin: 8px 0 0;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
border: var(--hairline-width) dashed var(--text-insignificant-color);
|
border: var(--hairline-width) solid var(--divider-color);
|
||||||
|
position: relative;
|
||||||
max-height: 33vh;
|
max-height: 33vh;
|
||||||
max-height: 33dvh;
|
max-height: 33dvh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
|
||||||
#filtered-status-peek .status-link .status {
|
&.truncated {
|
||||||
|
.status {
|
||||||
|
mask-image: linear-gradient(to bottom, #000 80px, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:after {
|
||||||
|
content: attr(data-read-more);
|
||||||
|
line-height: 1;
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
--inset-offset: 16px;
|
||||||
|
inset-block-end: var(--inset-offset);
|
||||||
|
inset-inline-end: var(--inset-offset);
|
||||||
|
color: var(--text-color);
|
||||||
|
background-color: var(--bg-faded-color);
|
||||||
|
border: 1px dashed var(--link-color);
|
||||||
|
box-shadow: 0 0 0 1px var(--bg-color), 0 -5px 10px var(--bg-color),
|
||||||
|
0 -5px 15px var(--bg-color), 0 -5px 20px var(--bg-color);
|
||||||
|
padding: 0.5em 0.75em;
|
||||||
|
border-radius: 10em;
|
||||||
|
font-size: 90%;
|
||||||
|
white-space: nowrap;
|
||||||
|
transition: transform 0.2s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:is(:hover, :focus):after {
|
||||||
|
color: var(--link-color);
|
||||||
|
transform: translate(2px, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
max-height: 33vh;
|
}
|
||||||
max-height: 33dvh;
|
}
|
||||||
overflow: hidden;
|
|
||||||
mask-image: linear-gradient(black 80%, transparent 95%);
|
|
||||||
}
|
|
||||||
#filtered-status-peek .status-post-link {
|
|
||||||
float: right;
|
|
||||||
position: sticky;
|
|
||||||
bottom: 8px;
|
|
||||||
right: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* REACTIONS */
|
/* REACTIONS */
|
||||||
|
|
|
@ -2089,6 +2089,8 @@ function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const statusPeekRef = useTruncated();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class={isReblog ? (group ? 'status-group' : 'status-reblog') : ''}
|
class={isReblog ? (group ? 'status-group' : 'status-reblog') : ''}
|
||||||
|
@ -2162,16 +2164,15 @@ function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
|
||||||
</header>
|
</header>
|
||||||
<main tabIndex="-1">
|
<main tabIndex="-1">
|
||||||
<Link
|
<Link
|
||||||
|
ref={statusPeekRef}
|
||||||
class="status-link"
|
class="status-link"
|
||||||
to={`/${instance}/s/${status.id}`}
|
to={`/${instance}/s/${status.id}`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowPeek(false);
|
setShowPeek(false);
|
||||||
}}
|
}}
|
||||||
|
data-read-more="Read more →"
|
||||||
>
|
>
|
||||||
<Status status={status} instance={instance} size="s" readOnly />
|
<Status status={status} instance={instance} size="s" readOnly />
|
||||||
<button type="button" class="status-post-link plain3">
|
|
||||||
See post »
|
|
||||||
</button>
|
|
||||||
</Link>
|
</Link>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -118,23 +118,20 @@
|
||||||
--inset-offset: 16px;
|
--inset-offset: 16px;
|
||||||
inset-block-end: var(--inset-offset);
|
inset-block-end: var(--inset-offset);
|
||||||
inset-inline-end: var(--inset-offset);
|
inset-inline-end: var(--inset-offset);
|
||||||
color: var(--link-color);
|
color: var(--text-color);
|
||||||
background-color: var(--bg-faded-blur-color);
|
background-color: var(--bg-faded-color);
|
||||||
backdrop-filter: blur(8px);
|
border: 1px dashed var(--link-color);
|
||||||
border: 1px solid var(--outline-color);
|
box-shadow: 0 0 0 1px var(--bg-color), 0 -5px 10px var(--bg-color),
|
||||||
|
0 -5px 15px var(--bg-color), 0 -5px 20px var(--bg-color);
|
||||||
padding: 0.5em 0.75em;
|
padding: 0.5em 0.75em;
|
||||||
border-radius: 10em;
|
border-radius: 10em;
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
box-shadow: inset 0 0 0 1px var(--bg-color);
|
|
||||||
text-shadow: 0 -1px var(--bg-color);
|
text-shadow: 0 -1px var(--bg-color);
|
||||||
transition-property: transform, background-color, border-color;
|
transition: transform 0.2s ease-out;
|
||||||
transition-duration: 0.2s;
|
|
||||||
transition-timing-function: ease-out;
|
|
||||||
}
|
}
|
||||||
.notification .status-link:is(:hover, :focus).truncated:after {
|
.notification .status-link:is(:hover, :focus).truncated:after {
|
||||||
border-color: var(--link-color);
|
color: var(--link-color);
|
||||||
background-color: var(--bg-color);
|
|
||||||
transform: translate(2px, 0);
|
transform: translate(2px, 0);
|
||||||
}
|
}
|
||||||
.notification .status-link.status-type-mention {
|
.notification .status-link.status-type-mention {
|
||||||
|
|
Loading…
Reference in a new issue