This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
forked from usd-wg/assets
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ebaca1
commit 84fd8cc
Showing
5 changed files
with
103 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { writable } from "svelte/store"; | ||
|
||
export let mode = writable("hierarchy"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
<script lang="ts"> | ||
import path from 'path'; | ||
import { mode } from '$lib/settings'; | ||
import GridItem from './GridItem.svelte'; | ||
export let data; | ||
</script> | ||
|
||
<div> | ||
<div class:grid={$mode == "grid"}> | ||
{#each data.posts.children as child} | ||
<article> | ||
<GridItem child={child} depth={1}/> | ||
</article> | ||
{/each} | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.grid article { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(var(--image-size), 1fr)); | ||
gap: 0.5em; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters