mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2024-12-25 22:10:43 -05:00
feat: styling complete
This commit is contained in:
parent
9e81ce23d8
commit
f1bae19cac
20 changed files with 88 additions and 27 deletions
BIN
restaurant/src/assets/.DS_Store
vendored
Normal file
BIN
restaurant/src/assets/.DS_Store
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -57,20 +57,20 @@ class Items {
|
||||||
|
|
||||||
let carouselItems = [
|
let carouselItems = [
|
||||||
{
|
{
|
||||||
"heading": "Specialty Baked Goods",
|
"heading": "Specialty Baked Goods and coffee",
|
||||||
"desc": "Exclusively delicious baked goods, homemade and all that",
|
"desc": "Exclusively delicious baked goods, homemade and all that",
|
||||||
"link": "Order Now!"
|
"link": "Order Now!"
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
"heading": "Subscribe and Save today!",
|
// "heading": "Subscribe and Save today!",
|
||||||
"desc": "We offer flexible subscription plans to meet your needs",
|
// "desc": "We offer flexible subscription plans to meet your needs",
|
||||||
"link": "Get started"
|
// "link": "Get started"
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
"heading": "Explore our blog",
|
// "heading": "Explore our blog",
|
||||||
"desc": "This Wondrous Life teaches you how to dream, inspire, and embrace life",
|
// "desc": "This Wondrous Life teaches you how to dream, inspire, and embrace life",
|
||||||
"link": "Embrace this"
|
// "link": "Embrace this"
|
||||||
}
|
// }
|
||||||
]
|
]
|
||||||
|
|
||||||
let items = carouselItems.map(e => new Items(e.heading, e.desc, e.link));
|
let items = carouselItems.map(e => new Items(e.heading, e.desc, e.link));
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
function menuBar() {
|
function menuBar() {
|
||||||
const items = [
|
const items = [
|
||||||
"home",
|
'HOME',
|
||||||
"menu",
|
'MENU',
|
||||||
"contact"
|
'CONTACT'
|
||||||
];
|
];
|
||||||
|
|
||||||
const navbar = document.createElement('div');
|
const navbar = document.createElement('div');
|
||||||
|
|
|
@ -37,7 +37,7 @@ function loadPage(page='home') {
|
||||||
let contact = contactComponent();
|
let contact = contactComponent();
|
||||||
let contentData;
|
let contentData;
|
||||||
|
|
||||||
switch(page){
|
switch(page.toLowerCase()){
|
||||||
case 'menu':
|
case 'menu':
|
||||||
contentData = content(menu);
|
contentData = content(menu);
|
||||||
break;
|
break;
|
||||||
|
@ -49,14 +49,12 @@ function loadPage(page='home') {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log(contentData);
|
|
||||||
document.body.appendChild(contentData);
|
document.body.appendChild(contentData);
|
||||||
}
|
}
|
||||||
|
|
||||||
function content(data) {
|
function content(data) {
|
||||||
const old = document.querySelector('.content');
|
const old = document.querySelector('.content');
|
||||||
if (old) {
|
if (old) {
|
||||||
console.log(old);
|
|
||||||
old.textContent = '';
|
old.textContent = '';
|
||||||
document.body.removeChild(old);
|
document.body.removeChild(old);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,52 @@
|
||||||
:root {
|
:root {
|
||||||
--font-size: 18px;
|
--font-size: 18px;
|
||||||
--light-color: #E8E8E8;
|
--light-color: #E8E8E8;
|
||||||
|
--dark-color: #495464;
|
||||||
|
--rgb-dark-color: 73, 84, 100;
|
||||||
|
--rgb-light-color: 232, 232, 232;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Merriweather Sans';
|
||||||
|
src: url('./assets/Merriweather_Sans/MerriweatherSans-Italic-VariableFont_wght.ttf') format('truetype');
|
||||||
|
src: url('./assets/Merriweather_Sans/MerriweatherSans-VariableFont_wght.ttf') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
body, html {
|
body,
|
||||||
|
html {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
background: url('./background.jpg');
|
background: url('./background.jpg');
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
font-family: 'Merriweather Sans';
|
||||||
|
color: rgb(var(--rgb-dark-color));
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
min-height: 71px;
|
min-height: 71px;
|
||||||
|
background-color: rgb(var(--rgb-light-color), 0.7);
|
||||||
|
color: var(--dark-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
header>h1 {
|
header>h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--light-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -44,7 +69,8 @@ header>h1 {
|
||||||
|
|
||||||
.navbar li {
|
.navbar li {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
font-size: 1.3rem;
|
font-size: 1rem;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
|
@ -54,19 +80,39 @@ header>h1 {
|
||||||
margin-top: 150px;
|
margin-top: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .carousel-item { */
|
.carousel {
|
||||||
/* margin-top: 100px; */
|
height: 80%;
|
||||||
/* display: flex; */
|
gap: 20px;
|
||||||
/* flex-direction: column; */
|
padding: 100px;
|
||||||
/* min-height: 80vh; */
|
background: rgb(var(--rgb-dark-color), 0.7);
|
||||||
/* width: 100%; */
|
border: 1px solid var(--dark-color);
|
||||||
/* } */
|
color: var(--light-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-item>h1 {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.carousel-item>p {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
font-weight: 200;
|
||||||
|
}
|
||||||
|
|
||||||
.cards {
|
.cards {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
height: 80%;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
|
padding: 100px;
|
||||||
|
background: rgb(var(--rgb-dark-color), 0.7);
|
||||||
|
border: 1px solid var(--dark-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cards>.drinks-container>h2,
|
||||||
|
.cards>.snacks-container>h2 {
|
||||||
|
color: var(--light-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
|
@ -86,6 +132,10 @@ header>h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card>p {
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
|
||||||
.drinks-container {
|
.drinks-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 300px);
|
grid-template-columns: repeat(3, 300px);
|
||||||
|
@ -113,3 +163,12 @@ header>h1 {
|
||||||
.carousel .slide-hidden {
|
.carousel .slide-hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contact {
|
||||||
|
height: 80%;
|
||||||
|
gap: 20px;
|
||||||
|
padding: 100px;
|
||||||
|
background: rgb(var(--rgb-dark-color), 0.7);
|
||||||
|
border: 1px solid var(--dark-color);
|
||||||
|
color: var(--light-color);
|
||||||
|
}
|
||||||
|
|
|
@ -29,7 +29,11 @@ module.exports = {
|
||||||
{
|
{
|
||||||
test: /\.(png|svg|jpg|jpeg|gif)$/i,
|
test: /\.(png|svg|jpg|jpeg|gif)$/i,
|
||||||
type: 'asset/resource',
|
type: 'asset/resource',
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
test: /\.(woff|woff2|eot|ttf|otf)$/i,
|
||||||
|
type: 'asset/resource',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue