djLint/tests/django_cms/cms/welcome.html
2021-07-29 13:41:34 -05:00

127 lines
5.6 KiB
HTML

<!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 "Installation successful!" %}
</h1>
<a href="/" class="cms-welcome-logo">
<span class="cms-hidden">{% trans "django CMS" %}</span>
</a>
</header>
{{ request.version }}
<section class="cms-welcome-section">
<h2>
{% if user.is_authenticated %}
{% trans "Add your first page" %}
{% else %}
{% trans "Please log in" %}
{% endif %}
</h2>
<p>
{% blocktrans %}
Welcome to django CMS version
<strong>{{ cms_version }}</strong>
.
{% endblocktrans %}
</p>
<p>
{% url "admin:cms_page_add" as admin_add_page %}
{% if user.is_authenticated %}
{% blocktrans %}
<a href="{{ admin_add_page }}" class="js-welcome-add">
Add the first page
</a>
to the system to continue.
{% endblocktrans %}
{% else %}
{% blocktrans %}
JavaScript seems to be disabled so please
<a href="{{ admin_add_page }}" class="js-welcome-add">
add a page
</a>
manually.
{% endblocktrans %}
{% endif %}
</p>
</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>
</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 "cms_wizard_create" %}?language={{ LANGUAGE_CODE }}',
title: '{% trans "Welcome to django CMS" %}'
});
});
// automatically trigger the modal if sideframe isn't open
if (!CMS.settings.sideframe.url) {
btn.trigger('click');
}
});
{% else %}
window.location.href = '{% url "admin:login" %}?next={{ next_url }}?{{ cms_edit_on }}';
{% endif %}
</script>
{% endlanguage %}
</body>
</html>