add extra weapon container components
This commit is contained in:
parent
540b35fd85
commit
267658bb28
2 changed files with 100 additions and 0 deletions
36
src/lib/components/extra/ExtraContainer.svelte
Normal file
36
src/lib/components/extra/ExtraContainer.svelte
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import type { Snippet } from 'svelte'
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
children: Snippet
|
||||||
|
}
|
||||||
|
|
||||||
|
let { children }: Props = $props()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<section class="container">
|
||||||
|
{@render children()}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@use '$src/themes/spacing' as *;
|
||||||
|
@use '$src/themes/layout' as *;
|
||||||
|
|
||||||
|
.container {
|
||||||
|
background: var(--extra-purple-bg);
|
||||||
|
border-radius: $card-corner;
|
||||||
|
display: flex;
|
||||||
|
margin: $unit-4x auto 0;
|
||||||
|
flex-direction: column;
|
||||||
|
max-width: calc($grid-width + $unit-2x);
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
& > :global(*) {
|
||||||
|
border-bottom: 2px solid var(--background);
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
64
src/lib/components/extra/ExtraContainerItem.svelte
Normal file
64
src/lib/components/extra/ExtraContainerItem.svelte
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import type { Snippet } from 'svelte'
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
title: string
|
||||||
|
children: Snippet
|
||||||
|
}
|
||||||
|
|
||||||
|
let { title, children }: Props = $props()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="item">
|
||||||
|
<div class="content">
|
||||||
|
<header class="header">
|
||||||
|
<h3>{title}</h3>
|
||||||
|
</header>
|
||||||
|
{@render children()}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
@use '$src/themes/spacing' as *;
|
||||||
|
@use '$src/themes/typography' as *;
|
||||||
|
@use '$src/themes/mixins' as *;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: $unit;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: $unit-4x;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
& > h3 {
|
||||||
|
color: var(--extra-purple-text);
|
||||||
|
font-size: $font-small;
|
||||||
|
font-weight: $medium;
|
||||||
|
line-height: 1.2;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1.19fr 3fr;
|
||||||
|
gap: $unit-2x;
|
||||||
|
padding: $unit-2x $unit-2x $unit-2x;
|
||||||
|
|
||||||
|
@include breakpoint(phone) {
|
||||||
|
grid-template-columns: auto;
|
||||||
|
grid-template-rows: auto 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not(:first-child) {
|
||||||
|
border-top: 1px solid var(--extra-purple-card-bg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in a new issue