Skip to content

Commit

Permalink
feat: fade docs pages
Browse files Browse the repository at this point in the history
  • Loading branch information
DanWebb committed Oct 4, 2024
1 parent b069892 commit eb3cd2a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
13 changes: 13 additions & 0 deletions src/components/composition/d-fade.webc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<style webc:scoped>
@keyframes fade {
0% { opacity: 0; }
100% { opacity: 1; }
}

:host {
animation: fade 0.75s var(--diamond-transition-timing) forwards;
opacity: 0;
}
</style>

<slot></slot>
40 changes: 21 additions & 19 deletions src/layouts/docs.webc
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,27 @@ layout: default.webc
</d-sidebar-nav>

<diamond-section padding="fluid">
<diamond-grid>
<diamond-grid-item grow shrink>
<d-title-group class="diamond-spacing-bottom-xl">
<p @text="$data.tags[1]"></p>
<h1 @text="$data.title"></h1>
<p @text="$data.description"></p>
</d-title-group>
</diamond-grid-item>
<diamond-grid-item
webc:if="$data.icon"
class="diamond-hidden-small-mobile diamond-visible-large-tablet"
>
<d-icon :icon="$data.icon" class="giant-icon text-color-blue"></d-icon>
</diamond-grid-item>
</diamond-grid>

<d-separator class="diamond-spacing-bottom-xl"></d-separator>

<div @raw="content"></div>
<d-fade>
<diamond-grid>
<diamond-grid-item grow shrink>
<d-title-group class="diamond-spacing-bottom-xl">
<p @text="$data.tags[1]"></p>
<h1 @text="$data.title"></h1>
<p @text="$data.description"></p>
</d-title-group>
</diamond-grid-item>
<diamond-grid-item
webc:if="$data.icon"
class="diamond-hidden-small-mobile diamond-visible-large-tablet"
>
<d-icon :icon="$data.icon" class="giant-icon text-color-blue"></d-icon>
</diamond-grid-item>
</diamond-grid>

<d-separator class="diamond-spacing-bottom-xl"></d-separator>

<div @raw="content"></div>
</d-fade>
</diamond-section>
</d-sidebar-layout>
</diamond-wrap>

0 comments on commit eb3cd2a

Please sign in to comment.