Compare commits
78 Commits
0.1
...
45dba48421
Author | SHA1 | Date | |
---|---|---|---|
45dba48421 | |||
ae2c9ed956 | |||
1b2b493128 | |||
1dad2cc1e3 | |||
24a406851e | |||
6b539866c0 | |||
e13110f0a2 | |||
ca92e2eb94 | |||
fb7880681f | |||
35c4d09d7e | |||
924f4821a6 | |||
a119957313 | |||
6bbc33c9d6 | |||
4fbb914aac | |||
cba3fe4366 | |||
5c3b68252e | |||
81a5e8246a | |||
6bf8eb7083 | |||
c722830e66 | |||
ae41f539a1 | |||
c28cc3ac3c | |||
20a735d2ec | |||
b755f7f45e | |||
b7b3c5b89b | |||
b95e565bef | |||
91c888db8f | |||
843832d978 | |||
7a3b8529f8 | |||
538b43c2a1 | |||
ca2eac533f | |||
2007b512c7 | |||
751d4c81fe | |||
7a757bcf35 | |||
55b8d16751 | |||
f34d70edd5 | |||
c84be34a37 | |||
3959096c95 | |||
76daa71217 | |||
0707d2d51e | |||
d45724b774 | |||
c8e46d42ee | |||
591469799f | |||
3cd44959b1 | |||
ffef52269a | |||
9a30ced90c | |||
d44bf0c0f2 | |||
cad53c070c | |||
a0627761a7 | |||
04940a0901 | |||
3ef31eda0f | |||
7cb8bc6bac | |||
636bb880c1 | |||
c9d9ca9de0 | |||
5f3be5fc83 | |||
f916ac9742 | |||
03af8a0c02 | |||
65f3642272 | |||
e00a0f687b | |||
9af55d3f24 | |||
719e75a449 | |||
6688536a78 | |||
7835ddcf16 | |||
3caada8f08 | |||
4113811c5f | |||
a660763ea4 | |||
55fe79b82c | |||
b34e88a3ad | |||
f52dd733d8 | |||
ff428beaef | |||
e8c4faff8e | |||
0b0a401486 | |||
2b56eed759 | |||
e387091da6 | |||
5c5ad9502c | |||
baf3f54e1a | |||
8cb7e61274 | |||
fa1274c595 | |||
a5839c2c36 |
1
Pipfile
@@ -11,6 +11,7 @@ django = "*"
|
||||
easy-thumbnails = "*"
|
||||
image = "*"
|
||||
django-widget-tweaks = "*"
|
||||
django-svg-icons = "*"
|
||||
|
||||
# Commented out to not explicitly specify Python 3 subversion.
|
||||
# [requires]
|
||||
|
66
Readme.md
@@ -9,7 +9,11 @@ Right now it depends on the following non-core Python 3 libraries. These can be
|
||||
|
||||
* [django](https://www.djangoproject.com/) django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
|
||||
* [easy-thumbnails](https://github.com/SmileyChris/easy-thumbnails) A powerful, yet easy to implement thumbnailing application for Django 1.11+
|
||||
* [image](https://github.com/francescortiz/image) Image cropping for django
|
||||
* [django-widget-tweaks](https://github.com/jazzband/django-widget-tweaks) Tweak the form field rendering in templates, not in python-level form definitions.
|
||||
|
||||
|
||||
## Development
|
||||
### Setting up a (pipenv) virtual environment for development
|
||||
|
||||
After having obtained the repository contents (either via .zip download or git clone), you can easily setup a pipenv virtual environment. The repo provides a Pipfile for easy dependency management that does not mess with your system.
|
||||
@@ -18,6 +22,7 @@ After having obtained the repository contents (either via .zip download or git c
|
||||
$ cd lostplaces-backend
|
||||
$ pipenv install
|
||||
$ pipenv shell
|
||||
(lostplaces-backend) $ lostplaces/manage.py makemigrations
|
||||
(lostplaces-backend) $ lostplaces/manage.py migrate
|
||||
(lostplaces-backend) $ lostplaces/manage.py createsuperuser
|
||||
(lostplaces-backend) $ lostplaces/manage.py runserver
|
||||
@@ -33,4 +38,65 @@ $ pipenv shell
|
||||
Visit: [admin](http://localhost:8000/admin) for administrative backend or
|
||||
[frontend](http://localhost:8000/)
|
||||
|
||||
## Installing lostplaces
|
||||
|
||||
### Install dependencies
|
||||
Python3, Django3, easy-thumbnails, image, django-widget-tweaks
|
||||
```
|
||||
pip install --user django easy-thumbnails image django-widget-tweaks
|
||||
```
|
||||
Or, if you use pipenv
|
||||
```
|
||||
pipenv install
|
||||
```
|
||||
|
||||
|
||||
### Add 'lostplaces_app' to your INSTALLED_APPS setting like this
|
||||
|
||||
```
|
||||
INSTALLED_APPS = [
|
||||
...
|
||||
'lostplaces_app',
|
||||
'easy_thumbnails',
|
||||
'widget_tweaks',
|
||||
]
|
||||
```
|
||||
|
||||
### Add this configuration to your settings.py
|
||||
|
||||
```
|
||||
from django.urls import reverse_lazy
|
||||
...
|
||||
AUTH_USER_MODEL = 'lostplaces_app.Explorer'
|
||||
|
||||
LOGIN_URL = reverse_lazy('login')
|
||||
|
||||
THUMBNAIL_ALIASES = {
|
||||
'': {
|
||||
'thumbnail': {'size': (300, 300), 'crop': False},
|
||||
'hero': {'size': (700, 700), 'crop': False},
|
||||
'large': {'size': (1920, 1920), 'crop': False},
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Include the lostplaces URLconf in your project urls.py like this
|
||||
|
||||
```
|
||||
from django.urls import path, include
|
||||
...
|
||||
urlpatterns = [
|
||||
...
|
||||
path('lostplaces/', include('lostplaces_app.urls')),
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
```
|
||||
|
||||
Run ``python manage.py migrate`` to create the lost places models.
|
||||
|
||||
Start the development server and visit http://127.0.0.1:8000/admin/
|
||||
|
||||
Visit http://127.0.0.1:8000/lostplaces/ to CRUD lost places.
|
||||
|
||||
|
||||
Happy developing ;-)
|
||||
|
@@ -43,7 +43,7 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'easy_thumbnails',
|
||||
'widget_tweaks',
|
||||
'widget_tweaks'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@@ -148,3 +148,5 @@ THUMBNAIL_ALIASES = {
|
||||
'large': {'size': (1920, 1920), 'crop': False},
|
||||
},
|
||||
}
|
||||
|
||||
SVG_ICONS_SOURCE_FILE = os.path.join(BASE_DIR, 'lostplaces_app', 'static', 'icons', 'icons.icomoon.json')
|
@@ -26,3 +26,4 @@ admin.site.register(Explorer, ExplorerAdmin)
|
||||
admin.site.register(Voucher, VoucherAdmin)
|
||||
admin.site.register(Place)
|
||||
admin.site.register(PlaceImage)
|
||||
admin.site.register(PhotoAlbum)
|
||||
|
@@ -29,7 +29,7 @@ class Voucher(models.Model):
|
||||
Creation date is being set automatically during voucher creation.
|
||||
"""
|
||||
|
||||
code = models.CharField(unique=True, max_length=10)
|
||||
code = models.CharField(unique=True, max_length=30)
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
expires = models.DateField()
|
||||
|
||||
@@ -55,6 +55,22 @@ class Place (models.Model):
|
||||
longitude = models.FloatField()
|
||||
description = models.TextField()
|
||||
|
||||
# Get center position of LP-geocoordinates.
|
||||
|
||||
def average_latlon(place_list):
|
||||
amount = len(place_list)
|
||||
# Init fill values to prevent None
|
||||
longitude = 0
|
||||
latitude = 0
|
||||
|
||||
if amount > 0:
|
||||
for place in place_list:
|
||||
longitude += place.longitude
|
||||
latitude += place.latitude
|
||||
return (latitude / amount, longitude / amount)
|
||||
|
||||
return (latitude, longitude)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
@@ -126,3 +142,24 @@ def auto_delete_file_on_change(sender, instance, **kwargs):
|
||||
if not old_file == new_file:
|
||||
if os.path.isfile(old_file.path):
|
||||
os.remove(old_file.path)
|
||||
|
||||
|
||||
class ExternalLink(models.Model):
|
||||
url = models.URLField(max_length=200)
|
||||
label = models.CharField(max_length=100)
|
||||
submitted_by = models.ForeignKey(
|
||||
Explorer,
|
||||
on_delete=models.SET_NULL,
|
||||
null=True,
|
||||
blank=True,
|
||||
related_name='external_links'
|
||||
)
|
||||
submitted_when = models.DateTimeField(auto_now_add=True, null=True)
|
||||
|
||||
class PhotoAlbum(ExternalLink):
|
||||
place = models.ForeignKey(
|
||||
Place,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='photo_albums',
|
||||
null=True
|
||||
)
|
44
lostplaces/lostplaces_app/static/icons/cancel.svg
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 512.001 512.001" style="enable-background:new 0 0 512.001 512.001;" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M284.286,256.002L506.143,34.144c7.811-7.811,7.811-20.475,0-28.285c-7.811-7.81-20.475-7.811-28.285,0L256,227.717
|
||||
L34.143,5.859c-7.811-7.811-20.475-7.811-28.285,0c-7.81,7.811-7.811,20.475,0,28.285l221.857,221.857L5.858,477.859
|
||||
c-7.811,7.811-7.811,20.475,0,28.285c3.905,3.905,9.024,5.857,14.143,5.857c5.119,0,10.237-1.952,14.143-5.857L256,284.287
|
||||
l221.857,221.857c3.905,3.905,9.024,5.857,14.143,5.857s10.237-1.952,14.143-5.857c7.811-7.811,7.811-20.475,0-28.285
|
||||
L284.286,256.002z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
1
lostplaces/lostplaces_app/static/icons/delete.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="427pt" viewBox="-40 0 427 427.00131" width="427pt" xmlns="http://www.w3.org/2000/svg"><path d="m232.398438 154.703125c-5.523438 0-10 4.476563-10 10v189c0 5.519531 4.476562 10 10 10 5.523437 0 10-4.480469 10-10v-189c0-5.523437-4.476563-10-10-10zm0 0"/><path d="m114.398438 154.703125c-5.523438 0-10 4.476563-10 10v189c0 5.519531 4.476562 10 10 10 5.523437 0 10-4.480469 10-10v-189c0-5.523437-4.476563-10-10-10zm0 0"/><path d="m28.398438 127.121094v246.378906c0 14.5625 5.339843 28.238281 14.667968 38.050781 9.285156 9.839844 22.207032 15.425781 35.730469 15.449219h189.203125c13.527344-.023438 26.449219-5.609375 35.730469-15.449219 9.328125-9.8125 14.667969-23.488281 14.667969-38.050781v-246.378906c18.542968-4.921875 30.558593-22.835938 28.078124-41.863282-2.484374-19.023437-18.691406-33.253906-37.878906-33.257812h-51.199218v-12.5c.058593-10.511719-4.097657-20.605469-11.539063-28.03125-7.441406-7.421875-17.550781-11.5546875-28.0625-11.46875h-88.796875c-10.511719-.0859375-20.621094 4.046875-28.0625 11.46875-7.441406 7.425781-11.597656 17.519531-11.539062 28.03125v12.5h-51.199219c-19.1875.003906-35.394531 14.234375-37.878907 33.257812-2.480468 19.027344 9.535157 36.941407 28.078126 41.863282zm239.601562 279.878906h-189.203125c-17.097656 0-30.398437-14.6875-30.398437-33.5v-245.5h250v245.5c0 18.8125-13.300782 33.5-30.398438 33.5zm-158.601562-367.5c-.066407-5.207031 1.980468-10.21875 5.675781-13.894531 3.691406-3.675781 8.714843-5.695313 13.925781-5.605469h88.796875c5.210937-.089844 10.234375 1.929688 13.925781 5.605469 3.695313 3.671875 5.742188 8.6875 5.675782 13.894531v12.5h-128zm-71.199219 32.5h270.398437c9.941406 0 18 8.058594 18 18s-8.058594 18-18 18h-270.398437c-9.941407 0-18-8.058594-18-18s8.058593-18 18-18zm0 0"/><path d="m173.398438 154.703125c-5.523438 0-10 4.476563-10 10v189c0 5.519531 4.476562 10 10 10 5.523437 0 10-4.480469 10-10v-189c0-5.523437-4.476563-10-10-10zm0 0"/></svg>
|
After Width: | Height: | Size: 1.9 KiB |
13
lostplaces/lostplaces_app/static/icons/icons.icomoon.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"trash": {
|
||||
"paths": [
|
||||
"m232.398438 154.703125c-5.523438 0-10 4.476563-10 10v189c0 5.519531 4.476562 10 10 10 5.523437 0 10-4.480469 10-10v-189c0-5.523437-4.476563-10-10-10zm0 0",
|
||||
"m114.398438 154.703125c-5.523438 0-10 4.476563-10 10v189c0 5.519531 4.476562 10 10 10 5.523437 0 10-4.480469 10-10v-189c0-5.523437-4.476563-10-10-10zm0 0",
|
||||
"m28.398438 127.121094v246.378906c0 14.5625 5.339843 28.238281 14.667968 38.050781 9.285156 9.839844 22.207032 15.425781 35.730469 15.449219h189.203125c13.527344-.023438 26.449219-5.609375 35.730469-15.449219 9.328125-9.8125 14.667969-23.488281 14.667969-38.050781v-246.378906c18.542968-4.921875 30.558593-22.835938 28.078124-41.863282-2.484374-19.023437-18.691406-33.253906-37.878906-33.257812h-51.199218v-12.5c.058593-10.511719-4.097657-20.605469-11.539063-28.03125-7.441406-7.421875-17.550781-11.5546875-28.0625-11.46875h-88.796875c-10.511719-.0859375-20.621094 4.046875-28.0625 11.46875-7.441406 7.425781-11.597656 17.519531-11.539062 28.03125v12.5h-51.199219c-19.1875.003906-35.394531 14.234375-37.878907 33.257812-2.480468 19.027344 9.535157 36.941407 28.078126 41.863282zm239.601562 279.878906h-189.203125c-17.097656 0-30.398437-14.6875-30.398437-33.5v-245.5h250v245.5c0 18.8125-13.300782 33.5-30.398438 33.5zm-158.601562-367.5c-.066407-5.207031 1.980468-10.21875 5.675781-13.894531 3.691406-3.675781 8.714843-5.695313 13.925781-5.605469h88.796875c5.210937-.089844 10.234375 1.929688 13.925781 5.605469 3.695313 3.671875 5.742188 8.6875 5.675782 13.894531v12.5h-128zm-71.199219 32.5h270.398437c9.941406 0 18 8.058594 18 18s-8.058594 18-18 18h-270.398437c-9.941407 0-18-8.058594-18-18s8.058593-18 18-18zm0 0",
|
||||
"m173.398438 154.703125c-5.523438 0-10 4.476563-10 10v189c0 5.519531 4.476562 10 10 10 5.523437 0 10-4.480469 10-10v-189c0-5.523437-4.476563-10-10-10zm0 0"
|
||||
],
|
||||
"height": "427pt",
|
||||
"width": "427pt",
|
||||
"viewBox": "-40 0 427 427.00131"
|
||||
}
|
||||
}
|
8
lostplaces/lostplaces_app/static/icons/plus.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg class="LP-Link__Icon" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512"
|
||||
xml:space="preserve">
|
||||
<g>
|
||||
<path d="M492,236H276V20c0-11.046-8.954-20-20-20c-11.046,0-20,8.954-20,20v216H20c-11.046,0-20,8.954-20,20s8.954,20,20,20h216
|
||||
v216c0,11.046,8.954,20,20,20s20-8.954,20-20V276h216c11.046,0,20-8.954,20-20C512,244.954,503.046,236,492,236z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 488 B |
52
lostplaces/lostplaces_app/static/icons/social/facebook.svg
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="facebook.svg"
|
||||
xml:space="preserve"
|
||||
style="enable-background:new 0 0 96.227 96.227;"
|
||||
viewBox="0 0 96.227 96.227"
|
||||
height="96.227px"
|
||||
width="96.227px"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Capa_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata1183"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs1181" /><sodipodi:namedview
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="48.113499"
|
||||
inkscape:cx="48.113499"
|
||||
inkscape:zoom="8.511125"
|
||||
showgrid="false"
|
||||
id="namedview1179"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<g
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="g1176">
|
||||
<path
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="path1174"
|
||||
d="m 73.099,15.973 -9.058,0.004 c -7.102,0 -8.477,3.375 -8.477,8.328 V 35.226 H 72.502 L 72.496,52.332 H 55.564 V 96.227 H 37.897 V 52.332 H 23.127 V 35.226 h 14.77 V 22.612 C 37.897,7.972 46.84,0 59.9,0 l 13.2,0.021 z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
52
lostplaces/lostplaces_app/static/icons/social/instagram.svg
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="instagram.svg"
|
||||
xml:space="preserve"
|
||||
style="enable-background:new 0 0 97.395 97.395;"
|
||||
viewBox="0 0 97.395 97.395"
|
||||
height="97.395px"
|
||||
width="97.395px"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Capa_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata1237"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs1235" /><sodipodi:namedview
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="48.697498"
|
||||
inkscape:cx="48.697498"
|
||||
inkscape:zoom="8.4090562"
|
||||
showgrid="false"
|
||||
id="namedview1233"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<g
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="g1230">
|
||||
<path
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="path1228"
|
||||
d="m 12.501,0 h 72.393 c 6.875,0 12.5,5.09 12.5,12.5 v 72.395 c 0,7.41 -5.625,12.5 -12.5,12.5 H 12.501 C 5.624,97.395 0,92.305 0,84.895 V 12.5 C 0,5.09 5.624,0 12.501,0 Z m 58.447,10.821 c -2.412,0 -4.383,1.972 -4.383,4.385 v 10.495 c 0,2.412 1.971,4.385 4.383,4.385 h 11.008 c 2.412,0 4.385,-1.973 4.385,-4.385 V 15.206 c 0,-2.413 -1.973,-4.385 -4.385,-4.385 z m 15.439,30.367 h -8.572 c 0.811,2.648 1.25,5.453 1.25,8.355 0,16.2 -13.556,29.332 -30.275,29.332 -16.718,0 -30.272,-13.132 -30.272,-29.332 0,-2.904 0.438,-5.708 1.25,-8.355 h -8.945 v 41.141 c 0,2.129 1.742,3.872 3.872,3.872 h 67.822 c 2.13,0 3.872,-1.742 3.872,-3.872 V 41.188 Z M 48.789,29.533 c -10.802,0 -19.56,8.485 -19.56,18.953 0,10.468 8.758,18.953 19.56,18.953 10.803,0 19.562,-8.485 19.562,-18.953 0,-10.468 -8.758,-18.953 -19.562,-18.953 z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
62
lostplaces/lostplaces_app/static/icons/social/mastodon.svg
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="mastodon.svg"
|
||||
xml:space="preserve"
|
||||
style="enable-background:new 0 0 97.637 97.637;"
|
||||
viewBox="0 0 417.8 512"
|
||||
height="97.637px"
|
||||
width="97.637px"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Capa_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata1099"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs1097"><filter
|
||||
height="1.0046383"
|
||||
y="-0.0023191661"
|
||||
width="1.0049733"
|
||||
x="-0.0024866723"
|
||||
id="filter1101"
|
||||
style="color-interpolation-filters:sRGB"
|
||||
inkscape:collect="always"><feGaussianBlur
|
||||
id="feGaussianBlur1103"
|
||||
stdDeviation="0.43298031"
|
||||
inkscape:collect="always" /></filter></defs><sodipodi:namedview
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="48.818501"
|
||||
inkscape:cx="48.818501"
|
||||
inkscape:zoom="8.3882134"
|
||||
showgrid="false"
|
||||
id="namedview1095"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<g
|
||||
style="opacity:0.992;fill:#f9f9f9;fill-opacity:1;filter:url(#filter1101)"
|
||||
id="g1092">
|
||||
<path
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="path1090"
|
||||
d="M 417.8,179.1 C 417.8,81.9 354.1,53.4 354.1,53.4 291.6,24.7 125.6,25 63.7,53.4 63.7,53.4 0,81.9 0,179.1 c 0,115.7 -6.6,259.4 105.6,289.1 40.5,10.7 75.3,13 103.3,11.4 50.8,-2.8 79.3,-18.1 79.3,-18.1 l -1.7,-36.9 c 0,0 -36.3,11.4 -77.1,10.1 -40.4,-1.4 -83,-4.4 -89.6,-54 -0.6,-4.4 -0.9,-9 -0.9,-13.9 85.6,20.9 158.6,9.1 178.7,6.7 56.1,-6.7 105,-41.3 111.2,-72.9 9.8,-49.8 9,-121.5 9,-121.5 z M 342.7,304.3 H 296.1 V 190.1 c 0,-49.7 -64,-51.6 -64,6.9 v 62.5 H 185.8 V 197 c 0,-58.5 -64,-56.6 -64,-6.9 V 304.3 H 75.1 c 0,-122.1 -5.2,-147.9 18.4,-175 25.9,-28.9 79.8,-30.8 103.8,6.1 l 11.6,19.5 11.6,-19.5 c 24.1,-37.1 78.1,-34.8 103.8,-6.1 23.7,27.3 18.4,53 18.4,175 z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
52
lostplaces/lostplaces_app/static/icons/social/twitter.svg
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="twitter.svg"
|
||||
xml:space="preserve"
|
||||
style="enable-background:new 0 0 97.637 97.637;"
|
||||
viewBox="0 0 97.637 97.637"
|
||||
height="97.637px"
|
||||
width="97.637px"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Capa_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata889"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs887" /><sodipodi:namedview
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="48.818501"
|
||||
inkscape:cx="48.818501"
|
||||
inkscape:zoom="8.3882134"
|
||||
showgrid="false"
|
||||
id="namedview885"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<g
|
||||
style="opacity:0.995;fill:#f9f9f9;fill-opacity:1"
|
||||
id="g882">
|
||||
<path
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="path880"
|
||||
d="m 97.523,18.526 c -0.14,-0.165 -0.371,-0.221 -0.568,-0.131 -2.919,1.295 -5.99,2.226 -9.153,2.776 3.358,-2.526 5.86,-6.024 7.143,-10.035 0.062,-0.192 -0.002,-0.402 -0.159,-0.527 -0.158,-0.125 -0.377,-0.141 -0.55,-0.038 -3.782,2.243 -7.878,3.824 -12.18,4.701 -3.812,-3.956 -9.135,-6.219 -14.644,-6.219 -11.204,0 -20.318,9.114 -20.318,20.317 0,1.355 0.131,2.697 0.391,4 C 31.967,32.412 17.457,24.962 7.591,12.861 7.49,12.737 7.337,12.668 7.177,12.684 c -0.159,0.012 -0.301,0.102 -0.381,0.239 -1.8,3.088 -2.751,6.621 -2.751,10.215 0,6.229 2.83,12.053 7.649,15.896 C 9.213,38.736 6.79,37.955 4.605,36.742 4.458,36.659 4.275,36.66 4.128,36.745 c -0.147,0.084 -0.24,0.24 -0.244,0.41 l -0.002,0.26 c 0,8.946 5.895,16.801 14.282,19.409 -2.209,0.356 -4.501,0.332 -6.754,-0.098 -0.166,-0.031 -0.34,0.026 -0.454,0.154 -0.113,0.128 -0.151,0.307 -0.099,0.469 2.515,7.85 9.503,13.355 17.637,14.041 -6.785,4.971 -14.805,7.59 -23.279,7.59 -1.561,0 -3.133,-0.093 -4.673,-0.274 -0.22,-0.025 -0.438,0.106 -0.514,0.317 -0.076,0.213 0.005,0.451 0.195,0.572 9.17,5.881 19.773,8.988 30.664,8.988 35.625,0 56.913,-28.938 56.913,-56.914 0,-0.779 -0.015,-1.554 -0.046,-2.327 3.843,-2.811 7.142,-6.252 9.802,-10.235 0.119,-0.178 0.106,-0.415 -0.033,-0.581 z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
52
lostplaces/lostplaces_app/static/icons/social/vimeo.svg
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="vimeo.svg"
|
||||
xml:space="preserve"
|
||||
style="enable-background:new 0 0 97.097 97.096;"
|
||||
viewBox="0 0 97.097 97.096"
|
||||
height="97.096px"
|
||||
width="97.097px"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Capa_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata877"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs875" /><sodipodi:namedview
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="48.548"
|
||||
inkscape:cx="48.5485"
|
||||
inkscape:zoom="8.4349509"
|
||||
showgrid="false"
|
||||
id="namedview873"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<g
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="g870">
|
||||
<path
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="path868"
|
||||
d="M 97.05,25.977 C 96.619,35.43 90.012,48.378 77.244,64.811 64.046,81.975 52.876,90.56 43.734,90.56 38.079,90.56 33.29,85.334 29.377,74.876 26.764,65.291 24.15,55.715 21.539,46.13 18.637,35.678 15.522,30.447 12.187,30.447 c -0.724,0 -3.27,1.531 -7.622,4.577 L 0,29.136 c 4.788,-4.208 9.517,-8.422 14.167,-12.643 6.394,-5.52 11.19,-8.429 14.391,-8.722 7.557,-0.725 12.208,4.446 13.954,15.502 1.886,11.938 3.191,19.361 3.922,22.264 2.176,9.902 4.576,14.849 7.19,14.849 2.034,0 5.091,-3.216 9.159,-9.634 4.065,-6.427 6.244,-11.315 6.537,-14.667 0.58,-5.545 -1.6,-8.324 -6.537,-8.324 -2.328,0 -4.727,0.531 -7.188,1.592 4.77,-15.632 13.887,-23.229 27.348,-22.8 9.98,0.294 14.68,6.769 14.107,19.424 z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
52
lostplaces/lostplaces_app/static/icons/social/vkontakte.svg
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="vkontakte.svg"
|
||||
xml:space="preserve"
|
||||
style="enable-background:new 0 0 96.496 96.496;"
|
||||
viewBox="0 0 96.496 96.496"
|
||||
height="96.496px"
|
||||
width="96.496px"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Capa_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata937"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs935" /><sodipodi:namedview
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="48.248001"
|
||||
inkscape:cx="48.248001"
|
||||
inkscape:zoom="8.4873982"
|
||||
showgrid="false"
|
||||
id="namedview933"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<g
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="g930">
|
||||
<path
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="path928"
|
||||
d="m 92.499,65.178 c -2.873,-3.446 -6.254,-6.387 -9.453,-9.51 -2.886,-2.815 -3.068,-4.448 -0.748,-7.697 2.532,-3.546 5.255,-6.956 7.81,-10.486 2.385,-3.299 4.823,-6.589 6.078,-10.539 0.796,-2.513 0.092,-3.623 -2.485,-4.063 -0.444,-0.077 -0.903,-0.081 -1.355,-0.081 L 77.057,22.784 c -1.883,-0.028 -2.924,0.793 -3.59,2.462 -0.899,2.256 -1.826,4.51 -2.897,6.687 -2.43,4.936 -5.144,9.707 -8.949,13.747 -0.839,0.891 -1.767,2.017 -3.169,1.553 -1.754,-0.64 -2.271,-3.53 -2.242,-4.507 L 56.195,25.079 c -0.34,-2.521 -0.899,-3.645 -3.402,-4.135 l -15.882,0.003 c -2.12,0 -3.183,0.819 -4.315,2.145 -0.653,0.766 -0.85,1.263 0.492,1.517 2.636,0.5 4.121,2.206 4.515,4.849 0.632,4.223 0.588,8.463 0.224,12.703 -0.107,1.238 -0.32,2.473 -0.811,3.629 -0.768,1.817 -2.008,2.187 -3.637,1.069 -1.475,-1.012 -2.511,-2.44 -3.525,-3.874 C 26.045,37.603 23.006,31.799 20.528,25.7 19.812,23.938 18.577,22.87 16.71,22.841 12.123,22.768 7.535,22.756 2.948,22.845 c -2.76,0.052 -3.583,1.392 -2.459,3.894 4.996,11.113 10.557,21.917 17.816,31.759 3.727,5.051 8.006,9.51 13.534,12.67 6.265,3.582 13.009,4.66 20.112,4.328 3.326,-0.156 4.325,-1.021 4.479,-4.336 0.104,-2.268 0.361,-4.523 1.48,-6.561 1.098,-2 2.761,-2.381 4.678,-1.137 0.959,0.623 1.767,1.416 2.53,2.252 1.872,2.048 3.677,4.158 5.62,6.137 2.437,2.48 5.324,3.945 8.954,3.646 L 93.744,75.5 c 2.264,-0.148 3.438,-2.924 2.138,-5.451 -0.913,-1.77 -2.111,-3.346 -3.383,-4.871 z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
52
lostplaces/lostplaces_app/static/icons/social/wordpress.svg
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="wordpress.svg"
|
||||
xml:space="preserve"
|
||||
style="enable-background:new 0 0 96.24 96.24;"
|
||||
viewBox="0 0 96.24 96.24"
|
||||
height="96.24px"
|
||||
width="96.24px"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Capa_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata1045"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs1043" /><sodipodi:namedview
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="48.119999"
|
||||
inkscape:cx="48.119999"
|
||||
inkscape:zoom="8.5099753"
|
||||
showgrid="false"
|
||||
id="namedview1041"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<g
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="g1038">
|
||||
<path
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="path1036"
|
||||
d="M 48.122,0 C 21.587,0 0.001,21.585 0.001,48.118 c 0,26.535 21.587,48.122 48.12,48.122 26.532,0 48.117,-21.587 48.117,-48.122 C 96.239,21.586 74.654,0 48.122,0 Z M 4.857,48.118 c 0,-6.271 1.345,-12.227 3.746,-17.606 L 29.241,87.056 C 14.81,80.042 4.857,65.243 4.857,48.118 Z m 43.265,43.267 c -4.247,0 -8.346,-0.623 -12.222,-1.763 L 48.88,51.903 62.181,88.336 c 0.086,0.215 0.191,0.411 0.308,0.596 -4.497,1.582 -9.329,2.453 -14.367,2.453 z m 5.961,-63.551 c 2.604,-0.137 4.953,-0.412 4.953,-0.412 2.33,-0.276 2.057,-3.701 -0.277,-3.564 0,0 -7.007,0.549 -11.532,0.549 -4.25,0 -11.396,-0.549 -11.396,-0.549 -2.332,-0.137 -2.604,3.427 -0.273,3.564 0,0 2.208,0.275 4.537,0.412 l 6.74,18.469 -9.468,28.395 -15.752,-46.863 c 2.608,-0.136 4.952,-0.412 4.952,-0.412 2.33,-0.275 2.055,-3.702 -0.278,-3.562 0,0 -7.004,0.549 -11.53,0.549 -0.813,0 -1.77,-0.021 -2.784,-0.052 7.734,-11.747 21.033,-19.502 36.147,-19.502 11.265,0 21.519,4.306 29.215,11.357 -0.187,-0.01 -0.368,-0.035 -0.562,-0.035 -4.248,0 -7.264,3.702 -7.264,7.679 0,3.564 2.055,6.582 4.248,10.146 1.647,2.882 3.567,6.585 3.567,11.932 0,3.704 -1.422,8 -3.293,13.986 L 69.718,74.342 Z M 69.871,85.516 83.086,47.308 c 2.471,-6.171 3.29,-11.106 3.29,-15.497 0,-1.591 -0.104,-3.07 -0.292,-4.449 3.38,6.163 5.303,13.236 5.301,20.758 -0.001,15.96 -8.653,29.896 -21.514,37.396 z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
52
lostplaces/lostplaces_app/static/icons/social/youtube.svg
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="youtube.svg"
|
||||
xml:space="preserve"
|
||||
style="enable-background:new 0 0 96.875 96.875;"
|
||||
viewBox="0 0 96.875 96.875"
|
||||
height="96.875px"
|
||||
width="96.875px"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Capa_1"
|
||||
version="1.1"><metadata
|
||||
id="metadata991"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs989" /><sodipodi:namedview
|
||||
inkscape:current-layer="Capa_1"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:cy="48.4375"
|
||||
inkscape:cx="48.4375"
|
||||
inkscape:zoom="8.4541935"
|
||||
showgrid="false"
|
||||
id="namedview987"
|
||||
inkscape:window-height="1016"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<g
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="g984">
|
||||
<path
|
||||
style="fill:#f9f9f9;fill-opacity:1"
|
||||
id="path982"
|
||||
d="M 95.201,25.538 C 94.015,20.386 89.801,16.585 84.728,16.018 72.715,14.677 60.556,14.67 48.453,14.677 36.348,14.67 24.187,14.677 12.174,16.018 7.104,16.585 2.893,20.386 1.707,25.538 0.019,32.875 0,40.884 0,48.438 0,55.992 0,64 1.688,71.336 c 1.184,5.151 5.396,8.952 10.469,9.52 12.012,1.342 24.172,1.349 36.277,1.342 12.107,0.007 24.264,0 36.275,-1.342 5.07,-0.567 9.285,-4.368 10.471,-9.52 1.689,-7.337 1.695,-15.345 1.695,-22.898 0,-7.554 0.014,-15.563 -1.674,-22.9 z M 35.936,63.474 c 0,-10.716 0,-21.32 0,-32.037 10.267,5.357 20.466,10.678 30.798,16.068 -10.3,5.342 -20.504,10.631 -30.798,15.969 z" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
@@ -1,3 +1,3 @@
|
||||
<?xml version="1.0" ?><svg style="enable-background:new 0 0 24 24;" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">
|
||||
.st0{display:none;}
|
||||
.st0{display:none;}
|
||||
</style><g class="st0" id="grid"/><g id="icon"><path d="M12,0C5.383,0,0,5.383,0,12s5.383,12,12,12s12-5.383,12-12S18.617,0,12,0z M12,23C5.935,23,1,18.065,1,12S5.935,1,12,1 s11,4.935,11,11S18.065,23,12,23z"/><path d="M16.801,8.403l-6.132,6.133L7.753,11.62c-0.195-0.195-0.512-0.195-0.707,0s-0.195,0.512,0,0.707l3.27,3.27 c0.094,0.094,0.221,0.146,0.354,0.146s0.26-0.053,0.354-0.146l6.485-6.486c0.195-0.195,0.195-0.512,0-0.707 S16.997,8.208,16.801,8.403z"/></g></svg>
|
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 717 B |
2
lostplaces/lostplaces_app/static/maps/ol.css
Normal file
@@ -0,0 +1,2 @@
|
||||
.ol-box{box-sizing:border-box;border-radius:2px;border:2px solid #00f}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-step-marker{width:1px;height:15px;background-color:#000;float:right;z-Index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:12px;z-Index:11;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-text{position:absolute;font-size:14px;text-align:center;bottom:25px;color:#000;text-shadow:-2px 0 #fff,0 2px #fff,2px 0 #fff,0 -2px #fff}.ol-scale-singlebar{position:relative;height:10px;z-Index:9;border:1px solid #000}.ol-unsupported{display:none}.ol-unselectable,.ol-viewport{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-overlaycontainer,.ol-overlaycontainer-stopevent{pointer-events:none}.ol-overlaycontainer-stopevent>*,.ol-overlaycontainer>*{pointer-events:auto}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px}.ol-control:hover{background-color:rgba(255,255,255,.6)}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-control button span{pointer-events:none}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:focus,.ol-control button:hover{text-decoration:none;background-color:rgba(0,60,136,.7)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em)}.ol-attribution ul{margin:0;padding:0 .5em;color:#000;text-shadow:0 0 2px #fff}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button,.ol-attribution ul{display:inline-block}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:inline-block}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:1px;left:2px;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-overviewmap-box{border:2px dotted rgba(0,60,136,.7)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}
|
||||
/*# sourceMappingURL=ol.css.map */
|
1
lostplaces/lostplaces_app/static/maps/ol.css.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["src/ol/ol.css"],"names":[],"mappings":"AAAA,QACE,WAAY,WACZ,cAAe,IACf,OAAQ,IAAI,MAAM,KAGpB,mBACE,IAAK,IACL,MAAO,IACP,SAAU,SAGZ,eACE,WAAY,kBACZ,cAAe,IACf,OAAQ,IACR,KAAM,IACN,QAAS,IACT,SAAU,SAEZ,qBACE,OAAQ,IAAI,MAAM,KAClB,WAAY,KACZ,MAAO,KACP,UAAW,KACX,WAAY,OACZ,OAAQ,IACR,YAAa,QAAQ,CAAE,MACvB,WAAY,IAAI,KAElB,cACE,SAAU,SACV,OAAQ,IACR,KAAM,IAER,sBACE,MAAO,IACP,OAAQ,KACR,iBAAkB,KAClB,MAAO,MACP,QAAS,GAEX,oBACE,SAAU,SACV,OAAQ,KACR,UAAW,KACX,QAAS,GACT,MAAO,KACP,YAAa,KAAK,EAAE,IAAO,CAAE,EAAE,IAAI,IAAO,CAAE,IAAI,EAAE,IAAO,CAAE,EAAE,KAAK,KAEpE,eACE,SAAU,SACV,UAAW,KACX,WAAY,OACZ,OAAQ,KACR,MAAO,KACP,YAAa,KAAK,EAAE,IAAO,CAAE,EAAE,IAAI,IAAO,CAAE,IAAI,EAAE,IAAO,CAAE,EAAE,KAAK,KAEpE,oBACE,SAAU,SACV,OAAQ,KACR,QAAS,EACT,OAAQ,IAAI,MAAM,KAGpB,gBACE,QAAS,KAEG,iBAAd,aACE,sBAAuB,KACvB,oBAAqB,KACrB,iBAAkB,KAClB,gBAAiB,KACjB,YAAa,KACb,4BAA6B,YAE/B,qBAAsB,+BACpB,eAAgB,KAEQ,iCAA1B,uBACE,eAAgB,KAElB,eACE,sBAAuB,QACvB,oBAAqB,KACrB,iBAAkB,KAClB,gBAAiB,KACjB,YAAa,KAEf,aACE,OAAQ,iBACR,OAAQ,cACR,OAAQ,SAEV,SACE,OAAQ,KACR,OAAQ,aACR,OAAQ,UACR,OAAQ,KAEV,YACE,SAAU,SACV,iBAAkB,qBAClB,cAAe,IACf,QAAS,IAEX,kBACE,iBAAkB,qBAEpB,SACE,IAAK,KACL,KAAM,KAER,WACE,IAAK,KACL,MAAO,KACP,WAAY,QAAQ,KAAK,MAAM,CAAE,WAAW,GAAG,OAEjD,qBACE,QAAS,EACT,WAAY,OACZ,WAAY,QAAQ,KAAK,MAAM,CAAE,WAAW,GAAG,OAAO,KAExD,gBACE,IAAK,QACL,KAAM,KAER,gBACE,MAAO,KACP,IAAK,KAGP,mBACE,QAAS,MACT,OAAQ,IACR,QAAS,EACT,MAAO,KACP,UAAW,OACX,YAAa,IACb,gBAAiB,KACjB,WAAY,OACZ,OAAQ,QACR,MAAO,QACP,YAAa,KACb,iBAAkB,kBAClB,OAAQ,KACR,cAAe,IAEjB,qCACE,OAAQ,KACR,QAAS,EAEX,wBACE,eAAgB,KAElB,uBACE,YAAa,MAEf,YACE,QAAS,MACT,YAAa,IACb,UAAW,MACX,YAAa,UAEf,6BACE,UAAW,MAEb,0BACE,IAAK,MAGP,yBADA,yBAEE,gBAAiB,KACjB,iBAAkB,kBAEpB,qBACE,cAAe,IAAI,IAAI,EAAE,EAE3B,sBACE,cAAe,EAAE,EAAE,IAAI,IAIzB,gBACE,WAAY,MACZ,OAAQ,KACR,MAAO,KACP,UAAW,mBAGb,mBACE,OAAQ,EACR,QAAS,EAAE,KACX,MAAO,KACP,YAAa,EAAE,EAAE,IAAI,KAEvB,mBACE,QAAS,OACT,WAAY,KAEd,0CACE,QAAS,IAEX,oBACE,WAAY,IACZ,UAAW,QACX,eAAgB,OAEE,uBAApB,mBACE,QAAS,aAEX,gCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,iCACE,OAAQ,EACR,MAAO,EACP,cAAe,IAAI,EAAE,EAEvB,qCACE,WAAY,MACZ,WAAY,MAEd,wCACE,QAAS,KAGX,eACE,IAAK,MACL,KAAM,KACN,OAAQ,MAEV,sBACE,SAAU,SACV,OAAQ,KAGV,yBACE,IAAK,MAGP,gBACE,KAAM,KACN,OAAQ,KAEV,iCACE,OAAQ,EACR,KAAM,EACN,cAAe,EAAE,IAAI,EAAE,EAEzB,oCACA,uBACE,QAAS,aAEX,oCACE,OAAQ,IAAI,MAAM,QAClB,OAAQ,MACR,OAAQ,IACR,MAAO,MAET,0CACE,OAAQ,IACR,KAAM,IACN,SAAU,SAEZ,iDACA,wCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,oBACE,OAAQ,IAAI,OAAO,kBAGrB,0CACE,OAAQ"}
|
2
lostplaces/lostplaces_app/static/maps/ol.js
Normal file
1
lostplaces/lostplaces_app/static/maps/ol.js.map
Normal file
@@ -0,0 +1,7 @@
|
||||
# Keeping these files up-to-date is something for CI / release management.
|
||||
# But for now I noted the source urls down here for later reference.
|
||||
|
||||
https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/css/ol.css
|
||||
https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/css/ol.css.map
|
||||
https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js
|
||||
https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js.map
|
52
lostplaces/lostplaces_app/templates/flat/codex.html
Normal file
@@ -0,0 +1,52 @@
|
||||
{% extends 'global.html'%}
|
||||
|
||||
# {% block title %}UrBex codex{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
|
||||
<header class="LP-TextSection__Headline">
|
||||
<h1 class="LP-Headline">Take nothing but pictures. Leave nothing but footprints.</h1>
|
||||
</header>
|
||||
|
||||
<article class="LP-TextSection">
|
||||
|
||||
<p>This should be pretty self-explanatory, right? But as you all know, every sign has a history. We have seen too much senseless destruction so we decided to write down a basic Urban Exploration codex.</p>
|
||||
<ul class="LP-UnorderedList">
|
||||
<li>
|
||||
<b>We respect other people's property</b>, just as we demand it from others. Therefore we do not open access by force, or damage a locking device. We only enter a property or a building / a facility / a ruin if we can assume that we am not there against the will of the owner. A well-preserved fence or a permanent guard indicates that the owner is still dealing with his property. Fences that have long since collapsed, ruins in the final stages of decay, are more likely to indicate that the owner doesn't care.
|
||||
</li>
|
||||
<li>
|
||||
<b>We take nothing from a location</b>, not even "small souvenirs", and leave nothing there — no cigarettes, no waste — nothing.
|
||||
<b>We do not change anything in the location.</b>
|
||||
</li>
|
||||
<li>
|
||||
We don't smoke if possible. Not only, because it smells bad and causes litter, there is always the chance, to set anything on fire with flying sparks. Let it be dry leaves on a hot summer day or (poentially) flammable materials in industrial plants.
|
||||
</li>
|
||||
<li>
|
||||
<b>Spraying is an absolute "no-go"!</b>
|
||||
</li>
|
||||
<li>
|
||||
<b>In a location we are careful not to endanger ourselves or others.</b> We don't throw anything into holes or out of windows, and we don't touch electrical equipment. You can't tell from its look or sound if the power is really switched off. Therefore we do not open bottles and other containers. We never go into a dark room without light, and always have a spare lamp with us.
|
||||
</li>
|
||||
<li>
|
||||
<b>Before my tour we tell at least one person of my trust where we are</b> (coordinates!), how long we will be there and what we will do there. We arrange that we will contact him regularly if we stay there for a longer period of time, or give an "okay" when we have left the location again. If we am late, we will remember to send a message to that effect. Our contact person is supposed to provide help after a certain period of time if he does not hear from me.
|
||||
</li>
|
||||
<li>
|
||||
<b>We prepare my tour carefully.</b> It is annoying when the camera batteries are not charged — but it is not dangerous at all. But it is life-threatening if you step unto a dirty nail that perforates your shoe. It is wise to wear sturdy shoes. When we go underground, we take appropiate equipment with us to protect ourselves — e. g. a gas warner or even a geiger counter.
|
||||
</li>
|
||||
<li>
|
||||
<b>We do not park in such a way that third parties become aware of my intention.</b> Our hobby does not need public attention, which is directed to illegal entering of properties (and illegal entering is probably the most common way ...).
|
||||
</li>
|
||||
<li>
|
||||
<b>We do not disclose our locations</b> and only publish photos where geodata has been removed from the files (EXIF). Therefore we only post from my smartphone when we am absolutely sure that no coordinates are contained in the picture.
|
||||
</li>
|
||||
<li>
|
||||
<b>Above all, we keep my mouth shut</b> and don't brag about a great, still untouched looking location. You often don't even know your "friends" in Facebook personally, especially not in a group. Nothing spreads faster than a "secret" that has been passed on under the seal of trust. Do you want to be responsible for brainless sprayers destroying this place too?
|
||||
</li>
|
||||
<li>
|
||||
<b>We make sure through argument and conviction that my companions behave the same way!</b> First and foremost we try to convince through our own behavior.
|
||||
</li>
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
{% endblock maincontent %}
|
@@ -2,30 +2,19 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="{% static 'main.css' %}">
|
||||
<link rel="icon" type="image/png" href="{% static 'favicon.ico' %}">
|
||||
<title>
|
||||
{% block title %}Urban Exploration{% endblock %}
|
||||
</title>
|
||||
|
||||
|
||||
{% block additional_head %}
|
||||
{% endblock additional_head %}
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function(){
|
||||
Array.from(document.getElementsByClassName('LP-Main__Sidebar')).forEach(function(element){
|
||||
element.classList.add('LP-Main__Sidebar--hidden')
|
||||
})
|
||||
setTimeout(function(){
|
||||
Array.from(document.getElementsByClassName('LP-Main__Sidebar')).forEach(function(element){
|
||||
element.classList.remove('LP-Main__Sidebar--hidden')
|
||||
})
|
||||
}, 500)
|
||||
})
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -34,35 +23,36 @@
|
||||
<div class="LP-Header__Logo">
|
||||
<a class="LP-Link" href="/">
|
||||
<img src="{% static 'logo.png' %}" class="LP-Image" />
|
||||
</a>
|
||||
</a>
|
||||
</div>
|
||||
<div class="LP-Header__UserInformation">
|
||||
<span class="LP-Paragraph">
|
||||
{% if user.is_authenticated %}
|
||||
Hi {{ user.username }}!
|
||||
<a class="LP-Link" href="{% url 'logout' %}"><span class="LP-Link__Text">logout</span></a>
|
||||
{% if user.is_superuser %}
|
||||
| <a class="LP-Link" href="{% url 'admin:index' %}" target="_blank"><span class="LP-Link__Text">admin</span></a>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
You are not logged in.
|
||||
<a class="LP-Link" href="{% url 'login' %}"><span class="LP-Link__Text">login</span></a> |
|
||||
<a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">signup</span></a>
|
||||
{% endif %}
|
||||
<a class="LP-Link" href="{% url 'logout' %}"><span class="LP-Link__Text">logout</span></a>
|
||||
{% if user.is_superuser %}
|
||||
<a class="LP-Link" href="{% url 'admin:index' %}" target="_blank"><span class="LP-Link__Text">admin</span></a>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
You are not logged in.
|
||||
<a class="LP-Link" href="{% url 'login' %}"><span class="LP-Link__Text">login</span></a> |
|
||||
<a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">signup</span></a>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</header>
|
||||
<input id="toggle_sidebar" class="LP-Menu__Trigger" type="checkbox"/>
|
||||
<input id="toggle_sidebar" class="LP-Menu__Trigger" type="checkbox" />
|
||||
<label id="toggle_sidebar_label" for="toggle_sidebar" class="LP-Menu__TriggerLabel"></label>
|
||||
<aside class="LP-Main__Sidebar">
|
||||
<nav class="LP-Menu LP-Menu--sidebar">
|
||||
<ul class="LP-Menu__List">
|
||||
<li class="LP-Menu__Item"><a href="/" class="LP-Link"><span class="LP-Link__Text">Home</span></a></li>
|
||||
<li class="LP-Menu__Item"><a href="" class="LP-Link"><span class="LP-Link__Text">About</span></a></li>
|
||||
<li class="LP-Menu__Item"><a href="" class="LP-Link"><span class="LP-Link__Text">Contact</span></a></li>
|
||||
<li class="LP-Menu__Item"><a href="{% url 'codex' %}" class="LP-Link"><span class="LP-Link__Text">UrBex codex</span></a></li>
|
||||
|
||||
{% block additional_menu_items %}
|
||||
{% endblock additional_menu_items %}
|
||||
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_create'%}" class="LP-Link"><span class="LP-Link__Text">Create place</span></a></li>
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_list'%}" class="LP-Link"><span class="LP-Link__Text">See all places</span></a></li>
|
||||
</ul>
|
||||
@@ -88,9 +78,16 @@
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block maincontent %}
|
||||
{% endblock maincontent %}
|
||||
|
||||
</main>
|
||||
</div>
|
||||
|
||||
{% block footer %}
|
||||
{% include 'partials/nav/footer.html' %}
|
||||
{% endblock footer %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
{{text}}
|
||||
</body>
|
||||
</html>
|
@@ -1,10 +1,20 @@
|
||||
{% extends 'global.html'%}
|
||||
|
||||
{% load static %}
|
||||
{% block additional_head %}
|
||||
<link rel="stylesheet" href="{% static 'maps/ol.css' %}" type="text/css">
|
||||
<script src="{% static 'maps/ol.js' %}"></script>
|
||||
{% endblock additional_head %}
|
||||
|
||||
# {% block title %}Start{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
|
||||
{% include 'partials/welcome.html' %}
|
||||
<article class="LP-TextSection">
|
||||
</article>
|
||||
|
||||
{% include 'partials/osm_map.html' %}
|
||||
<div class="LP-PlaceGrid">
|
||||
<h1 class="LP-Headline LP-Headline">Explore the latest locations</h1>
|
||||
<ul class="LP-PlaceGrid__Grid">
|
||||
|
53
lostplaces/lostplaces_app/templates/home_unauth.html
Normal file
@@ -0,0 +1,53 @@
|
||||
{% extends 'global.html'%}
|
||||
|
||||
# {% block title %}Start{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
|
||||
{% include 'partials/welcome.html' %}
|
||||
<article class="LP-TextSection">
|
||||
<p class="LP-Paragraph">
|
||||
You can create, view and share your favorite lost places with other
|
||||
members of this site. You can upload photos, place links to your
|
||||
web galleries and contribute your knowledge by tagging other places or
|
||||
commenting on them. You will find detailed information on where these
|
||||
locations are, how to get there and what to expect from them. This might
|
||||
even include detailed information on the surroundings or the history
|
||||
of a lost place.
|
||||
</p>
|
||||
<p class="LP-Paragraph">
|
||||
Since vandalism is a growing problem these days, no sensitive
|
||||
information is available to the public. You have to
|
||||
<a class="LP-Link" href="{% url 'codex' %}"><span class="LP-Link__Text">sign up</span></a>
|
||||
with a voucher code as an invitation to join this community. Only admins
|
||||
can create these codes. Usually you are given a code when we know you
|
||||
in real life in person. A request from an unknown person will most
|
||||
probably be denied.
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<div class="LP-PlaceGrid">
|
||||
<h1 class="LP-Headline LP-Headline">Our latest locations</h1>
|
||||
<ul class="LP-PlaceGrid__Grid">
|
||||
{% for place in place_list %}
|
||||
<li class="LP-PlaceGrid__Item">
|
||||
<a href="{% url 'place_detail' pk=place.pk %}" class="LP-Link">
|
||||
<article class="LP-PlaceTeaser">
|
||||
<div class="LP-PlaceTeaser__Image">
|
||||
<img class="LP-Image" src="{{ place.images.first.filename.thumbnail.url}}" />
|
||||
</div>
|
||||
<div class="LP-PlaceTeaser__Meta">
|
||||
<div class="LP-PlaceTeaser__Info">
|
||||
<span class="LP-PlaceTeaser__Title">
|
||||
<h1 class="LP-Headline LP-Headline--teaser">{{place.name|truncatechars:19}}</h1>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% endblock maincontent %}
|
72
lostplaces/lostplaces_app/templates/partials/nav/footer.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<footer class="LP-Footer LP-Footer__Flex">
|
||||
|
||||
<!-- 1st footer column -->
|
||||
<ul class="LP-Footer__ListTop">
|
||||
<li>
|
||||
<h4 class="LP-Footer__ListHeader">About</h4>
|
||||
</li>
|
||||
<li><a href='https://git.mowoe.com/reverend/lostplaces-backend/src/branch/master/Readme.md' class="LP-Footer__GenericAnchor LP-Footer__ListAnchor">Host your own instance!</a></li>
|
||||
<li><a href='https://git.mowoe.com/reverend/lostplaces-backend/issues' class="LP-Footer__GenericAnchor LP-Footer__ListAnchor">Issue tracker</a></li>
|
||||
<li><a href='https://git.mowoe.com/reverend/lostplaces-backend' class="LP-Footer__GenericAnchor LP-Footer__ListAnchor">Backend repository</a></li>
|
||||
<li><a href='https://git.mowoe.com/reverend/lostplaces-frontend' class="LP-Footer__GenericAnchor LP-Footer__ListAnchor">Frontend repository</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- Snd footer column -->
|
||||
<ul class="LP-Footer__ListTop">
|
||||
<li>
|
||||
<h4 class="LP-Footer__ListHeader">Contact</h4>
|
||||
</li>
|
||||
<li><a href='https://www.urban-exploration.com' class="LP-Footer__GenericAnchor LP-Footer__ListAnchor">https://www.urban-exploration.com</a></li>
|
||||
<li><a href='mailto:JohnSSmith@einrot.com' class="LP-Footer__GenericAnchor LP-Footer__ListAnchor">JohnSSmith@einrot.com</a></li>
|
||||
<li class="LP-Footer__ListText LP-Footer__ListAnchor">937-387-6498</li>
|
||||
</ul>
|
||||
|
||||
<!-- 4rd footer column -->
|
||||
<ul class="LP-Footer__ListTop">
|
||||
<li id='Contact'>
|
||||
<h4 class="LP-Footer__ListHeader">Postal address</h4>
|
||||
</li>
|
||||
<li class="LP-Footer__ListText LP-Footer__ListAnchor"><b>Urban Exploration Ltd.</b></li>
|
||||
<li class="LP-Footer__ListText LP-Footer__ListAnchor">John S. Smith</li>
|
||||
<li class="LP-Footer__ListText LP-Footer__ListAnchor">2563 College Avenue</li>
|
||||
<li class="LP-Footer__ListText LP-Footer__ListAnchor">Dayton, OH 45402</li>
|
||||
</ul>
|
||||
|
||||
<!-- Explore with us / social media bar -->
|
||||
<section class="LP-Footer__SocialSection LP-Footer__Flex">
|
||||
<span class="LP-Footer__SocialOverlap LP-Footer__SocialExplore">
|
||||
EXPLORE <span class="LP-Footer__SocialSmall">with</span> US
|
||||
</span>
|
||||
<!-- Social media buttons. Arranging them was *really* discomforting. -->
|
||||
<span class="LP-Footer__SocialOverlap LP-Footer__SocialIconsWrapper">
|
||||
<a href="https://mastodon.social/@urbanexploration" class="LP-Footer__Social-Mastodon LP-Footer__GenericAnchor" target="_blank" title="Mastodon">
|
||||
<span class="LP-Footer__Icon"></span>
|
||||
</a>
|
||||
<a href="https://twitter.com/urbanexploration" class="LP-Footer__Social-Twitter LP-Footer__GenericAnchor" target="_blank" title="Twitter">
|
||||
<span class="LP-Footer__Icon"></span>
|
||||
</a>
|
||||
<a href="https://www.youtube.com/channel/urbanexploration" class="LP-Footer__Social-Youtube LP-Footer__GenericAnchor" target="_blank" title="Youtube">
|
||||
<span class="LP-Footer__Icon"></span>
|
||||
</a>
|
||||
<a href="https://blog.urbanexploration.com" class="LP-Footer__Social-Wordpress LP-Footer__GenericAnchor" target="_blank" title="Wordpress">
|
||||
<span class="LP-Footer__Icon"></span>
|
||||
</a>
|
||||
<a href="https://www.instagram.com/urbanexploration" class="LP-Footer__Social-Instagram LP-Footer__GenericAnchor" target="_blank" title="Instagram">
|
||||
<span class="LP-Footer__Icon"></span>
|
||||
</a>
|
||||
</span>
|
||||
</section>
|
||||
|
||||
<!-- Bottom section with last line of text and links. -->
|
||||
<section class="LP-Footer__BottomSection LP-Footer__Flex">
|
||||
<div class="LP-Footer__BottomWrapper">
|
||||
Proudly made by <a href="https://www.reverend.church" class="LP-Footer__GenericAnchor">Reverend</a>
|
||||
and <a href="https://www.commander1024.de" class="LP-Footer__GenericAnchor">Commander1024.</a></span>
|
||||
</div>
|
||||
<div class="LP-Footer__BottomWrapper">
|
||||
<a href="/flat/privacy-policy.html" class="LP-Footer__GenericAnchor">Privacy Policy</a>
|
||||
|
|
||||
<a href="/flat/impress.html" class="LP-Footer__GenericAnchor">Impress</a>
|
||||
</div>
|
||||
</section>
|
||||
</footer>
|
69
lostplaces/lostplaces_app/templates/partials/osm_map.html
Normal file
@@ -0,0 +1,69 @@
|
||||
|
||||
<div id="map" class="map" style="height: 300px"></div>
|
||||
<div id="info" class="map-popup"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var map = new ol.Map({
|
||||
target: 'map',
|
||||
layers: [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.OSM()
|
||||
}),
|
||||
],
|
||||
view: new ol.View({
|
||||
center: ol.proj.fromLonLat([{{place_map_center|last}}, {{place_map_center|first}}]),
|
||||
zoom: 9
|
||||
})
|
||||
});
|
||||
|
||||
var vectorSource = new ol.source.Vector({
|
||||
features: [
|
||||
{% for place in place_list %}
|
||||
new ol.Feature({
|
||||
geometry: new ol.geom.Point(
|
||||
ol.proj.fromLonLat([{{place.longitude}},{{place.latitude}}])
|
||||
),
|
||||
url: '{% url 'place_detail' pk=place.pk %}',
|
||||
name: '{{place.name}}'
|
||||
}),
|
||||
{% endfor %}
|
||||
]
|
||||
});
|
||||
|
||||
var markerVectorLayer = new ol.layer.Vector({
|
||||
source: vectorSource,
|
||||
style: new ol.style.Style({
|
||||
image: new ol.style.Icon({
|
||||
anchor: [0.5, 46],
|
||||
anchorXUnits: 'fraction',
|
||||
anchorYUnits: 'pixels',
|
||||
scale: 0.3,
|
||||
src: 'http://icons.iconarchive.com/icons/paomedia/small-n-flat/128/map-marker-icon.png'
|
||||
})
|
||||
})
|
||||
});
|
||||
map.addLayer(markerVectorLayer);
|
||||
|
||||
var overlay = new ol.Overlay({
|
||||
element: document.getElementById('info'),
|
||||
positioning: 'bottom-left'
|
||||
});
|
||||
overlay.setMap(map);
|
||||
|
||||
map.on(['singleclick'], function(evt) {
|
||||
var feature = map.forEachFeatureAtPixel(evt.pixel, function(feature) {
|
||||
window.open(feature.get('url'), '_blank');
|
||||
});
|
||||
});
|
||||
|
||||
map.on(['pointermove'], function(evt) {
|
||||
var feature = map.forEachFeatureAtPixel(evt.pixel, function(feature) {
|
||||
overlay.setPosition(evt.coordinate.map(element => element + 1));
|
||||
overlay.getElement().innerHTML = feature.get('name');
|
||||
return feature;
|
||||
});
|
||||
overlay.getElement().style.display = feature ? '' : 'none';
|
||||
document.body.style.cursor = feature ? 'pointer' : '';
|
||||
});
|
||||
|
||||
</script>
|
19
lostplaces/lostplaces_app/templates/partials/welcome.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<header class="LP-TextSection__Headline">
|
||||
<h1 class="LP-Headline">Start</h1>
|
||||
</header>
|
||||
|
||||
<div class="LP-TextSection__Text">
|
||||
<p class="LP-Paragraph">Welcome to our Urban Exploration community catalogue,
|
||||
{% if user.is_authenticated %}
|
||||
{{ user.username }}
|
||||
{% else %}
|
||||
explorer
|
||||
{% endif %}
|
||||
!
|
||||
</p>
|
||||
<p class="LP-Paragraph">
|
||||
We strictly follow our
|
||||
<a class="LP-Link" href="{% url 'codex' %}"><span class="LP-Link__Text">UrBex codex</span></a>
|
||||
and expect you to do so, too.
|
||||
</p>
|
||||
</div>
|
@@ -0,0 +1,41 @@
|
||||
{% extends 'global.html'%}
|
||||
|
||||
{% block title %}Submit a photo album{% endblock %}
|
||||
|
||||
{% block additional_menu_items %}
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_edit' pk=place.pk %}" class="LP-Link"><span
|
||||
class="LP-Link__Text">Edit place</span></a></li>
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_delete' pk=place.pk %}" class="LP-Link"><span
|
||||
class="LP-Link__Text">Delete place</span></a></li>
|
||||
{% endblock additional_menu_items %}
|
||||
|
||||
{% block maincontent %}
|
||||
<form class="LP-Form" method="POST">
|
||||
<fieldset class="LP-Form__Fieldset">
|
||||
<legend class="LP-Form__Legend">Submit a photo album for {{place.name}}</legend>
|
||||
{% csrf_token %}
|
||||
<div class="LP-Form__Composition">
|
||||
<div class="LP-Form__Field">
|
||||
{% include 'partials/form/inputField.html' with field=form.url %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="LP-Form__Composition">
|
||||
<div class="LP-Form__Field">
|
||||
{% include 'partials/form/inputField.html' with field=form.label %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="LP-Form__Composition LP-Form__Composition--buttons">
|
||||
<div class="LP-Form__Field LP-Form__Button LP-Input">
|
||||
<button class="LP-Button">Submit</button>
|
||||
</div>
|
||||
<div class="LP-Form__Field LP-Form__Button LP-Input">
|
||||
<a class="LP-Link" href="{% url 'place_detail' pk=place.id%}">
|
||||
<button type="button" class="LP-Button LP-Button--cancel">Cancel</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endblock maincontent %}
|
@@ -1,53 +1,107 @@
|
||||
{% extends 'global.html'%}
|
||||
|
||||
{% load static %}
|
||||
{% load thumbnail %}
|
||||
{% load svg_icon %}
|
||||
|
||||
{% block additional_head %}
|
||||
<link rel="stylesheet" href="{% static 'maps/ol.css' %}" type="text/css">
|
||||
<script src="{% static 'maps/ol.js' %}"></script>
|
||||
{% endblock additional_head %}
|
||||
|
||||
{% block title %}{{place.name}}{% endblock %}
|
||||
|
||||
{% block additional_menu_items %}
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_edit' pk=place.pk %}" class="LP-Link"><span class="LP-Link__Text">Edit place</span></a></li>
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_delete' pk=place.pk %}" class="LP-Link"><span class="LP-Link__Text">Delete place</span></a></li>
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_edit' pk=place.pk %}" class="LP-Link"><span
|
||||
class="LP-Link__Text">Edit place</span></a></li>
|
||||
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_delete' pk=place.pk %}" class="LP-Link"><span
|
||||
class="LP-Link__Text">Delete place</span></a></li>
|
||||
{% endblock additional_menu_items %}
|
||||
|
||||
|
||||
{% block maincontent %}
|
||||
<article class="LP-PlaceDetail">
|
||||
|
||||
<header class="LP-PlaceDetail__Header">
|
||||
<h1 class="LP-Headline">{{ place.name }}</h1>
|
||||
{% if place.images.first.filename.hero.url %}
|
||||
<figure class="LP-PlaceDetail__Image">
|
||||
<img src="{{ place.images.first.filename.hero.url }}" class="LP-Image" />
|
||||
</figure>
|
||||
{% endif %}
|
||||
</header>
|
||||
<header class="LP-PlaceDetail__Header">
|
||||
<h1 class="LP-Headline">{{ place.name }}</h1>
|
||||
{% if place.images.first.filename.hero.url %}
|
||||
<figure class="LP-PlaceDetail__Image">
|
||||
<img src="{{ place.images.first.filename.hero.url }}" class="LP-Image" />
|
||||
</figure>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<div class="LP-PlaceDetail__Description">
|
||||
<p class="LP-Paragraph">{{ place.description }}</p>
|
||||
</div>
|
||||
<div class="LP-PlaceDetail__Description">
|
||||
<p class="LP-Paragraph">{{ place.description }}</p>
|
||||
</div>
|
||||
|
||||
<section class="LP-Section">
|
||||
<h1 class="LP-Headline">Map-Links</h1>
|
||||
{% include 'partials/osm_map.html' %}
|
||||
<div class="LP-LinkList">
|
||||
<ul class="LP-LinkList__Container">
|
||||
<li class="LP-LinkList__Item"><a target="_blank"
|
||||
href="https://www.google.com/maps?q={{place.latitude}},{{place.longitude}}"
|
||||
class="LP-Link"><span class="LP-Text">Google Maps</span></a></li>
|
||||
<li class="LP-LinkList__Item"><a target="_blank"
|
||||
href="https://www.tim-online.nrw.de/tim-online2/?center={{place.latitude}},{{place.longitude}}&icon=true&bg=dop"
|
||||
class="LP-Link"><span class="LP-Text">TIM Online</span></a></li>
|
||||
<li class="LP-LinkList__Item"><a target="_blank"
|
||||
href="http://www.openstreetmap.org/?mlat={{place.latitude}}&mlon={{place.longitude}}&zoom=16"
|
||||
class="LP-Link"><span class="LP-Text">OSM</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="LP-Section">
|
||||
<h1 class="LP-Headline">Photoalben</h1>
|
||||
<div class="LP-LinkList">
|
||||
<ul class="LP-LinkList__Container">
|
||||
{% for photo_album in place.photo_albums.all %}
|
||||
<li class="LP-LinkList__Item">
|
||||
<a target="_blank" href="{{photo_album.url}}" class="LP-Link">
|
||||
<span class="LP-Text">{{photo_album.label}}</span>
|
||||
</a>
|
||||
{% if user == photo_album.submitted_by or user == place.submitted_by %}
|
||||
<a href="{% url 'photo_album_delete' pk=photo_album.pk%}" class="LP-Link LP-LinkList__ItemHover" title="Delete Photo Album">
|
||||
<div class="RV-Iconized__Container RV-Iconized__Container--small">
|
||||
{% icon 'trash' className="RV-Iconized__Icon" %}
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="LP-LinkList__Item">
|
||||
<a href="{% url 'photo_album_create' place_id=place.id %}" class="LP-Link">
|
||||
<div class="RV-Iconized__Container RV-Iconized__Container--small">
|
||||
<svg class="RV-Iconized__Icon" version="1.1" id="Capa_1"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 512 512" xml:space="preserve">
|
||||
<g>
|
||||
<path d="M492,236H276V20c0-11.046-8.954-20-20-20c-11.046,0-20,8.954-20,20v216H20c-11.046,0-20,8.954-20,20s8.954,20,20,20h216
|
||||
v216c0,11.046,8.954,20,20,20s20-8.954,20-20V276h216c11.046,0,20-8.954,20-20C512,244.954,503.046,236,492,236z" />
|
||||
</g>
|
||||
</svg>
|
||||
<span class="RV-Iconized__Text">Fotoalbum hinzufügen</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="LP-Section">
|
||||
<h1 class="LP-Headline">Bilder</h1>
|
||||
<div class="LP-ImageGrid">
|
||||
<ul class="LP-ImageGrid__Container">
|
||||
{% for place_image in place.images.all %}
|
||||
<li class="LP-ImageGrid__Item">
|
||||
<a href="{{ place_image.filename.large.url }}" class="LP-Link"><img class="LP-Image"
|
||||
src="{{ place_image.filename.thumbnail.url }}"></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="LP-Section">
|
||||
<h1 class="LP-Headline">Map-Links</h1>
|
||||
<div class="LP-LinkList">
|
||||
<ul class="LP-LinkList__List">
|
||||
<li class="LP-LinkList__Item"><a target="_blank" href="https://www.google.com/maps?q={{place.latitude}},{{place.longitude}}" class="LP-Link"><span class="LP-Text">Google Maps</span></a></li>
|
||||
<li class="LP-LinkList__Item"><a target="_blank" href="https://www.tim-online.nrw.de/tim-online2/?center={{place.latitude}},{{place.longitude}}&icon=true&bg=dop" class="LP-Link"><span class="LP-Text">TIM Online</span></a></li>
|
||||
<li class="LP-LinkList__Item"><a target="_blank" href="http://www.openstreetmap.org/?mlat={{place.latitude}}&mlon={{place.longitude}}&zoom=16" class="LP-Link"><span class="LP-Text">OSM</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="LP-Section">
|
||||
<h1 class="LP-Headline">Bilder</h1>
|
||||
<div class="LP-ImageGrid">
|
||||
<ul class="LP-ImageGrid__List">
|
||||
{% for place_image in place.images.all %}
|
||||
<li class="LP-ImageGrid__Item">
|
||||
<a href="{{ place_image.filename.large.url }}" class="LP-Link"><img class="LP-Image" src="{{ place_image.filename.thumbnail.url }}"></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
{% endblock maincontent %}
|
@@ -1,9 +1,16 @@
|
||||
{% extends 'global.html'%}
|
||||
{% load static %}
|
||||
|
||||
{% block additional_head %}
|
||||
<link rel="stylesheet" href="{% static 'maps/ol.css' %}" type="text/css">
|
||||
<script src="{% static 'maps/ol.js' %}"></script>
|
||||
{% endblock additional_head %}
|
||||
|
||||
{% block title %}Lost Places{% endblock %}
|
||||
|
||||
{% block maincontent %}
|
||||
|
||||
{% include 'partials/osm_map.html' %}
|
||||
<div class="LP-PlaceList">
|
||||
<h1 class="LP-Headline">Listing our places</h1>
|
||||
<ul class="LP-PlaceList__List">
|
||||
|
@@ -16,16 +16,16 @@
|
||||
<div class="LP-Form__Field">
|
||||
{% include 'partials/form/inputField.html' with field=form.password %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="LP-Form__Composition LP-Form__Composition--buttons">
|
||||
<div class="LP-Form__Field LP-Form__Button LP-Input">
|
||||
<button class="LP-Button">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="LP-Form__Composition LP-Form__Composition--buttons">
|
||||
<div class="LP-Form__Field LP-Form__Button LP-Input">
|
||||
<button class="LP-Button">Login</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
<p class="LP-Headline">No account? <a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">Sign up here</span></a></p>
|
||||
|
||||
{% endblock maincontent %}
|
5
lostplaces/lostplaces_app/templates/svg_icon/icon.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="{{ width }}" height="{{ height }}" viewBox="{{viewBox}}" class="svg{% if className %} {{ className }}{% endif %}">
|
||||
{% for path in paths %}
|
||||
<path d="{{ path }}"></path>
|
||||
{% endfor %}
|
||||
</svg>
|
After Width: | Height: | Size: 209 B |
31
lostplaces/lostplaces_app/templatetags/svg_icon.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import json, os
|
||||
from importlib import import_module
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.conf import settings
|
||||
from django.template import Library, TemplateSyntaxError
|
||||
|
||||
#icons_json_path = getattr(settings, 'SVG_ICONS_SOURCE_FILE')
|
||||
icons_json_path = os.path.join(settings.BASE_DIR, 'lostplaces_app', 'static', 'icons', 'icons.icomoon.json')
|
||||
icons_json = json.load(open(icons_json_path))
|
||||
|
||||
register = Library()
|
||||
|
||||
@register.inclusion_tag('svg_icon/icon.html')
|
||||
def icon(name, **kwargs):
|
||||
|
||||
icon_config = icons_json.get(name, None)
|
||||
|
||||
if icon_config:
|
||||
|
||||
width = kwargs.get('width', icon_config.get('width', 16))
|
||||
height = kwargs.get('height', icon_config.get('heigh', 16))
|
||||
viewBox = kwargs.get('viewBox', icon_config.get('viewBox', '0 0 1024 1024'))
|
||||
|
||||
return {
|
||||
'width': kwargs.get('size', width),
|
||||
'height': kwargs.get('size', height),
|
||||
'className': kwargs.get('className'),
|
||||
'viewBox': viewBox,
|
||||
'paths': icon_config.get('paths', [''])
|
||||
}
|
@@ -6,7 +6,10 @@ from .views import (
|
||||
SignUpView,
|
||||
PlaceCreateView,
|
||||
PlaceUpdateView,
|
||||
PlaceDeleteView
|
||||
PlaceDeleteView,
|
||||
PhotoAlbumCreateView,
|
||||
PhotoAlbumDeleteView,
|
||||
CodexView
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
@@ -14,7 +17,10 @@ urlpatterns = [
|
||||
path('signup/', SignUpView.as_view(), name='signup'),
|
||||
path('place/<int:pk>/', PlaceDetailView.as_view(), name='place_detail'),
|
||||
path('place/create/', PlaceCreateView.as_view(), name='place_create'),
|
||||
path('photo_album/create/<int:place_id>', PhotoAlbumCreateView.as_view(), name='photo_album_create'),
|
||||
path('photo_album/delete/<int:pk>', PhotoAlbumDeleteView.as_view(), name='photo_album_delete'),
|
||||
path('place/update/<int:pk>/', PlaceUpdateView.as_view(), name='place_edit'),
|
||||
path('place/delete/<int:pk>/', PlaceDeleteView.as_view(), name='place_delete'),
|
||||
path('place/', PlaceListView.as_view(), name='place_list')
|
||||
path('place/', PlaceListView.as_view(), name='place_list'),
|
||||
path('codex/', CodexView, name='codex'),
|
||||
]
|
||||
|
3
lostplaces/lostplaces_app/views/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from lostplaces_app.views.base_views import *
|
||||
from lostplaces_app.views.views import *
|
||||
from lostplaces_app.views.place_views import *
|
98
lostplaces/lostplaces_app/views/base_views.py
Normal file
@@ -0,0 +1,98 @@
|
||||
from django.views import View
|
||||
from django.views.generic.edit import CreateView
|
||||
from django.views.generic.detail import SingleObjectMixin
|
||||
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.mixins import UserPassesTestMixin, LoginRequiredMixin
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
from lostplaces_app.models import Place
|
||||
|
||||
class IsAuthenticated(LoginRequiredMixin, View):
|
||||
redirect_field_name = 'redirect_to'
|
||||
permission_denied_message = 'Please login to proceed'
|
||||
|
||||
def handle_no_permission(self):
|
||||
messages.error(self.request, self.permission_denied_message)
|
||||
return super().handle_no_permission()
|
||||
|
||||
class IsPlaceSubmitter(UserPassesTestMixin, View):
|
||||
place_submitter_error_message = None
|
||||
|
||||
def get_place(self):
|
||||
pass
|
||||
|
||||
def test_func(self):
|
||||
""" Check if user is eligible to modify place. """
|
||||
|
||||
if not hasattr(self.request, 'user'):
|
||||
return False
|
||||
|
||||
if self.request.user.is_superuser:
|
||||
return True
|
||||
|
||||
# Check if currently logged in user was the submitter
|
||||
place_obj = self.get_place()
|
||||
|
||||
if place_obj and hasattr(place_obj, 'submitted_by') and self.request.user == place_obj.submitted_by:
|
||||
return True
|
||||
|
||||
if self.place_submitter_error_message:
|
||||
messages.error(self.request, self.place_submitter_error_message)
|
||||
return False
|
||||
|
||||
class PlaceAssetCreateView(IsAuthenticated, SuccessMessageMixin, CreateView):
|
||||
model = None
|
||||
fields = []
|
||||
template_name = ''
|
||||
success_message = ''
|
||||
|
||||
def get(self, request, place_id, *args, **kwargs):
|
||||
self.place = Place.objects.get(pk=place_id)
|
||||
return super().get(request, *args, **kwargs)
|
||||
|
||||
def post(self, request, place_id, *args, **kwargs):
|
||||
self.place = Place.objects.get(pk=place_id)
|
||||
response = super().post(request, *args, **kwargs)
|
||||
self.object.place = self.place
|
||||
self.object.submitted_by = request.user
|
||||
self.object.save()
|
||||
return response
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['place'] = self.place
|
||||
return context
|
||||
|
||||
def get_success_url(self):
|
||||
return reverse_lazy('place_detail', kwargs={'pk': self.place.id})
|
||||
|
||||
class PlaceAssetDeleteView(IsAuthenticated, IsPlaceSubmitter, SingleObjectMixin, View):
|
||||
model = None
|
||||
pk_url_kwarg = 'pk'
|
||||
success_message = ''
|
||||
permission_denied_message = ''
|
||||
|
||||
def get_place(self):
|
||||
place_id = self.get_object().place.id
|
||||
return Place.objects.get(pk=place_id)
|
||||
|
||||
def test_func(self):
|
||||
can_edit_place = super().test_func()
|
||||
if can_edit_place:
|
||||
return True
|
||||
|
||||
if self.get_object().submitted_by == self.request.user:
|
||||
return True
|
||||
|
||||
messages.error(self.request, self.permission_denied_message)
|
||||
return False
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
place_id = self.get_object().place.id
|
||||
self.get_object().delete()
|
||||
messages.success(self.request, self.success_message)
|
||||
return redirect(reverse_lazy('place_detail', kwargs={'pk': place_id}))
|
@@ -1,83 +1,52 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
''' Django views. '''
|
||||
from django.shortcuts import render, redirect, get_object_or_404
|
||||
from django.urls import reverse_lazy
|
||||
from django.views.generic.edit import CreateView, UpdateView, DeleteView
|
||||
from django.views.generic import ListView
|
||||
from django.views import View
|
||||
from django.http import Http404
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.mixins import UserPassesTestMixin, LoginRequiredMixin
|
||||
from django.views.generic.edit import CreateView, UpdateView, DeleteView
|
||||
from django.views.generic.detail import SingleObjectMixin
|
||||
from django.views.generic import ListView
|
||||
|
||||
from django.contrib import messages
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
|
||||
from .forms import (
|
||||
ExplorerCreationForm,
|
||||
PlaceForm,
|
||||
PlaceImageCreateForm
|
||||
)
|
||||
from .models import Place, PlaceImage, Voucher
|
||||
from django.shortcuts import render, redirect
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
# Create your views here.
|
||||
|
||||
# BaseView that checks if user is logged in.
|
||||
class IsAuthenticated(LoginRequiredMixin, View):
|
||||
redirect_field_name = 'redirect_to'
|
||||
|
||||
# BaseView that checks if logged in user is submitter of place.
|
||||
class IsSubmitter(UserPassesTestMixin, View):
|
||||
def test_func(self):
|
||||
""" Check if user is eligible to modify place. """
|
||||
if self.request.user.is_superuser:
|
||||
return True
|
||||
|
||||
# Check if currently logged in user was the submitter
|
||||
place_obj = self.get_object()
|
||||
|
||||
if self.request.user == place_obj.submitted_by:
|
||||
return True
|
||||
|
||||
messages.error(
|
||||
self.request, 'You do not have permission to do this.')
|
||||
return False
|
||||
|
||||
class SignUpView(SuccessMessageMixin, CreateView):
|
||||
form_class = ExplorerCreationForm
|
||||
success_url = reverse_lazy('login')
|
||||
template_name = 'signup.html'
|
||||
success_message = 'User created.'
|
||||
from lostplaces_app.models import Place, PlaceImage
|
||||
from lostplaces_app.views import IsAuthenticated, IsPlaceSubmitter
|
||||
from lostplaces_app.forms import PlaceForm, PlaceImageCreateForm
|
||||
|
||||
class PlaceListView(IsAuthenticated, ListView):
|
||||
paginate_by = 2
|
||||
paginate_by = 5
|
||||
model = Place
|
||||
template_name = 'place/place_list.html'
|
||||
ordering = ['name']
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['place_map_center'] = Place.average_latlon(context['place_list'])
|
||||
return context
|
||||
|
||||
class PlaceDetailView(IsAuthenticated, View):
|
||||
def get(self, request, pk):
|
||||
place = Place.objects.get(pk=pk)
|
||||
context = {
|
||||
'place': Place.objects.get(pk=pk)
|
||||
'place': place,
|
||||
'place_list': [ place ],
|
||||
'place_map_center': [ place.latitude, place.longitude ]
|
||||
}
|
||||
return render(request, 'place/place_detail.html', context)
|
||||
|
||||
class HomeView(View):
|
||||
def get(self, request, *args, **kwargs):
|
||||
place_list = Place.objects.all().order_by('-submitted_when')[:10]
|
||||
context = {
|
||||
'place_list': place_list
|
||||
}
|
||||
return render(request, 'home.html', context)
|
||||
|
||||
class PlaceUpdateView(IsAuthenticated, IsSubmitter, SuccessMessageMixin, UpdateView):
|
||||
class PlaceUpdateView(IsAuthenticated, IsPlaceSubmitter, SuccessMessageMixin, UpdateView):
|
||||
template_name = 'place/place_update.html'
|
||||
model = Place
|
||||
form_class = PlaceForm
|
||||
success_message = 'Successfully updated place.'
|
||||
place_submitter_error_message = 'You do no have permissions to alter this place'
|
||||
|
||||
def get_success_url(self):
|
||||
return reverse_lazy('place_detail', kwargs={'pk':self.get_object().pk})
|
||||
|
||||
def get_place(self):
|
||||
return self.get_object()
|
||||
|
||||
class PlaceCreateView(IsAuthenticated, View):
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
@@ -134,13 +103,17 @@ class PlaceCreateView(IsAuthenticated, View):
|
||||
)
|
||||
place_image.save()
|
||||
|
||||
class PlaceDeleteView(IsAuthenticated, IsSubmitter, DeleteView):
|
||||
class PlaceDeleteView(IsAuthenticated, IsPlaceSubmitter, DeleteView):
|
||||
template_name = 'place/place_delete.html'
|
||||
model = Place
|
||||
success_message = 'Successfully deleted place.'
|
||||
success_url = reverse_lazy('place_list')
|
||||
success_message = 'Place deleted'
|
||||
place_submitter_error_message = 'You do no have permission to delete this place'
|
||||
|
||||
def delete(self, request, *args, **kwargs):
|
||||
messages.success(self.request, self.success_message)
|
||||
return super().delete(request, *args, **kwargs)
|
||||
|
||||
def get_place(self):
|
||||
return self.get_object()
|
53
lostplaces/lostplaces_app/views/views.py
Normal file
@@ -0,0 +1,53 @@
|
||||
from django.views import View
|
||||
from django.views.generic.edit import CreateView
|
||||
|
||||
from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.contrib import messages
|
||||
from django.urls import reverse_lazy
|
||||
from django.shortcuts import render, redirect
|
||||
|
||||
from lostplaces_app.forms import ExplorerCreationForm
|
||||
from lostplaces_app.models import Place, PhotoAlbum
|
||||
from lostplaces_app.views import IsAuthenticated
|
||||
|
||||
from lostplaces_app.views.base_views import (
|
||||
PlaceAssetCreateView,
|
||||
PlaceAssetDeleteView
|
||||
)
|
||||
class SignUpView(SuccessMessageMixin, CreateView):
|
||||
form_class = ExplorerCreationForm
|
||||
success_url = reverse_lazy('login')
|
||||
template_name = 'signup.html'
|
||||
success_message = 'User created.'
|
||||
|
||||
class HomeView(IsAuthenticated, View):
|
||||
def get(self, request, *args, **kwargs):
|
||||
place_list = Place.objects.all().order_by('-submitted_when')[:10]
|
||||
place_map_center = Place.average_latlon(place_list)
|
||||
context = {
|
||||
'place_list': place_list,
|
||||
'place_map_center': place_map_center
|
||||
}
|
||||
return render(request, 'home.html', context)
|
||||
|
||||
def handle_no_permission(self):
|
||||
place_list = Place.objects.all().order_by('-submitted_when')[:5]
|
||||
context = {
|
||||
'place_list': place_list
|
||||
}
|
||||
return render(self.request, 'home_unauth.html', context)
|
||||
|
||||
class PhotoAlbumCreateView(PlaceAssetCreateView):
|
||||
model = PhotoAlbum
|
||||
fields = ['url', 'label']
|
||||
template_name = 'photo_album/photo_album_create.html'
|
||||
success_message = 'Photo Album submitted'
|
||||
|
||||
class PhotoAlbumDeleteView(PlaceAssetDeleteView):
|
||||
model = PhotoAlbum
|
||||
pk_url_kwarg = 'pk'
|
||||
success_message = 'Photo Album deleted'
|
||||
permission_denied_messsage = 'You do not have permissions to alter this photo album'
|
||||
|
||||
def CodexView(request):
|
||||
return render(request, 'flat/codex.html')
|