Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template Screen Minor Fixes #1258

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@
.getAll('runtime')
.includes(runtime)}
on:change={(e) => applyFilter('runtime', runtime, e)} />
<div class="u-flex u-cross-center u-gap-8">
<div
class="u-flex u-cross-center u-gap-8 functions-avatar-holder">
<div class="avatar is-size-x-small">
<SvgIcon name={icon} iconSize="small" />
</div>
Expand Down Expand Up @@ -181,14 +182,16 @@
<li>
<article class="card u-min-height-100-percent">
<div class="u-flex u-gap-16 u-cross-center u-main-space-between">
<h2 class="body-text-1 u-bold u-trim-1">
<h2
class="body-text-1 u-bold u-trim-1 functions-template-title">
{template.name}
</h2>
<ul class="avatars-group is-with-border">
{#each displayed as runtime}
{@const icon = getIconFromRuntime(runtime.name)}
{#if icon}
<li class="avatars-group-item">
<li
class="avatars-group-item functions-avatar-holder">
<div class="avatar is-size-small">
<img
style:--p-text-size="20px"
Expand All @@ -201,7 +204,7 @@
{/if}
{/each}
{#if hidden.length}
<li class="avatars-group-item">
<li class="avatars-group-item functions-avatar-holder">
<div
class="avatar is-size-small"
use:tooltip={{
Expand Down Expand Up @@ -261,3 +264,18 @@
</section>
</div>
</Container>

<style>
:global(.theme-light .functions-avatar-holder .avatar) {
background-color: var(--p-avatar-bg-color-default);
--p-avatar-bg-color-default: hsl(var(--color-neutral-0));
}

:global(.theme-light .functions-template-title) {
color: hsl(var(--color-neutral-70));
}

:global(.theme-dark .functions-template-title) {
color: hsl(var(--color-neutral-15));
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,34 @@
<div class="grid-300px-1fr">
<section>
<Collapsible>
<li class="collapsible-item">
<h3 class="body-text-2 u-bold u-padding-block-12">
Use cases <span class="inline-tag">{$template.useCases.length}</span>
<li class="collapsible-item-divider collapsible-item">
<h3 class="u-flex u-gap-16 body-text-2 u-bold u-padding-block-12">
Use cases
<span class="inline-tag">{$template.useCases.length}</span>
</h3>
<div class="collapsible-content u-flex u-flex-wrap u-gap-8">
{#each $template.useCases as useCase}
<Pill>{useCase}</Pill>
{/each}
</div>
</li>
<li class="collapsible-item">
<h3 class="body-text-2 u-bold u-padding-block-12">
Runtimes <span class="inline-tag">{$template.runtimes.length}</span>
<li class="collapsible-item-divider collapsible-item">
<h3 class="u-flex u-gap-16 body-text-2 u-bold u-padding-block-12">
Runtimes
<span class="inline-tag">{$template.runtimes.length}</span>
</h3>
<div class="collapsible-content u-flex u-flex-wrap u-gap-8">
{#each $template.runtimes as runtime}
<Pill>{runtime.name}</Pill>
{/each}
</div>
</li>
<li class="collapsible-item">
<li class="collapsible-item-divider collapsible-item">
<section class="card u-margin-block-start-24">
<h4 class="body-text-1 u-bold">Published by</h4>
<img
class="u-margin-block-start-8"
src={$app.themeInUse == 'dark' ? AppwriteLogoDark : AppwriteLogoLight}
src={$app.themeInUse === 'dark' ? AppwriteLogoDark : AppwriteLogoLight}
width="120"
height="22"
alt="Appwrite" />
Expand All @@ -57,7 +59,7 @@
<section>
<Card>
<Heading size="7" tag="h3">
<span class="u-flex u-cross-center u-gap-8">
<span class="u-flex u-cross-center u-gap-16 functions-avatar-holder">
<div class="avatar is-size-small">
<span
style:--p-text-size="20px"
Expand Down Expand Up @@ -89,3 +91,13 @@
</section>
</div>
</Container>

<style>
:global(.theme-dark .collapsible-item-divider:where(:not(:last-child))) {
border-block-end: solid 0.0625rem hsl(var(--color-neutral-85));
}

:global(.theme-light .collapsible-item-divider:where(:not(:last-child))) {
border-block-end: solid 0.0625rem hsl(var(--color-neutral-10));
}
</style>