[Refactor] Rename the app module to calsocial

Just for clarity
This commit is contained in:
2018-07-02 08:33:21 +02:00
parent 6b3d36ff21
commit 7846d9017d
23 changed files with 9 additions and 9 deletions

View File

@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html>
<head>
<title>Calendar.Social</title>
<link rel="icon" type="image/png" sizes="16x16" href="{{ url_for('static', filename='images/calendar-social-icon-16.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/calendar-social-icon-32.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/calendar-social-icon-96.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/calendar-social-icon-192.png') }}">
{% block head %}
<style>
header > h1 > img {
height: 1em;
}
footer {
margin-top: 3em;
font-weight: bold;
border-top: 1px dotted black;
padding-top: 1em;
}
</style>
{% endblock %}
</head>
<body>
<header>
<h1>
<img src="{{ url_for('static', filename='images/calendar-social-icon.svg') }}">
Calendar.social
</h1>
<nav class="menu">
{% if current_user.is_authenticated %}
{{ _('Logged in as %(username)s', username=current_user.username) }}
{% endif %}
<ul>
{% if not current_user.is_authenticated %}
<li><a href="{{ url_for('security.login') }}">{% trans %}Login{% endtrans %}</a></li>
{% else %}
<li><a href="{{ url_for('security.logout') }}">{% trans %}Logout{% endtrans %}</a></li>
<li><a href="{{ url_for('hello') }}">{% trans %}Calendar view{% endtrans %}</a></li>
{% endif %}
</ul>
</nav>
</header>
{% block content %}{% endblock %}
<footer>
Soon…™
</footer>
{% block scripts %}{% endblock %}
</body>
</html>

View File

@@ -0,0 +1,43 @@
{% extends 'base.html' %}
{% block content %}
<form method="post">
{{ form.hidden_tag() }}
{{ form.errors }}
<br>
{{ form.title.errors }}
{{ form.title.label }}
{{ form.title }}
<br>
{{ form.time_zone.errors }}
{{ form.time_zone.label }}
{{ form.time_zone }}
<br>
{{ form.start_time.errors }}
{{ form.start_time.label }}
{{ form.start_time }}
<br>
{{ form.end_time.errors }}
{{ form.end_time.label }}
{{ form.end_time }}
<br>
{{ form.all_day.errors }}
{{ form.all_day.label }}
{{ form.all_day }}
<br>
{{ form.description.errors }}
{{ form.description.label }}
{{ form.description }}
<br>
<button type="submit">{% trans %}Save{% endtrans %}</button>
<a href="{{ url_for('hello') }}">Cancel</a>
</form>
{% endblock content %}

View File

@@ -0,0 +1,9 @@
{% extends 'base.html' %}
{% block content %}
{{ _('Welcome to Calendar.social, %(username)s!', username=current_user.username) }}
{% include 'month-view.html' %}
<a href="{{ url_for('new_event') }}">{% trans %}Add event{% endtrans %}</a>
{% endblock content %}

View File

@@ -0,0 +1,82 @@
<style>
table.calendar > * {
font-family: sans;
}
table.calendar {
width: 100%;
border-collapse: collapse;
}
tr.month > td {
text-align: center;
font-weight: bold;
border-bottom: 2px solid black;
padding-bottom: .5em;
}
tr.days > td {
text-align: center;
border-bottom: 2px solid black;
}
tr.week > td {
height: 3em;
}
tr.week > td > span.day-num {
font-weight: bold;
}
tr.week > td.other-month > span.day-num {
font-weight: normal;
color: #909090;
}
tr.week > td.today {
background-color: #d8d8d8;
}
td > div.event {
border: 1px solid green;
background-color: white;
border-radius: 2px;
}
</style>
<table class="calendar">
<thead>
<tr class="month">
<td colspan="7">{{ calendar.month }}</td>
</tr>
<tr class="days">
{% for day in calendar.day_names %}
<td>
{{ day }}
</td>
{% endfor %}
</tr>
</thead>
<tbody>
{% set markers = namespace() -%}
{% set markers.first = true -%}
{% for day in calendar.days -%}
{% if loop.index0 % (calendar.day_names) | length == 0 -%}
{% if not markers.first %}
</tr>
{%- else %}
{%- set markers.first = false %}
{%- endif %}
<tr class="week">
{%- endif %}
<td class="{% if day.month != calendar.timestamp.month %} other-month{% endif %}{% if day.date() == calendar.timestamp.date() %} today{% endif %}">
<span class="day-num">{{ day.day }}</span>
{% for event in calendar.day_events(day, user=current_user) %}
<div class="event">
{{ event.title }}
</div>
{% endfor %}
</td>
{% endfor %}
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,5 @@
{% extends 'base.html' %}
{% block content %}
<h1>Registration is disabled on this instance</h1>
{% endblock content %}

View File

@@ -0,0 +1,29 @@
{% extends 'base.html' %}
{% block content %}
<form method="post">
{{ form.hidden_tag() }}
{{ form.username.errors }}
{{ form.username.label }}
{{ form.username }}
<br>
{{ form.email.errors }}
{{ form.email.label }}
{{ form.email }}
<br>
{{ form.password.errors }}
{{ form.password.label }}
{{ form.password }}
<br>
{{ form.password_retype.errors }}
{{ form.password_retype.label }}
{{ form.password_retype }}
<br>
<button type="submit">{% trans %}Register{% endtrans %}</button>
</form>
{% endblock %}

View File

@@ -0,0 +1,5 @@
{% extends 'base.html' %}
{% block content %}
<p>Welcome to Calendar.social. There will be lot of content here soon!</p>
{% endblock content %}