update home page
This commit is contained in:
parent
ec51d488ed
commit
b7e4216705
@ -13,6 +13,11 @@ static = [
|
|||||||
{
|
{
|
||||||
"route" :"/js/<filepath:re:.*\.(js)>",
|
"route" :"/js/<filepath:re:.*\.(js)>",
|
||||||
"root" :"./static/js"
|
"root" :"./static/js"
|
||||||
|
},
|
||||||
|
# add image route
|
||||||
|
{
|
||||||
|
"route" :"/img/<filepath:re:.*\.(jpg|png|webp)>",
|
||||||
|
"root" :"./static/img"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
template.add(static, "templates")
|
template.add(static, "templates")
|
||||||
|
@ -9,8 +9,6 @@ class main:
|
|||||||
def html(self, params):
|
def html(self, params):
|
||||||
return Template(params["mako"]["website"]['index']).render(
|
return Template(params["mako"]["website"]['index']).render(
|
||||||
title = globalvar.title,
|
title = globalvar.title,
|
||||||
header = "Welcome to CostaCoffe",
|
|
||||||
sub_header = "Best Place To Buy Coffe",
|
|
||||||
navbar = Template(params["mako"]["website"]['navbar']).render(
|
navbar = Template(params["mako"]["website"]['navbar']).render(
|
||||||
title = globalvar.title,
|
title = globalvar.title,
|
||||||
menu = globalvar.menu['public']['navbar'],
|
menu = globalvar.menu['public']['navbar'],
|
||||||
@ -21,6 +19,8 @@ class main:
|
|||||||
copyright = globalvar.copyright,
|
copyright = globalvar.copyright,
|
||||||
),
|
),
|
||||||
container = Template(params["mako"]["website"]['container']).render(
|
container = Template(params["mako"]["website"]['container']).render(
|
||||||
greeting = f"Welcome to your new web application! This placeholder page is here to let you know that your web framework is successfully set up and ready to go. Now, it's time to start building your project. Dive into the documentation to explore the features and capabilities at your disposal."
|
header = "Welcome to CostaCoffe",
|
||||||
|
sub_header = "Best Place To Buy Coffe",
|
||||||
|
header_desc = f"Experience the rich flavors and aromas of our premium coffee"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -1 +1,15 @@
|
|||||||
<p>${greeting}</p>
|
<div class="hero">
|
||||||
|
<h3>${sub_header}</h3>
|
||||||
|
<h1>${header}</h1>
|
||||||
|
<p>${header_desc}</p>
|
||||||
|
<img src="/img/coffe-unsplash.jpg"
|
||||||
|
alt="Coffe image">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="about">
|
||||||
|
<h2>About</h2>
|
||||||
|
<p>At CostaCoffee, we are passionate about delivering the finest coffee experience to our customers. Our journey
|
||||||
|
begins with sourcing high-quality beans from sustainable farms around the world, ensuring that every cup
|
||||||
|
supports local communities and promotes eco-friendly practices. </p>
|
||||||
|
<img src="/img/signature.png" alt="">
|
||||||
|
</div>
|
46
static/css/home.css
Normal file
46
static/css/home.css
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
.hero {
|
||||||
|
max-width: 768px;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero img {
|
||||||
|
width: 720px;
|
||||||
|
height: 360px;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero h3 {
|
||||||
|
font-size: 1.12rem;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero h1 {
|
||||||
|
font-size: 2.4rem;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-top: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero p {
|
||||||
|
max-width: 50%;
|
||||||
|
margin: 0 auto 2rem auto;
|
||||||
|
color: grey;
|
||||||
|
font-size: 1.12rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about {
|
||||||
|
max-width: 768px;
|
||||||
|
text-align: center;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-top: 8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about h2 {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.about img {
|
||||||
|
width: 380px;
|
||||||
|
}
|
BIN
static/img/coffe-unsplash.jpg
Normal file
BIN
static/img/coffe-unsplash.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 KiB |
BIN
static/img/signature.png
Normal file
BIN
static/img/signature.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
@ -7,16 +7,13 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
<title>${title}</title>
|
<title>${title}</title>
|
||||||
<link rel="stylesheet" href="/templates/plain/css/style.css">
|
<link rel="stylesheet" href="/templates/plain/css/style.css">
|
||||||
<!-- <link rel="stylesheet" href="/css/index.sass"> -->
|
<link rel="stylesheet" href="/css/home.css">
|
||||||
<script src="/js/feather.min.js"></script>
|
<script src="/js/feather.min.js"></script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
${navbar}
|
${navbar}
|
||||||
<header>
|
|
||||||
<h1>${header}</h1>
|
|
||||||
</header>
|
|
||||||
<main>
|
<main>
|
||||||
${container}
|
${container}
|
||||||
</main>
|
</main>
|
||||||
|
@ -54,11 +54,10 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
background-color: #333;
|
margin-top: 8rem;
|
||||||
color: #fff;
|
color: gray;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 10px;
|
padding: 1.2rem 0;
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user