mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Overhaul app responsiveness
We introduce more breakpoints to cover mobile, small-desktop, medium-desktop and large-desktop viewports.
This commit is contained in:
@@ -54,8 +54,10 @@
|
||||
.card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 0.75rem;
|
||||
height: 1.5rem;
|
||||
min-height: 1.5rem;
|
||||
gap: 0.5rem;
|
||||
font-size: var(--font-size-small);
|
||||
}
|
||||
@@ -143,19 +145,18 @@
|
||||
{utils.formatTimestamp(timestamp)}
|
||||
</span>
|
||||
{#if lastEdit}
|
||||
<div class="card-metadata">•</div>
|
||||
<div
|
||||
class="card-metadata"
|
||||
title={utils.formatEditedCaption(
|
||||
lastEdit.author,
|
||||
lastEdit.timestamp,
|
||||
)}>
|
||||
edited
|
||||
• edited
|
||||
</div>
|
||||
{/if}
|
||||
<div class="header-right">
|
||||
{#if id && editComment && state === "read"}
|
||||
<div class="edit-buttons">
|
||||
<div class="edit-buttons global-hide-on-mobile-down">
|
||||
<IconButton title="edit comment" on:click={() => (state = "edit")}>
|
||||
<IconSmall name={"edit"} />
|
||||
</IconButton>
|
||||
@@ -199,15 +200,17 @@
|
||||
<div class="actions">
|
||||
{#if id && reactOnComment}
|
||||
{@const reactOnComment_ = reactOnComment}
|
||||
<ReactionSelector
|
||||
{reactions}
|
||||
on:select={async ({ detail: { authors, emoji } }) => {
|
||||
try {
|
||||
await reactOnComment_(authors, emoji);
|
||||
} finally {
|
||||
closeFocused();
|
||||
}
|
||||
}} />
|
||||
<div class="global-hide-on-mobile-down">
|
||||
<ReactionSelector
|
||||
{reactions}
|
||||
on:select={async ({ detail: { authors, emoji } }) => {
|
||||
try {
|
||||
await reactOnComment_(authors, emoji);
|
||||
} finally {
|
||||
closeFocused();
|
||||
}
|
||||
}} />
|
||||
</div>
|
||||
{/if}
|
||||
{#if id && reactions && reactions.length > 0}
|
||||
<Reactions handleReaction={reactOnComment} {reactions} />
|
||||
|
||||
@@ -42,6 +42,14 @@
|
||||
font-size: var(--font-size-small);
|
||||
text-align: center;
|
||||
}
|
||||
.command {
|
||||
max-width: 25rem;
|
||||
}
|
||||
@media (max-width: 719.98px) {
|
||||
.command {
|
||||
max-width: 20rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="error">
|
||||
@@ -54,13 +62,13 @@
|
||||
{#if error}
|
||||
<div class="help">
|
||||
If you need help resolving this issue, copy the error message
|
||||
<br />
|
||||
<br class="global-hide-on-mobile-down" />
|
||||
below and send it to us on
|
||||
<ExternalLink href={config.supportWebsite}>
|
||||
{config.supportWebsite}
|
||||
</ExternalLink>
|
||||
</div>
|
||||
<div style:max-width="25rem">
|
||||
<div class="command">
|
||||
<Command
|
||||
command={JSON.stringify(error, Object.getOwnPropertyNames(error))}
|
||||
fullWidth
|
||||
|
||||
@@ -56,6 +56,19 @@
|
||||
border-bottom-left-radius: var(--border-radius-small);
|
||||
border-bottom-right-radius: var(--border-radius-small);
|
||||
}
|
||||
@media (max-width: 719.98px) {
|
||||
.header {
|
||||
border-radius: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
padding: 0 1rem 0 1rem;
|
||||
}
|
||||
.container {
|
||||
border-radius: 0;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div bind:this={header} class="header" class:collapsed={!expanded} class:sticky>
|
||||
|
||||
@@ -42,4 +42,5 @@
|
||||
class:txt-small={fontSize === "small"}
|
||||
class:txt-tiny={fontSize === "tiny"}>
|
||||
{@html render(content)}
|
||||
<slot />
|
||||
</span>
|
||||
|
||||
@@ -215,6 +215,7 @@
|
||||
}
|
||||
.markdown {
|
||||
max-width: 1024px;
|
||||
word-break: break-word;
|
||||
}
|
||||
.front-matter {
|
||||
font-size: var(--font-size-tiny);
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
font-family: var(--font-family-monospace);
|
||||
font-weight: var(--font-weight-semibold);
|
||||
font-size: var(--font-size-small);
|
||||
white-space: nowrap;
|
||||
}
|
||||
.popover-container {
|
||||
display: flex;
|
||||
|
||||
@@ -67,6 +67,11 @@
|
||||
.reply {
|
||||
padding: 1rem;
|
||||
}
|
||||
@media (max-width: 719.98px) {
|
||||
.comments {
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="comments">
|
||||
@@ -115,7 +120,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
{#if createReply}
|
||||
<div id={`reply-${root.id}`} class="reply">
|
||||
<div id={`reply-${root.id}`} class="reply global-hide-on-mobile-down">
|
||||
<CommentToggleInput
|
||||
{rawPath}
|
||||
focus
|
||||
|
||||
Reference in New Issue
Block a user