Create project website with near-complete home page

This commit is contained in:
Keavon Chambers
2022-02-17 02:44:02 -08:00
parent 4757e8b8cd
commit 3f79df7314
13 changed files with 1555 additions and 0 deletions
+441
View File
@@ -0,0 +1,441 @@
:root {
--color-walnut: #473a3a;
--color-manilla: #f1decd;
--color-mustard: #deba92;
--color-crimson: #803847;
--color-navy: #16323f;
--color-fog: #eeeeee;
--color-black: #000000;
--max-width: 1600px;
--max-width-plus-padding: calc(var(--max-width) + 40px * 2);
--variable-px: Min(1px, 0.15vw);
}
// Global element styles
html,
body {
width: 100%;
height: 100%;
margin: 0;
background: var(--color-manilla);
font-family: "Inter", sans-serif;
line-height: 1.5;
font-weight: 500;
font-size: 18px;
color: var(--color-navy);
}
a {
color: var(--color-crimson);
}
h1,
h2,
h3,
h4 {
margin: 0;
display: inline-block;
}
h1 {
font-family: "Bona Nova", serif;
font-feature-settings: "lnum";
line-height: 1.25;
font-weight: 700;
font-size: 60px;
~ p {
font-size: 22px;
}
}
h2 {
font-family: "Bona Nova", serif;
font-feature-settings: "lnum";
line-height: 1.25;
font-weight: 700;
font-size: 40px;
}
h3 {
font-size: 24px;
font-weight: 800;
text-transform: uppercase;
span {
white-space: pre;
}
~ .divider {
margin-top: 20px;
}
+ .divider + .diptych,
+ .divider + .triptych {
margin-top: 40px;
}
}
h4 {
font-family: "Bona Nova", serif;
font-feature-settings: "lnum";
line-height: 1.25;
font-size: 32px;
font-weight: 400;
}
p {
margin: 0;
hyphens: auto;
text-align: justify;
}
h1 ~ p,
h2 ~ p,
h4 ~ p,
h4 ~ img,
p + .link {
margin-top: 20px;
}
p + p {
margin-top: calc(1em * 1.5);
}
.link {
display: inline-block;
font-size: 24px;
font-weight: 800;
text-decoration: none;
color: var(--color-crimson);
white-space: nowrap;
&:not(.not-uppercase) {
text-transform: uppercase;
}
}
.button.button.button.button {
color: var(--color-crimson);
display: inline-block;
border: 2px solid currentColor;
height: 48px;
line-height: calc(48px - 2 * 2px);
font-size: 24px;
padding: 0 24px;
box-sizing: border-box;
text-decoration: none;
font-weight: 800;
white-space: nowrap;
}
.arrow::after {
content: " »";
font-family: "Inter", sans-serif;
}
.divider {
margin: 0 32px;
width: calc(100% - 32px * 2);
height: 2px;
background: currentColor;
position: relative;
&::before {
left: -40px;
border-width: 0 0 2px 40px;
}
&::after {
right: -40px;
border-width: 0 40px 2px 0;
}
&::before,
&::after {
content: "";
display: block;
width: 0;
height: 0;
position: absolute;
border-color: transparent transparent currentColor transparent;
border-style: solid;
}
}
.section-row {
display: flex;
align-items: stretch;
gap: calc(40 * var(--variable-px)) calc(80 * var(--variable-px));
&.right {
flex-direction: row-reverse;
}
@media screen and (max-width: 800px) {
&.section-row {
flex-direction: column;
align-items: center;
}
}
.graphic {
max-width: 280px;
flex: 1 1 100%;
display: flex;
img {
display: block;
width: 100%;
height: auto;
}
}
.section {
display: flex;
flex-direction: column;
align-items: flex-start;
}
}
.feature-box {
padding: calc(80 * var(--variable-px));
background-image: url("https://static.graphite.rs/textures/noise.png");
background-blend-mode: soft-light;
background-position: center;
&.feature-box.feature-box {
max-width: unset;
}
@media screen and (max-width: 1000px) {
&.feature-box.feature-box {
margin-left: -40px;
margin-right: -40px;
}
}
.box {
max-width: var(--max-width);
margin: 0 auto;
.section h4 + .graphic {
margin-top: 20px;
img {
margin: auto;
}
}
}
}
.diptych,
.triptych {
display: flex;
flex-wrap: wrap;
gap: calc(80 * var(--variable-px));
.section {
flex: 1 1 0;
}
&.diptych .section {
min-width: 320px;
}
&.triptych .section {
min-width: 280px;
}
img[alt=""]{
display: block;
&::after {
content: "";
display: block;
width: 100%;
height: 240px;
background: var(--color-crimson);
}
}
+ div {
margin-top: calc(80 * var(--variable-px));
}
}
// Page content
.page {
box-sizing: border-box;
overflow: hidden;
min-width: 600px;
header {
padding: 0 40px;
color: var(--color-walnut);
// max-width + (80px + 32px) * 2
@media screen and (max-width: 1824px) {
.divider {
&.ripple {
width: calc(100% + (40px * 2));
margin-left: -40px;
margin-right: -40px;
}
&:not(.ripple) {
display: none;
}
}
}
nav {
margin: auto;
max-width: var(--max-width);
.row {
display: flex;
justify-content: space-between;
padding: 30px 0;
gap: 80px;
.left,
.right {
display: flex;
align-items: center;
gap: 40px;
a {
color: inherit;
font-family: "Bona Nova", serif;
font-feature-settings: "lnum";
line-height: 1.25;
font-weight: 700;
text-decoration: none;
--height: 60px;
--button-padding: 24px;
--font-size: 36px;
font-size: var(--font-size);
&.button {
height: var(--height);
padding-left: var(--button-padding);
padding-right: var(--button-padding);
line-height: calc(var(--height) - 2 * 2px);
font-size: var(--font-size);
&::after {
content: "»";
margin-left: 8px
}
}
svg {
fill: currentColor;
display: block;
width: var(--height);
height: var(--height);
}
}
}
@media screen and (max-width: 960px) {
gap: 60px;
.left,
.right {
gap: 30px;
a {
--height: 50px;
--button-padding: 16px;
--font-size: 26px;
}
}
}
@media screen and (max-width: 760px) {
gap: 40px;
.left,
.right {
gap: 20px;
a {
--height: 40px;
--button-padding: 16px;
--font-size: 22px;
}
}
}
}
}
.divider {
background: none;
&.ripple {
display: block;
fill: none;
stroke: currentColor;
--ripple-height: 16px;
height: var(--ripple-height);
margin-top: calc(-1 * var(--ripple-height) + 2px);
margin-bottom: -2px;
stroke-width: 2px;
&::before,
&::after {
content: none;
}
}
}
}
main {
padding: 0 40px;
.content {
padding: calc(120 * var(--variable-px)) 0;
section {
max-width: var(--max-width);
margin: auto;
// Puts the content in front of the hexagon decoration
position: relative;
z-index: 1;
~ section {
margin-top: calc(80 * var(--variable-px));
}
}
}
}
footer {
display: flex;
flex-direction: column;
align-items: center;
gap: 40px;
padding: 40px;
padding-top: 0;
nav {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px 40px;
@media screen and (max-width: 800px) {
max-width: 500px;
}
}
span {
text-align: center;
}
}
}
+327
View File
@@ -0,0 +1,327 @@
#logo {
display: flex;
svg {
display: block;
height: auto;
}
}
#quick-links {
margin-bottom: calc(120 * var(--variable-px));
display: flex;
gap: 20px;
flex-wrap: wrap;
}
.pencil-texture {
position: absolute;
--remaining-width-to-full: calc(var(--max-width-plus-padding) - min(calc(100vw - 100px), var(--max-width-plus-padding)));
left: Max(calc(-1 * var(--remaining-width-to-full)), -40px);
width: 100px;
mix-blend-mode: multiply;
}
.hexagons {
max-width: var(--max-width);
margin: auto;
position: relative;
bottom: calc(-80 * var(--variable-px));
div {
position: absolute;
top: 0;
right: 10%;
svg {
position: absolute;
margin: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
transform: translate(-50%) rotate(347deg);
opacity: 0.25;
width: Max(1000px, Min(1400px, calc(100vw * 1400 / 1920)));
height: auto;
polygon {
fill: none;
stroke: gray;
stroke-width: 1px;
}
}
}
}
#screenshots {
transform: translate(0);
.carousel {
display: flex;
white-space: nowrap;
touch-action: pan-y pinch-zoom;
cursor: grab;
img {
position: relative;
display: inline-block;
width: 100%;
flex: 0 0 auto;
padding: 0 20px;
&:first-child {
margin-left: -20px;
}
&:last-child {
margin-right: -20px;
}
}
}
&:not(.dragging) .carousel img {
transition: transform 500ms;
}
.carousel:not(.torn) {
overflow: hidden;
}
.carousel.torn {
position: fixed;
top: 0;
z-index: -1;
// Torn edge mask
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-size: contain;
mask-size: contain;
&.left {
padding-left: 120px;
margin-left: -120px;
-webkit-mask-image: url("https://static.graphite.rs/textures/torn-edge-left.png");
mask-image: url("https://static.graphite.rs/textures/torn-edge-left.png");
-webkit-mask-position: top left;
mask-position: top left;
}
&.right {
padding-right: 120px;
margin-right: -120px;
-webkit-mask-image: url("https://static.graphite.rs/textures/torn-edge-right.png");
mask-image: url("https://static.graphite.rs/textures/torn-edge-right.png");
-webkit-mask-position: top right;
mask-position: top right;
}
}
.screenshot-details {
display: flex;
margin: 20px 0;
gap: 20px 40px;
@media screen and (max-width: 800px) {
flex-wrap: wrap;
justify-content: center;
}
.carousel-controls {
display: flex;
align-items: center;
button {
outline: none;
background: none;
border: none;
padding: 0;
color: inherit;
cursor: pointer;
svg {
display: block;
}
+ button {
margin-left: 20px;
}
}
.direction {
fill: currentColor;
}
.dot {
width: 16px;
height: 16px;
box-sizing: border-box;
border-radius: 50%;
border: 2px solid currentColor;
&.active {
border: none;
background: var(--color-crimson);
}
}
}
.screenshot-description {
display: flex;
align-items: center;
min-height: calc(2em * 1.5);
p + p {
margin: 0;
}
p:not(.active) {
display: none;
}
}
}
@media screen and (max-width: 1000px) {
margin-left: -40px;
margin-right: -40px;
.screenshot-details {
margin-left: 40px;
margin-right: 40px;
}
.divider.divider {
width: calc(100% - (32px + 40px) * 2);
margin-left: auto;
margin-right: auto;
}
}
}
#upcoming-tech {
background-color: var(--color-navy);
color: var(--color-fog);
a {
color: var(--color-mustard);
}
}
#community {
#newsletter form {
margin-top: 40px;
display: flex;
gap: 20px;
flex-wrap: wrap;
.same-line {
display: flex;
gap: 20px;
flex: 100000 1 0;
@media screen and (max-width: 1200px) {
flex-direction: column;
flex: 1 1 100%;
&.name,
&.email {
flex: 1 1 100%;
}
}
}
.column {
display: flex;
flex-direction: column;
justify-content: flex-end;
&.name {
flex: 1 0 0;
min-width: 240px;
}
&.email {
flex: 1 0 0;
min-width: 240px;
}
&.submit {
flex: 1 0 0;
}
label,
input {
flex: 0 0 auto;
}
label {
font-size: 24px;
font-weight: 800;
margin-bottom: 10px;
line-height: 1;
}
input:not([type="submit"]) {
flex: 0 0 auto;
width: 100%;
height: 48px;
font-size: 22px;
color: inherit;
border: 2px solid currentColor;
outline: none;
margin: 0;
padding: 0 24px;
font-family: inherit;
font-weight: inherit;
box-sizing: border-box;
&:focus {
border-color: var(--color-mustard);
}
}
input[type="submit"] {
background: none;
outline: none;
cursor: pointer;
&:focus {
border-color: var(--color-mustard);
color: var(--color-mustard);
}
}
}
}
#social .social-links {
display: flex;
flex-wrap: wrap;
gap: 20px 80px;
margin-top: 40px;
.column {
display: flex;
flex-direction: column;
gap: 20px;
a {
text-decoration: none;
display: flex;
span {
line-height: 48px;
margin-left: 20px;
}
}
}
}
}
#recent-news {
background-color: var(--color-mustard);
color: var(--color-navy);
a {
color: var(--color-crimson);
}
}