feat: tweak color

This commit is contained in:
Xyphyn committed 2023-07-29 12:40:06 -07:00
1 parent a72ce72f7f
commit e2c08d1806
4 files changed
+31 -7

No files matched your search

+2 -2
View File
@@ -8,8 +8,8 @@
type ButtonRoundness = keyof typeof buttonRoundness type ButtonRoundness = keyof typeof buttonRoundness
const buttonColor = { const buttonColor = {
primary: `border bg-black border-black text-white dark:bg-white primary: `border border-slate-900 bg-slate-900 dark:bg-zinc-100
dark:border-white dark:text-black hover:text-inherit hover:bg-transparent dark:border-zinc-100 dark:text-black hover:text-inherit text-slate-100 hover:bg-transparent
active:bg-black/10 active:dark:bg-white/10`, active:bg-black/10 active:dark:bg-white/10`,
secondary: secondary:
+2 -2
View File
@@ -22,8 +22,8 @@
class="px-3 py-1.5 text-sm rounded-md class="px-3 py-1.5 text-sm rounded-md
transition-colors transition-colors
{selected == option {selected == option
? 'bg-black text-white dark:bg-white dark:text-black\ ? 'bg-slate-900 text-slate-50 dark:bg-zinc-100 dark:text-black\
hover:bg-zinc-900 hover:dark:bg-zinc-300' hover:bg-slate-800 hover:dark:bg-zinc-300'
: ' hover:bg-slate-200 hover:dark:bg-zinc-800'} : ' hover:bg-slate-200 hover:dark:bg-zinc-800'}
{clazz} {clazz}
disabled:opacity-60 disabled:pointer-events-none" disabled:opacity-60 disabled:pointer-events-none"
@@ -1,14 +1,29 @@
<script lang="ts"> <script lang="ts">
export let width: number = 16 export let width: number = 16
export let filled: boolean = false
</script> </script>
<svg {#if filled}
<svg
{width} {width}
height={width} height={width}
viewBox="0 0 20 22" viewBox="0 0 20 22"
fill="none" fill="none"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
> >
<path
d="M10.516 1.17C10.3767 1.03791 10.192 0.964283 10 0.964283C9.80801 0.964283 9.62333 1.03791 9.484 1.17C7.36127 3.18588 4.53412 4.29133 1.607 4.25C1.44753 4.24793 1.29156 4.29674 1.16172 4.38935C1.03189 4.48196 0.934957 4.61355 0.885 4.765C0.462973 6.05116 0.248618 7.39637 0.25 8.75C0.25 14.692 4.314 19.683 9.813 21.098C9.93566 21.1296 10.0643 21.1296 10.187 21.098C15.686 19.683 19.75 14.692 19.75 8.75C19.75 7.36 19.527 6.02 19.115 4.765C19.0652 4.61336 18.9684 4.48156 18.8385 4.38875C18.7087 4.29595 18.5526 4.247 18.393 4.249L18.25 4.25C15.254 4.25 12.533 3.08 10.516 1.17Z"
fill="currentColor"
/>
</svg>
{:else}
<svg
{width}
height={width}
viewBox="0 0 20 22"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path <path
fill-rule="evenodd" fill-rule="evenodd"
clip-rule="evenodd" clip-rule="evenodd"
@@ -16,4 +31,5 @@
stroke="currentColor" stroke="currentColor"
stroke-width="1.5" stroke-width="1.5"
/> />
</svg> </svg>
{/if}
@@ -1,4 +1,5 @@
<script lang="ts"> <script lang="ts">
import ShieldIcon from '$lib/components/lemmy/moderation/ShieldIcon.svelte'
import Avatar from '$lib/components/ui/Avatar.svelte' import Avatar from '$lib/components/ui/Avatar.svelte'
import { userSettings } from '$lib/settings.js' import { userSettings } from '$lib/settings.js'
import type { Person } from 'lemmy-js-client' import type { Person } from 'lemmy-js-client'
@@ -30,4 +31,11 @@
{user.name} {user.name}
{/if} {/if}
</span> </span>
{#if user.admin}
<span>
<div class="text-red-500" title="Admin">
<ShieldIcon width={12} filled />
</div>
</span>
{/if}
</a> </a>