Initial Sunflower Acres Hugo site scaffold
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }} — {{ .Site.Params.tagline }}{{ else }}{{ .Title }} — {{ .Site.Title }}{{ end }}</title>
|
||||
<style>{{ (resources.Get "css/style.css").Content | safeCSS }}</style>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<a class="brand" href="{{ "/" | relURL }}">{{ .Site.Title }}</a>
|
||||
<nav>
|
||||
<a href="{{ "/" | relURL }}">Home</a>
|
||||
<a href="{{ "/shop/" | relURL }}">Shop</a>
|
||||
<a href="{{ "/about/" | relURL }}">About</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<p>© {{ now.Year }} {{ .Site.Title }}</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<section class="hero">
|
||||
<h1>Small-batch soap, made by hand.</h1>
|
||||
<p>{{ .Content }}</p>
|
||||
<a class="cta" href="{{ "/shop/" | relURL }}">Shop the soaps</a>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,41 @@
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
<div class="product-grid">
|
||||
{{ range .Site.Data.products }}
|
||||
<div class="product-card">
|
||||
<img src="{{ .image | relURL }}" alt="{{ .name }}">
|
||||
<div class="body">
|
||||
<span class="status-pill {{ .status }}">
|
||||
{{ if eq .status "available" }}Available
|
||||
{{ else if eq .status "low" }}Low Stock
|
||||
{{ else }}Out of Stock{{ end }}
|
||||
</span>
|
||||
<h3>{{ .name }}</h3>
|
||||
<p class="desc">{{ .description }}</p>
|
||||
<p class="price">${{ .price }}</p>
|
||||
{{ if eq .status "low" }}
|
||||
<p class="low-note">Orders may take a bit longer to ship.</p>
|
||||
{{ end }}
|
||||
{{ if eq .status "out" }}
|
||||
<span class="buy-btn disabled">Out of Stock</span>
|
||||
{{ else if .stripe_payment_link }}
|
||||
<a class="buy-btn enabled" href="{{ .stripe_payment_link }}">Buy — ${{ .price }}</a>
|
||||
{{ else }}
|
||||
<span class="buy-btn disabled">Checkout coming soon</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="reorder-box">
|
||||
<h2>Already ordered from us?</h2>
|
||||
<p>Enter your email to see what you got last time.</p>
|
||||
<form onsubmit="return false;">
|
||||
<input type="email" placeholder="you@example.com" disabled>
|
||||
<button type="submit" disabled>Look up my orders</button>
|
||||
</form>
|
||||
<p class="demo-note">This box is a preview — it'll work once checkout is connected, since it looks up real past orders.</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user