Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Improved comments in index template.
Browse files Browse the repository at this point in the history
  • Loading branch information
kerns committed Mar 2, 2022
1 parent 5888227 commit 2b7d135
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion templates/_includes/fonts.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@
{# Place them in src/public/fonts prior to `make build` #}
{# Lastly, assign them to extend rules or overrides in tailwind.config.js #}
{% endapply %}
6 changes: 4 additions & 2 deletions templates/_layouts/default.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
<meta name="referrer" content="origin-when-cross-origin" />
<title>{{ siteName }}</title>
{% include "_includes/analytics.twig" %}

{# {% include "_includes/analytics.twig" %} #}
{% include "_includes/fonts.twig" %}
{% include "_includes/scripts.twig" %}
</head>

{% block bodyTag %}
<body class="relative flex flex-col min-h-screenh antialiased">
<body class="relative flex flex-col antialiased min-h-screenh">
{% endblock %}
{% block content %}{% endblock %}
</body>
Expand Down
6 changes: 3 additions & 3 deletions templates/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@
<div class="flex flex-col max-w-4xl p-8 bg-cover bg-oxford-blue-900">
<main class="relative pt-16 prose prose-2xl prose-invert">
<h1 class="mb-6 text-5xl tracking-tighter text-center font-headline lg:text-7xl"><span class="font-normal"></span> It worked.</h1>
<p class="text-center text-gray-300 font-body"><strong>{{ siteName }}</strong> is up and running at...</p>
<p class="text-center text-gray-400 font-body"><strong>{{ siteName }}</strong> is up and running at...</p>

<!-- URL address bar and success confetti -->
<div class="relative">

{# Example of simple if/else conditional in Twig #}
{# Example of setting/requesting/testing and filtering vars in Twig #}
{% set url = craft.app.request.absoluteUrl %}
{% set protocol = 'https://' in url ? 'https' : 'http' %}
{% set url = craft.app.request.absoluteUrl|trim('https://') %}

{# Example of simple if/else conditional in Twig #}
{% if protocol == 'https' %}
{% set animationArray = [
{ src: 'https://assets10.lottiefiles.com/packages/lf20_pkanqwys.json', size:'h-96', position:'left-0 -top-96' },
Expand Down Expand Up @@ -69,7 +70,6 @@
<p>You’re viewing the <code>index.twig</code> file located at the root of your <code>templates/</code> directory.<p>
<p>Try editing this file after running <code>make dev</code> or <code>ddev exec npm run serve</code> to start Vite, and verify HMR and Live Reload are working.</p>
<p>You can run <code>make build</code> or <code>ddev exec npm run build</code> to verify your build pipeline is working.</p>
<p>🧐 Reload this page once manually after starting Vite.</p>
</div>

<hr class="pb-12">
Expand Down

0 comments on commit 2b7d135

Please sign in to comment.