add base styles and scripts
This commit is contained in:
111
web/app/themes/badegg/resources/styles/components/_button.scss
Normal file
111
web/app/themes/badegg/resources/styles/components/_button.scss
Normal file
@@ -0,0 +1,111 @@
|
||||
button {
|
||||
&%block,
|
||||
&.block {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
font-size: 1em;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
button,
|
||||
input[type="submit"] {
|
||||
&.btn {
|
||||
appearance: none;
|
||||
}
|
||||
}
|
||||
|
||||
%btn,
|
||||
.btn {
|
||||
display: inline-block;
|
||||
padding: 0.75em 1.5em;
|
||||
border: 0.125em solid $black;
|
||||
border-radius: 2em;
|
||||
background-color: $black;
|
||||
color: $white;
|
||||
font-family: $font;
|
||||
font-weight: 700;
|
||||
font-size: 1em;
|
||||
text-transform: lowercase;
|
||||
text-decoration: none;
|
||||
white-space: normal;
|
||||
cursor: pointer;
|
||||
transition: 300ms ease all;
|
||||
|
||||
.knockout & {
|
||||
background-color: $white;
|
||||
border-color: $white;
|
||||
color: currentcolor;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: $white;
|
||||
text-decoration: none;
|
||||
background-color: rgba($black, 0.5);
|
||||
border-color: rgba($black, 0.5);
|
||||
|
||||
.knockout & {
|
||||
background-color: rgba($white, 0.5);
|
||||
border-color: rgba($white, 0.5);
|
||||
color: currentcolor;
|
||||
}
|
||||
}
|
||||
|
||||
&.outline {
|
||||
border-color: $black;
|
||||
background-color: transparent;
|
||||
color: $black;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $black;
|
||||
color: $white;
|
||||
}
|
||||
|
||||
.knockout & {
|
||||
@media screen {
|
||||
border-color: $white;
|
||||
color: $white;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $white;
|
||||
color: $black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.wide {
|
||||
padding-right: 3em;
|
||||
padding-left: 3em;
|
||||
}
|
||||
|
||||
&.thin {
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
&.full {
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding-right: 0.625em;
|
||||
padding-left: 0.625em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.small { font-size: 1em; }
|
||||
&.smaller { font-size: 0.875em; }
|
||||
&.big { font-size: 1.25em; }
|
||||
&.bigger { font-size: 1.5em; }
|
||||
}
|
||||
|
||||
.btn-wrap {
|
||||
margin: 1.5em -0.25em -0.25em;
|
||||
|
||||
input[type=submit],
|
||||
.btn {
|
||||
margin: 0.25em;
|
||||
}
|
||||
}
|
||||
13
web/app/themes/badegg/resources/styles/components/_card.scss
Normal file
13
web/app/themes/badegg/resources/styles/components/_card.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
.card {
|
||||
position: relative;
|
||||
margin: 0.5em;
|
||||
flex: 0 0 calc(100% - 1em);
|
||||
|
||||
&-wrap {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: -0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
331
web/app/themes/badegg/resources/styles/components/_forms.scss
Normal file
331
web/app/themes/badegg/resources/styles/components/_forms.scss
Normal file
@@ -0,0 +1,331 @@
|
||||
select,
|
||||
input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
|
||||
textarea {
|
||||
color: $grey-dark;
|
||||
background: white;
|
||||
font-weight: 400;
|
||||
font-size: 1em;
|
||||
font-family: $font;
|
||||
width: 100%;
|
||||
padding: 0.5em 1em;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
border: 1px solid $grey;
|
||||
transition: all 300ms ease;
|
||||
outline-color: $primary-lighter;
|
||||
|
||||
&::placeholder {
|
||||
color: $grey-lighter;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: $primary-light;
|
||||
color: $primary-lighter;
|
||||
}
|
||||
|
||||
.hfont & {
|
||||
font-weight: bold;
|
||||
font-family: $hfont;
|
||||
color: $primary;
|
||||
|
||||
&:focus {
|
||||
color: $primary-lighter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: auto;
|
||||
|
||||
&:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
select {
|
||||
width: 100%;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
.field-wrap {
|
||||
flex: 1 1 calc(100% - 1em);
|
||||
margin: 0.5em;
|
||||
transition: all 300ms ease;
|
||||
|
||||
span.label {
|
||||
display: block;
|
||||
font-size: 0.75em;
|
||||
margin: 0 0 0.25em;
|
||||
}
|
||||
|
||||
label {
|
||||
flex: 0 0 100%;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
order: -1;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
textarea,
|
||||
input {
|
||||
flex: 1 1 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.has-icon {
|
||||
position: relative;
|
||||
|
||||
i {
|
||||
position: absolute;
|
||||
top: 0.45em;
|
||||
left: 0.5em;
|
||||
z-index: 1;
|
||||
color: $quaternary-lighter;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
input,
|
||||
select {
|
||||
padding-left: 2.5em !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* stylelint-disable selector-class-pattern */
|
||||
.mce_inline_error {
|
||||
flex: 0 0 100%;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-family: $font;
|
||||
}
|
||||
/* stylelint-enable selector-class-pattern */
|
||||
|
||||
@media (min-width: $screen-sm) {
|
||||
&.half {
|
||||
flex: 0 0 calc(50% - 1em);
|
||||
max-width: calc(50% - 1em);
|
||||
width: calc(50% - 1em);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select-wrap {
|
||||
.has-icon {
|
||||
select {
|
||||
padding-right: 1.5em;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: '\f0d7';
|
||||
font-family: 'Font Awesome 6 Free', serif;
|
||||
font-weight: 900;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0.375em;
|
||||
right: 0.75em;
|
||||
color: $grey-light;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section-form {
|
||||
container-name: SectionForm;
|
||||
container-type: inline-size;
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: -0.5em;
|
||||
position: relative;
|
||||
|
||||
div[class^="eacf7-form-"] {
|
||||
flex: auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.wpcf7 {
|
||||
.screen-reader-response {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&-spinner {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: calc(50% - 12px);
|
||||
left: calc(50% - 12px);
|
||||
}
|
||||
|
||||
&-form-control-wrap {
|
||||
display: block;
|
||||
}
|
||||
|
||||
&-not-valid-tip {
|
||||
position: absolute;
|
||||
right: -0.5em;
|
||||
top: -3.125em;
|
||||
background: $error;
|
||||
color: $white;
|
||||
padding: 0.5em 1em;
|
||||
border-radius: 0.5em;
|
||||
font-weight: 700;
|
||||
font-size: 0.75em;
|
||||
transition: all 300ms ease;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 1em;
|
||||
bottom: -0.25em;
|
||||
display: block;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
background: $error;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
opacity: 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
&-response-output {
|
||||
display: block;
|
||||
margin: 2em auto 0;
|
||||
flex: 1 1 100%;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-family: $font;
|
||||
font-weight: 700;
|
||||
font-size: 0.875em;
|
||||
padding: 0.5em 1em;
|
||||
border-radius: 0.5em;
|
||||
border-width: 0;
|
||||
|
||||
@extend .white;
|
||||
@extend .bg-black;
|
||||
@extend .knockout;
|
||||
}
|
||||
|
||||
&-display-none {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&-checkbox {
|
||||
label {
|
||||
display: block;
|
||||
padding: 0 0 0 1.75em;
|
||||
margin: 0;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
appearance: none;
|
||||
display: block;
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
border: 0.125em solid $black;
|
||||
background: transparent;
|
||||
color: currentcolor;
|
||||
|
||||
&::before {
|
||||
content: "\f00c";
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0.125em;
|
||||
font-family: "Font Awesome 6 Free", serif;
|
||||
font-weight: 900;
|
||||
opacity: 0;
|
||||
transition: all 300ms ease;
|
||||
}
|
||||
|
||||
&:checked {
|
||||
&::before {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
@container SectionForm (min-width: #{$screen-sm}) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
&-text {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
button,
|
||||
.btn,
|
||||
input[type="submit"] {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wpcf7-list-item {
|
||||
margin: 0;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.submitting {
|
||||
.field-wrap:not(.form-footer) {
|
||||
opacity: 0.1;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
.form-footer-text {
|
||||
opacity: 0.1;
|
||||
}
|
||||
|
||||
.form-footer-button input {
|
||||
opacity: 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.sent {
|
||||
.wpcf7-response-output {
|
||||
@extend .bg-success;
|
||||
}
|
||||
}
|
||||
|
||||
&.invalid {
|
||||
.wpcf7-response-output {
|
||||
@extend .bg-error;
|
||||
}
|
||||
}
|
||||
|
||||
.ajax-loader {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: calc(50% - 12px);
|
||||
right: calc(50% - 12px);
|
||||
display: block;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.knockout {
|
||||
form {
|
||||
.wpcf7 {
|
||||
&-checkbox {
|
||||
input[type="checkbox"] {
|
||||
border-color: $white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user