diff --git a/wedding_site/primary/static/primary/fonts/Emitha-Script.otf b/wedding_site/primary/static/primary/fonts/Emitha-Script.otf new file mode 100755 index 0000000..6dd90e4 Binary files /dev/null and b/wedding_site/primary/static/primary/fonts/Emitha-Script.otf differ diff --git a/wedding_site/primary/static/primary/fonts/GlacialIndifference-Bold.otf b/wedding_site/primary/static/primary/fonts/GlacialIndifference-Bold.otf new file mode 100755 index 0000000..b88fd16 Binary files /dev/null and b/wedding_site/primary/static/primary/fonts/GlacialIndifference-Bold.otf differ diff --git a/wedding_site/primary/static/primary/fonts/GlacialIndifference-Regular.otf b/wedding_site/primary/static/primary/fonts/GlacialIndifference-Regular.otf new file mode 100755 index 0000000..f28afdc Binary files /dev/null and b/wedding_site/primary/static/primary/fonts/GlacialIndifference-Regular.otf differ diff --git a/wedding_site/primary/static/primary/images/Background.png b/wedding_site/primary/static/primary/images/Background.png new file mode 100755 index 0000000..75205c6 Binary files /dev/null and b/wedding_site/primary/static/primary/images/Background.png differ diff --git a/wedding_site/primary/static/primary/images/Blob1.png b/wedding_site/primary/static/primary/images/Blob1.png new file mode 100755 index 0000000..65bf624 Binary files /dev/null and b/wedding_site/primary/static/primary/images/Blob1.png differ diff --git a/wedding_site/primary/static/primary/images/Blob2.png b/wedding_site/primary/static/primary/images/Blob2.png new file mode 100755 index 0000000..afc8dcb Binary files /dev/null and b/wedding_site/primary/static/primary/images/Blob2.png differ diff --git a/wedding_site/primary/static/primary/images/Flowers.png b/wedding_site/primary/static/primary/images/Flowers.png new file mode 100755 index 0000000..5b2f1d0 Binary files /dev/null and b/wedding_site/primary/static/primary/images/Flowers.png differ diff --git a/wedding_site/primary/static/primary/style.css b/wedding_site/primary/static/primary/style.css new file mode 100755 index 0000000..8e17fb4 --- /dev/null +++ b/wedding_site/primary/static/primary/style.css @@ -0,0 +1,165 @@ +@font-face { + font-family: 'GlacialIndifference'; + font-style: normal; + font-weight: normal; + src: local('GlacialIndifference'), + url('fonts/GlacialIndifference-Regular.otf') format('opentype'); +} +@font-face { + font-family: 'GlacialIndifference'; + font-style: normal; + font-weight: bold; + src: local('GlacialIndifference'), + url('fonts/GlacialIndifference-Bold.otf') format('opentype'); +} +@font-face { + font-family: 'Emitha-Script'; + font-style: normal; + font-weight: normal; + src: local('Emitha-Script'), + url('fonts/Emitha-Script.otf') format('opentype'); +} + +body { + width: 100%; + height: 600px; + margin: 0 auto; + background: + top right / 40% no-repeat url('images/Flowers.png'), + bottom -150px left -400px / 1000px no-repeat url('images/Blob1.png'), + top -300px right -250px / 700px no-repeat url('images/Blob2.png'), + url('images/Background.png'); + } + +.site-tagline{ + text-align: center; + margin-top: 140px; + font-family: GlacialIndifference; + font-size: 74px; +} + +.site-names{ + text-align: center; + margin-top: 20px; + font-family: GlacialIndifference; + font-size: 24px; + font-weight: bold; +} + +.site-tagline-span{ + font-family: Emitha-Script; + font-size: 184px; + position:relative; + bottom: -30px; +} + +ul { + list-style-type: none; + margin: 0 auto; + padding: 0; + overflow: hidden; +} + +li { + display: inline; + float: left; +} + +.main-nav { + margin:0 auto; + width: 100%; + display: flex; + justify-content: center; + } + +.nav-button { + display: block; + color: black; + text-align: center; + padding: 14px 16px; + text-decoration: none; + font-size: 24px; + font-family: GlacialIndifference; +} + +.standard-a { + color: black; + text-decoration: none; + font-style: italic; +} + +.standard-a:hover { + text-decoration: underline; +} + +.biglink-a { + color: black; + text-decoration: none; +} + +.biglink-a:hover { + text-decoration: underline; +} + +li a:hover { + text-decoration: underline; +} + +.login-input{ + margin-top: 30px; + text-align: center; + font-size: 20px; + font-family: GlacialIndifference; +} + +input[type=password] { + padding:5px; + border:2px solid #ccc; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +input[type=password]:autofill { + background: #bdc4c2; /* or any other */ + } + + +input[type=password]:focus { + border-color:#333; +} + +input[type=submit] { + padding:5px 15px; + background:#b9b9b9; + border:0 none; + cursor:pointer; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +.article-content{ + margin-top: 30px; + text-align: center; + font-size: 20px; + width: 50%; + margin:0 auto; + font-family: GlacialIndifference; +} + +.jumbo-image { + margin:0 auto; + width: 100%; + display: flex; + justify-content: center; + max-height:300px; + border-radius: 8px; + box-shadow: 0 4px 8px 0; + } + +.signature{ + font-family: Emitha-Script; + font-size: 50px; + width: 70%; + text-align: center; + margin:0 auto; +} \ No newline at end of file diff --git a/wedding_site/primary/templates/header.html b/wedding_site/primary/templates/header.html new file mode 100644 index 0000000..6574036 --- /dev/null +++ b/wedding_site/primary/templates/header.html @@ -0,0 +1,6 @@ +{{site.title}} + + +{% load static %} + \ No newline at end of file diff --git a/wedding_site/primary/templates/index_body.html b/wedding_site/primary/templates/index_body.html new file mode 100644 index 0000000..3ee886c --- /dev/null +++ b/wedding_site/primary/templates/index_body.html @@ -0,0 +1,11 @@ +
SAVE the DATE
+ +
JAMES AND FIONNUALA
+ +
+
+ + + +
+
\ No newline at end of file diff --git a/wedding_site/primary/templates/page_header.html b/wedding_site/primary/templates/page_header.html new file mode 100644 index 0000000..ae3975d --- /dev/null +++ b/wedding_site/primary/templates/page_header.html @@ -0,0 +1,10 @@ +
+ +
\ No newline at end of file diff --git a/wedding_site/primary/urls.py b/wedding_site/primary/urls.py index 3fe02fa..436bcbe 100644 --- a/wedding_site/primary/urls.py +++ b/wedding_site/primary/urls.py @@ -5,7 +5,7 @@ from . import views urlpatterns = [ path("", views.index, name="index"), - path("schedule", views.schedule, name="schedule"), + path('schedule', views.schedule, name="schedule"), path("thingstodo", views.things_to_do, name="thingstodo"), path("travel", views.travel, name="travel"), ] diff --git a/wedding_site/primary/views.py b/wedding_site/primary/views.py index c315607..a2ea822 100644 --- a/wedding_site/primary/views.py +++ b/wedding_site/primary/views.py @@ -12,43 +12,22 @@ _TEMPLATE = """ - {{site_header}} + {{site_header | safe}} - {{page_body}} + {{page_body | safe}} """ -_BODY = """ -
SAVE the DATE
- -
JAMES AND FIONNUALA
- -
-
- - - -
-
-""" - -_HEADER = """ - {{site.title}} - - -""" - def get_site_header(site): - template = Template(_HEADER) + template = Template(site.header) context = Context({"site": site}) return template.render(context) def get_index_body(site): - template = Template(_BODY) + template = Template(site.index) context = Context({"site": site}) return template.render(context) @@ -63,34 +42,11 @@ def index(request): soup = BeautifulSoup(template.render(context)) return HttpResponse(soup.prettify()) -def schedule(request): - return get_page("Schedule") - -def things_to_do(request): - return get_page("ThingsToDo") - -def travel(request): - return get_page("Travel") - - -_PAGE_HEADER = """ -
- -
-""" - def get_page_header(site: Site): pages = site.page_set.filter(navigable=True) - template = Template(_PAGE_HEADER) - context = Context({"pages", pages}) + template = Template(site.page_header) + context = Context({"pages" : pages}) return template.render(context) def get_page_body(site: Site, page: Page): @@ -108,5 +64,15 @@ def get_page(name:str): "site_header" : get_site_header(site), "page_body" : get_page_body(site, page)}) - soup = BeautifulSoup(template.render(context)) - return HttpResponse(soup.prettify()) \ No newline at end of file + content = template.render(context) + soup = BeautifulSoup(content, features="html.parser") + return HttpResponse(soup.prettify()) + +def schedule(request): + return get_page("Schedule") + +def things_to_do(request): + return get_page("ThingsToDo") + +def travel(request): + return get_page("Travel") \ No newline at end of file