-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from idkncc/feat/skeleton-elements
feat: skeleton elements
- Loading branch information
Showing
6 changed files
with
146 additions
and
14 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
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,54 @@ | ||
<div class="friend-card"> | ||
<div class="friend-image"> | ||
<div | ||
class="placeholder rounded-lg" | ||
style="width: 90px; height: 90px;" | ||
/> | ||
</div> | ||
|
||
<div class="friend-username"> | ||
<p class="user-name text-center"> | ||
<span class="placeholder w-full rounded-lg" style="width: 70px" /> | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<style lang="scss"> | ||
.friend-card { | ||
--size: 100px; | ||
@media screen and (max-width: 920px) { | ||
--size: 80px; | ||
} | ||
@apply flex flex-col; | ||
.friend-image { | ||
min-width: var(--size); | ||
min-height: var(--size); | ||
@apply aspect-square; | ||
@apply rounded-full relative; | ||
img { | ||
@apply w-full rounded-full; | ||
} | ||
} | ||
div.friend-username { | ||
@apply text-xs text-center; | ||
@apply flex gap-1 justify-center; | ||
width: var(--size); | ||
.user-name { | ||
max-width: calc(var(--size) - 10px); | ||
@apply truncate; | ||
} | ||
.user-status { | ||
@apply w-fit; | ||
} | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<script lang="ts"> | ||
import type { Recommendation, TreatmentType } from "$lib/typings.ts"; | ||
</script> | ||
|
||
<div class="game-card w-full" data-treatment-type={"Carousel"}> | ||
<div class="game-image rounded-md placeholder" /> | ||
|
||
<p class="game-title"><span class="placeholder w-20" /></p> | ||
<p class="game-playing"><span class="placeholder w-12" /></p> | ||
</div> | ||
|
||
<style lang="scss"> | ||
.game-card { | ||
@apply min-w-[120px]; | ||
@apply cursor-pointer; | ||
.game-title { | ||
@apply max-w-[120px] max-h-[52px] text-sm truncate; | ||
} | ||
.game-playing { | ||
@apply text-[#C0C0C0] text-xs; | ||
} | ||
} | ||
.game-card[data-treatment-type="Carousel"] { | ||
.game-image { | ||
@apply w-[120px] h-[120px]; | ||
} | ||
} | ||
.game-card[data-treatment-type="SortlessGrid"] { | ||
.game-image { | ||
@apply min-w-[120px] min-h-[120px]; | ||
width: 100%; | ||
aspect-ratio: 16 / 9; | ||
} | ||
} | ||
</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
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