style: fix

This commit is contained in:
Shusui MOYATANI
2024-05-29 02:20:06 +09:00
parent c76cb4ab62
commit e53c9b4fa1
8 changed files with 9 additions and 9 deletions

View File

@@ -13,7 +13,7 @@ const isPlus = (r: ReactionTypes) => r.type === 'LikeDislike' && r.content === '
const EmojiDisplay: Component<EmojiDisplayProps> = (props) => ( const EmojiDisplay: Component<EmojiDisplayProps> = (props) => (
<Switch fallback={<span class="truncate">{props.reactionTypes.content}</span>}> <Switch fallback={<span class="truncate">{props.reactionTypes.content}</span>}>
<Match when={isPlus(props.reactionTypes)}> <Match when={isPlus(props.reactionTypes)}>
<span class="inline-block size-4 pt-[1px] text-r-reaction"> <span class="inline-block size-4 pt-px text-r-reaction">
<HeartSolid /> <HeartSolid />
</span> </span>
</Match> </Match>
@@ -21,7 +21,7 @@ const EmojiDisplay: Component<EmojiDisplayProps> = (props) => (
{({ content }) => <span class="truncate">{content}</span>} {({ content }) => <span class="truncate">{content}</span>}
</Match> </Match>
<Match when={props.reactionTypes.type === 'CustomEmoji' && props.reactionTypes} keyed> <Match when={props.reactionTypes.type === 'CustomEmoji' && props.reactionTypes} keyed>
{({ shortcode, url }) => <img class="h-4 max-w-[6rem]" src={url} alt={`:${shortcode}:`} />} {({ shortcode, url }) => <img class="h-4 max-w-24" src={url} alt={`:${shortcode}:`} />}
</Match> </Match>
</Switch> </Switch>
); );

View File

@@ -384,7 +384,7 @@ const NotePostForm: Component<NotePostFormProps> = (props) => {
emojiTextAreaRef(el); emojiTextAreaRef(el);
}} }}
name="text" name="text"
class="scrollbar max-h-[40vh] min-h-[4rem] overflow-y-auto rounded-md border border-border bg-bg ring-border placeholder:text-fg-secondary focus:border-border focus:ring-primary" class="scrollbar max-h-[40vh] min-h-16 overflow-y-auto rounded-md border border-border bg-bg ring-border placeholder:text-fg-secondary focus:border-border focus:ring-primary"
rows={4} rows={4}
placeholder={placeholder(mode())} placeholder={placeholder(mode())}
onInput={handleInput} onInput={handleInput}

View File

@@ -131,7 +131,7 @@ const TextNoteContentDisplay = (props: TextNoteContentDisplayProps) => {
// const { imageRef, canvas } = useImageAnimation({ initialPlaying: false }); // const { imageRef, canvas } = useImageAnimation({ initialPlaying: false });
return ( return (
<img <img
class="inline-block h-8 max-w-[8rem]" class="inline-block h-8 max-w-32"
src={item.url} src={item.url}
alt={item.content} alt={item.content}
title={item.shortcode} title={item.shortcode}

View File

@@ -28,7 +28,7 @@ const Copy: Component<CopyProps> = (props) => {
<ClipboardDocument /> <ClipboardDocument />
</button> </button>
<Show when={showPopup()}> <Show when={showPopup()}>
<div class="absolute left-[-2.5rem] top-[-1.5rem] rounded bg-primary p-1 text-xs font-bold text-primary-fg shadow"> <div class="absolute -left-10 -top-6 rounded bg-primary p-1 text-xs font-bold text-primary-fg shadow">
Copied! Copied!
</div> </div>
</Show> </Show>

View File

@@ -27,7 +27,7 @@ const useEmojiComplete = () => {
template: (config: CustomEmojiConfig) => { template: (config: CustomEmojiConfig) => {
const e = ( const e = (
<div class="flex gap-1 border-b border-border px-2 py-1"> <div class="flex gap-1 border-b border-border px-2 py-1">
<img class="h-6 max-w-[3rem]" src={config.url} alt={config.shortcode} /> <img class="h-6 max-w-12" src={config.url} alt={config.shortcode} />
<div>{config.shortcode}</div> <div>{config.shortcode}</div>
</div> </div>
) as HTMLElement; ) as HTMLElement;

View File

@@ -101,7 +101,7 @@ const parseTextNote = (textNoteContent: string) => {
...textNoteContent.matchAll(mentionRegex), ...textNoteContent.matchAll(mentionRegex),
...textNoteContent.matchAll(hashTagRegex), ...textNoteContent.matchAll(hashTagRegex),
...textNoteContent.matchAll(customEmojiRegex), ...textNoteContent.matchAll(customEmojiRegex),
].sort((a, b) => (a.index as number) - (b.index as number)); ].sort((a, b) => a.index - b.index);
let pos = 0; let pos = 0;
const result: ParsedTextNote = []; const result: ParsedTextNote = [];

View File

@@ -51,7 +51,7 @@ const Hello: Component = () => {
}); });
return ( return (
<div class="mx-auto flex max-w-[640px] flex-col items-center p-4 text-fg"> <div class="mx-auto flex max-w-screen-sm flex-col items-center p-4 text-fg">
<div class="flex flex-col items-center gap-4 rounded p-4"> <div class="flex flex-col items-center gap-4 rounded p-4">
<img src={resolveAsset('images/rabbit_256.png')} width="96" alt="logo" height="96" /> <img src={resolveAsset('images/rabbit_256.png')} width="96" alt="logo" height="96" />
<h1 class="text-5xl font-black text-primary">Rabbit</h1> <h1 class="text-5xl font-black text-primary">Rabbit</h1>

View File

@@ -6,7 +6,7 @@ const NotFound: Component = () => {
const i18n = useTranslation(); const i18n = useTranslation();
return ( return (
<div class="container mx-auto max-w-[640px] py-10"> <div class="container mx-auto max-w-screen-sm py-10">
<h1 class="text-4xl font-bold text-fg">{i18n.t('notFound.title')}</h1> <h1 class="text-4xl font-bold text-fg">{i18n.t('notFound.title')}</h1>
<p class="pt-4"> <p class="pt-4">
<a class="text-link underline" href="/"> <a class="text-link underline" href="/">