Compare commits

..

2 Commits

Author SHA1 Message Date
fc7a847f6d New css 2020-08-04 20:06:39 +02:00
2346f814e7 Removed debug 2020-08-04 20:04:46 +02:00
3 changed files with 69 additions and 38 deletions

View File

@ -45,5 +45,5 @@ class PlaceImageCreateForm(forms.ModelForm):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
print(self.fields)
self.fields['filename'].required = False self.fields['filename'].required = False

View File

@ -1,12 +1,20 @@
@font-face {
font-family: Crimson;
src: url("fonts/Crimson/CrimsonText-Regular.ttf"), url("fonts/Crimson/CrimsonText-Bold.ttf"), url("fonts/Crimson/CrimsonText-Italic.ttf"); }
@font-face {
font-family: Montserrat;
src: url("fonts/Montserrat/Montserrat-Regular.otf"), url("fonts/Montserrat/Montserrat-Bold.otf"), url("fonts/Montserrat/Montserrat-Italic.otf"); }
.LP-Link { .LP-Link {
color: #565656; color: #565656;
text-decoration: none; text-decoration: none;
font-family: Roboto, Arial, sans-serif; } font-family: Montserrat, Helvetica, sans-serif; }
.LP-Link:hover { .LP-Link:hover {
color: #C09F80; } color: #C09F80; }
.LP-Link .LP-Text { .LP-Link .LP-Paragraph {
font-family: Roboto, Arial, sans-serif; } font-family: Montserrat, Helvetica, sans-serif; }
.LP-Link .LP-Text:hover { .LP-Link .LP-Paragraph:hover {
color: #C09F80; } color: #C09F80; }
.LP-Link__IconWrapper { .LP-Link__IconWrapper {
@ -221,33 +229,49 @@
.LP-TagList .LP-TagList__List .LP-TagList__Item { .LP-TagList .LP-TagList__List .LP-TagList__Item {
margin: 6px; } margin: 6px; }
.LP-Menu .LP-Menu__List { .LP-Menu {
border-left: 1px solid #C09F80; }
.LP-Menu .LP-Menu__List {
list-style-type: none; list-style-type: none;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-around;
padding: 0; padding: 0;
margin: 0; } margin: 0; }
.LP-Menu .LP-Menu__Item {
.LP-Menu .LP-Menu__Item {
padding: 15px 0;
margin: 0; margin: 0;
width: 100px;
text-align: center; text-align: center;
background-color: transparent; } background-color: transparent; }
.LP-Menu .LP-Menu__Item .LP-Link {
.LP-Menu .LP-Link__Text { display: block;
padding: 15px 0; }
.LP-Menu .LP-Link__Text {
color: #565656; color: #565656;
font-weight: bold; font-weight: bold;
text-shadow: 0px 0px 20px white; } text-shadow: 0px 0px 20px white; }
.LP-Menu .LP-Link__Text:hover { .LP-Menu .LP-Link__Text:hover {
color: #76323F; } color: #76323F; }
.LP-Menu--sidebar {
border: none;
min-width: 80px; }
.LP-Menu--sidebar .LP-Menu__List {
flex-direction: column; }
.LP-Menu--sidebar .LP-Menu__List .LP-Menu__Item {
text-align: left;
border-left: 1px solid #C09F80;
margin-bottom: 10px; }
.LP-Menu--sidebar .LP-Menu__List .LP-Menu__Item:last-child {
margin-bottom: 0; }
.LP-Menu--sidebar .LP-Menu__List .LP-Menu__Item .LP-Link:hover {
background-color: #f9f9f9; }
@media (max-width: 750px) { @media (max-width: 750px) {
.LP-Menu .LP-Menu__List { .LP-Menu:not(.LP-Menu--sidebar) .LP-Menu__List {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-start; } } justify-content: flex-start; }
.LP-Menu:not(.LP-Menu--sidebar) .LP-Menu__List .LP-Menu__Item {
flex: 1 1 auto; } }
@media (max-width: 450px) { @media (max-width: 450px) {
.LP-Menu .LP-Menu__List { .LP-Menu .LP-Menu__List {
@ -259,15 +283,27 @@
justify-content: space-between; justify-content: space-between;
margin-bottom: 70px; margin-bottom: 70px;
height: 60px; } height: 60px; }
.LP-Header__Navigation {
flex-grow: 2; }
.LP-Header__Logo { .LP-Header__Logo {
height: 60px; height: 60px;
margin: 25px; margin: 25px;
object-fit: cover; object-fit: cover;
max-height: 100%; max-height: 100%;
overflow: hidden; } overflow: hidden;
flex-shrink: 0; }
.LP-Header__Logo .LP-Image { .LP-Header__Logo .LP-Image {
height: 60px; } height: 60px; }
.LP-Header__UserInformation {
margin-right: 3%; }
.LP-Header__UserInformation .LP-Paragraph {
font-family: Montserrat, Helvetica, sans-serif;
white-space: nowrap; }
.LP-Header__UserInformation .LP-Link {
margin: 0 3px;
padding: 4px 4px; }
@media (max-width: 750px) { @media (max-width: 750px) {
.LP-Header__Logo { .LP-Header__Logo {
width: 60px; } width: 60px; }
@ -412,9 +448,6 @@
.LP-HorizontalLine { .LP-HorizontalLine {
color: #565656; } color: #565656; }
.LP-Section {
clear: both; }
@media (max-width: 650px) { @media (max-width: 650px) {
.LP-MainContainer { .LP-MainContainer {
width: 100%; } } width: 100%; } }
@ -435,7 +468,8 @@
top: -15px; } top: -15px; }
.LP-PlaceOverview .LP-PlaceOverview__Info .LP-PlaceOverView__Description .LP-Headline { .LP-PlaceOverview .LP-PlaceOverview__Info .LP-PlaceOverView__Description .LP-Headline {
position: relative; position: relative;
top: 15px; } top: 15px;
margin-bottom: 30px; }
.LP-PlaceOverview .LP-PlaceOverView__ImageList { .LP-PlaceOverview .LP-PlaceOverView__ImageList {
list-style-type: none; list-style-type: none;

View File

@ -31,7 +31,6 @@ def hello_world(request):
class HomeView(View): class HomeView(View):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
place_list = Place.objects.all().order_by('submitted_when')[:10] place_list = Place.objects.all().order_by('submitted_when')[:10]
print(place_list)
context = { context = {
'place_list': place_list 'place_list': place_list
} }
@ -84,9 +83,7 @@ class PlaceCreateView(View):
} }
return render(request, 'create_place.html', context) return render(request, 'create_place.html', context)
def _apply_multipart_image_upload(self, files, place, submitter): def _apply_multipart_image_upload(self, files, place, submitter)::
print(files)
for image in files:
place_image = PlaceImage.objects.create( place_image = PlaceImage.objects.create(
filename=image, filename=image,
place=place, place=place,