Initial Shopify theme

This commit is contained in:
2026-09-25 13:26:23 -06:00
parent 462ac0c5de
commit 2e6142e55b
54 changed files with 3753 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
{% comment %}
This section is used in the 404 template to render page shown when customers
enter an invalid store URL.
https://shopify.dev/docs/storefronts/themes/architecture/templates/404
{% endcomment %}
<h1>{{ '404.title' | t }}</h1>
<p>
{{ '404.not_found' | t }}
</p>
<a href="{{ routes.all_products_collection_url }}">
{{ '404.back_to_shopping' | t }}
</a>
{% schema %}
{
"name": "t:general.404",
"settings": []
}
{% endschema %}
+68
View File
@@ -0,0 +1,68 @@
{% comment %}
This section is used in the article template to render the article page, which
displays the full content of the blog post and can optionally include a
comments section for customers (not shown in this example).
https://shopify.dev/docs/storefronts/themes/architecture/templates/article
{% endcomment %}
{% if article.image %}
{{ article.image | image_url: width: 1000 | image_tag }}
{% endif %}
<h1>{{ article.title }}</h1>
{% assign date = article.published_at | time_tag: format: 'date' %}
<p>{{ 'blog.article_metadata_html' | t: date: date, author: article.author }}</p>
{{ article.content }}
{% if blog.comments_enabled? %}
<h2>{{ 'blog.article_comments' | t }}</h2>
<div id="comments">
{% paginate article.comments by 10 %}
{% for comment in article.comments %}
<div>
<p>{{ comment.author }}</p>
<p>
{{- comment.created_at | time_tag: format: 'date' -}}
</p>
<p>{{ comment.content }}</p>
</div>
{% endfor %}
{{ paginate | default_pagination: anchor: 'comments' }}
{% endpaginate %}
</div>
{% form 'new_comment', article %}
<h2>{{ 'blog.comment_form_title' | t }}</h2>
{{ form.errors | default_errors }}
<div>
<label for="author">{{ 'blog.comment_form_name' | t }}</label>
<input type="text" name="comment[author]" id="author" value="{{ form.author }}" required>
</div>
<div>
<label for="email">{{ 'blog.comment_form_email' | t }}</label>
<input type="email" name="comment[email]" id="email" value="{{ form.email }}" required>
</div>
<div>
<label for="body">{{ 'blog.comment_form_body' | t }}</label>
<textarea name="comment[body]" id="body" required>{{ form.body }}</textarea>
</div>
<input type="submit" value="{{ 'blog.comment_form_submit' | t }}">
{% endform %}
{% endif %}
{% schema %}
{
"name": "t:general.article",
"settings": []
}
{% endschema %}
+35
View File
@@ -0,0 +1,35 @@
{% comment %}
This section is used in the blog template to render the blog page listing all
articles within a blog.
https://shopify.dev/docs/storefronts/themes/architecture/templates/blog
{% endcomment %}
<h1>{{ blog.title }}</h1>
{% paginate blog.articles by 5 %}
{% for article in blog.articles %}
<div>
{% if article.image %}
{{ article.image | image_url: width: 1000 | image_tag }}
{% endif %}
<h2>
{{ article.title | link_to: article.url }}
</h2>
{% assign date = article.published_at | time_tag: format: 'date' %}
<p>{{ 'blog.article_metadata_html' | t: date: date, author: article.author }}</p>
<p>{{ article.excerpt }}</p>
</div>
{% endfor %}
{%- if paginate.pages > 1 -%}
{{- paginate | default_pagination -}}
{%- endif -%}
{% endpaginate %}
{% schema %}
{
"name": "t:general.blog",
"settings": []
}
{% endschema %}
+37
View File
@@ -0,0 +1,37 @@
{% comment %}
This section is used in the cart template to render /cart page with an
overview of the items in customer's cart.
https://shopify.dev/docs/storefronts/themes/architecture/templates/cart
{% endcomment %}
<h1>{{ 'cart.title' | t }}</h1>
<form action="{{ routes.cart_url }}" method="post">
<table>
{% for item in cart.items %}
<tr>
<td>
{% render 'image', image: item.image, url: item.url %}
</td>
<td>
<p>{{ item.product.title }}</p>
{{ 'cart.remove' | t | link_to: item.url_to_remove }}
</td>
<td>
<input type="text" name="updates[]" value="{{ item.quantity }}">
<input type="submit" value="{{ 'cart.update' | t }}">
</td>
</tr>
{% endfor %}
</table>
<input type="submit" name="checkout" value="{{ 'cart.checkout' | t }}">
</form>
{% schema %}
{
"name": "t:general.cart",
"settings": []
}
{% endschema %}
+47
View File
@@ -0,0 +1,47 @@
{% comment %}
This section is used in the collection template to render collection page
listing all products within a collection.
https://shopify.dev/docs/storefronts/themes/architecture/templates/collection
{% endcomment %}
<h1>{{ collection.title }}</h1>
<div class="collection-products">
{% paginate collection.products by 20 %}
{% for product in collection.products %}
<div class="collection-product">
{% if product.featured_image %}
{% render 'image',
class: 'collection-product__image',
image: product.featured_image,
url: product.url,
width: 400,
height: 400,
crop: 'center'
%}
{% endif %}
<div class="collection-product__content">
<p>{{ product.title | escape | link_to: product.url }}</p>
<p>{{ product.price | money }}</p>
</div>
</div>
{% endfor %}
{{ paginate | default_pagination }}
{% endpaginate %}
</div>
{% stylesheet %}
.collection-products {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
}
{% endstylesheet %}
{% schema %}
{
"name": "t:general.collection",
"settings": []
}
{% endschema %}
+83
View File
@@ -0,0 +1,83 @@
{% comment %}
This section is used in the list-collections template to render a list of
collections.
https://shopify.dev/docs/storefronts/themes/architecture/templates/collection
{% endcomment %}
<h1>{{ 'collections.title' | t }}</h1>
<div
class="collections {{ section.settings.grid_item_width }}"
style="--grid-gap: {{ section.settings.grid_gap }}px"
>
{% for collection in collections %}
<a class="collection-card" href="{{ collection.url }}">
{% if collection.featured_image %}
{% render 'image',
class: 'collection-card__image',
image: collection.featured_image,
width: 600,
height: 600,
crop: 'center'
%}
{% endif %}
<div class="collection-card__content">
<p>{{ collection.title }}</p>
{% if collection.description %}
<p>{{ collection.description | strip_html | truncatewords: 15 }}</p>
{% endif %}
</div>
</a>
{% endfor %}
</div>
{% stylesheet %}
.collections {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(var(--collection-card-size), 100%), 1fr));
gap: var(--grid-gap);
}
.collections--compact {
--collection-card-size: 160px;
}
.collections--full {
--collection-card-size: 280px;
}
.collection-card {
display: flex;
flex-direction: column;
width: 100%;
}
{% endstylesheet %}
{% schema %}
{
"name": "t:general.collections_grid",
"settings": [
{
"type": "select",
"id": "grid_item_width",
"label": "t:labels.grid_item_width",
"options": [
{ "value": "collections--compact", "label": "t:options.size.small" },
{ "value": "collections--full", "label": "t:options.size.large" }
],
"default": "collections--full"
},
{
"type": "range",
"id": "grid_gap",
"label": "t:labels.grid_gap",
"min": 0,
"max": 50,
"step": 5,
"unit": "px",
"default": 10
}
],
"presets": [{ "name": "t:general.collections_grid" }]
}
{% endschema %}
+60
View File
@@ -0,0 +1,60 @@
<div class="custom-section full-width">
{% if section.settings.background_image %}
<div class="custom-section__background">
{{ section.settings.background_image | image_url: width: 2000 | image_tag }}
</div>
{% endif %}
<div class="custom-section__content">
{% content_for 'blocks' %}
</div>
</div>
{% stylesheet %}
.custom-section {
position: relative;
overflow: hidden;
width: 100%;
}
.custom-section__background {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
overflow: hidden;
}
.custom-section__background img {
position: absolute;
width: 100%;
height: auto;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.custom-section__content {
display: grid;
grid-template-columns: var(--content-grid);
}
.custom-section__content > * {
grid-column: 2;
}
{% endstylesheet %}
{% schema %}
{
"name": "t:general.custom_section",
"blocks": [{ "type": "@theme" }],
"settings": [
{
"type": "image_picker",
"id": "background_image",
"label": "t:labels.background"
}
],
"presets": [
{
"name": "t:general.custom_section"
}
]
}
{% endschema %}
+25
View File
@@ -0,0 +1,25 @@
/*
* ------------------------------------------------------------
* IMPORTANT: The contents of this file are auto-generated.
*
* This file may be updated by the Shopify admin theme editor
* or related systems. Please exercise caution as any changes
* made to this file may be overwritten.
* ------------------------------------------------------------
*/
{
"type": "footer",
"name": "t:general.footer",
"sections": {
"footer": {
"type": "footer",
"settings": {
"menu": "",
"show_payment_icons": true
}
}
},
"order": [
"footer"
]
}
+57
View File
@@ -0,0 +1,57 @@
<footer>
<div class="footer__copyright">
&copy;
{{ 'now' | date: '%Y' }}
{{ shop.name | link_to: routes.root_url }}, {{ powered_by_link }}
</div>
<div class="footer__links">
{% for link in section.settings.menu.links %}
{{ link.title | link_to: link.url }}
{% endfor %}
</div>
<div class="footer__payment">
{% if section.settings.show_payment_icons %}
{% for type in shop.enabled_payment_types %}
{{ type | payment_type_svg_tag }}
{% endfor %}
{% endif %}
</div>
</footer>
{% stylesheet %}
footer {
display: flex;
justify-content: space-between;
margin-top: 2rem;
}
footer a {
text-decoration: none;
color: var(--color-foreground);
}
footer .footer__links,
footer .footer__payment {
display: flex;
gap: 1rem;
}
{% endstylesheet %}
{% schema %}
{
"name": "t:general.footer",
"settings": [
{
"type": "link_list",
"id": "menu",
"label": "t:labels.menu"
},
{
"type": "checkbox",
"id": "show_payment_icons",
"label": "t:labels.show_payment_icons",
"default": true
}
]
}
{% endschema %}
+22
View File
@@ -0,0 +1,22 @@
/*
* ------------------------------------------------------------
* IMPORTANT: The contents of this file are auto-generated.
*
* This file may be updated by the Shopify admin theme editor
* or related systems. Please exercise caution as any changes
* made to this file may be overwritten.
* ------------------------------------------------------------
*/
{
"type": "header",
"name": "t:general.header",
"sections": {
"header": {
"type": "header",
"settings": {}
}
},
"order": [
"header"
],
}
+77
View File
@@ -0,0 +1,77 @@
<header>
<h2 class="header__title">
{{ shop.name | link_to: routes.root_url }}
</h2>
<div class="header__menu">
{% for link in section.settings.menu.links %}
{{ link.title | link_to: link.url }}
{% endfor %}
</div>
<div class="header__icons">
{% if shop.customer_accounts_enabled %}
<shopify-account menu="{{ section.settings.customer_account_menu }}">
{{ 'icon-account.svg' | inline_asset_content }}
</shopify-account>
{% endif %}
<a href="{{ routes.cart_url }}">
{% if cart.item_count > 0 %}
<sup>{{ cart.item_count }}</sup>
{% endif %}
{{ 'icon-cart.svg' | inline_asset_content }}
</a>
</div>
</header>
{% stylesheet %}
header {
height: 5rem;
display: flex;
align-items: center;
justify-content: space-between;
}
header a {
position: relative;
text-decoration: none;
color: var(--color-foreground);
display: flex;
align-items: center;
justify-content: center;
}
header a sup {
position: absolute;
left: 100%;
overflow: hidden;
max-width: var(--page-margin);
}
header svg {
width: 2rem;
}
header .header__menu,
header .header__icons {
display: flex;
gap: 1rem;
}
{% endstylesheet %}
{% schema %}
{
"name": "t:general.header",
"settings": [
{
"type": "link_list",
"id": "menu",
"label": "t:labels.menu"
},
{
"type": "link_list",
"id": "customer_account_menu",
"label": "t:labels.customer_account_menu",
"default": "customer-account-main-menu"
}
]
}
{% endschema %}
+144
View File
@@ -0,0 +1,144 @@
{% comment %}
Welcome to Shopify theme development!
{% endcomment %}
<div class="welcome full-width">
<div class="welcome-content">
<div>
<h1>Hello, World!</h1>
<p class="welcome-description">
The Skeleton theme is a minimal, carefully structured Shopify theme designed to help you quickly get started.
Designed with modularity, maintainability, and Shopify's best practices in mind.
</p>
<p class="welcome-description">
Themes shape the online store experience for merchants and their customers. Build fast, flexible themes at scale
using Liquid, Shopify's theme templating language, along with HTML, CSS, JavaScript, and JSON.
</p>
</div>
<div class="icon">
<img src="{{ 'shoppy-x-ray.svg' | asset_url }}" width="300" height="300">
</div>
</div>
</div>
<div class="highlights">
<div class="highlight">
<h3>Key Concepts</h3>
<p class="highlight-description">
Shopify themes are a package of template files, building blocks, and supporting assets. Use these building blocks
to create modular, customizable themes.
</p>
<p>{{ 'Learn more about key concepts' | link_to: 'https://shopify.dev/docs/storefronts/themes/architecture' }}</p>
</div>
<div class="highlight">
<h3>Liquid</h3>
<p class="highlight-description">
The Liquid templating language is the backbone of Shopify themes, and is used to load dynamic content on
storefronts. Extend Liquid objects to store and present custom data using metafields.
</p>
<p>{{ 'View the Liquid reference' | link_to: 'https://shopify.dev/docs/api/liquid' }}</p>
</div>
<div class="highlight">
<h3>Best Practices</h3>
<p class="highlight-description">
To optimize your theme development experience, Shopify has established a set of best practices that you can refer
to when developing your theme and setting up your toolchains and processes.
</p>
<p>{{ 'Follow best practices' | link_to: 'https://shopify.dev/docs/storefronts/themes/best-practices' }}</p>
</div>
</div>
{% stylesheet %}
.welcome {
display: grid;
grid-template-columns: var(--content-grid);
background-color: #f6f6f7;
padding: 72px 0;
}
.welcome-content {
grid-column: 2;
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
width: 100%;
padding: 0 24px;
}
.welcome-description {
max-width: 80ch;
line-height: 1.4;
margin-top: 1.5rem;
}
.icon {
width: 300px;
}
.highlights {
display: grid;
gap: 2rem;
grid-template-columns: repeat(3, 1fr);
margin-top: 50px;
}
@media (max-width: 1100px) {
.highlights {
grid-template-columns: 1fr;
}
}
.highlight {
display: flex;
flex-direction: column;
height: 100%;
padding: 24px;
border-radius: 8px;
background-color: #eef3ff;
color: rgb(92, 95, 98);
line-height: 1.4;
}
.highlight > * + * {
margin-top: 1rem;
}
.highlight h3 {
font-size: 1rem;
color: rgb(32, 34, 35);
}
.highlight-description {
flex: 1 1;
}
.highlight a {
display: flex;
width: fit-content;
background-color: rgb(250, 251, 251);
box-shadow: rgba(0, 0, 0, 0.2) 0px -3px 0px 0px inset, rgba(255, 255, 255, 0.9) 0px 2px 0px 0px inset;
border: 1px solid rgb(140, 145, 150);
border-radius: 4px;
color: rgb(92, 95, 98);
padding: 3px 10px 5px;
text-decoration: none;
}
{% endstylesheet %}
{% schema %}
{
"name": "Hello World",
"settings": [],
"presets": [
{
"name": "Hello World Template",
"category": "Demo"
}
]
}
{% endschema %}
+17
View File
@@ -0,0 +1,17 @@
{% comment %}
This section is used in the page template to render store pages like About us
or Contact us.
https://shopify.dev/docs/storefronts/themes/architecture/templates/page
{% endcomment %}
<h1>{{ page.title }}</h1>
{{ page.content }}
{% schema %}
{
"name": "t:general.page",
"settings": []
}
{% endschema %}
+35
View File
@@ -0,0 +1,35 @@
{% comment %}
This section is used in the password template to render landing page shown
when password protection is applied to a store.
https://shopify.dev/docs/storefronts/themes/architecture/templates/password
{% endcomment %}
<h1>{{ 'password.title' | t }}</h1>
{% if shop.password_message %}
<p>{{ shop.password_message }}</p>
{% endif %}
{% form 'storefront_password' %}
{% if form.errors %}
{{ form.errors | default_errors }}
{% endif %}
<label for="password-input">
{{ 'password.password' | t }}
</label>
<input type="password" name="password" id="password-input">
<button type="submit">
{{ 'password.enter' | t }}
</button>
{% endform %}
{% schema %}
{
"name": "t:general.password",
"settings": []
}
{% endschema %}
+52
View File
@@ -0,0 +1,52 @@
{% comment %}
This section is used in the product template to render product page with
media, content, and add-to-cart form.
https://shopify.dev/docs/storefronts/themes/architecture/templates/product
{% endcomment %}
<div class="product-images">
{% for image in product.images %}
{% render 'image', class: 'product-image', image: image %}
{% endfor %}
</div>
<div class="product-info">
<h1>{{ product.title }}</h1>
<p>{{ product.price | money }}</p>
<p>{{ product.description }}</p>
</div>
<div class="product-form">
{% form 'product', product %}
{% assign current_variant = product.selected_or_first_available_variant %}
<select name="id">
{% for variant in product.variants %}
<option
value="{{ variant.id }}"
{% if variant == current_variant %}
selected="selected"
{% endif %}
>
{{ variant.title }} - {{ variant.price | money }}
</option>
{% endfor %}
</select>
<input type="text" name="quantity" min="1" value="1">
<input type="submit" value="Add to cart">
{{ form | payment_button }}
{% endform %}
</div>
{% schema %}
{
"name": "t:general.product",
"settings": [],
"disabled_on": {
"groups": ["header", "footer"]
}
}
{% endschema %}
+70
View File
@@ -0,0 +1,70 @@
{% comment %}
This section is used in the search template to render search results for
products, articles, and pages.
https://shopify.dev/docs/storefronts/themes/architecture/templates/search
{% endcomment %}
<h1>{{ 'search.title' | t }}</h1>
<form action="{{ routes.search_url }}" method="get" role="search">
<input
type="search"
size="50"
name="q"
value="{{ search.terms | escape }}"
placeholder="{{ 'search.placeholder' | t }}"
>
<button type="submit">{{ 'search.submit' | t }}</button>
</form>
{% if search.performed %}
{% if search.results_count == 0 %}
<p>{{ 'search.no_results_html' | t: terms: search.terms }}</p>
{% else %}
<p>{{ 'search.results_for_html' | t: terms: search.terms, count: search.results_count }}</p>
<div class="search-results">
{% paginate search.results by 20 %}
{% # Search result items may be an article, a page, or a product. %}
{% for result in search.results %}
<div class="search-result">
{% assign featured_image = result.featured_image | default: result.image %}
{% if featured_image %}
{% render 'image', class: 'search-result__image', image: featured_image, url: result.url, width: 400 %}
{% endif %}
<div class="search-result__content">
<p>
{{ result.title | link_to: result.url }}
{% if result.price %}
{{ result.price | money_with_currency }}
{% endif %}
</p>
</div>
</div>
{% endfor %}
{{ paginate | default_pagination }}
{% endpaginate %}
</div>
{% endif %}
{% endif %}
{% stylesheet %}
.search-results {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.search-results .prev,
.search-results .page,
.search-results .next {
grid-column: 1 / -1;
}
{% endstylesheet %}
{% schema %}
{
"name": "t:general.search",
"settings": []
}
{% endschema %}