diff --git a/digitalglarus/templates/base_glarus.html b/digitalglarus/templates/base_glarus.html index a87e157e..4e0bc1d1 100644 --- a/digitalglarus/templates/base_glarus.html +++ b/digitalglarus/templates/base_glarus.html @@ -1,3 +1,5 @@ + + {% load staticfiles cms_tags menu_tags sekizai_tags menu_tags %} <!DOCTYPE html> @@ -37,8 +39,8 @@ <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> - <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> - <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <script> diff --git a/digitalglarus/templates/digitalglarus/index.html b/digitalglarus/templates/digitalglarus/index.html index d7894fb2..003d7e1f 100644 --- a/digitalglarus/templates/digitalglarus/index.html +++ b/digitalglarus/templates/digitalglarus/index.html @@ -1,4 +1,4 @@ -{% extends "base_glarus.html" %} +{% extends "new_base_glarus.html" %} {% load staticfiles cms_tags %} {% block content %} diff --git a/digitalglarus/templates/new_base_glarus.html b/digitalglarus/templates/new_base_glarus.html new file mode 100644 index 00000000..e75c4139 --- /dev/null +++ b/digitalglarus/templates/new_base_glarus.html @@ -0,0 +1,245 @@ +{% load static %} +{% load bootstrap3 %} +{% load staticfiles cms_tags menu_tags sekizai_tags menu_tags %} +{% load i18n %} +<!DOCTYPE html> +<html lang="en"> +<head> + + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="description" content=""> + <meta name="author" content=""> + + <title>Digital Glarus - {% block title %}Welcome{% endblock %}</title> + + + <!-- Bootstrap Core CSS --> + <link href="{% static 'ungleich_page/css/bootstrap.min.css' %}" rel="stylesheet"> + <link href="{% static 'ungleich_page/css/lib/animate.min.css' %}" rel="stylesheet"> + + + <!-- Custom CSS --> + <link href="{% static 'ungleich_page/css/agency.css' %}" rel="stylesheet"> + + <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> + <![endif]--> + + <!-- Fonts --> + <link href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" + rel="stylesheet" type="text/css"> + <link href="//fonts.googleapis.com/css?family=Josefin+Slab:100,300,400,600,700,100italic,300italic,400italic,600italic,700italic" + rel="stylesheet" type="text/css"> + <link href="{% static 'digitalglarus/bower_components/font-awesome/css/font-awesome.min.css' %}" + rel="stylesheet" type="text/css"> + + + <link href="{% static 'ungleich_page/css/ungleich.css' %}" rel="stylesheet"> + + {% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %} + {% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %} + + + <!-- Google tracking --> + <script src="//www.google-analytics.com/analytics.js" async></script> + <script> + (function (i, s, o, g, r, a, m) { + i['GoogleAnalyticsObject'] = r; + i[r] = i[r] || function () { + (i[r].q = i[r].q || []).push(arguments) + }, i[r].l = 1 * new Date(); + a = s.createElement(o), + m = s.getElementsByTagName(o)[0]; + a.async = 1; + a.src = g; + m.parentNode.insertBefore(a, m) + })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); + + ga('create', 'UA-62285904-1', 'auto'); + ga('send', 'pageview'); + + </script> + <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon"> + <style id="igtranslator-color" type="text/css"></style> + <style type="text/css"> + + + .intro-cap{ + + font-size:3em; + } + .intro-text a{ + color:white; + } + + </style> +</head> + +<body id="page-top" class="index"> +{% cms_toolbar %} + + + +<!-- Navigation --> +<nav class="navbar navbar-default navbar-fixed-top"> + <div class="container"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header page-scroll"> + <button type="button" class="navbar-toggle" data-toggle="collapse" + data-target="#bs-example-navbar-collapse-1"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <p><a class="navbar-brand page-scroll" href="#page-top"><img + src="{% static 'ungleich_page/img/logo_white.svg' %}"></a></p> + + <p> </p> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav navbar-right"> + <li class="hidden active"> + <a href="#page-top"></a> + </li> + <li> + <a class="page-scroll" href="#services">{% trans "About"%}</a></li> + <li></li> + <li></li> + <li></li> + <li> + <a class="page-scroll" href="#portfolio">{% trans "Contact"%}</a></li> + <li></li> + <li> + <a class="page-scroll" href="#about">{% trans "Crowdfunding"%}</a> + </li> + <li> + <a class="page-scroll" href="#team">{% trans "Supporters"%}</a> + </li> + <li> + <a class="page-scroll" href="http://blog.ungleich.ch">{% trans "BLOG"%}</a> + </li> + </ul> + </div> + <!-- /.navbar-collapse --> + </div> + <!-- /.container-fluid --> +</nav> + + + + <header style="background-image: url({% static 'digitalglarus/img/slide-1.jpg' %});box-shadow: inset 0 0 0 1000px rgba(0,0,0,.4);"> + <div class="container"> + <div class="intro-text"> + <p></p><p></p><br> + <small>WELCOME TO</small> + <br> + <span class="intro-cap" style="font-size:3em;"> + Digital Glarus + </span> + <hr class="tagline-divider"> + <small>By + <strong><a href="http://ungleich.ch">ungleich gmbh</a></strong> + </small> + + </div> + </div> + </header> +</div> + + + +<!-- Header --> +{% include "ungleich_page/includes/_header.html" %} + + +<!-- Services Section --> +{% include "ungleich_page/includes/_services.html" %} + +<!-- Portfolio Grid Section --> +{% include "ungleich_page/includes/_portfolio.html" %} + + +<!-- About Section --> +{% include "ungleich_page/includes/_about.html" %}$ + +<!-- Team Section --> +{% include "ungleich_page/includes/_team.html" %} + +<!-- Software We Use Section --> +{% include "ungleich_page/includes/_softwares.html" %} + +<!-- Contact Us Section --> +{% include "ungleich_page/includes/_contact_us.html" %} + +<!-- Footer --> +{% include "ungleich_page/includes/_footer.html" %} + +<!-- Portfolio Modals --> +<!-- Use the modals below to showcase details about your portfolio projects! --> + +<!-- Portfolio Modal 1 --> + +<!-- Portfolio Modal 2 --> + +<!-- Portfolio Modal 3 --> + +<!-- Portfolio Modal 4 --> + +<!-- Portfolio Modal 6 --> +</div> +</div> + + +<!-- jQuery --> +<script src="{% static 'ungleich_page/js/jquery.js' %}" type="text/javascript"></script> +<script type="text/javascript"> + $(document).ready(function () { + if ($(".has-error").length != 0) { + window.location = window.location.pathname + "#contact" + } + }); +</script> + +<!-- Bootstrap Core JavaScript --> +<script src="{% static 'ungleich_page/js/bootstrap.min.js' %}" type="text/javascript"></script> + +<!-- Plugin JavaScript --> +<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js" + type="text/javascript"></script> +<script src="{% static 'ungleich_page/js/classie.js' %}" type="text/javascript"></script> +<script src="{% static 'ungleich_page/js/cbpAnimatedHeader.js' %}" type="text/javascript"></script> + +<!-- Bootstrap Core JavaScript --> +<script src="{% static 'digitalglarus/js/bootstrap.min.js' %}"></script> +<script src="{% static 'digitalglarus/js/digital.glarus.js' %}"></script> + + +<!-- Contact Form JavaScript --> +<script src="{% static 'ungleich_page/js/jqBootstrapValidation.js' %}" type="text/javascript"></script> +<!-- <script src="{% static 'ungleich_page/js/contact_me.js' %}" type="text/javascript"></script> --> +<script src="{% static 'ungleich_page/js/lib/wow.min.js' %}" type="text/javascript"></script> + +<!-- Custom Theme JavaScript --> +<script src="{% static 'ungleich_page/js/ungleich.js' %}" type="text/javascript"></script> + + +<!-- Custom Fonts --> +<link href="//fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css"> +<link href="{% static 'ungleich_page/font-awesome-4.1.0/css/font-awesome.min.css' %}" rel="stylesheet" + type="text/css"> +<link href="//fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"> +<link href="//fonts.googleapis.com/css?family=Kaushan+Script" rel="stylesheet" type="text/css"> +<link href="//fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic" rel="stylesheet" + type="text/css"> +<link href="//fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700" rel="stylesheet" type="text/css"> +</html> + + diff --git a/digitalglarus/urls.py b/digitalglarus/urls.py index b25fa273..b465da78 100644 --- a/digitalglarus/urls.py +++ b/digitalglarus/urls.py @@ -5,7 +5,7 @@ from . import views from .views import ContactView, IndexView, AboutView urlpatterns = [ - url(_(r'^$'), IndexView.as_view(), name='contact'), + url(_(r'^$'), IndexView.as_view(), name='landing'), url(_(r'contact/?$'), ContactView.as_view(), name='contact'), url(_(r'supporters/?$'), views.supporters, name='supporters'), url(r'calendar_api/(?P<month>\d+)/(?P<year>\d+)?$', views.CalendarApi.as_view(),name='calendar_api_1'), diff --git a/nosystemd/management/commands/make_donation_charges.py b/nosystemd/management/commands/make_donation_charges.py index 70f95d64..12f4e884 100644 --- a/nosystemd/management/commands/make_donation_charges.py +++ b/nosystemd/management/commands/make_donation_charges.py @@ -4,10 +4,12 @@ from datetime import datetime from utils.stripe_utils import StripeUtils +from utils.mailer import BaseEmail from nosystemd.models import DonatorStatus, Donation from nosystemd.forms import DonationForm + class Command(BaseCommand): help = 'Make the monthly stripe charge to all donators' CURRENCY = 'usd' @@ -48,6 +50,7 @@ class Command(BaseCommand): print("--------- STRIPE PAYMENT ERROR ---------") print(context) print("-------------------------") + continue # Create a donation charge = charge_response.get('response_object') donation_data = { @@ -61,6 +64,22 @@ class Command(BaseCommand): donation_form = DonationForm(donation_data) if donation_form.is_valid(): donation = donation_form.save() + + context = { + 'donation': donation, + 'base_url': "{0}://{1}".format('https', 'dynamicweb.ungleich.ch') + + } + email_data = { + 'subject': 'Your donation have been charged', + 'to': donation.donator.user.email, + 'context': context, + 'template_name': 'donation_charge', + 'template_path': 'nosystemd/emails/' + } + email = BaseEmail(**email_data) + email.send() + print("--------- PAYMENT DONATION SUCCESSFULL ---------") print("Donator: %s" % donation.donator.user.email) print("Amount: %s %s" % (donation.donation, self.CURRENCY)) diff --git a/ungleich/templates/ungleich/djangocms_blog/includes/blog_item.html b/ungleich/templates/ungleich/djangocms_blog/includes/blog_item.html index 9825fe92..0c683d9f 100644 --- a/ungleich/templates/ungleich/djangocms_blog/includes/blog_item.html +++ b/ungleich/templates/ungleich/djangocms_blog/includes/blog_item.html @@ -1,32 +1,48 @@ {% load i18n thumbnail cms_tags %} <div class="post-preview"> - <a href=" {{ post.get_absolute_url }} "> - <h2 class="post-title"> - {{ post.title }} - </h2> - <img src="{% thumbnail post.main_image 630x200 crop upscale subject_location=post.main_image.subject_location %}"/> - <h3 class="post-subtitle"> - {% if not TRUNCWORDS_COUNT %} - {% render_model post "abstract" %} - {% else %} - {% render_model post "abstract" "" "" 'truncatewords_html:TRUNCWORDS_COUNT' %} - {% endif %} - </h3> - </a> - <p class="post-meta"> - Posted - {% if post.author %} - by - <!-- <a href="{% url 'djangocms_blog:posts-author' post.author.get_username %}"> --> - {% if post.author.get_full_name %} - {{ post.author.get_full_name }} - {% else %} - {{ post.author }} - {% endif %} - <!-- </a> --> - {% endif %} - on {{ post.date_published|date:"DATE_FORMAT" }} - </p> + + + <div class="row"> + <div class="col-md-4"> + + <img style="margin-top:11%"src="{% thumbnail post.main_image 240x235 crop upscale subject_location=post.main_image.subject_location %}"/> + + </div> + <div class="col-md-8"> + <a href=" {{ post.get_absolute_url }} "> + <h2 class="post-title"> + {{ post.title }} + </h2> + </a> + <p class="post-meta" style="font-size:0.9em;"> + Posted + {% if post.author %} + by + <!-- <a href="{% url 'djangocms_blog:posts-author' post.author.get_username %}"> --> + {% if post.author.get_full_name %} + {{ post.author.get_full_name }} + {% else %} + {{ post.author }} + {% endif %} + <!-- </a> --> + {% endif %} + on {{ post.date_published|date:"DATE_FORMAT" }} + </p> + + <p class="post-subtitle"> + {% if not TRUNCWORDS_COUNT %} + {% render_model post "abstract" %} + {% else %} + {% render_model post "abstract" "" "" 'truncatewords_html:TRUNCWORDS_COUNT' %} + {% endif %} + </p> + + + + </div> + </div> + + </div> <hr> diff --git a/ungleich_page/templates/ungleich_page/includes/_contact_us.html b/ungleich_page/templates/ungleich_page/includes/_contact_us.html index 8c21634c..146a6f18 100644 --- a/ungleich_page/templates/ungleich_page/includes/_contact_us.html +++ b/ungleich_page/templates/ungleich_page/includes/_contact_us.html @@ -16,7 +16,7 @@ <br> <h3 class="intro-smallcap">{% trans "Join us at" %} <a - href="{% page_url 'digital-glarus-page' %}">{% trans "Digital Glarus" %}</a>, + href="{% url 'digitalglarus:landing' %}">{% trans "Digital Glarus" %}</a>, {% trans "a great co-working space in the middle of Alps!" %} <p></p> {% trans "You can contact us at" %} </h3> <h3 class="intro-smallcap"><a href="mailto:info@ungleich.ch"><i class="fa fa-envelope">info@ungleich.ch</i></a>