<!DOCTYPE html>{% load i18n static cms_tags cms_static sekizai_tags %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>{% trans "django CMS" %}</title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link rel="icon" type="image/png" href="{% static 'cms/img/favicon.png' %}">
    {% render_block "css" %}
    <link rel="stylesheet" href="{% static_with_version 'cms/css/cms.base.css' %}">
    <link rel="stylesheet" href="{% static_with_version 'cms/css/cms.welcome.css' %}">
</head>
<body class="cms-welcome-bg">
    {% cms_toolbar %}
    {% language request.toolbar.toolbar_language %}
    <div class="cms-reset cms-welcome">
        <header class="cms-welcome-header">
            <h1 class="cms-welcome-heading">
                <span class="cms-icon cms-icon-check"></span>
                {% trans "Welcome to your new django CMS installation!" %}
            </h1>
            <a href="/" class="cms-welcome-logo">
                <span class="cms-hidden">{% trans "django CMS" %}</span>
            </a>
            <h2>
                {% blocktrans %}Version {{ cms_version }}{% endblocktrans %}
            </h2>
            <p class="lead">
                {% if user.is_authenticated %}
                    {% trans "Let’s build something great together!" %}
                {% else %}
                    {% trans "Please log in" %}
                {% endif %}
            </p>
            {% url "admin:cms_page_add" as admin_add_page %}
            {% blocktrans %}
                <a class="js-welcome-add cms-btn cms-btn-action">Add your first page</a>
            {% endblocktrans %}
        </header>

        <section class="cms-welcome-cards">
            <div class="cms-welcome-section">
                {% blocktranslate %}
                    <h2>Help Funding</h2>
                    <p>
                        Your funding directly benefits the product, mainly through the
                        <a href="https://www.django-cms.org/en/fellowship-program/">django CMS Fellowship Program</a>!
                    </p>
                    <p>
                        A quick way for yourself or your organisation to donate is on
                        <a href="https://github.com/sponsors/django-cms">Github Sponsors</a>.
                    </p>
                {% endblocktranslate %}
            </div>
            <div class="cms-welcome-section">
                {% blocktranslate %}
                    <h2>Join Us</h2>
                    <p>
                        The django CMS Association is a non-profit organisation that funds and steers the development of
                        django CMS.
                    </p>
                    <p>
                        You can <a href="https://www.django-cms.org/en/memberships/">join both as an individual or as an
                        organisation</a>.
                    </p>
                {% endblocktranslate %}
            </div>
            <div class="cms-welcome-section">
                {% blocktranslate %}
                    <h2>Contribute</h2>
                    <ul>
                        <li><a href="https://www.django-cms.org/en/contribute/">Contribute code:</a> fix a bug or
                            implement a new feature!</li>
                        <li><a href="https://www.django-cms.org/en/volunteering-opportunities/">Volunteer:</a>
                            We offer fun and efficient team work!</li>
                        <li><a href="https://www.django-cms.org/en/repositories-plugins/">Open-source your work:</a>
                            Make the ecosystem strong.</li>
                    </ul>
                {% endblocktranslate %}
            </div>
        </section>

        <footer class="cms-welcome-footer">
            <h2 class="cms-hidden">{% trans "Installation Notes" %}</h2>
            <p class="cms-welcome-links">
                <a href="//django-cms.org/" target="_blank">{% trans "django CMS" %}</a>
                <a href="//django-cms.org/en/support" target="_blank">{% trans "Support" %}</a>
                <a href="//docs.django-cms.org/" target="_blank">{% trans "Documentation" %}</a>
                <a href="//user-guide.django-cms.org/" target="_blank">{% trans "User guide" %}</a>
                <a href="//www.django-cms.org/en/donate/" target="_blank">{% trans "Give back" %}</a>
            </p>
            {% blocktrans %}
                <p class="cms-welcome-notes">If you don't see the django CMS logo at the top, make sure
                    you linked the <code>static/cms</code> folder to your
                    static files.</p>
            {% endblocktrans %}
            {% if django_debug %}
                {% blocktrans %}
                    <p class="cms-welcome-notes">You're seeing this message because you have
                        <code>DEBUG = True</code> in your django settings file and
                        haven't added any pages yet.
                    </p>
                {% endblocktrans %}
            {% endif %}
        </footer>
    </div>
    {% endlanguage %}
    {% render_block "js" %}

    {% language request.toolbar.toolbar_language %}
    <script>
        {% if user.is_authenticated %}
            CMS.$(function () {
                var btn = CMS.$('.js-welcome-add');
                btn.on('click', function (e) {
                    e.preventDefault();
                    var modal = new CMS.Modal();
                    modal.open({
                        url: '{% url "admin:cms_wizard_create" %}?language={{ LANGUAGE_CODE }}',
                        title: '{% trans "Welcome to django CMS" %}'
                    });
                });
            });
        {% else %}
            window.location.href = '{% url "admin:login" %}?next={{ next_url }}';
        {% endif %}
    </script>
    {% endlanguage %}
</body>
</html>
