title = "Home"
url = "/"
layout = "default"
is_hidden = 0
==
<?php
use System\Classes\PluginManager;

function onStart()
{
    $manager = PluginManager::instance();

    // Find installed plugins
    $this['blogInstalled'] = $manager->hasPlugin('Winter.Blog');
}
?>
==
{% partial 'nav/section-nav' %}

<section id="hero" class="bg-gradient-to-b from-blue-500 to-blue-600 hero">
    <h1 class="text-white mb-0">
        Winter CMS Workshop
    </h1>
    <h2 class="text-blue-300 font-body font-light mb-0">
        Testing Winter CMS core and plugins since 2021.
    </h2>
</section>

<section id="body" class="py-20 flex-grow">
    <div class="container max-w-screen-xl">
        <div class="block lg:flex lg:flex-row">
            <div class="flex-grow-0 px-8 {% if blogInstalled %} lg:w-9/12 xl:pl-0 {% else %} xl:px-0 {% endif %}">
                <h2 class="mb-6">Hi, there!</h2>

                <p>Welcome to the Winter CMS Workshop. This theme provides a suitable boilerplate for testing the most common Winter CMS core functions and plugins with a simple but visually pleasing theme. It is built using the <a href="https://tailwindcss.com" target="tailwind">Tailwind CSS</a> framework, also providing a suitable example of how to implement Tailwind CSS in a theme.</p>

                <p>In this instance, the theme is testing out a simple CMS page with a partial underneath the main content, in addition to partials being used throughout the layout and page to display UI elements.</p>

                {% if blogInstalled %}
                <p>On the right, you can see a component to show the latest article in the Blog.</p>
                {% endif %}

                {% partial 'instructions' %}
            </div>

            {% if blogInstalled %}
                <div class="flex-grow-0 px-8 mt-16 lg:w-3/12 lg:mt-0 xl:pr-0">
                    <div class="w-full sm:w-1/3 lg:w-full mx-auto">
                        {% partial 'blog/latest-single' %}

                        <div class="mt-6 text-center">
                            {% partial 'ui/link-button' url="blog/index"|page text="All blog articles" %}
                        </div>
                    </div>
                </div>
            {% endif %}
        </div>
    </div>
</section>