Skip to content

Commit

Permalink
New Elizabeth theme template
Browse files Browse the repository at this point in the history
  • Loading branch information
polidario committed Nov 29, 2022
1 parent efa586b commit f9a9bfa
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 54 deletions.
12 changes: 12 additions & 0 deletions assets/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
body {
background-color: rgb(251, 251, 232);
}

.homepage {
text-align: center;
padding-top: 10em;
}

.logo {
width: 25%;
}
2 changes: 0 additions & 2 deletions assets/application.css.liquid

This file was deleted.

60 changes: 18 additions & 42 deletions layout/theme.liquid
Original file line number Diff line number Diff line change
@@ -1,44 +1,20 @@
<!doctype html>
<html>
<head>
<title>{{ page_title }}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="{{ page_description | escape }}">
<link rel="canonical" href="{{ canonical_url }}">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
{{ content_for_header }} <!-- Header hook for plugins -->
{{ 'application.css' | asset_url | stylesheet_tag }}
{{ 'application.js' | asset_url | script_tag }}
</head>
<body>

{% for link in linklists.main-menu.links %}
{% assign child_list_handle = link.title | handleize %}
{% if linklists[child_list_handle].links != blank %}
<a href="{{ link.url }}">{{ link.title }}</a>
[{% for childlink in linklists[child_list_handle].links %}
<a href="{{ childlink.url }}">{{ childlink.title | escape }}</a>
{% endfor %}]
{% else %}
<a href="{{ link.url }}">{{ link.title }}</a>
{% endif %}
{% endfor %}

<a href="/cart">cart</a>

{% if shop.customer_accounts_enabled %}
{% if customer %}
<a href="/account">account</a>
{{ 'log out' | customer_logout_link }}
{% else %}
{{ 'log in ' | customer_login_link }}
{{ 'register' | customer_register_link }}
{% endif %}
{% endif %}

<main role="main">
{{ content_for_layout }}
</main>
</body>
</html>
<head>
<title>{{ page_title }}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="{{ page_description | escape }}">
<link rel="canonical" href="{{ canonical_url }}">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
{{ content_for_header }}
<!-- Header hook for plugins -->
{{ 'application.css' | asset_url | stylesheet_tag }}
{{ 'application.js' | asset_url | script_tag }}
</head>
<body>
<main role="main">
{{ content_for_layout }}
</main>
</body>
</html>
7 changes: 7 additions & 0 deletions sections/homepage.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="homepage">
<img src="https://weeklyhow.com/wp-content/uploads/2020/11/WeeklyHow-Logo-With-Text-Bottom.png" class="logo">
<h1>Welcome to Shopify Theme Development course!</h1>
<p>{% render 'homepage-text' %}</p>


</div>
1 change: 1 addition & 0 deletions snippets/homepage-text.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Thank you so much for taking the course and I hope you will learn something from me.
11 changes: 1 addition & 10 deletions templates/index.liquid
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
{% for product in collections.frontpage.products limit:4 %}
<div>
<a href="{{ product.url | within: collection }}">{{ product.title }}</a>
{{ product.price | money }}
{% unless product.available %}<br><strong>sold out</strong>{% endunless %}
<a href="{{ product.url | within: collection }}">
<img src="{{ product.featured_image.src | img_url: 'large' }}" alt="{{ product.featured_image.alt | escape }}">
</a>
</div>
{% endfor %}
{% section 'homepage' %}

0 comments on commit f9a9bfa

Please sign in to comment.