fix: padding in compact mode
This commit is contained in:
1 parent
1c456ac499
commit
1d13f4b0be
5 files changed
+18
-9
No files matched your search
@@ -50,12 +50,12 @@
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<Material
|
||||
color={view != 'card' ? 'none' : 'distinct'}
|
||||
class="relative max-w-full min-w-0 w-full group gap-2
|
||||
class="relative max-w-full min-w-0 w-full group
|
||||
{view != 'card' ? 'bg-transparent !border-0' : 'p-5'} {view == 'compact'
|
||||
? 'py-4 list-type'
|
||||
: view == 'list'
|
||||
? 'py-5 list-type'
|
||||
: 'py-5 flex flex-col'} {$$props.class}"
|
||||
: 'py-5 flex flex-col gap-2'} {$$props.class}"
|
||||
id={post.post.id.toString()}
|
||||
padding="none"
|
||||
>
|
||||
@@ -125,14 +125,16 @@
|
||||
<style>
|
||||
:global(.list-type) {
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
grid-template-areas: var(
|
||||
--template-areas,
|
||||
'meta media' 'title media' 'body media' 'embed embed' 'actions actions'
|
||||
);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
grid-auto-rows: minmax(-0.5rem, auto);
|
||||
grid-template-columns: var(--template-columns, 1fr auto);
|
||||
}
|
||||
|
||||
:global(.list-type > *:not(:first-child)) {
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
@@ -93,7 +93,10 @@
|
||||
</Modal>
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-row gap-2 items-center h-8" style={$$props.style ?? ''}>
|
||||
<div
|
||||
class="flex flex-row gap-2 items-center !h-8 flex-shrink-0"
|
||||
style={$$props.style ?? ''}
|
||||
>
|
||||
<PostVote
|
||||
post={post.post}
|
||||
bind:vote={post.my_vote}
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
class:dark:text-zinc-400={$userSettings.markReadPosts && read}
|
||||
style="grid-area: title;"
|
||||
>
|
||||
<Markdown source={title} inline></Markdown>
|
||||
<Markdown source={title} inline noStyle></Markdown>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
|
||||
<slot {vote} {score}>
|
||||
<div
|
||||
class="{buttonColor.secondary} rounded-lg h-full flex items-center [&>*]:p-2
|
||||
hover:bg-white hover:dark:bg-zinc-900 overflow-hidden transition-colors
|
||||
class="{buttonColor.secondary} rounded-lg h-8 flex items-center [&>*]:p-2
|
||||
hover:bg-white hover:dark:bg-zinc-900 overflow-hidden transition-colors flex-shrink-0
|
||||
{loading ? 'animate-pulse opacity-75 pointer-events-none' : ''}"
|
||||
>
|
||||
<button
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
export let source: string = ''
|
||||
export let inline: boolean = false
|
||||
export let noStyle: boolean = false
|
||||
|
||||
let rendered = ''
|
||||
|
||||
@@ -52,7 +53,10 @@
|
||||
|
||||
<div
|
||||
bind:this={div}
|
||||
class="break-words flex flex-col markdown gap-2 leading-[1.5] {$$props.class}"
|
||||
class="{noStyle
|
||||
? ''
|
||||
: 'break-words flex flex-col markdown gap-2 leading-[1.5]'} {$$props.class}"
|
||||
style={$$props.style}
|
||||
>
|
||||
{@html rendered}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user