diff --git a/django_lostplaces/lostplaces/migrations/0004_release_0_1_3.py b/django_lostplaces/lostplaces/migrations/0004_release_0_1_3.py new file mode 100644 index 0000000..e5137a7 --- /dev/null +++ b/django_lostplaces/lostplaces/migrations/0004_release_0_1_3.py @@ -0,0 +1,102 @@ +# Generated by Django 3.1.1 on 2020-12-19 13:53 + +import django.core.validators +from django.db import migrations, models +import django.db.models.deletion +import easy_thumbnails.fields +import lostplaces.models.place + + +class Migration(migrations.Migration): + + dependencies = [ + ('lostplaces', '0003_voucher'), + ] + + operations = [ + migrations.AlterField( + model_name='photoalbum', + name='label', + field=models.CharField(max_length=100, verbose_name='link text'), + ), + migrations.AlterField( + model_name='photoalbum', + name='submitted_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='photoalbums', to='lostplaces.explorer', verbose_name='Submitter'), + ), + migrations.AlterField( + model_name='photoalbum', + name='submitted_when', + field=models.DateTimeField(auto_now_add=True, null=True, verbose_name='Submission date'), + ), + migrations.AlterField( + model_name='photoalbum', + name='url', + field=models.URLField(verbose_name='URL'), + ), + migrations.AlterField( + model_name='place', + name='description', + field=models.TextField(help_text="Description of the place: e.g. how to get there, where to be careful, the place's history...", verbose_name='Description'), + ), + migrations.AlterField( + model_name='place', + name='latitude', + field=models.FloatField(help_text='Latitude in decimal format: e. g. 41.40338', validators=[django.core.validators.MinValueValidator(-90), django.core.validators.MaxValueValidator(90)], verbose_name='Latitude'), + ), + migrations.AlterField( + model_name='place', + name='location', + field=models.CharField(max_length=50, verbose_name='Location'), + ), + migrations.AlterField( + model_name='place', + name='longitude', + field=models.FloatField(help_text='Longitude in decimal format: e. g. 2.17403', validators=[django.core.validators.MinValueValidator(-180), django.core.validators.MaxValueValidator(180)], verbose_name='Longitude'), + ), + migrations.AlterField( + model_name='place', + name='name', + field=models.CharField(max_length=50, verbose_name='Name'), + ), + migrations.AlterField( + model_name='place', + name='submitted_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='places', to='lostplaces.explorer', verbose_name='Submitter'), + ), + migrations.AlterField( + model_name='place', + name='submitted_when', + field=models.DateTimeField(auto_now_add=True, null=True, verbose_name='Submission date'), + ), + migrations.AlterField( + model_name='placeimage', + name='description', + field=models.TextField(blank=True, verbose_name='Description'), + ), + migrations.AlterField( + model_name='placeimage', + name='filename', + field=easy_thumbnails.fields.ThumbnailerImageField(help_text='Optional: One or more images to upload', upload_to=lostplaces.models.place.generate_image_upload_path, verbose_name='Filename(s)'), + ), + migrations.AlterField( + model_name='placeimage', + name='submitted_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='placeimages', to='lostplaces.explorer', verbose_name='Submitter'), + ), + migrations.AlterField( + model_name='placeimage', + name='submitted_when', + field=models.DateTimeField(auto_now_add=True, null=True, verbose_name='Submission date'), + ), + migrations.AlterField( + model_name='voucher', + name='created_when', + field=models.DateTimeField(auto_now_add=True, verbose_name='Creation date'), + ), + migrations.AlterField( + model_name='voucher', + name='expires_when', + field=models.DateTimeField(verbose_name='Expiration date'), + ), + ] diff --git a/django_lostplaces/lostplaces/static/main.css b/django_lostplaces/lostplaces/static/main.css index 951ba23..a242677 100644 --- a/django_lostplaces/lostplaces/static/main.css +++ b/django_lostplaces/lostplaces/static/main.css @@ -723,6 +723,10 @@ body { margin: 0; padding: 0; } +.LP-Figure { + padding: 0; + margin: 0; } + .LP-Logo { max-width: 100%; max-height: 100%; @@ -1710,6 +1714,54 @@ body { top: 7.8125px; } .LP-ImageGrid__Item > .LP-Link:hover + .LP-ImageGrid__DeleteItem, .LP-ImageGrid__DeleteItem:hover { visibility: visible; } + .LP-ImageGrid__LightBox { + visibility: hidden; + display: none; + position: fixed; + pointer-events: none; + flex-direction: row; + justify-content: center; + align-items: center; + background-color: rgba(86, 86, 86, 0.9); + padding: 2rem; + padding-bottom: 0; + width: 100vw; + height: 100vh; + z-index: 30; + top: 0; + left: 0; + box-sizing: border-box; } + .LP-ImageGrid__LightBox:target { + visibility: visible; + display: grid; + grid-template-areas: 'picture picture' 'previous next'; + grid-template-rows: 1fr 4rem; + grid-template-columns: 1fr 1fr; + pointer-events: initial; } + .LP-ImageGrid__FullSizeImage { + grid-area: picture; } + .LP-ImageGrid__Previous { + grid-area: previous; + align-self: center; + justify-self: end; } + .LP-ImageGrid__Next { + grid-area: next; + align-self: center; + justify-self: start; } + .LP-ImageGrid__Previous, .LP-ImageGrid__Next { + padding: 25px; + color: #D7CEC7; + text-decoration: none; + font-family: "Montserrat", Helvetica, sans-serif; + font-weight: bold; + font-size: 20px; } + .LP-ImageGrid__Close { + position: fixed; + right: 1rem; + top: 1rem; + left: unset; + visibility: visible; + opacity: 1; } .LP-Map { margin-bottom: 25px; } diff --git a/django_lostplaces/lostplaces/templates/403.html b/django_lostplaces/lostplaces/templates/403.html index ef4fbb8..566a9ab 100644 --- a/django_lostplaces/lostplaces/templates/403.html +++ b/django_lostplaces/lostplaces/templates/403.html @@ -1,7 +1,7 @@ {% extends 'global.html'%} {% load i18n %} -{% block title %}{% trans 'Forbidden' %}{% endblock %} +{% block title %}{% translate 'Forbidden' %}{% endblock %} {% block additional_head %} {% if request.META.HTTP_REFERER %} @@ -11,6 +11,6 @@ {% block maincontent %} {% if request.META.HTTP_REFERER %} -

{% trans 'You will be redirected in 5 seconds' %}

{% trans 'Go Back' %}

+

{% translate 'You will be redirected in 5 seconds' %}

{% translate 'Go Back' %}

{% endif %} {% endblock maincontent %} \ No newline at end of file diff --git a/django_lostplaces/lostplaces/templates/explorer/profile.html b/django_lostplaces/lostplaces/templates/explorer/profile.html index a2e49b9..e5e25cb 100644 --- a/django_lostplaces/lostplaces/templates/explorer/profile.html +++ b/django_lostplaces/lostplaces/templates/explorer/profile.html @@ -49,7 +49,7 @@ - {% trans 'Joined' %} + {% translate 'Joined' %} {{explorer.user.date_joined|date:'d.m.Y'}} @@ -57,7 +57,7 @@ - {% trans 'Places'%} + {% translate 'Places'%} {{place_count}} @@ -65,7 +65,7 @@ - {% trans 'Place assets'%} + {% translate 'Place Assets'%} {{asset_count}} @@ -81,43 +81,17 @@
-
-

{% trans 'Favorite places' %}

- - {% include 'partials/nav/pagination.html' %} -
-
- -
-
-

{% trans 'Visited places' %}

- - {% include 'partials/nav/pagination.html' %} -
-
- -
-
-

{% trans 'Places submitted by' %} {{explorer.user.username}}

- +
+

{% translate 'Places submitted by' %} {{explorer.user.username}}

+ {% include 'partials/nav/pagination.html' %} @@ -125,47 +99,30 @@
-

{% trans 'Images submitted by' %} {{explorer.user.username}}

-
- -
+ {% translate 'Images submitted by' as submitted_by %} + {% include 'partials/placeImageGrid.html' with headline=submitted_by|add:' '|add:explorer.user.username image_list=assets.placeimages.all%}
-

{% trans 'Photo albums submitted by' %} {{explorer.user.username}}

- +

{% translate 'Photo albums submitted by' %} {{explorer.user.username}}

+
{% endblock maincontent %} \ No newline at end of file diff --git a/django_lostplaces/lostplaces/templates/global.html b/django_lostplaces/lostplaces/templates/global.html index e474d1b..ac54f70 100644 --- a/django_lostplaces/lostplaces/templates/global.html +++ b/django_lostplaces/lostplaces/templates/global.html @@ -29,16 +29,16 @@ {% if user.is_authenticated %} Hi {{ user.username }}! - {% trans 'Logout' %} | - {% trans 'Profile' %} + {% translate 'Logout' %} | + {% translate 'Profile' %} {% if user.is_superuser %} - | {% trans 'Admin' %} + | {% translate 'Admin' %} {% endif %} {% else %} You are not logged in. - {% trans 'Login' %} | - {% trans 'Sign up' %} + {% translate 'Login' %} | + {% translate 'Sign up' %} {% endif %} @@ -48,14 +48,14 @@ diff --git a/django_lostplaces/lostplaces/templates/home.html b/django_lostplaces/lostplaces/templates/home.html index 1ad244b..6df0ef5 100644 --- a/django_lostplaces/lostplaces/templates/home.html +++ b/django_lostplaces/lostplaces/templates/home.html @@ -7,7 +7,7 @@ {% endblock additional_head %} -# {% block title %}{% trans 'Home' %}{% endblock %} +# {% block title %}{% translate 'Home' %}{% endblock %} {% block maincontent %} @@ -17,7 +17,7 @@ {% include 'partials/osm_map.html' with config=mapping_config modifier='wide' %}
-

{% trans 'Explore the latest places' %}

+

{% translate 'Explore the latest places' %}