abdullahtarawneh.com/assets/scss/base/components.scss

219 lines
4 KiB
SCSS

a:link {color: #06f;}
a:visited {color: rgb(147, 85, 197)}
.button, .button:link, .button:visited {
width: 100%;
@media (min-width: 33.75em) {
width: max-content;
}
font-size: clamp(1em,2vw,1em);
padding: 1em;
display: flex;
justify-content: center;
align-items: center;
text-decoration: none;
border-radius: 0.25em;
font-weight: 700;
i {
margin-right: 1em;
}
}
.button.primary {
background: #06f;
color: white;
}
.button.secondary {
background: white;
border: 2px solid #06f;
color: #06f;
}
@mixin pullquote {
content: attr(data-pullquote);
font-size: 1em;
line-height: 1.2;
display: flex;
font-family: serif;
color: #555;
padding: 1em;
font-size: 1.25em;
}
.has-pullquote{
&.before:before {
@include pullquote;
margin-bottom: 1rem;
}
&.after:after {
@include pullquote;
margin-top: 1rem;
}
}
#praise {
.title:before {
content: 'praise';
}
.testimonials {
display: flex;
flex-flow: row wrap;
gap: 2em;
justify-content: center;
}
.testimonial {
display: grid;
grid-template-areas: "b b" "a n";
grid-template-columns: auto 1fr;
grid-template-rows: auto auto;
gap: 1em;
width: 18em;
}
.avatar {
grid-area: a;
margin-left: 1em;
width: 4em;
height: 4em;
border-radius: 100em;
background: #212121;
}
.name {
grid-area: n;
align-self: center;
}
.bubble {
grid-area: b;
background: #212121;
color: white;
padding: 0.5em;
border-radius: 0.5em;
position: relative;
grid-column: span 2;
min-height: 80px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
line-height: 1.4;
width: 100%;
}
.bubble:after {
content: '';
position: absolute;
width: 0;
height: 0;
border: 0.5em solid transparent;
border-top-color: #212121;
bottom: -1em;
left:2.5em;
}
}
#intro {
line-height: 1.4;
background-color: rgb(15, 35, 65);
color: white;
background-image: url('/images/puzzlehead.svg');
background-size: contain;
background-position-x: center;
background-position-y: bottom;
background-repeat: no-repeat;
min-height: max-content;
max-height: calc(100vh - 9em);
@media (min-width: 960px) {
max-height: calc(100vh - 6em);
}
padding: 0;
.container {
position: relative;
height: calc(100vh - 9em);
@media (min-width: 960px) {
height: calc(100vh - 6em);
}
padding: 1em;
}
.tagline {
font-size: 1.5em;
font-weight: 700;
em {color: #0f6;font-style: italic;}
margin-bottom: 1rem;
}
.blurb {
margin-bottom: 1.75em;
max-width: 30ch;
font-size: 1.1em;
}
// TODO: matrix of weird sizes for intro breakpoints
// - landscape se
@media (max-width: 30em) and (max-height: 20em) {
.blurb {
max-width: 40ch;
}
}
// - tall phones in multitasking mode
// END: matrix of weird sizes for breakpoints
@media (min-height: 33.75em) {
.blurb {font-size: 1.1em}
}
@media (min-height: 37.5em) {
.container {
padding: 2em 1em;
}
}
@media (min-height: 40em) {
.container {
padding: 3em 1em;
}
.tagline {
font-size: 1.8em;
margin-bottom: 1.5rem;
}
}
@media (max-width: 22em) {
.tagline br {display: none;}
}
@media (min-width: 34em) {
.button {
i {margin-right: 1rem !important;}
span {display: block !important;}
padding-left: 2em;
padding-right: 2em;
bottom: 1.5em !important;
right: 1.5em !important;
}
}
@media (min-width: 22em) and (min-height: 46em) {
.blurb {font-size: 1.3em;}
}
@media (min-width: 25em) and (min-height: 45em) {
.tagline {
font-size: 2.5em;
}
.blurb {font-size: 1.36em;}
}
@media (min-width: 37.5em) and (min-height: 30em) {
.container {
padding-left: 1.5em;
}
}
@media (min-width: 40em) and (min-height: 50em) {
.blurb {
font-size: 1.8em;
}
}
.button {
background: #06f;
color: white;
width: max-content;
i {margin: 0;}
span {display: none;}
border-radius: 100em;
position: absolute;
bottom: 1em;
right: 1em;
box-shadow: 0 1px 1px rgba(0,0,0,0.11),
0 2px 2px rgba(0,0,0,0.11),
0 4px 4px rgba(0,0,0,0.11),
0 6px 8px rgba(0,0,0,0.11),
0 8px 16px rgba(0,0,0,0.11);
}
}