diff --git a/frontend/scss/app.scss b/frontend/scss/app.scss index c9e7c41..5f1ce76 100644 --- a/frontend/scss/app.scss +++ b/frontend/scss/app.scss @@ -2,86 +2,8 @@ @tailwind components; @tailwind utilities; -/* purgecss start ignore */ -.sidebar { - position: fixed; - overflow-y: scroll; - top: 0; - background: white; - z-index: 2000; - width: 0; - box-shadow: 0 1rem 3rem rgba(0,0,0,.175); - - &.open { - background-color: rgba(255, 255, 255, 100%); - display: block; - height: 100vh; - right: 0; - top: 0; - width: 375px; - z-index: 40000; - } - - &.slide-in { - transition-duration: 75ms; - transition-property: all; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-timing-function: cubic-bezier(0, 0, 0.2, 1); - } - - &.from-right { - right: -24rem; - - &.open { - right: 0; - } - } - - &.from-left { - left: -24rem; - - &.open { - left: 0; - } - } - - &-overlay { - display: none; - - &.show { - background-color: rgba(0, 0, 0, 0.2); - content: ''; - display: block; - height: 100%; - left: 0; - position: fixed; - top: 0; - width: 100%; - z-index: 1025; - } - } - - &-close { - border-radius: 100%; - width: 27.5px; - - &:focus { - background: white !important; - } - } - - &-footer { - position: fixed; - margin: 0 -8px -4px; - width: 374px; - bottom: 0; - } - - &-header { - position: fixed; - width: 375px; - top: 0; - z-index: 1; - } -} -/* purgecss end ignore */ +@import 'components/headlines'; +@import 'components/sidebar'; +@import 'components/btns'; +@import 'components/links'; +@import 'components/input'; diff --git a/frontend/scss/components/_btns.scss b/frontend/scss/components/_btns.scss new file mode 100644 index 0000000..c696504 --- /dev/null +++ b/frontend/scss/components/_btns.scss @@ -0,0 +1,23 @@ +.btn { + @apply rounded-md px-3 py-2 text-sm font-semibold text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 cursor-pointer text-center; + + &-primary { + @apply bg-primary-600 hover:bg-primary-500 focus-visible:outline-primary-600; + } + + &-dark { + @apply bg-primary-900 hover:bg-primary-950 focus-visible:outline-primary-950; + } + + &-attention { + @apply bg-[#f43f5e] hover:bg-[#ff0000] focus-visible:outline-[#ff0000]; + } + + &-alert { + @apply bg-[#ff0000] hover:bg-[#ff0000] focus-visible:outline-[#ff0000]; + } + + &-fw { + @apply w-28; + } +} diff --git a/frontend/scss/components/_headlines.scss b/frontend/scss/components/_headlines.scss new file mode 100644 index 0000000..a547fab --- /dev/null +++ b/frontend/scss/components/_headlines.scss @@ -0,0 +1,3 @@ +.h1 { + @apply text-center text-3xl uppercase tracking-wide font-bold text-primary-900; +} diff --git a/frontend/scss/components/_input.scss b/frontend/scss/components/_input.scss new file mode 100644 index 0000000..453fd78 --- /dev/null +++ b/frontend/scss/components/_input.scss @@ -0,0 +1,3 @@ +.input { + @apply relative block w-full border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:z-10 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6; +} diff --git a/frontend/scss/components/_links.scss b/frontend/scss/components/_links.scss new file mode 100644 index 0000000..d03040d --- /dev/null +++ b/frontend/scss/components/_links.scss @@ -0,0 +1,9 @@ +.link { + &-primary { + @apply text-primary-600 hover:text-primary-900 underline; + } + + &-dark { + @apply text-primary-900 hover:text-primary-950 underline; + } +} diff --git a/frontend/scss/components/_sidebar.scss b/frontend/scss/components/_sidebar.scss new file mode 100644 index 0000000..78597ac --- /dev/null +++ b/frontend/scss/components/_sidebar.scss @@ -0,0 +1,83 @@ +/* purgecss start ignore */ +.sidebar { + position: fixed; + overflow-y: scroll; + top: 0; + background: white; + z-index: 2000; + width: 0; + box-shadow: 0 1rem 3rem rgba(0,0,0,.175); + + &.open { + background-color: rgba(255, 255, 255, 100%); + display: block; + height: 100vh; + right: 0; + top: 0; + width: 375px; + z-index: 40000; + } + + &.slide-in { + transition-duration: 75ms; + transition-property: all; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-timing-function: cubic-bezier(0, 0, 0.2, 1); + } + + &.from-right { + right: -24rem; + + &.open { + right: 0; + } + } + + &.from-left { + left: -24rem; + + &.open { + left: 0; + } + } + + &-overlay { + display: none; + + &.show { + background-color: rgba(0, 0, 0, 0.2); + content: ''; + display: block; + height: 100%; + left: 0; + position: fixed; + top: 0; + width: 100%; + z-index: 1025; + } + } + + &-close { + border-radius: 100%; + width: 27.5px; + + &:focus { + background: white !important; + } + } + + &-footer { + position: fixed; + margin: 0 -8px -4px; + width: 374px; + bottom: 0; + } + + &-header { + position: fixed; + width: 375px; + top: 0; + z-index: 1; + } +} +/* purgecss end ignore */ diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index 8391a71..b206925 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -4,7 +4,7 @@ {% block content %}