Add subscription add page

This commit is contained in:
Nathan Chapman 2023-01-28 16:56:05 -07:00
parent 8b8da28f1e
commit c3998bb79a
4 changed files with 115 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

@ -0,0 +1,110 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Subscribe and save</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,700;1,900&family=Vollkorn:wght@0,400,900&display=swap" rel="stylesheet">
<style>
html {
/*22px*/
font-size: 137.5%;
}
body {
padding: 0;
margin: 0;
background: white;
font-family: 'Montserrat', sans-serif;
font-weight: 400;
line-height: 1.75;
display: flex;
justify-content: center;
align-items: center;
color: #EAE2D7;
height: 100vh;
background-image: url('/static/images/coffee_sunrise.jpg');
background-position: center;
background-size: cover;
background-repeat: no-repeat;
box-sizing: border-box;
}
article {
padding: 2rem 1rem;
box-sizing: border-box;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
p {
margin-bottom: 1rem;
}
a {
color: #EAE2D7;
}
h1, h2, h3, h4, h5 {
margin: 0;
font-family: 'Montserrat', sans-serif;
font-weight: 700;
line-height: 1.3;
}
h1 {
margin-top: 0;
font-size: 3.052rem;
}
h2 {
font-size: 2.441rem;
}
h3 {
font-size: 1.953rem;
}
h4 {
font-size: 1.563rem;
}
h5 {
font-size: 1.25rem;
}
small, .text_small {
font-size: 0.8rem;
}
.color-black {
color: #3c2821;
font-family: "Vollkorn";
font-weight: 400;
}
.text-center {
text-align: center;
}
@media screen and (max-width: 600px) {
html {
font-size: 100%;
}
.color-black {
font-size: 1.563rem;
}
}
</style>
</head>
<body>
<article>
<section class="text-center">
<h3 class="color-black">
Better than an alarm clock,<br>
and just as reliable.
</h3>
</section>
<section>
<h1>SAVE 10%</h1>
<h4><a href="{% url 'storefront:subscription-form' %}">COFFEE SUBSCRIPTIONS ARE HERE &rarr;</a></h4>
<p>Never run out of coffee with automatic delivery</p>
<dl>
<dt>Every:</dt>
<dd>7 days<br>14 days<br>30 days</dd>
</dl>
</section>
</article>
</body>
</html>

View File

@ -107,6 +107,7 @@ urlpatterns = [
), ),
# Subscriptions # Subscriptions
path('subscriptions/', include([ path('subscriptions/', include([
path('', views.SubscriptionAdView.as_view(), name='subscription-ad'),
path( path(
'form/', 'form/',
views.SubscriptionFormView.as_view(), views.SubscriptionFormView.as_view(),

View File

@ -555,6 +555,10 @@ class ReviewListView(TemplateView):
template_name = 'storefront/reviews.html' template_name = 'storefront/reviews.html'
class SubscriptionAdView(TemplateView):
template_name = 'storefront/subscription/ad.html'
class SubscriptionFormView(FormView): class SubscriptionFormView(FormView):
template_name = 'storefront/subscription/form.html' template_name = 'storefront/subscription/form.html'
form_class = SubscriptionForm form_class = SubscriptionForm