Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/tailwind #27

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
6 changes: 6 additions & 0 deletions building_dialouge_webapp/static/css/base/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import '../base/variables';

body {
font-family: Roboto, system-ui, 'Open Sans', 'Helvetica Neue', sans-serif;
color: $body-color;
}
52 changes: 52 additions & 0 deletions building_dialouge_webapp/static/css/base/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Primary palette
$blue-050: #eff7ff;
$blue-100: #dcecfd;
$blue-200: #c1dffc;
$blue-300: #96ccfa;
$blue-400: #65aff5;
$blue-500: #418ff0;
$blue-600: #2a71e5;
$blue-700: #235dd2;
$blue-800: #224bab;
$blue-900: #214387;
$blue-950: #192a52;

/* Secondary & Neutral palette */
$grey-050: #fafafa;
$grey-100: #f5f5f5;
$grey-200: #e5e5e5;
$grey-300: #d4d4d4;
$grey-400: #a3a3a3;
$grey-500: #737373;
$grey-600: #525252;
$grey-700: #404040;
$grey-800: #262626;
$grey-900: #171717;
$grey-950: #0a0a0a;

$primary-color: $grey-900;
$secondary-color: $blue-800;
$body-color: $grey-900;
$color-white: #ffffff;

// Breakpoints
$breakpoint-md: 768px;
$breakpoint-lg: 992px;
$breakpoint-xl: 1200px;
$breakpoint-2xl: 1400px;
$breakpoint-3xl: 1600px;

// Typography
$font-size-2xl: 2rem;
$font-size-xl: 1.5rem;
$font-size-lg: 1.25rem;
$font-size-md: 1rem;
$font-size-sm: 0.875rem;
$font-size-xs: 0.75rem;

$font-weight-bold: 600;
$font-weight-regular: 400;
$font-weight-light: 300;

// Border
$border-color: $grey-400;
44 changes: 44 additions & 0 deletions building_dialouge_webapp/static/css/components/_buttons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@import '../base/variables';

.btn {
border-radius: 100px !important;

&.btn-primary {
background-color: $blue-600;
color: $color-white;
border: 1px solid $blue-600;

&:hover,
&:active {
background-color: $blue-800;
color: $color-white;
border: 1px solid $blue-800;
}
}

&.btn-secondary {
background-color: $grey-800;
color: $color-white;
border: 1px solid $grey-800;

&:hover,
&:active {
background-color: $grey-950;
color: $color-white;
border: 1px solid $grey-950;
}
}

&.btn-light {
background-color: $blue-050;
color: $blue-900;
border: 1px solid $blue-050;

&:hover,
&:active {
background-color: $blue-100;
color: $blue-800;
border: 1px solid $blue-100;
}
}
}
25 changes: 25 additions & 0 deletions building_dialouge_webapp/static/css/components/_forms.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@import '../base/variables';

.input-unit {
display: flex;
align-items: center;

span {
padding: 0 1rem;
}
}

.form-control,
.form-select {
&--sm {
max-width:12.5rem;
}

&--md {
max-width: 24rem;
}
}

fieldset legend {
font-size: $font-size-md;
}
42 changes: 42 additions & 0 deletions building_dialouge_webapp/static/css/components/_nav.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@import '../base/variables';

@mixin nav-links {
color: $body-color;
text-decoration: none;

&:hover,
&:active {
color: $grey-500;
}
}

nav.navbar {
.navbar-brand {
font-size: $font-size-xl;
font-weight: $font-weight-bold;
}

.navbar-collapse {
flex-grow: 0;
}

a {
@include nav-links;
}
}

footer {
z-index: 99;

.footer {
ul {
display: flex;
list-style: none;
margin-bottom: 0;
}

a {
@include nav-links;
}
}
}
154 changes: 154 additions & 0 deletions building_dialouge_webapp/static/css/layouts/_questions.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
@import '../base/variables';

@mixin sidebar-items {
a {
color: $grey-400;
pointer-events: none;
}

&.visited a {
color: $body-color;
pointer-events: auto;
}

&.active a {
color: $body-color;
font-weight: $font-weight-bold;
pointer-events: auto;
}
}

@mixin step-item($step-item-padding) {
display: flex;
flex-direction: row;

.step-container {
flex: 1;
display: flex;
justify-content: center;
}

.main {
background-color: $color-white;
padding: $step-item-padding;
flex: 1;
max-width: 60rem;
}

.help {
background-color: $grey-100;
height: auto;
width: 28rem;
font-size: $font-size-sm;
display: none;

@media screen and (min-width: $breakpoint-md) {
display: block;
width: 20rem;
}

@media screen and (min-width: $breakpoint-2xl) {
width: 32rem;
}

@media screen and (min-width: $breakpoint-3xl) {
width: 40rem;
}
}
}

main .sidebar {
width: 18rem;
height: 100%;
background-color: $color-white;
overflow-y: auto;
display: none;

@media screen and (min-width: $breakpoint-lg) {
display: block;
}

a {
color: $body-color;
text-decoration: none;

&:hover,
&:active {
color: $grey-500;
}
}

&__category {
font-size: $font-size-lg;
font-weight: $font-weight-bold;
}

.sidebar-nav {
ul {
list-style: none;
}

ul li {
padding-bottom: 0.5rem;
}

&__category {
font-weight: $font-weight-bold;
text-decoration: underline;
@include sidebar-items;
}

&__step {
@include sidebar-items;
}
}
}

main .step-title {
@include step-item(4rem 4rem 1.5rem);

h1 {
font-size: $font-size-2xl;
}
}

main .step-text {
@include step-item(0 4rem 1.5rem);
}

main .step-question {
@include step-item(0 4rem 1.5rem);

.help {
padding: 0 2rem 1.5rem;
height: auto;

span {
font-weight: $font-weight-bold;
}
}
}

.help-background {
position: absolute;
top:0;
right:0;
width: 28rem;
background-color: $grey-100;
height: 100%;
z-index: -1;
display: none;

@media screen and (min-width: $breakpoint-md) {
display: block;
width: 20rem;
}

@media screen and (min-width: $breakpoint-2xl) {
width: 32rem;
}

@media screen and (min-width: $breakpoint-3xl) {
width: 40rem;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/* These styles are generated from project.scss. */
@import 'base/variables';
@import 'base/base';
@import 'components/buttons';
@import 'components/forms';
@import 'components/nav';
@import 'layouts/questions';

.alert-debug {
color: black;
Expand Down
Loading
Loading