Create the contents of the welcome page
This commit is contained in:
parent
13e55e7c68
commit
ff304dc64d
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -1,5 +1,78 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<p>Welcome to Calendar.social. There will be lot of content here soon!</p>
|
||||
<div class="ui grid">
|
||||
<div class="row">
|
||||
<div class="four wide column">
|
||||
<h2>{% trans %}Login{% endtrans %}</h2>
|
||||
<form class="ui form" method="post" action="{{ url_for('security.login') }}">
|
||||
{{ login_form.hidden_tag() }}
|
||||
{{ login_form.email.label }}
|
||||
{{ login_form.email }}
|
||||
{{ login_form.password.label }}
|
||||
{{ login_form.password }}
|
||||
<button type="submit" class="fluid ui primary button">{% trans %}Login{% endtrans %}</button>
|
||||
</form>
|
||||
{% if config.REGISTRATION_ENABLED %}
|
||||
<div class="ui horizontal divider">
|
||||
{% trans %}Or{% endtrans %}
|
||||
</div>
|
||||
<a href="{{ url_for('register' ) }}" class="fluid ui button">{% trans %}Register an account{% endtrans %}</a>
|
||||
{% endif %}
|
||||
<div class="ui horizontal divider"></div>
|
||||
<h2>{% trans %}What is Calendar.social?{% endtrans %}</h2>
|
||||
<p>
|
||||
{% 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 %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="twelve wide column">
|
||||
<h2>{% trans %}Peek inside{% endtrans %}</h2>
|
||||
{% include 'month-view.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="four wide column">
|
||||
<h2>{% trans %}Built for users in mind{% endtrans %}</h2>
|
||||
<p>
|
||||
{% trans %}From planning your appointments to organising large scale events Calendar.social can help with all your scheduling needs.{% endtrans %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="four wide column">
|
||||
<div class="ui statistics">
|
||||
<div class="statistic">
|
||||
<div class="value">12</div>
|
||||
<div class="label">
|
||||
{% trans count=12 %}user{% pluralize %}users{% endtrans %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="statistic">
|
||||
<div class="value">87</div>
|
||||
<div class="label">
|
||||
{% trans count=87 %}event{% pluralize %}events{% endtrans %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="four wide column">
|
||||
<h2>{% trans %}Built for people{% endtrans %}</h2>
|
||||
<p>
|
||||
{% 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 %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="four wide column">
|
||||
<h2>{% trans %}Administered by{% endtrans %}</h2>
|
||||
<a href="#" class="ui profile">
|
||||
<div class="avatar"></div>
|
||||
<div class="display name">Your Admin here</div>
|
||||
<div class="handle">@admin@he.re</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
Loading…
Reference in New Issue
Block a user