-
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.
- Loading branch information
1 parent
11449fe
commit f1ae3f2
Showing
18 changed files
with
105 additions
and
12,150 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# nuxt-layout-compositions | ||
A library with some useful layout compositions components | ||
|
||
This is v2. | ||
For v1 code, check v1 branch. |
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,24 +1,6 @@ | ||
.box-l | ||
padding: var(--gap, 1.5rem) | ||
border: var(--border-thin, .0625rem) solid var(--color-grey-light, #F0F0F0) | ||
border-radius: var(--border-radius, .5rem) | ||
color: var(--color-default, #595959) | ||
background-color: #FFF | ||
& * | ||
color: inherit | ||
.boxl | ||
padding: var(--boxl-gap, var(--lc-gap, 1.5rem)) | ||
|
||
&[compact] | ||
&[nogap]:not([nogap='false']) | ||
overflow: hidden | ||
padding: 0 | ||
|
||
&[transparent] | ||
background-color: transparent | ||
|
||
&[sharp] | ||
border-radius: 0 | ||
|
||
&[borderless] | ||
border-width: 0 | ||
border-color: transparent | ||
|
||
|
||
padding: 0 |
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,10 @@ | ||
.center-l | ||
.centerl | ||
box-sizing: content-box | ||
margin-inline: auto | ||
max-inline-size: var(--max-width, 65ch) | ||
padding-inline-start: var(--gap, 1.5rem) | ||
padding-inline-end: var(--gap, 1.5rem) | ||
max-inline-size: var(--centerl-max-width, var(--lc-max-width, 40rem)) | ||
padding-inline: var(--centerl-gap, var(--lc-gap, 1.5rem)) | ||
|
||
&[center-text] | ||
text-align: center | ||
|
||
&[intrinsic] | ||
&[intrinsic]:not([intrinsic='false']) | ||
display:flex | ||
flex-direction: column | ||
align-items: center |
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,24 +1,27 @@ | ||
.cluster-l | ||
.clusterl | ||
display: flex | ||
flex-wrap: wrap | ||
gap: var(--gap, 1.5rem) | ||
gap: var(--clusterl-gap, var(--lc-gap, 1.5rem)) | ||
justify-content: flex-start | ||
align-items: center | ||
|
||
&[center] | ||
&[center]:not([center='false']) | ||
justify-content: center | ||
|
||
&[end] | ||
&[end]:not([end='false']) | ||
justify-content: flex-end | ||
|
||
&[between] | ||
&[between]:not([between='false']) | ||
justify-content: space-between | ||
|
||
&[around] | ||
&[around]:not([around='false']) | ||
justify-content: space-around | ||
|
||
&[narrow] | ||
gap: var(--s0, 1rem) | ||
&[evenly]:not([evenly='false']) | ||
justify-content: space-evenly | ||
|
||
&[narrow]:not([narrow='false']) | ||
gap: calc(var(--clusterl-gap, var(--lc-gap, 1.5rem)) * 0.666666667) // ~1rem | ||
|
||
&[wide] | ||
gap: calc(var(--gap, 1.5rem) * 2) | ||
&[wide]:not([wide='false']) | ||
gap: calc(var(--clusterl-gap, var(--lc-gap, 1.5rem)) * 2) // 2rem |
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,10 +1,5 @@ | ||
.modal | ||
.modall | ||
position: fixed | ||
inset-block-start: 50% | ||
inset-inline-start: 50% | ||
transform: translate(-50%, -50%) | ||
|
||
// .modal.contain | ||
// overflow: auto | ||
// max-inline-size: calc(100% - (var(--gap, 1.5rem) * 2)) | ||
// max-block-size: calc(100% - (var(--gap, 1.5rem) * 2)) | ||
transform: translate(-50%, -50%) |
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
.sidebarl | ||
display: flex | ||
flex-wrap: wrap | ||
gap: var(--sidebar-gap, 0) | ||
|
||
&:not([right]) > :first-child | ||
flex-basis: var(--sidebar-column-size, 0) | ||
flex-grow: 1 | ||
|
||
&:not([right]) > :last-child | ||
flex-basis: 0 | ||
flex-grow: 999 | ||
min-inline-size: var(--sidebar-content-size, 50%) | ||
|
||
&[right] > :last-child | ||
flex-basis: var(--sidebar-column-size, 0) | ||
flex-grow: 1 | ||
|
||
&[right] > :first-child | ||
flex-basis: 0 | ||
flex-grow: 999 | ||
min-inline-size: var(--sidebar-content-size, 50%) |
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,20 +1,20 @@ | ||
.stack-l | ||
.stackl | ||
display: flex | ||
flex-direction: column | ||
justify-content: flex-start | ||
|
||
&[recursive] > * | ||
&[recursive]:not([recursive='false']) > * | ||
margin-block: 0 | ||
|
||
& > * + *, | ||
&[recursive] * + * | ||
margin-block-start: var(--gap, 1.5rem) | ||
&[recursive]:not([recursive='false']) * + * | ||
margin-block-start: var(--stackl-gap, var(--lc-gap, 1.5rem)) | ||
|
||
&[squeezed] > * + * | ||
&[compact]:not([compact='false']) > * + | ||
margin-block-start: calc(var(--stackl-gap, var(--lc-gap, 1.5rem)) / 2) | ||
|
||
&[squeezed]:not([squeezed='false']) > * + * | ||
margin-block-start: 0 | ||
|
||
&[compact] > * + * | ||
margin-block-start: calc(var(--gap, 1.5rem) / 2) | ||
|
||
&[wide] > * + * | ||
margin-block-start: calc(var(--gap, 1.5rem) * 3) | ||
&[wide]:not([wide='false']) > * + * | ||
margin-block-start: calc(var(--stackl-gap, var(--lc-gap, 1.5rem)) * 3) |
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,30 @@ | ||
<script lang='ts' setup> | ||
/** | ||
* One Header-Body-Footer (HBF) | ||
* layout to rule them all | ||
* @name 'BasicLayout' | ||
* @version 1.0.0 | ||
*/ | ||
</script> | ||
|
||
<template> | ||
<div class='hbf-layout'> | ||
<header> | ||
<slot name='header' /> | ||
</header> | ||
<main> | ||
<slot /> | ||
</main> | ||
<footer> | ||
<slot name='footer' /> | ||
</footer> | ||
</div> | ||
</template> | ||
|
||
<style lang="stylus" scoped> | ||
.hbf-layout | ||
display: grid | ||
grid-template-rows: var(--lc-header-height, min-content) auto var(--lc-footer-height, min-content) | ||
gap: var(--lc-gap, 1.5rem) 0 | ||
min-block-size: 100vh | ||
</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
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
Oops, something went wrong.