From 78c6c45a0b9d2d7dbad225b73019a06f496ab38c Mon Sep 17 00:00:00 2001 From: rscnt Date: Sun, 4 Oct 2015 08:04:23 -0600 Subject: [PATCH 01/15] project: removed circus egg and deps. Signed-off-by: rscnt --- requirements.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index f43f1e69..342be9cf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ six==1.3.0 #compat python-memcached # django -django==1.7.8 +django==1.7.10 #django-assets django-bootstrap3 @@ -45,10 +45,9 @@ djangocms-table cmsplugin-filer==0.10.1 # production --e git+git@github.com:circus-tent/circus.git#egg=circus -circus-web -chaussette -meinheld +# circus-web +# chaussette +# meinheld # python3 support gevent>=1.1a2 From 4b69077414580132552aa05383e2b8506c6586de Mon Sep 17 00:00:00 2001 From: rscnt Date: Sun, 4 Oct 2015 08:08:19 -0600 Subject: [PATCH 02/15] dynamicweb: settings, added German lang, changed templates. Signed-off-by: rscnt --- dynamicweb/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dynamicweb/settings.py b/dynamicweb/settings.py index e133cca3..6bcc26c3 100644 --- a/dynamicweb/settings.py +++ b/dynamicweb/settings.py @@ -159,7 +159,7 @@ TEMPLATE_DIRS = ( ) CMS_TEMPLATES_DIR = { - 1: os.path.join(TEMPLATE_DIRS[0], 'cms/ungleich.ch/'), + 1: os.path.join(TEMPLATE_DIRS[0], 'cms/'), } @@ -187,6 +187,7 @@ USE_TZ = True LANGUAGES = ( ('en-us', _('US English')), + ('de', _('German')), ) LANGUAGE_CODE = 'en-us' From b12a273a1d13371e3debb67188ac432e399f6607 Mon Sep 17 00:00:00 2001 From: rscnt Date: Sun, 4 Oct 2015 08:27:44 -0600 Subject: [PATCH 03/15] templates: cms, moved ungleich.ch -> ungleichch Signed-off-by: rscnt --- templates/cms/ungleich.ch/index.html | 3 --- templates/cms/{ungleich.ch => ungleichch}/__init__.py | 0 templates/cms/{ungleich.ch => ungleichch}/_footer.html | 0 templates/cms/{ungleich.ch => ungleichch}/_header_base.html | 0 templates/cms/{ungleich.ch => ungleichch}/_menu.html | 0 templates/cms/{ungleich.ch => ungleichch}/base.html | 6 +++--- templates/cms/{ungleich.ch => ungleichch}/blog.html | 2 +- templates/cms/ungleichch/index.html | 3 +++ templates/cms/{ungleich.ch => ungleichch}/page.html | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 templates/cms/ungleich.ch/index.html rename templates/cms/{ungleich.ch => ungleichch}/__init__.py (100%) rename templates/cms/{ungleich.ch => ungleichch}/_footer.html (100%) rename templates/cms/{ungleich.ch => ungleichch}/_header_base.html (100%) rename templates/cms/{ungleich.ch => ungleichch}/_menu.html (100%) rename templates/cms/{ungleich.ch => ungleichch}/base.html (94%) rename templates/cms/{ungleich.ch => ungleichch}/blog.html (64%) create mode 100644 templates/cms/ungleichch/index.html rename templates/cms/{ungleich.ch => ungleichch}/page.html (68%) diff --git a/templates/cms/ungleich.ch/index.html b/templates/cms/ungleich.ch/index.html deleted file mode 100644 index 9e1c9503..00000000 --- a/templates/cms/ungleich.ch/index.html +++ /dev/null @@ -1,3 +0,0 @@ -{% extends "cms/ungleich.ch/base.html" %} -{% block base_content %} -{% endblock %} diff --git a/templates/cms/ungleich.ch/__init__.py b/templates/cms/ungleichch/__init__.py similarity index 100% rename from templates/cms/ungleich.ch/__init__.py rename to templates/cms/ungleichch/__init__.py diff --git a/templates/cms/ungleich.ch/_footer.html b/templates/cms/ungleichch/_footer.html similarity index 100% rename from templates/cms/ungleich.ch/_footer.html rename to templates/cms/ungleichch/_footer.html diff --git a/templates/cms/ungleich.ch/_header_base.html b/templates/cms/ungleichch/_header_base.html similarity index 100% rename from templates/cms/ungleich.ch/_header_base.html rename to templates/cms/ungleichch/_header_base.html diff --git a/templates/cms/ungleich.ch/_menu.html b/templates/cms/ungleichch/_menu.html similarity index 100% rename from templates/cms/ungleich.ch/_menu.html rename to templates/cms/ungleichch/_menu.html diff --git a/templates/cms/ungleich.ch/base.html b/templates/cms/ungleichch/base.html similarity index 94% rename from templates/cms/ungleich.ch/base.html rename to templates/cms/ungleichch/base.html index 339fe37c..9897c4f8 100644 --- a/templates/cms/ungleich.ch/base.html +++ b/templates/cms/ungleichch/base.html @@ -37,11 +37,11 @@ {% cms_toolbar %} - {% show_menu 0 1 100 100 "cms/ungleich.ch/_menu.html" %} + {% show_menu 0 1 100 100 "cms/ungleichch/_menu.html" %} {% block base_header %} - {% include "cms/ungleich.ch/_header_base.html" %} + {% include "cms/ungleichch/_header_base.html" %} {% endblock %}
@@ -53,7 +53,7 @@
- {% include "cms/ungleich.ch/_footer.html" %} + {% include "cms/ungleichch/_footer.html" %} {% addtoblock "external-js" %} {% bootstrap_javascript %} {% endaddtoblock %} diff --git a/templates/cms/ungleich.ch/blog.html b/templates/cms/ungleichch/blog.html similarity index 64% rename from templates/cms/ungleich.ch/blog.html rename to templates/cms/ungleichch/blog.html index bfc3aae7..5317a021 100644 --- a/templates/cms/ungleich.ch/blog.html +++ b/templates/cms/ungleichch/blog.html @@ -1,4 +1,4 @@ -{% extends "cms/ungleich.ch/base.html" %} +{% extends "cms/ungleichch/base.html" %} {% block base_content %} {% block content %} {% endblock %} diff --git a/templates/cms/ungleichch/index.html b/templates/cms/ungleichch/index.html new file mode 100644 index 00000000..f3fbca67 --- /dev/null +++ b/templates/cms/ungleichch/index.html @@ -0,0 +1,3 @@ +{% extends "cms/ungleichch/base.html" %} +{% block base_content %} +{% endblock %} diff --git a/templates/cms/ungleich.ch/page.html b/templates/cms/ungleichch/page.html similarity index 68% rename from templates/cms/ungleich.ch/page.html rename to templates/cms/ungleichch/page.html index 66f67def..81a4a027 100644 --- a/templates/cms/ungleich.ch/page.html +++ b/templates/cms/ungleichch/page.html @@ -1,4 +1,4 @@ -{% extends "cms/ungleich.ch/base.html" %} +{% extends "cms/ungleichch/base.html" %} {% load cms_tags %} {% block base_content %} {% placeholder "page_content" %} From 9f2fa42302a67f265364bef7208cdf5ab4e896b7 Mon Sep 17 00:00:00 2001 From: rscnt Date: Sun, 4 Oct 2015 08:33:48 -0600 Subject: [PATCH 04/15] templates: added html for digital.glarus cms. Signed-off-by: rscnt --- templates/cms/__init__.py | 11 ++ templates/cms/digitalglarus/__init__.py | 9 ++ templates/cms/digitalglarus/about.html | 57 +++++++++ templates/cms/digitalglarus/base.html | 128 ++++++++++++++++++++ templates/cms/digitalglarus/contact.html | 65 ++++++++++ templates/cms/digitalglarus/detail.html | 11 ++ templates/cms/digitalglarus/index.html | 99 +++++++++++++++ templates/cms/digitalglarus/letscowork.html | 51 ++++++++ 8 files changed, 431 insertions(+) create mode 100644 templates/cms/__init__.py create mode 100644 templates/cms/digitalglarus/__init__.py create mode 100755 templates/cms/digitalglarus/about.html create mode 100644 templates/cms/digitalglarus/base.html create mode 100755 templates/cms/digitalglarus/contact.html create mode 100644 templates/cms/digitalglarus/detail.html create mode 100644 templates/cms/digitalglarus/index.html create mode 100644 templates/cms/digitalglarus/letscowork.html diff --git a/templates/cms/__init__.py b/templates/cms/__init__.py new file mode 100644 index 00000000..f27d72f5 --- /dev/null +++ b/templates/cms/__init__.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +from django.utils.translation import ugettext_lazy as _ +TEMPLATES = { + 'digitalglarus/about.html': _('DG.About'), + 'digitalglarus/contact.html': _('DG.Contact'), + 'digitalglarus/index.html': _('DG.Home'), + 'digitalglarus/letscowork.html': _('DG.CoWork'), + 'digitalglarus/detail.html': _('DG.Detail'), + 'ungleichch/blog.html': _('Blog'), + 'ungleichch/page.html': _('Page'), +} diff --git a/templates/cms/digitalglarus/__init__.py b/templates/cms/digitalglarus/__init__.py new file mode 100644 index 00000000..7b16fec8 --- /dev/null +++ b/templates/cms/digitalglarus/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +from django.utils.translation import ugettext_lazy as _ +TEMPLATES = { + 'about.html': _('DG.About'), + 'contact.html': _('DG.Contact'), + 'index.html': _('DG.Home'), + 'letscowork.html': _('DG.CoWork'), + 'detail.html': _('DG.Detail'), +} diff --git a/templates/cms/digitalglarus/about.html b/templates/cms/digitalglarus/about.html new file mode 100755 index 00000000..6c12cbcb --- /dev/null +++ b/templates/cms/digitalglarus/about.html @@ -0,0 +1,57 @@ +{% extends "cms/digitalglarus/base.html" %} +{% load staticfiles cms_tags %} +{% block title %}About{% endblock %} + +{% block content %} +
+
+
+
+

{% placeholder 'digitalglarus_why_us' %}

+
+
+
+ +
+
+

+ {% placeholder 'digitalglarus_why_us_content' %} +

+
+
+
+
+ +
+
+
+
+

+ {% placeholder 'digitalglarus_why_glarus' %} +

+
+
+
+ +

+ {% placeholder 'digitalglarus_why_glarus_beautiful_landscape' %} +

+
+
+ + {% placeholder 'digitalglarus_why_glarus_affordable_price' %} + +
+
+ + {% placeholder 'digitalglarus_why_glarus_direct_connection_zurich' %} + +
+
+
+
+ + + + +{% endblock %} diff --git a/templates/cms/digitalglarus/base.html b/templates/cms/digitalglarus/base.html new file mode 100644 index 00000000..6dd1bfc0 --- /dev/null +++ b/templates/cms/digitalglarus/base.html @@ -0,0 +1,128 @@ +{% load staticfiles cms_tags menu_tags sekizai_tags %} + + + + + + + + + + + + + + {% page_attribute "page_title" %} + + + + + + + + + + + + + + + + + + + {% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %} + {% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %} + + + + + {% cms_toolbar %} +
Digital Glarus
+
+ {% placeholder 'digital_glarus_legend' %} +
+ + + + +
+ {% block content %} {% endblock %} +
+ + + + + + + + + + + + + + + + + diff --git a/templates/cms/digitalglarus/contact.html b/templates/cms/digitalglarus/contact.html new file mode 100755 index 00000000..01a57109 --- /dev/null +++ b/templates/cms/digitalglarus/contact.html @@ -0,0 +1,65 @@ +{% extends "digitalglarus/base.html" %} +{% load cms_tags %} +{% block title %}Contact{% endblock %} + +{% block content %} +
+
+
+
+

+ {% placeholder 'digital_glarus_contact' %} +

+
+
+
+ {% placeholder 'digital_glarus_contact_content' %} +
+
+ {% placeholder 'digital_glarus_contact_information' %} +
+
+
+
+ +
+
+
+
+

Contact + form +

+
+

If you want further information on Digital Glarus, please send us a message using the form below.

+
+ {% csrf_token %} +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+
+
+
+
+ + +{% endblock %} diff --git a/templates/cms/digitalglarus/detail.html b/templates/cms/digitalglarus/detail.html new file mode 100644 index 00000000..412a6b91 --- /dev/null +++ b/templates/cms/digitalglarus/detail.html @@ -0,0 +1,11 @@ +

{{ message }}

+ +
    +
  • {{ message.name }} +
  • {{ message.email }} +
  • {{ message.phone_number }} +
  • {{ message.message }} +
  • {{ message.received_date }} +
+ +

Back to Main diff --git a/templates/cms/digitalglarus/index.html b/templates/cms/digitalglarus/index.html new file mode 100644 index 00000000..7e7eaff3 --- /dev/null +++ b/templates/cms/digitalglarus/index.html @@ -0,0 +1,99 @@ +{% extends "digitalglarus/base.html" %} +{% load staticfiles %} + +{% block content %} +

+
+
+ +

+ WELCOME TO +

+

Digital Glarus

+
+

+ By + ungleich gmbh + +

+
+
+
+ +
+
+
+
+

+ {% placeholder 'digital_glarus_build_a_tech_valley' %} +

+
+ +
+ {% placeholder 'digital_glarus_build_a_tech_valley_content' %} +

 

+
+
+
+ +
+
+
+
+

+ {% placeholder 'digital_glarus_a_new_area' %} +

+
+ {% placeholder 'digital_glarus_a_new_area_content' %} +
+
+
+ +
+
+
+
+

+ {% placeholder 'digital_glarus_why_be_interested' %} +

+
+ {% placeholder 'digital_glarus_why_be_interested_content' %} +
+
+
+
+
+
+
+

+ {% placeholder 'digital_glarus_where_we_are' %} +

+
+ {% placeholder 'digital_glarus_where_we_are_content' %} +

 

+
+
+
+ +{% endblock %} diff --git a/templates/cms/digitalglarus/letscowork.html b/templates/cms/digitalglarus/letscowork.html new file mode 100644 index 00000000..518e1224 --- /dev/null +++ b/templates/cms/digitalglarus/letscowork.html @@ -0,0 +1,51 @@ +{% extends "digitalglarus/base.html" %} +{% load staticfiles %} +{% block title %}crowdfunding{% endblock %} + +{% block content %} +
+
+
+

99 days to go!

+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+

why + glarus? +

+
+
+
+ +

BEAUTIFUL + landscape +

+
+
+ +

AFFORDABLE + price

+
+
+ +

direct + connection to zurich +

+
+
+
+
+ +{% endblock %} From 530ca19556a6a020334b417603a682517c6c1efb Mon Sep 17 00:00:00 2001 From: Sanghee Kim Date: Fri, 4 Mar 2016 21:15:48 +0100 Subject: [PATCH 05/15] Import cal + css from Jiyoun --- design_membership/calendar.html | 110 ++++++++++++++++++++ design_membership/stylesheet.css | 166 +++++++++++++++++++++++++++++++ 2 files changed, 276 insertions(+) create mode 100644 design_membership/calendar.html create mode 100644 design_membership/stylesheet.css diff --git a/design_membership/calendar.html b/design_membership/calendar.html new file mode 100644 index 00000000..acd783f5 --- /dev/null +++ b/design_membership/calendar.html @@ -0,0 +1,110 @@ + + + + + Calendar + + + + + + +
+ +
+ +
+ +

September

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MoTuWeThFrSaSu
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
+ +
+ +
+ + + \ No newline at end of file diff --git a/design_membership/stylesheet.css b/design_membership/stylesheet.css new file mode 100644 index 00000000..4c257151 --- /dev/null +++ b/design_membership/stylesheet.css @@ -0,0 +1,166 @@ +@charset "utf-8"; +/* CSS Document */ + +/* ---------- FONTAWESOME ---------- */ +/* ---------- http://fortawesome.github.com/Font-Awesome/ ---------- */ +/* ---------- http://weloveiconfonts.com/ ---------- */ + +@import url(http://weloveiconfonts.com/api/?family=fontawesome); + +*[class*="fontawesome-"]:before { + font-family: 'FontAwesome', sans-serif; +} + +/* ---------- GENERAL ---------- */ + +body { + background: #f9f9f9; + color: #0e171c; + font: 100 100%/.7em 'Lato', sans-serif; + margin: 0; +} + +a { + text-decoration: none; +} + +/*Month size*/ +h2 { + font-size: .8em; + line-height: 1em; + /*margin: .1em 0;*/ +} + +td{ + font-size:.7em; +} + +h3 { + font-size: .7em; + line-height: .1em; + margin: .13em 0; +} + +table { + /*border-collapse: collapse;*/ + border-spacing: 0; +} + +.container { + height: 270px; + left: 50%; + margin: -100px 0 0 -100px; /* Calendar location */ + position: absolute; + top: 50%; + width: 13%; +} + +/* ---------- CALENDAR ---------- */ + +.calendar { + text-align: center; +} + +.calendar header { + position: relative; +} + +.calendar h2 { + text-transform: uppercase; + color: #1A6687; +} +/*Title*/ +.calendar thead { + font-size: .9em; + font-weight: 600; + text-transform: uppercase; + color: #8BC4C9; +} + +/*Body text*/ +.calendar tbody { + color: #7c8a95; +} + +/*select date*/ +.calendar tbody td:hover { + border: .2em solid #8BC4C9; +} + +.calendar td { + border: .7em solid none; + border-radius: 50%; + display: inline-block; + height: 2em; + line-height: 2em; + text-align: center; + width: 2em; +} + +.calendar .prev-month, +.calendar .next-month { + color: #cbd1d2; +} + +.calendar .prev-month:hover, +.calendar .next-month:hover { + border: 2px solid #cbd1d2; +} + +/*Today*/ +.current-day { + background: #8BC4C9; + color: #f9f9f9; +} + +.event { + cursor: pointer; + position: relative; +} + +/*Little dot*/ +.event:after { + background: #8BC4C9; + border-radius: 50%; + bottom: .3em; + display: block; + content: ''; + height: .3em; + left: 50%; + margin: -.5em 0 0 -.1em; + position: absolute; + width: .3em; +} + +.event.current-day:after { + background: #f9f9f9; +} + +/*Next,Prev month*/ +.btn-prev, +.btn-next { + border: 2px solid none; + border-radius: 50%; + color: #8BC4C9; + height: 2em; + font-size: .75em; + line-height: 2em; + margin: -1em; + position: absolute; + top: 50%; + width: 2em; +} + +.btn-prev:hover, +.btn-next:hover { + background: none; + color: #1A6687; +} + +.btn-prev { + left: 1.7em; +} + +.btn-next { + right: 1.7em; +} \ No newline at end of file From 201331742087c577718428c9c454e0f54bdf190f Mon Sep 17 00:00:00 2001 From: jiyounyoon Date: Mon, 14 Mar 2016 14:13:31 -0700 Subject: [PATCH 06/15] Add new files for design --- design_membership/stylesheet.css | 63 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/design_membership/stylesheet.css b/design_membership/stylesheet.css index 4c257151..d0ed6d1f 100644 --- a/design_membership/stylesheet.css +++ b/design_membership/stylesheet.css @@ -16,7 +16,7 @@ body { background: #f9f9f9; color: #0e171c; - font: 100 100%/.7em 'Lato', sans-serif; + font: 300 100%/1.5em 'Lato', sans-serif; margin: 0; } @@ -26,33 +26,30 @@ a { /*Month size*/ h2 { - font-size: .8em; - line-height: 1em; - /*margin: .1em 0;*/ -} - -td{ - font-size:.7em; + font-size: 1.5em; + line-height: 1.25em; + margin: .25em 0; } h3 { - font-size: .7em; - line-height: .1em; - margin: .13em 0; + font-size: 1.5em; + line-height: 1em; + margin: .33em 0; } table { /*border-collapse: collapse;*/ border-spacing: 0; + margin:auto; } .container { - height: 270px; + height: 558px; left: 50%; - margin: -100px 0 0 -100px; /* Calendar location */ + margin: -255px 0 0 -245px; position: absolute; top: 50%; - width: 13%; + width: 540px; } /* ---------- CALENDAR ---------- */ @@ -71,7 +68,6 @@ table { } /*Title*/ .calendar thead { - font-size: .9em; font-weight: 600; text-transform: uppercase; color: #8BC4C9; @@ -84,17 +80,20 @@ table { /*select date*/ .calendar tbody td:hover { - border: .2em solid #8BC4C9; + border: .5px solid #8BC4C9; + -webkit-border: .5px solid none; + border-radius: 50%; } .calendar td { - border: .7em solid none; + border: .5px solid transparent; border-radius: 50%; display: inline-block; - height: 2em; - line-height: 2em; + height: 2.5em; + line-height: 2.5em; text-align: center; - width: 2em; + width: 2.5em; + } .calendar .prev-month, @@ -104,7 +103,7 @@ table { .calendar .prev-month:hover, .calendar .next-month:hover { - border: 2px solid #cbd1d2; + border: .5px solid #cbd1d2; } /*Today*/ @@ -122,14 +121,14 @@ table { .event:after { background: #8BC4C9; border-radius: 50%; - bottom: .3em; + bottom: .35em; display: block; content: ''; - height: .3em; + height: .35em; left: 50%; - margin: -.5em 0 0 -.1em; + margin: -.25em 0 0 -.25em ; position: absolute; - width: .3em; + width: .35em; } .event.current-day:after { @@ -139,18 +138,18 @@ table { /*Next,Prev month*/ .btn-prev, .btn-next { - border: 2px solid none; - border-radius: 50%; + border: 1px solid transparent; color: #8BC4C9; height: 2em; font-size: .75em; line-height: 2em; - margin: -1em; + margin: auto; position: absolute; - top: 50%; - width: 2em; + top: .3em; + width: 10em; } + .btn-prev:hover, .btn-next:hover { background: none; @@ -158,9 +157,9 @@ table { } .btn-prev { - left: 1.7em; + left: 6em; } .btn-next { - right: 1.7em; + right: 6em; } \ No newline at end of file From 17a9245d2151c46bd391949e09d7b8c1bf839911 Mon Sep 17 00:00:00 2001 From: Sanghee Kim Date: Wed, 23 Mar 2016 18:25:49 +0100 Subject: [PATCH 07/15] calendar added --- design_membership/calendar/calendar.html | 107 +++++++++++++++ design_membership/calendar/stylesheet.css | 160 ++++++++++++++++++++++ 2 files changed, 267 insertions(+) create mode 100644 design_membership/calendar/calendar.html create mode 100644 design_membership/calendar/stylesheet.css diff --git a/design_membership/calendar/calendar.html b/design_membership/calendar/calendar.html new file mode 100644 index 00000000..5b3b04a2 --- /dev/null +++ b/design_membership/calendar/calendar.html @@ -0,0 +1,107 @@ + + + + + Calendar + + + + + + +
+ +
+ +
+ + September + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MoTuWeThFrSaSu
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
+ +
+ +
+ + + \ No newline at end of file diff --git a/design_membership/calendar/stylesheet.css b/design_membership/calendar/stylesheet.css new file mode 100644 index 00000000..25861a58 --- /dev/null +++ b/design_membership/calendar/stylesheet.css @@ -0,0 +1,160 @@ +@charset "utf-8"; +/* CSS Document */ + +/* ---------- FONTAWESOME ---------- */ +/* ---------- http://fortawesome.github.com/Font-Awesome/ ---------- */ +/* ---------- http://weloveiconfonts.com/ ---------- */ + +@import url(http://weloveiconfonts.com/api/?family=fontawesome); + +*[class*="fontawesome-"]:before { + font-family: 'FontAwesome', sans-serif; +} + +/* ---------- GENERAL ---------- */ + +body { + background: #f9f9f9; + color: #0e171c; + font: 300 100%/1em 'Lato', sans-serif; + margin: 0; +} + +a { + text-decoration: none; +} + +/*Month size*/ +#monthtitle { + font-size: 1.2em; + line-height: 1.25em; + margin: .25em 0; + font-weight: 600; +} + +h3 { + font-size: 1.5em; + line-height: 1em; + margin: .33em 0; +} + +table { + border-collapse: collapse; + border-spacing: 0; + margin:auto; + +} + +.container { + height: 358px; + left: 50%; + margin: -255px 0 0 -245px; + position: absolute; + top: 50%; + width: 340px; +} + +/* ---------- CALENDAR ---------- */ + +.calendar { + text-align: center; +} + +.calendar header { + position: relative; +} + +.calendar #monthtitle { + text-transform: uppercase; + color: #1A6687; +} +/*Title*/ +.calendar thead { + font-weight: 500; + /*text-transform: uppercase;*/ + color: #8BC4C9; + /*margin-bottom:1px;*/ + +} + +/*Body text*/ +.calendar tbody { + color: #7c8a95; +} + +/*select date*/ +.calendar tbody td:hover { + background: #8BC4C9; + color: #f9f9f9; + /*border: .1px solid #8BC4C9;*/ + + /*border-radius: 50%;*/ +} + +.calendar thead>tr>td{ + border-top:hidden; + border-left:hidden; + border-right: hidden; +} + +.calendar td { + border: .1px solid #cbd1d2; + /*border-radius: 50%;*/ + display: inline-block; + height: 2.5em; + line-height: 2.5em; + text-align: center; + width: 2.5em; + +} + +.calendar .prev-month, +.calendar .next-month { + /*border: .1px solid #cbd1d2;*/ + color: #cbd1d2; + +} + +.calendar .prev-month:hover, +.calendar .next-month:hover { + border: .5px solid #cbd1d2; + background: #cbd1d2; + color: #f9f9f9; +} + +/*Today*/ +.current-day { + color: #8BC4C9; + /*background-color: #8BC4C9;*/ +} + + +/*Next,Prev month*/ +.btn-prev, +.btn-next { + border: 1px solid transparent; + color: #8BC4C9; + font-size: 1.5em; + padding: 1em; + /*height: .7em;*/ + /*line-height: .3em;*/ + /*margin: auto;*/ + /*position: absolute;*/ + /*top: .1em;*/ + /*width: 25em;*/ +} + + +.btn-prev:hover, +.btn-next:hover { + background: none; + color: #1A6687; +} + +.btn-prev { + left: 6em; +} + +.btn-next { + right: 6em; +} \ No newline at end of file From 64a484e749e2131072f34f9d1807160385df86c9 Mon Sep 17 00:00:00 2001 From: Levi Date: Wed, 20 Apr 2016 01:03:32 -0500 Subject: [PATCH 08/15] Separated base hosting page into html sections, Added pricing selector to Django Page, Added pricing selector to Rails Page, Added pricing selector to NodeJS Page, Implemented hosting signup , Implemented hosting login, Created forms to handle login/signup errors --- dynamicweb/urls.py | 4 +- hosting/forms.py | 50 +++ hosting/models.py | 10 +- hosting/static/hosting/css/landing-page.css | 6 +- hosting/static/hosting/js/pricing.js | 5 - hosting/templates/hosting/base.html | 334 ++---------------- .../templates/hosting/includes/_contact.html | 28 ++ .../templates/hosting/includes/_footer.html | 33 ++ .../templates/hosting/includes/_header.html | 31 ++ .../templates/hosting/includes/_navbar.html | 39 ++ .../hosting/includes/_our_infrastructure.html | 23 ++ .../templates/hosting/includes/_pricing.html | 144 ++++++++ .../includes/_your_infrastructure.html | 20 ++ hosting/templates/hosting/index.html | 10 +- hosting/templates/hosting/login.html | 53 ++- hosting/templates/hosting/pricing.html | 186 ---------- hosting/templates/hosting/signup.html | 59 ++-- hosting/urls.py | 12 +- hosting/views.py | 169 ++++++--- 19 files changed, 578 insertions(+), 638 deletions(-) create mode 100644 hosting/forms.py create mode 100644 hosting/templates/hosting/includes/_contact.html create mode 100644 hosting/templates/hosting/includes/_footer.html create mode 100644 hosting/templates/hosting/includes/_header.html create mode 100644 hosting/templates/hosting/includes/_navbar.html create mode 100644 hosting/templates/hosting/includes/_our_infrastructure.html create mode 100644 hosting/templates/hosting/includes/_pricing.html create mode 100644 hosting/templates/hosting/includes/_your_infrastructure.html delete mode 100644 hosting/templates/hosting/pricing.html diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py index daa7cbee..78c06077 100644 --- a/dynamicweb/urls.py +++ b/dynamicweb/urls.py @@ -5,12 +5,12 @@ from django.conf.urls.i18n import i18n_patterns from django.conf.urls.static import static from django.conf import settings -from hosting.views import railshosting +from hosting.views import RailsHostingView from membership import urls as membership_urls urlpatterns = [ url(r'^hosting/', include('hosting.urls', namespace="hosting")), - url(r'^railshosting/', railshosting, name="rails.hosting"), + url(r'^railshosting/', RailsHostingView.as_view(), name="rails.hosting"), url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), url(r'^jsi18n/(?P\S+?)/$', 'django.views.i18n.javascript_catalog'), diff --git a/hosting/forms.py b/hosting/forms.py new file mode 100644 index 00000000..ddb30e1c --- /dev/null +++ b/hosting/forms.py @@ -0,0 +1,50 @@ +from django import forms +from membership.models import CustomUser +from django.contrib.auth import authenticate + + +class HostingUserLoginForm(forms.Form): + + email = forms.CharField(widget=forms.EmailInput()) + password = forms.CharField(widget=forms.PasswordInput()) + + class Meta: + fields = ['email', 'password'] + + def clean(self): + email = self.cleaned_data.get('email') + password = self.cleaned_data.get('password') + is_auth = authenticate(email=email, password=password) + if not is_auth: + raise forms.ValidationError("Your username and/or password were incorrect.") + return self.cleaned_data + + def clean_email(self): + email = self.cleaned_data.get('email') + try: + CustomUser.objects.get(email=email) + return email + except CustomUser.DoesNotExist: + raise forms.ValidationError("User does not exists") + else: + return email + + +class HostingUserSignupForm(forms.ModelForm): + + confirm_password = forms.CharField(widget=forms.PasswordInput()) + password = forms.CharField(widget=forms.PasswordInput()) + + class Meta: + model = CustomUser + fields = ['name', 'email', 'password'] + widgets = { + 'name': forms.TextInput(attrs={'placeholder': 'Enter your name or company name'}), + } + + def clean_confirm_password(self): + password = self.cleaned_data.get('password') + confirm_password = self.cleaned_data.get('confirm_password') + if not confirm_password == password: + raise forms.ValidationError("Passwords don't match") + return confirm_password diff --git a/hosting/models.py b/hosting/models.py index ba38219a..59ba8521 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -41,9 +41,16 @@ class VirtualMachineType(models.Model): @classmethod def get_serialized_vm_types(cls): return [vm.get_serialized_data() - for vm in cls.objects.all()] + for vm in cls.objects.all()] # return serializers.serialize("json",) + def defeault_price(self): + price = self.base_price + price += self.core_price + price += self.memory_price + price += self.disk_size_price * 10 + return price + def get_serialized_data(self): return { 'description': self.description, @@ -53,5 +60,6 @@ class VirtualMachineType(models.Model): 'memory_price': self.memory_price, 'hosting_company_name': self.get_hosting_company_display(), 'hosting_company': self.hosting_company, + 'default_price': self.defeault_price(), 'id': self.id, } diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index 6698c5ec..24be9dec 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -31,7 +31,8 @@ h6 { } .intro-header { - padding-top: 50px; /* If you're making other pages, make sure there is 50px of padding to make sure the navbar doesn't overlap content! */ + height: 85%; + padding-top: 10%; /* If you're making other pages, make sure there is 50px of padding to make sure the navbar doesn't overlap content! */ padding-bottom: 50px; text-align: center; color: #f8f8f8; @@ -47,7 +48,8 @@ h6 { background-size: cover; } .intro-header-2 { - padding-top: 50px; /* If you're making other pages, make sure there is 50px of padding to make sure the navbar doesn't overlap content! */ + height: 85%; + padding-top: 100px; /* If you're making other pages, make sure there is 50px of padding to make sure the navbar doesn't overlap content! */ padding-bottom: 50px; text-align: center; color: #f8f8f8; diff --git a/hosting/static/hosting/js/pricing.js b/hosting/static/hosting/js/pricing.js index 667239ab..64e80638 100644 --- a/hosting/static/hosting/js/pricing.js +++ b/hosting/static/hosting/js/pricing.js @@ -30,11 +30,6 @@ $( document ).ready(function() { console.log(final_price_selector); $(final_price_selector).text(price.toString().concat(CURRENCY)); - - - - - } //Listener function diff --git a/hosting/templates/hosting/base.html b/hosting/templates/hosting/base.html index 4c80530a..72ebff2e 100644 --- a/hosting/templates/hosting/base.html +++ b/hosting/templates/hosting/base.html @@ -60,336 +60,48 @@ - - + {% include "hosting/includes/_navbar.html" %} - -
-
- -
-
- -
- -

{{ domain }}

-

{{ hosting_long }} as easy as possible

-
- -
-
-
- -
- - -
- + {% include "hosting/includes/_header.html" %} -
- -
- -
-
-
-
-

How it works :

    - {% block specification %} - {% endblock %} -
-
- {% with 'hosting/img/card-'|add:hosting|add:'.png' as image_static %} -
- -
- {% endwith %} -
- -
- - -
- -
-
-
-
-
-
-

Option 1 : Your own infrastructure

-

We configure your own infrastructure for {{ hosting_long }}. Keep the comfort and safety of being at your home, while we set things up for you.

-
-
- -
-
- -
- -
- - - -
-
-
-
-
-

Option 2 : Our infrastructure

-

We take care of everything for you! You don't need your infrastructure. We give you everything you need in {{ hosting_long }} hosting. Full root access, 24x7 support.

+
+
+

How it works :

+
    + {% block specification %} + {% endblock %} +
+ {% with 'hosting/img/card-'|add:hosting|add:'.png' as image_static %}
- +
+ {% endwith %}
+
+
- - + + {% include "hosting/includes/_your_infrastructure.html" %} - - - - -
+ + {% include "hosting/includes/_our_infrastructure.html" %} -
+ + {% include "hosting/includes/_pricing.html" %} -
-
-
-
-

Hosting Price Samples

-

Here are samples of our {{ hosting_long }} hosting offers, suited for different projects. Our offer examples come in different size, speed, and storage.

-
- -
-
-
- - - -
- - {% include "hosting/pricing.html" %} - - -
- -
- -
- - -
- - -
-
- -
-
- -
-

Let me try!

-

 

-

 

- {% if error_message %}

{{ error_message }}

{% endif %} - {{ form.non_field_errors }} - {{ form.email.errors }} -
- {% csrf_token %} -
- - -
- -
- - - -
-
-
- -
- - -
- - - - - + + {% include "hosting/includes/_contact.html" %} - + {% include "hosting/includes/_footer.html" %} {% if vm_types %} diff --git a/hosting/templates/hosting/includes/_contact.html b/hosting/templates/hosting/includes/_contact.html new file mode 100644 index 00000000..b0ad9ff7 --- /dev/null +++ b/hosting/templates/hosting/includes/_contact.html @@ -0,0 +1,28 @@ + + \ No newline at end of file diff --git a/hosting/templates/hosting/includes/_footer.html b/hosting/templates/hosting/includes/_footer.html new file mode 100644 index 00000000..270c9b61 --- /dev/null +++ b/hosting/templates/hosting/includes/_footer.html @@ -0,0 +1,33 @@ +{% load staticfiles %} + + \ No newline at end of file diff --git a/hosting/templates/hosting/includes/_header.html b/hosting/templates/hosting/includes/_header.html new file mode 100644 index 00000000..03e3e5c2 --- /dev/null +++ b/hosting/templates/hosting/includes/_header.html @@ -0,0 +1,31 @@ +{% load staticfiles %} + + +
+
+ +
+
+ +
+ +

{{ domain }}

+

{{ hosting_long }} as easy as possible

+
+ +
+
+
+ +
+ + +
+ \ No newline at end of file diff --git a/hosting/templates/hosting/includes/_navbar.html b/hosting/templates/hosting/includes/_navbar.html new file mode 100644 index 00000000..62ae9a12 --- /dev/null +++ b/hosting/templates/hosting/includes/_navbar.html @@ -0,0 +1,39 @@ +{% load staticfiles %} + + + \ No newline at end of file diff --git a/hosting/templates/hosting/includes/_our_infrastructure.html b/hosting/templates/hosting/includes/_our_infrastructure.html new file mode 100644 index 00000000..135d6ba4 --- /dev/null +++ b/hosting/templates/hosting/includes/_our_infrastructure.html @@ -0,0 +1,23 @@ +{% load staticfiles %} + + +
+ +
+ +
+
+
+
+

Option 2 : Our infrastructure

+

We take care of everything for you! You don't need your infrastructure. We give you everything you need in {{ hosting_long }} hosting. Full root access, 24x7 support.

+
+
+ +
+
+ +
+ + +
\ No newline at end of file diff --git a/hosting/templates/hosting/includes/_pricing.html b/hosting/templates/hosting/includes/_pricing.html new file mode 100644 index 00000000..628a65f8 --- /dev/null +++ b/hosting/templates/hosting/includes/_pricing.html @@ -0,0 +1,144 @@ + +
+
+
+
+
+
+

Hosting Price Samples

+

Here are samples of our {{ hosting_long }} hosting offers, suited for different projects. Our offer examples come in different size, speed, and storage.

+
+ +
+
+
+ + +
+ +
+ + {% for vm in vm_types %} +
+
+
+
+ + + {{vm.hosting_company_name}} + + +

+ {{vm.description}} +

+
+
+
+
+ + +
+
+
+ +
+ + + GiB +
+
+
+ + + GiB +
+
+

$199

+
+
+ +
+ + + + + +
+
+ {% endfor %} + {% for vm in vm_types %} +
+
+
    +
  • + +

    {{vm.hosting_company_name}}

    +
  • +
  • + +
    +
    + + +
    +
    + +
  • +
  • +
    +
    + + + GiB +
    +
    +
  • +
  • +
    + + + GiB +
    +
  • +
  • +

    {{vm.default_price|floatformat}}$

    + per month +
  • +
  • + +
  • +
+
+
+ {% endfor %} + +
+
+
+ +
+
\ No newline at end of file diff --git a/hosting/templates/hosting/includes/_your_infrastructure.html b/hosting/templates/hosting/includes/_your_infrastructure.html new file mode 100644 index 00000000..e70a6261 --- /dev/null +++ b/hosting/templates/hosting/includes/_your_infrastructure.html @@ -0,0 +1,20 @@ +{% load staticfiles %} + + +
+
+
+
+
+
+

Option 1 : Your own infrastructure

+

We configure your own infrastructure for {{ hosting_long }}. Keep the comfort and safety of being at your home, while we set things up for you.

+
+
+ +
+
+ +
+ +
\ No newline at end of file diff --git a/hosting/templates/hosting/index.html b/hosting/templates/hosting/index.html index 0956b500..446534d4 100644 --- a/hosting/templates/hosting/index.html +++ b/hosting/templates/hosting/index.html @@ -14,16 +14,16 @@ Rails Hosting.ch - Ruby on Rails as easy as possible - + - + - + - + @@ -296,7 +296,7 @@ {% if error_message %}

{{ error_message }}

{% endif %} {{ form.non_field_errors }} {{ form.email.errors }} -
+ {% csrf_token %}
diff --git a/hosting/templates/hosting/login.html b/hosting/templates/hosting/login.html index 3a00b83e..04def39f 100644 --- a/hosting/templates/hosting/login.html +++ b/hosting/templates/hosting/login.html @@ -1,3 +1,4 @@ +{% load staticfiles bootstrap3%} @@ -12,10 +13,10 @@ Rails Hosting.ch - Ruby on Rails as easy as possible - + - + @@ -77,34 +78,26 @@
-
 
- -
-

Log In

- -
- - -
-
- - -
- - -

-
    - -
 
-
-
+
 
+
+

Login

+
+ {% csrf_token %} + {% for field in form %} + {% bootstrap_field field show_label=False type='fields'%} + {% endfor %} + {% bootstrap_form_errors form type='non_fields'%} + {% buttons %} + + {% endbuttons %} +
+
    + +
+
-
@@ -138,7 +131,7 @@ Contact - +
diff --git a/hosting/templates/hosting/pricing.html b/hosting/templates/hosting/pricing.html deleted file mode 100644 index 95e8cc83..00000000 --- a/hosting/templates/hosting/pricing.html +++ /dev/null @@ -1,186 +0,0 @@ -
-
- - {% for vm in vm_types %} -
-
-
-
- - - {{vm.hosting_company_name}} - - -

- {{vm.description}} -

-
-
-
-
- - -
-
-
- -
- - - GiB -
-
-
- - - GiB -
-
-

$199

-
-
- -
- - - - - -
-
- {% endfor %} - {% for vm in vm_types %} -
-
-
    -
  • - -

    {{vm.hosting_company_name}}

    -
  • -
  • - -
    -
    - - -
    -
    - -
  • -
  • -
    -
    - - - GiB -
    -
    -
  • -
  • -
    - - - GiB -
    -
  • -
  • -

    select

    - per month -
  • -
  • - -
  • -
-
-
- {% endfor %} - - - - - -
-
diff --git a/hosting/templates/hosting/signup.html b/hosting/templates/hosting/signup.html index b7dc3239..d92957bc 100644 --- a/hosting/templates/hosting/signup.html +++ b/hosting/templates/hosting/signup.html @@ -1,3 +1,5 @@ +{% load staticfiles bootstrap3%} + @@ -9,13 +11,13 @@ - Rails Hosting.ch - Ruby on Rails as easy as possible + Signup - + - + @@ -45,7 +47,7 @@ - + @@ -139,7 +132,7 @@ Contact - + diff --git a/hosting/urls.py b/hosting/urls.py index ee79deb9..0852bc0d 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -1,12 +1,14 @@ from django.conf.urls import url -from . import views -from .views import VMPricingView, DjangoHostingView +from .views import VMPricingView, DjangoHostingView, RailsHostingView, \ + NodeJSHostingView, LoginView, SignupView, IndexView urlpatterns = [ - url(r'beta$', views.beta, name='beta'), + url(r'index/?$', IndexView.as_view(), name='index'), url(r'pricing/?$', VMPricingView.as_view(), name='pricing'), url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'), - url(r'nodejs$', views.nodejshosting, name='nodejshosting'), - url(r'rails$', views.railshosting, name='railshosting'), + url(r'nodejs/?$', NodeJSHostingView.as_view(), name='nodejshosting'), + url(r'rails/?$', RailsHostingView.as_view(), name='railshosting'), + url(r'login/?$', LoginView.as_view(), name='login'), + url(r'signup/?$', SignupView.as_view(), name='signup'), ] diff --git a/hosting/views.py b/hosting/views.py index 7bbb2b85..27bbeea2 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1,16 +1,14 @@ -import datetime from django.shortcuts import get_object_or_404, render -from django.forms import ModelForm +from django.core.urlresolvers import reverse_lazy, reverse + +from django.views.generic import View, CreateView, FormView from django.http import HttpResponseRedirect -from django.core.urlresolvers import reverse - -from django.core.mail import send_mail -from django.core.mail import mail_managers -from django.views.generic import View, DetailView - +from django.contrib.auth import authenticate, login +from membership.models import CustomUser from .models import RailsBetaUser, VirtualMachineType +from .forms import HostingUserSignupForm, HostingUserLoginForm class VMPricingView(View): @@ -38,67 +36,122 @@ class DjangoHostingView(View): return render(request, self.template_name, context) -class RailsBetaUserForm(ModelForm): - required_css_class = 'form-control' - class Meta: - model = RailsBetaUser - fields = [ 'email' ] +class RailsHostingView(View): + template_name = "hosting/rails.html" -def hosting(request, context): - email = RailsBetaUser(received_date=datetime.datetime.now()) + def get_context_data(self, **kwargs): + context = {} + context["hosting"] = "rails" + context["hosting_long"] = "Ruby On Rails" + context["domain"] = "rails-hosting.ch" + context["google_analytics"] = "UA-62285904-5" + context["email"] = "info@rails-hosting.ch" + context["vm_types"] = VirtualMachineType.get_serialized_vm_types() + return context - if request.method == 'POST': - context['form'] = RailsBetaUserForm(request.POST, instance=email) - if context['form'].is_valid(): - context['form'].save() - email = context['form'].cleaned_data['email'] - subject = "%shosting request" % context['hosting'] - message = "Request for beta by: %s" % email + def get(self, request, *args, **kwargs): + context = self.get_context_data() + return render(request, self.template_name, context) - mail_managers(subject, message) - return HttpResponseRedirect(reverse("hosting:beta")) - else: - context['form'] = RailsBetaUserForm() - context['error_message'] = "a problem" +class NodeJSHostingView(View): + template_name = "hosting/nodejs.html" - page = "hosting/%s.html" % context['hosting'] + def get_context_data(self, **kwargs): + context = {} + context["hosting"] = "nodejs" + context["hosting_long"] = "NodeJS" + context["domain"] = "node-hosting.ch" + context["google_analytics"] = "UA-62285904-7" + context["email"] = "info@node-hosting.ch" + context["vm_types"] = VirtualMachineType.get_serialized_vm_types() + return context - return render(request, page, context) + def get(self, request, *args, **kwargs): + context = self.get_context_data() + return render(request, self.template_name, context) -################################################################################ -# Hostings -# -def djangohosting(request): - context = {} - context["hosting"]="django" - context["hosting_long"]="Django" - context["domain"]="django-hosting.ch" - context["google_analytics"]="UA-62285904-6" - context["email"]="info@django-hosting.ch" - return hosting(request, context) +class IndexView(View): + template_name = "hosting/index.html" -def railshosting(request): - context = {} - context["hosting"]="rails" - context["hosting_long"]="Ruby On Rails" - context["domain"]="rails-hosting.ch" - context["google_analytics"]="UA-62285904-5" - context["email"]="info@rails-hosting.ch" + def get_context_data(self, **kwargs): + context = {} + context["hosting"] = "nodejs" + context["hosting_long"] = "NodeJS" + context["domain"] = "node-hosting.ch" + context["google_analytics"] = "UA-62285904-7" + context["email"] = "info@node-hosting.ch" + context["vm_types"] = VirtualMachineType.get_serialized_vm_types() + return context - return hosting(request, context) + def get(self, request, *args, **kwargs): + context = self.get_context_data() + return render(request, self.template_name, context) -def nodejshosting(request): - context = {} - context["hosting"]="nodejs" - context["hosting_long"]="NodeJS" - context["domain"]="node-hosting.ch" - context["google_analytics"]="UA-62285904-7" - context["email"]="info@node-hosting.ch" +class LoginView(FormView): + template_name = 'hosting/login.html' + form_class = HostingUserLoginForm + moodel = CustomUser + success_url = reverse_lazy('hosting:login') - return hosting(request, context) + def form_valid(self, form): + email = form.cleaned_data.get('email') + password = form.cleaned_data.get('password') + auth_user = authenticate(email=email, password=password) + if auth_user: + login(self.request, auth_user) + return HttpResponseRedirect(self.get_success_url()) + return HttpResponseRedirect(self.get_success_url()) -def beta(request): - return render(request, 'hosting/beta.html') + +class SignupView(CreateView): + template_name = 'hosting/signup.html' + form_class = HostingUserSignupForm + moodel = CustomUser + + def get_success_url(self): + return reverse_lazy('hosting:signup') + + def form_valid(self, form): + name = form.cleaned_data.get('name') + email = form.cleaned_data.get('email') + password = form.cleaned_data.get('password') + CustomUser.register(name, password, email) + auth_user = authenticate(email=email, password=password) + login(self.request, auth_user) + return HttpResponseRedirect(self.get_success_url()) + + + +# class RailsBetaUserForm(ModelForm): +# required_css_class = 'form-control' +# class Meta: +# model = RailsBetaUser +# fields = [ 'email' ] + +# def hosting(request, context): +# email = RailsBetaUser(received_date=datetime.datetime.now()) + +# if request.method == 'POST': +# context['form'] = RailsBetaUserForm(request.POST, instance=email) +# if context['form'].is_valid(): +# context['form'].save() +# email = context['form'].cleaned_data['email'] +# subject = "%shosting request" % context['hosting'] +# message = "Request for beta by: %s" % email + +# mail_managers(subject, message) + +# return HttpResponseRedirect(reverse("hosting:beta")) +# else: +# context['form'] = RailsBetaUserForm() +# context['error_message'] = "a problem" + +# page = "hosting/%s.html" % context['hosting'] + +# return render(request, page, context) + +# def beta(request): +# return render(request, 'hosting/beta.html') From 213f295394a18583653d77b6cb17835f1eb92768 Mon Sep 17 00:00:00 2001 From: Tomislav R Date: Sat, 23 Apr 2016 19:00:20 +0200 Subject: [PATCH 09/15] digitalglarus booking update --- design_membership/calendar/stylesheet.css | 2 +- design_membership/login.html | 6 +- digitalglarus/models.py | 1 + .../static/digitalglarus/css/login.css | 71 + digitalglarus/templates/base_glarus.html | 22 +- digitalglarus/urls.py | 2 + digitalglarus/views.py | 32 +- dynamicweb/settings/base.py | 4 +- dynamicweb/urls.py | 2 +- membership/calendar/__init__.py | 1 + membership/calendar/calendar.py | 136 + .../migrations/0003_auto_20160422_1002.py | 35 + membership/models.py | 31 +- membership/static/membership.css | 8644 ++++++++++------- membership/static/stylesheet.css | 168 + membership/templates/calendar/calendar.html | 112 + membership/templates/error.html | 2 +- membership/templates/login.html | 6 +- membership/templates/membership.html | 434 +- membership/templates/success.html | 2 +- membership/urls.py | 3 +- membership/views.py | 13 +- 22 files changed, 5935 insertions(+), 3794 deletions(-) create mode 100644 digitalglarus/static/digitalglarus/css/login.css create mode 100644 membership/calendar/__init__.py create mode 100644 membership/calendar/calendar.py create mode 100644 membership/migrations/0003_auto_20160422_1002.py create mode 100644 membership/static/stylesheet.css create mode 100644 membership/templates/calendar/calendar.html diff --git a/design_membership/calendar/stylesheet.css b/design_membership/calendar/stylesheet.css index 25861a58..b5902a87 100644 --- a/design_membership/calendar/stylesheet.css +++ b/design_membership/calendar/stylesheet.css @@ -84,7 +84,7 @@ table { /*select date*/ .calendar tbody td:hover { - background: #8BC4C9; + background: #347D80; color: #f9f9f9; /*border: .1px solid #8BC4C9;*/ diff --git a/design_membership/login.html b/design_membership/login.html index 6f796f06..5c9d5461 100644 --- a/design_membership/login.html +++ b/design_membership/login.html @@ -15,15 +15,15 @@ - Brand + Digital Glarus diff --git a/digitalglarus/models.py b/digitalglarus/models.py index 19962a2f..3939dac1 100644 --- a/digitalglarus/models.py +++ b/digitalglarus/models.py @@ -1,6 +1,7 @@ from django.db import models from cms.models import CMSPlugin from filer.fields.image import FilerImageField +from django.core.urlresolvers import reverse class Supporter(models.Model): diff --git a/digitalglarus/static/digitalglarus/css/login.css b/digitalglarus/static/digitalglarus/css/login.css new file mode 100644 index 00000000..f0cd3326 --- /dev/null +++ b/digitalglarus/static/digitalglarus/css/login.css @@ -0,0 +1,71 @@ +.user { + padding-right: 2%; + background-position: 6px 7px; + background-repeat: no-repeat; + background-color: white; + padding: 5px 8px 4px 8px; + -webkit-border-radius: 0px 0px 8px 8px; + -moz-border-radius: 0px 0px 8px 8px; + border-radius: 1px 1px 1px 1px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin-left: 8px; + background-color: #333; + padding: 4px 4px 0px 4px; + -webkit-border-radius: 0px 0px 10px 10px; + -moz-border-radius: 0px 0px 10px 10px; + border-radius: 0px 0px 10px 10px; + font-size: 14px; + line-height: 1.42857143; + color: #794646; + background-color: #fff; + +} + +.user_loggedin{ + padding-bottom: 2%; + padding-right: 2%; + background-position: 6px 7px; + background-repeat: no-repeat; + background-color: white; + padding: 5px 8px 4px 8px; + -webkit-border-radius: 0px 0px 8px 8px; + -moz-border-radius: 0px 0px 8px 8px; + border-radius: 1px 1px 1px 1px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 8px; + background-color: #333; + padding: 4px 4px 0px 4px; + -webkit-border-radius: 0px 0px 10px 10px; + -moz-border-radius: 0px 0px 10px 10px; + border-radius: 0px 0px 10px 10px; + font-size: 14px; + line-height: 1.42857143; + color: #777; + background-color: #fff; +} + +.user > span { + width: 100%; +} + +.u_P { + background-color: #fffcfc; + text-transform: uppercase; + padding-right: 2%; + padding-left:2%; + padding-bottom:0.5%; + margin-right: 1%; +} +.u_P a{ + margin-bottom: 1%; + color: #777; +} +.u_P a:hover{ + text-decoration: None; + color: #000; +} diff --git a/digitalglarus/templates/base_glarus.html b/digitalglarus/templates/base_glarus.html index 36a86190..b1d57293 100644 --- a/digitalglarus/templates/base_glarus.html +++ b/digitalglarus/templates/base_glarus.html @@ -21,12 +21,15 @@ + + {% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %} {% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %} @@ -37,6 +40,7 @@ + +
+
+
+ +
+ diff --git a/membership/templates/error.html b/membership/templates/error.html index 7e7ce023..c697ef87 100644 --- a/membership/templates/error.html +++ b/membership/templates/error.html @@ -36,7 +36,7 @@
- Back + Back
diff --git a/membership/templates/login.html b/membership/templates/login.html index fc795325..d199f601 100644 --- a/membership/templates/login.html +++ b/membership/templates/login.html @@ -20,15 +20,15 @@ - Brand + Digital Glarus diff --git a/membership/templates/membership.html b/membership/templates/membership.html index a0c5468c..335bc847 100644 --- a/membership/templates/membership.html +++ b/membership/templates/membership.html @@ -1,196 +1,252 @@ - + + - - - + + + {% load static %} - -
- +
+ {% load static %} + +
+
+
+
+

When do you want to cowork?

+ +

Pick a date!

+ + + +
+
+
+ +
+
+
+
+

Become a member!

+
+
+
+
+

Become our member of Digital Glarus! 

+
+
+
+
+
+
+
+
+ +
+
+

The Spontaneous

+ +

35CHF/Month (1 day pass included)

+ +

Do you dream of having a place to be inspired in the middle of the Alps? + With only 35CHF a month, you can enjoy the full benefit of a Digital Chalet + Schwanden membership! You can enjoy high speed network connection and comfortable + working desks where you can come up with best ideas for your project surrounded + by friendly coworkers. And if your work gets too productive to leave, you + can crash on our guest bed for the night, the house has everything a coworker + needs from an equipped kitchen to a shower. The Spontaneous includes 1 + day pass included, it is perfect for you if you are planning a retreat + month of a coworking in the nature, or coming for a limited period to Switzerland + for coworking. It is a perfect try-out package! +
+

+ Buy Now +
+
+
+
+
+
+
+
+

The Committed

+ +

360CHF/Year (2 free day per month included)

+ +

Be a regular coworker in our Digital Chalet Schwanden! With only 360CHF, + you can enjoy the full coworking space for the whole year, with additional + 2 free day passes for each month. It is an ideal deal for our busy and + active coworkers who would like to save time(and nerve)for requesting new + membership every month. Signifiantly discounted price is applied for yearly + membership. +
+

+ Buy Now +
+
+ +
+
+
+
+
+
+
+
+

A Quick Glance..

+ +

A short guide for membership features.

+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
The SpontaneousThe Committed
Includes1 work day included2 free work days per month
Fits forGreat for trial, see how it goesPerfect for coworking with great price
PriceDecicde every monthPay once per year
Membership price35CHF/Month360CHF/Year
Price per additional day20 CHF15 CHF
+
+
+
+
+
+
+
+
+

Digital Glarus

+ +

In der Au 7 8762 Schwanden +
Copyright © ungleich GmbH 2016

+
+
+

+
+
+

+ +
+ +
+
+ +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/membership/templates/success.html b/membership/templates/success.html index ed64b8ec..88cb2256 100644 --- a/membership/templates/success.html +++ b/membership/templates/success.html @@ -19,7 +19,7 @@
Check your email to activate your account.

- Back + Back
diff --git a/membership/urls.py b/membership/urls.py index d1d1c474..65be6868 100644 --- a/membership/urls.py +++ b/membership/urls.py @@ -5,9 +5,10 @@ from django.contrib.auth.decorators import login_required from . import views urlpatterns = ( - url(r"^$", views.LoginRegistrationView.as_view(), name='login'), + url(r"^$", views.LoginRegistrationView.as_view(), name='login_glarus'), url(r"^validate/(?P.*)/$", views.validate_email), url(r"^membership/$", login_required(views.MembershipView.as_view()), name='membership'), + url(r'logout/?$',views.logout_glarus,name='logout_glarus'), url(r"^buy/(?P