diff --git a/calsocial/__init__.py b/calsocial/__init__.py index 55f1aaa..452e40d 100644 --- a/calsocial/__init__.py +++ b/calsocial/__init__.py @@ -161,9 +161,6 @@ class CalendarSocialApp(Flask): from .calendar_system.gregorian import GregorianCalendar - if not current_user.is_authenticated: - return render_template('welcome.html') - try: timestamp = datetime.fromtimestamp(float(request.args.get('date'))) except TypeError: @@ -171,6 +168,14 @@ class CalendarSocialApp(Flask): calendar = GregorianCalendar(timestamp.timestamp()) + if not current_user.is_authenticated: + login_form_class = current_app.extensions['security'].login_form + login_form = login_form_class() + return render_template('welcome.html', + calendar=calendar, + user_only=False, + login_form=login_form) + return render_template('index.html', calendar=calendar, user_only=True) @staticmethod diff --git a/calsocial/static/css/style.css b/calsocial/static/css/style.css index 0b59f6e..f4a702e 100644 --- a/calsocial/static/css/style.css +++ b/calsocial/static/css/style.css @@ -6,6 +6,34 @@ header > h1 > img { margin-top: 10px; } +.ui.profile { + display: block; + position: relative; + height: 50px; +} + +.ui.profile > .avatar { + width: 48px; + height: 48px; + border: 1px solid black; + border-radius: 50%; + position: absolute; +} + +.ui.profile > .display.name { + position: absolute; + left: 58px; + font-weight: bold; + color: #000000; +} + +.ui.profile > .handle { + position: absolute; + top: 1.5em; + left: 58px; + color: #666666; +} + .timezone-warning { color: #e94a4a; } diff --git a/calsocial/templates/welcome.html b/calsocial/templates/welcome.html index 10c27c3..948d555 100644 --- a/calsocial/templates/welcome.html +++ b/calsocial/templates/welcome.html @@ -1,5 +1,78 @@ {% extends 'base.html' %} {% block content %} -

Welcome to Calendar.social. There will be lot of content here soon!

+
+
+
+

{% trans %}Login{% endtrans %}

+
+ {{ login_form.hidden_tag() }} + {{ login_form.email.label }} + {{ login_form.email }} + {{ login_form.password.label }} + {{ login_form.password }} + +
+ {% if config.REGISTRATION_ENABLED %} +
+ {% trans %}Or{% endtrans %} +
+ {% trans %}Register an account{% endtrans %} + {% endif %} +
+

{% trans %}What is Calendar.social?{% endtrans %}

+

+ {% trans %}Calendar.social is a calendar app based on open protocols and free, open source software.{% endtrans %} + {% trans %}It is decentralised like one of its counterparts, email.{% endtrans %} +

+
+
+

{% trans %}Peek inside{% endtrans %}

+ {% include 'month-view.html' %} +
+
+
+
+

{% trans %}Built for users in mind{% endtrans %}

+

+ {% trans %}From planning your appointments to organising large scale events Calendar.social can help with all your scheduling needs.{% endtrans %} +

+
+ +
+
+
+
12
+
+ {% trans count=12 %}user{% pluralize %}users{% endtrans %} +
+
+
+
87
+
+ {% trans count=87 %}event{% pluralize %}events{% endtrans %} +
+
+
+
+ +
+

{% trans %}Built for people{% endtrans %}

+

+ {% trans %}Calendar.social is not a commercial network.{% endtrans %} + {% trans %}No advertising, no data mining, no walled gardens.{% endtrans %} + {% trans %}There is no central authority.{% endtrans %} +

+
+ +
+

{% trans %}Administered by{% endtrans %}

+ +
+
Your Admin here
+
@admin@he.re
+
+
+
+
{% endblock content %}