Merge branch 'develop' into feature/supporter
This commit is contained in:
commit
979a0bb24d
55 changed files with 676 additions and 426 deletions
|
@ -4,6 +4,8 @@
|
||||||
<header class="intro-header"
|
<header class="intro-header"
|
||||||
{% if post.main_image_id %}
|
{% if post.main_image_id %}
|
||||||
style="background-image: url('{{ post.main_image.url }}');"
|
style="background-image: url('{{ post.main_image.url }}');"
|
||||||
|
{% else %}
|
||||||
|
style="background-image: url('{% static 'blog.ungleich.ch/img/home-bg.jpg' %}');"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
>
|
>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -32,4 +34,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
19
cms_templates/djangocms_blog/base.html
Normal file
19
cms_templates/djangocms_blog/base.html
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{% extends 'base_glarus.html' %}
|
||||||
|
|
||||||
|
{% block meta %}
|
||||||
|
{% if meta %}
|
||||||
|
{% include "meta_mixin/meta.html" %}
|
||||||
|
{% endif %}
|
||||||
|
{% endblock meta %}
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
{% block content %}
|
||||||
|
<div class="app app-blog span8">
|
||||||
|
<div class="row">
|
||||||
|
<div class="box">
|
||||||
|
{% block content_blog %}{% endblock %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock content %}
|
||||||
|
</div>
|
35
cms_templates/djangocms_blog/post_detail.html
Normal file
35
cms_templates/djangocms_blog/post_detail.html
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{% extends "djangocms_blog/base.html" %}
|
||||||
|
{% load i18n thumbnail cms_tags %}
|
||||||
|
|
||||||
|
{% block meta_description %}{{ post.meta_description }}{% endblock meta_description %}
|
||||||
|
{% block meta_keywords %}{{ post.meta_keywords }}{% endblock meta_keywords %}
|
||||||
|
{% block canonical_url %}<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
|
||||||
|
{% block title %}{{ post.get_title }}{% endblock %}
|
||||||
|
|
||||||
|
{% block content_blog %}{% spaceless %}
|
||||||
|
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
||||||
|
{% if post.main_image_id %}
|
||||||
|
<div class="blog-visual">
|
||||||
|
{% thumbnail post.main_image post.full_image_options.size crop=post.full_image_options.crop upscale=post.full_image_options.upscale subject_location=post.main_image.subject_location as thumb %}
|
||||||
|
<img src="{{ post.main_image.url }}" alt="{{ post.main_image.default_alt_text }}" class="img-responsive img-full" />
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<header class="text-center">
|
||||||
|
<hr></hr>
|
||||||
|
<h2 class="text-center intro-text">
|
||||||
|
<a href="{% url 'digitalglarus:blog-detail' post.slug %}" class="post-title center-block">
|
||||||
|
<b>{{ post.title }}</b>
|
||||||
|
</a>
|
||||||
|
<small>
|
||||||
|
{{ post.date_created }}
|
||||||
|
</small>
|
||||||
|
</h2>
|
||||||
|
<hr></hr>
|
||||||
|
{% block blog_meta %}
|
||||||
|
{# include "glarus_blog/includes/blog_meta.html" #}
|
||||||
|
{% endblock %}
|
||||||
|
</header>
|
||||||
|
{% endspaceless %}
|
||||||
|
<div class="digitalglarus-blog-content">{% render_placeholder post.content %}</div>
|
||||||
|
</article>
|
||||||
|
{% endblock content_blog %}
|
47
cms_templates/djangocms_blog/post_list.html
Normal file
47
cms_templates/djangocms_blog/post_list.html
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{% extends "djangocms_blog/base.html" %}
|
||||||
|
{% load i18n thumbnail %}{% spaceless %}
|
||||||
|
|
||||||
|
{% block canonical_url %}<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
|
||||||
|
|
||||||
|
{% block content_blog %}
|
||||||
|
<section class="blog-list">
|
||||||
|
{% block blog_title %}
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
{% if author %}{% trans "Articles by" %} {{ author.get_full_name }}
|
||||||
|
{% elif archive_date %}{% trans "Archive" %} – {% if month %}{{ archive_date|date:'F' }} {% endif %}{{ year }}
|
||||||
|
{% elif tagged_entries %}{% trans "Tag" %} – {{ tagged_entries|capfirst }}
|
||||||
|
{% elif category %}{% trans "Category" %} – {{ category }}{% endif %}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
{% endblock %}
|
||||||
|
{% for post in post_list %}
|
||||||
|
{% include "djangocms_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
|
||||||
|
{% empty %}
|
||||||
|
<p class="blog-empty">{% trans "No article found." %}</p>
|
||||||
|
{% endfor %}
|
||||||
|
{% if author or archive_date or tagged_entries %}
|
||||||
|
<p class="blog-back"><a href="{% url 'djangocms_blog:posts-latest' %}">{% trans "Back" %}</a></p>
|
||||||
|
{% endif %}
|
||||||
|
{% if is_paginated %}
|
||||||
|
<!-- Pager -->
|
||||||
|
<ul class="pager">
|
||||||
|
{% if page_obj.has_previous %}
|
||||||
|
<li class="previous">
|
||||||
|
<a href="?{{ view.page_kwarg }}={{ page_obj.previous_page_number }}">
|
||||||
|
« {% trans "Newer Posts" %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if page_obj.has_next %}
|
||||||
|
<li class="next">
|
||||||
|
<a href="?{{ view.page_kwarg }}={{ page_obj.next_page_number }}">
|
||||||
|
{% trans "Older Posts" %} →
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
|
{% endspaceless %}
|
33
cms_templates/includes/blog_item.html
Normal file
33
cms_templates/includes/blog_item.html
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{% load i18n thumbnail %}
|
||||||
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
|
<article id="post-{{ post.slug }}" class="post-item col-lg-12 text-center">
|
||||||
|
{% if post.main_image %}
|
||||||
|
<div class="blog-visual">
|
||||||
|
{% thumbnail post.main_image post.full_image_options.size crop=post.full_image_options.crop upscale=post.full_image_options.upscale subject_location=post.main_image.subject_location as thumb %}
|
||||||
|
<img src="{{ post.main_image.url }}" alt="{{ post.main_image.default_alt_text }}" class="img-responsive img-full" />
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<header>
|
||||||
|
<hr></hr>
|
||||||
|
<h2 class="text-center intro-text">
|
||||||
|
<a href="{% url 'djangocms_blog:post-detail' post.slug LANGUAGE_CODE %}" class="post-title center-block">
|
||||||
|
<b>{{ post.title }}</b>
|
||||||
|
</a>
|
||||||
|
<small>
|
||||||
|
{{ post.date_created }}
|
||||||
|
</small>
|
||||||
|
</h2>
|
||||||
|
<hr></hr>
|
||||||
|
{% block blog_meta %}
|
||||||
|
{# include "glarus_blog/includes/blog_meta.html" #}
|
||||||
|
{% endblock %}
|
||||||
|
</header>
|
||||||
|
<div class="blog-lead text-center blog-abstract center-block">
|
||||||
|
<p>
|
||||||
|
{{ post.abstract| safe }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="read-more">
|
||||||
|
<a class="lead" href="{% url 'djangocms_blog:post-detail' post.slug %}">{% trans "read more" %} »</a>
|
||||||
|
</div>
|
||||||
|
</article>
|
23
cms_templates/includes/blog_meta.html
Normal file
23
cms_templates/includes/blog_meta.html
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{% load i18n thumbnail %}
|
||||||
|
|
||||||
|
<ul class="post-detail list-inline">
|
||||||
|
{% if post.author %}
|
||||||
|
<li>
|
||||||
|
{% trans "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>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
<ul class="post-detail tags list-inline">
|
||||||
|
{% if post.categories.exists %}
|
||||||
|
{% for category in post.categories.all %}
|
||||||
|
{% if category.slug %}
|
||||||
|
<li class="category_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:posts-category' category=category.slug %}" class="blog-categories-{{ category.count }}">{{ category.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
{% if post.tags.exists %}
|
||||||
|
{% for tag in post.tags.all %}
|
||||||
|
<li class="tag_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:posts-tagged' tag=tag.slug %}" class="blog-tag blog-tag-{{ tag.count }}">{{ tag.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "digitalglarus/base.html" %}
|
{% extends "base_glarus.html" %}
|
||||||
{% load staticfiles cms_tags %}
|
{% load staticfiles cms_tags %}
|
||||||
{% block title %}crowdfunding{% endblock %}
|
{% block title %}crowdfunding{% endblock %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "digitalglarus/base.html" %}
|
{% extends "base_glarus.html" %}
|
||||||
{% load staticfiles cms_tags %}
|
{% load staticfiles cms_tags %}
|
||||||
{% block title %}About{% endblock %}
|
{% block title %}About{% endblock %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "cms/digitalglarus/base.html" %}
|
{% extends "base_glarus.html" %}
|
||||||
{% load staticfiles cms_tags %}
|
{% load staticfiles cms_tags %}
|
||||||
{% block title %}About{% endblock %}
|
{% block title %}About{% endblock %}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
# from .models import Message, Supporter, DGGallery, DGPicture
|
from .models import Message, Supporter, DGGallery, DGPicture
|
||||||
|
#
|
||||||
|
class DGPictureInline(admin.StackedInline):
|
||||||
|
model = DGPicture
|
||||||
|
|
||||||
# class DGPictureInline(admin.StackedInline):
|
class DGGalleryAdmin(admin.ModelAdmin):
|
||||||
# model = DGPicture
|
inlines = [DGPictureInline]
|
||||||
#
|
|
||||||
# class DGGalleryAdmin(admin.ModelAdmin):
|
admin.site.register(DGGallery, DGGalleryAdmin)
|
||||||
# inlines = [DGPictureInline]
|
admin.site.register(Message)
|
||||||
#
|
admin.site.register(Supporter)
|
||||||
# admin.site.register(DGGallery, DGGalleryAdmin)
|
|
||||||
# admin.site.register(Message)
|
|
||||||
# admin.site.register(Supporter)
|
|
|
@ -1,36 +1,36 @@
|
||||||
# from cms.plugin_base import CMSPluginBase
|
from cms.plugin_base import CMSPluginBase
|
||||||
# from cms.plugin_pool import plugin_pool
|
from cms.plugin_pool import plugin_pool
|
||||||
# from cms.wizards import wizard_base
|
from cms.wizards import wizard_base
|
||||||
# from .models import DGGalleryPlugin, DGSupportersPlugin, Supporter
|
from .models import DGGalleryPlugin, DGSupportersPlugin, Supporter
|
||||||
# from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
|
|
||||||
# class CMSGalleryPlugin(CMSPluginBase):
|
|
||||||
# model = DGGalleryPlugin
|
|
||||||
# name = _("Digital Glarus Gallery")
|
|
||||||
# render_template = "digitalglarus/gallery.html"
|
|
||||||
#
|
#
|
||||||
# def render(self, context, instance, placeholder):
|
class CMSGalleryPlugin(CMSPluginBase):
|
||||||
# context.update({
|
model = DGGalleryPlugin
|
||||||
# 'gallery':instance.dgGallery,
|
name = _("Digital Glarus Gallery")
|
||||||
# 'object':instance,
|
render_template = "gallery.html"
|
||||||
# 'placeholder':placeholder
|
|
||||||
# })
|
def render(self, context, instance, placeholder):
|
||||||
# return context
|
context.update({
|
||||||
|
'gallery':instance.dgGallery,
|
||||||
|
'object':instance,
|
||||||
|
'placeholder':placeholder
|
||||||
|
})
|
||||||
|
return context
|
||||||
|
|
||||||
|
class CMSSupportersPlugin(CMSPluginBase):
|
||||||
|
name = _("Digital Glarus Supporters")
|
||||||
|
model = DGSupportersPlugin
|
||||||
|
render_template = "supporters_plugin.html"
|
||||||
|
|
||||||
|
def render(self, context, instance, placeholder):
|
||||||
|
context.update({
|
||||||
|
'supporters': Supporter.objects.all().order_by('name'),
|
||||||
|
'object': instance,
|
||||||
|
'placeholder':placeholder
|
||||||
|
})
|
||||||
|
return context
|
||||||
#
|
#
|
||||||
# class CMSSupportersPlugin(CMSPluginBase):
|
|
||||||
# name = _("Digital Glarus Supporters")
|
|
||||||
# model = DGSupportersPlugin
|
|
||||||
# render_template = "digitalglarus/supporters_plugin.html"
|
|
||||||
#
|
#
|
||||||
# def render(self, context, instance, placeholder):
|
#
|
||||||
# context.update({
|
plugin_pool.register_plugin(CMSGalleryPlugin)
|
||||||
# 'supporters': Supporter.objects.all().order_by('name'),
|
plugin_pool.register_plugin(CMSSupportersPlugin)
|
||||||
# 'object': instance,
|
|
||||||
# 'placeholder':placeholder
|
|
||||||
# })
|
|
||||||
# return context
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# plugin_pool.register_plugin(CMSGalleryPlugin)
|
|
||||||
# plugin_pool.register_plugin(CMSSupportersPlugin)
|
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.9.4 on 2016-03-30 22:23
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
import filer.fields.image
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('cms', '0013_urlconfrevision'),
|
||||||
|
('filer', '0002_auto_20150606_2003'),
|
||||||
|
('digitalglarus', '0003_auto_20160325_1659'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='DGGallery',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=30)),
|
||||||
|
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='digitalglarus.DGGallery')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'verbose_name_plural': 'dgGallery',
|
||||||
|
},
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='DGGalleryPlugin',
|
||||||
|
fields=[
|
||||||
|
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
|
||||||
|
('dgGallery', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='digitalglarus.DGGallery')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'abstract': False,
|
||||||
|
},
|
||||||
|
bases=('cms.cmsplugin',),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='DGPicture',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('description', models.CharField(max_length=60)),
|
||||||
|
('gallery', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='digitalglarus.DGGallery')),
|
||||||
|
('image', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, related_name='dg_gallery', to='filer.Image')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='DGSupportersPlugin',
|
||||||
|
fields=[
|
||||||
|
('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')),
|
||||||
|
],
|
||||||
|
options={
|
||||||
|
'abstract': False,
|
||||||
|
},
|
||||||
|
bases=('cms.cmsplugin',),
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Supporter',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=200)),
|
||||||
|
('description', models.TextField(blank=True, null=True)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
|
@ -18,7 +18,7 @@ class Message(models.Model):
|
||||||
class Supporter(models.Model):
|
class Supporter(models.Model):
|
||||||
name = models.CharField(max_length=200)
|
name = models.CharField(max_length=200)
|
||||||
description = models.TextField(null=True, blank=True)
|
description = models.TextField(null=True, blank=True)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "%s" % (self.name)
|
return "%s" % (self.name)
|
||||||
|
|
||||||
|
@ -39,16 +39,36 @@ class Supporter(models.Model):
|
||||||
# class Meta:
|
# class Meta:
|
||||||
# verbose_name_plural = 'dgGallery'
|
# verbose_name_plural = 'dgGallery'
|
||||||
|
|
||||||
# class DGPicture(models.Model):
|
def __str__(self):
|
||||||
# gallery = models.ForeignKey(DGGallery)
|
return "%s" % (self.name)
|
||||||
# image = FilerImageField(related_name='dg_gallery')
|
|
||||||
# description = models.CharField(max_length=60)
|
def get_absolute_url(self):
|
||||||
|
return reverse('dgSupporters_view', args=[self.pk])
|
||||||
|
|
||||||
|
|
||||||
|
class DGGallery(models.Model):
|
||||||
|
parent = models.ForeignKey('self', blank=True, null=True)
|
||||||
|
name = models.CharField(max_length=30)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return "%s" % (self.name)
|
||||||
|
|
||||||
|
def get_absolute_url(self):
|
||||||
|
return reverse('dgGallery_view', args=[self.pk])
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name_plural = 'dgGallery'
|
||||||
#
|
#
|
||||||
# def __str__(self):
|
class DGPicture(models.Model):
|
||||||
# return "%s" % (self.image.name)
|
gallery = models.ForeignKey(DGGallery)
|
||||||
#
|
image = FilerImageField(related_name='dg_gallery')
|
||||||
# class DGGalleryPlugin(CMSPlugin):
|
description = models.CharField(max_length=60)
|
||||||
# dgGallery = models.ForeignKey(DGGallery)
|
|
||||||
#
|
def __str__(self):
|
||||||
# class DGSupportersPlugin(CMSPlugin):
|
return "%s" % (self.image.name)
|
||||||
# pass
|
|
||||||
|
class DGGalleryPlugin(CMSPlugin):
|
||||||
|
dgGallery = models.ForeignKey(DGGallery)
|
||||||
|
|
||||||
|
class DGSupportersPlugin(CMSPlugin):
|
||||||
|
pass
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "digitalglarus/base.html" %}
|
{% extends "base_glarus.html" %}
|
||||||
{% load staticfiles cms_tags %}
|
{% load staticfiles cms_tags %}
|
||||||
{% block title %}About{% endblock %}
|
{% block title %}About{% endblock %}
|
||||||
|
|
||||||
|
@ -54,4 +54,4 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- /.container -->
|
<!-- /.container -->
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -1,10 +0,0 @@
|
||||||
# -*- 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'),
|
|
||||||
'one_column.html': _('DG.OneColumn'),
|
|
||||||
}
|
|
|
@ -1,96 +0,0 @@
|
||||||
{% load staticfiles cms_tags menu_tags sekizai_tags menu_tags %}
|
|
||||||
<!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>
|
|
||||||
{% page_attribute "page_title" %}
|
|
||||||
</title>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Favicon -->
|
|
||||||
<link rel="shortcut icon" href="{% static 'digitalglarus/img/favicon.ico' %}"/>
|
|
||||||
|
|
||||||
<!-- Bootstrap Core CSS -->
|
|
||||||
<link href="{% static 'digitalglarus/css/bootstrap.min.css' %}" rel="stylesheet">
|
|
||||||
|
|
||||||
<!-- Custom CSS -->
|
|
||||||
<link href="{% static 'digitalglarus/css/business-casual.css' %}" rel="stylesheet">
|
|
||||||
<!-- 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">
|
|
||||||
|
|
||||||
<!-- 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]-->
|
|
||||||
{% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %}
|
|
||||||
{% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %}
|
|
||||||
<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-2', 'auto');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{% cms_toolbar %}
|
|
||||||
<div class="brand">Digital Glarus</div>
|
|
||||||
<div class="address-bar">
|
|
||||||
{# {% placeholder 'digital_glarus_legend' %}#}
|
|
||||||
</div>
|
|
||||||
<div class="center-block">
|
|
||||||
<ul class="list-inline center-block language-chooser-list">
|
|
||||||
{% language_chooser "cms/digitalglarus/partials/language-chooser.html" %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Navigation -->
|
|
||||||
{% include "cms/digitalglarus/partials/menu.html" %}
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
{% block content %} {% endblock %}
|
|
||||||
</div>
|
|
||||||
<!-- /.container -->
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-12 text-center">
|
|
||||||
<p class="text-center">Copyright © <a href="http://www.ungleich.ch">ungleich GmbH 2015</a></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<!-- jQuery -->
|
|
||||||
<script src="{% static 'digitalglarus/js/jquery.js' %}"></script>
|
|
||||||
|
|
||||||
<!-- Bootstrap Core JavaScript -->
|
|
||||||
<script src="{% static 'digitalglarus/js/bootstrap.min.js' %}"></script>
|
|
||||||
<script src="{% static 'digitalglarus/js/digital.glarus.js' %}"></script>
|
|
||||||
|
|
||||||
<!-- Script to Activate the Carousel -->
|
|
||||||
<script>
|
|
||||||
$('.carousel').carousel({
|
|
||||||
interval: 5000 //changes the speed
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,9 +0,0 @@
|
||||||
{% load i18n menu_tags %}
|
|
||||||
|
|
||||||
{% if languages|length > 1 %}
|
|
||||||
{% for language in languages %}
|
|
||||||
<li class="lang{% if current_language == language.0 %} active{% endif %}">
|
|
||||||
<a href="{% page_language_url language.0 %}" title="{% trans "Change to language:" %} {{ language.1 }}">{{ language.1 }}</a>
|
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
|
@ -1,26 +0,0 @@
|
||||||
{% load menu_tags staticfiles cms_tags %}
|
|
||||||
<!-- Navigation -->
|
|
||||||
<nav class="navbar navbar-default" role="navigation">
|
|
||||||
<div class="container">
|
|
||||||
<!-- Brand and toggle get grouped for better mobile display -->
|
|
||||||
<div class="navbar-header">
|
|
||||||
<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>
|
|
||||||
<!-- navbar-brand is hidden on larger screens, but visible when the menu is collapsed -->
|
|
||||||
<a class="navbar-brand" href="index.html">Digital Glarus</a>
|
|
||||||
</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">
|
|
||||||
{% show_menu 0 0 0 1 %}
|
|
||||||
{% show_menu_below_id "digital-glarus-page" 0 %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<!-- /.navbar-collapse -->
|
|
||||||
</div>
|
|
||||||
<!-- /.container -->
|
|
||||||
</nav>
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "digitalglarus/base.html" %}
|
{% extends "base_glarus.html" %}
|
||||||
{% load cms_tags %}
|
{% load cms_tags %}
|
||||||
{% block title %}Contact{% endblock %}
|
{% block title %}Contact{% endblock %}
|
||||||
|
|
||||||
|
@ -62,4 +62,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.container -->
|
<!-- /.container -->
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -1,72 +0,0 @@
|
||||||
{% extends "digitalglarus/base.html" %}
|
|
||||||
{% load staticfiles %}
|
|
||||||
{% block title %}About{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="row">
|
|
||||||
<div class="box">
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<hr>
|
|
||||||
<h2 class="intro-text text-center">why
|
|
||||||
<strong>Us?</strong>
|
|
||||||
</h2>
|
|
||||||
<hr>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<img class="img-responsive img-border-left" src="{% static 'digitalglarus/img/img_4.png' %}" alt="">
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<p>
|
|
||||||
We, the ungleich GmbH, were founded 2013 in Switzerland -
|
|
||||||
however our first incarnation in Germany dates back to 2000.
|
|
||||||
We have long knowledge in tech industry, and have extensive
|
|
||||||
networks with small to medium tech companies in Switzerland,
|
|
||||||
because we are one of them. We have been working at coworking
|
|
||||||
spaces with these small to medium sized IT companies ;
|
|
||||||
tech-savvy and flexible, tech companies have open culture in
|
|
||||||
work environment, and very often experience difficulty in
|
|
||||||
letting their employees be as creative as possible. We
|
|
||||||
understand and share their needs and problems. This is how we
|
|
||||||
came up with a solution of our own, of finding and providing
|
|
||||||
an attractive working space for technology companies
|
|
||||||
in Switzerland.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="box">
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<hr>
|
|
||||||
<h2 class="intro-text text-center">why
|
|
||||||
<strong>glarus?</strong>
|
|
||||||
</h2>
|
|
||||||
<hr>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 text-center">
|
|
||||||
<img class="img-responsive" src="{% static 'digitalglarus/img/img_1.jpg' %}" alt="">
|
|
||||||
<h3>BEAUTIFUL
|
|
||||||
<small> landscape</small>
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 text-center">
|
|
||||||
<img class="img-responsive" src="{% static 'digitalglarus/img/price_1.jpg' %}" alt="">
|
|
||||||
<h3>AFFORDABLE
|
|
||||||
<small>price</small></h3>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-4 text-center">
|
|
||||||
<img class="img-responsive" src="{% static 'digitalglarus/img/img_3.jpg' %}" alt="">
|
|
||||||
<h3>direct
|
|
||||||
<small> connection to zurich</small>
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- /.container -->
|
|
||||||
|
|
||||||
{% endblock %}
|
|
|
@ -1,11 +0,0 @@
|
||||||
<h1>{{ message }}</h1>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>{{ message.name }}
|
|
||||||
<li>{{ message.email }}
|
|
||||||
<li>{{ message.phone_number }}
|
|
||||||
<li>{{ message.message }}
|
|
||||||
<li>{{ message.received_date }}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p><a href="{% url 'digitalglarus:index' %}">Back to Main</a>
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "digitalglarus/base.html" %}
|
{% extends "base_glarus.html" %}
|
||||||
|
|
||||||
{% block meta %}
|
{% block meta %}
|
||||||
{% if meta %}
|
{% if meta %}
|
||||||
|
@ -16,4 +16,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
</div>
|
</div>
|
|
@ -29,4 +29,4 @@
|
||||||
<div class="read-more">
|
<div class="read-more">
|
||||||
<a class="lead" href="{% url 'djangocms_blog:post-detail' post.slug %}">{% trans "read more" %} »</a>
|
<a class="lead" href="{% url 'djangocms_blog:post-detail' post.slug %}">{% trans "read more" %} »</a>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
|
@ -20,4 +20,4 @@
|
||||||
<li class="tag_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:posts-tagged' tag=tag.slug %}" class="blog-tag blog-tag-{{ tag.count }}">{{ tag.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
<li class="tag_{{ forloop.counter }}"><a href="{% url 'djangocms_blog:posts-tagged' tag=tag.slug %}" class="blog-tag blog-tag-{{ tag.count }}">{{ tag.name }}</a>{% if not forloop.last %}, {% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "glarus_blog/base.html" %}
|
{% extends "base_glarus.html" %}
|
||||||
{% load i18n thumbnail cms_tags %}
|
{% load i18n thumbnail cms_tags %}
|
||||||
|
|
||||||
{% block meta_description %}{{ post.meta_description }}{% endblock meta_description %}
|
{% block meta_description %}{{ post.meta_description }}{% endblock meta_description %}
|
||||||
|
@ -7,7 +7,6 @@
|
||||||
{% block title %}{{ post.get_title }}{% endblock %}
|
{% block title %}{{ post.get_title }}{% endblock %}
|
||||||
|
|
||||||
{% block content_blog %}{% spaceless %}
|
{% block content_blog %}{% spaceless %}
|
||||||
{% debug %}
|
|
||||||
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
||||||
{% if post.main_image_id %}
|
{% if post.main_image_id %}
|
||||||
<div class="blog-visual">
|
<div class="blog-visual">
|
||||||
|
@ -18,7 +17,7 @@
|
||||||
<header class="text-center">
|
<header class="text-center">
|
||||||
<hr></hr>
|
<hr></hr>
|
||||||
<h2 class="text-center intro-text">
|
<h2 class="text-center intro-text">
|
||||||
<a href="{% url 'djangocms_blog:post-detail' post.slug %}" class="post-title center-block">
|
<a href="{% url 'digitalglarus:blog-detail' post.slug %}" class="post-title center-block">
|
||||||
<b>{{ post.title }}</b>
|
<b>{{ post.title }}</b>
|
||||||
</a>
|
</a>
|
||||||
<small>
|
<small>
|
||||||
|
@ -27,10 +26,10 @@
|
||||||
</h2>
|
</h2>
|
||||||
<hr></hr>
|
<hr></hr>
|
||||||
{% block blog_meta %}
|
{% block blog_meta %}
|
||||||
include "glarus_blog/includes/blog_meta.html"
|
{# include "glarus_blog/includes/blog_meta.html" #}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</header>
|
</header>
|
||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
<div class="digitalglarus-blog-content">{% render_placeholder post.content %}</div>
|
<div class="digitalglarus-blog-content">{% render_placeholder post.content %}</div>
|
||||||
</article>
|
</article>
|
||||||
{% endblock content_blog %}
|
{% endblock content_blog %}
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "glarus_blog/base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load i18n thumbnail %}{% spaceless %}
|
{% load i18n thumbnail %}{% spaceless %}
|
||||||
|
|
||||||
{% block canonical_url %}<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
|
{% block canonical_url %}<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
|
||||||
|
@ -32,4 +32,4 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endspaceless %}
|
{% endspaceless %}
|
99
digitalglarus/templates/index.html
Normal file
99
digitalglarus/templates/index.html
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
{% extends "base_glarus.html" %}
|
||||||
|
{% load staticfiles cms_tags %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="row">
|
||||||
|
<div class="box">
|
||||||
|
<div class="col-lg-12 text-center">
|
||||||
|
<div id="carousel-example-generic" class="carousel slide">
|
||||||
|
<!-- Indicators --><!-- Wrapper for slides -->
|
||||||
|
<div class="carousel-inner">
|
||||||
|
<div class="item active">
|
||||||
|
<img class="img-responsive img-full" src="{% static 'digitalglarus/img/slide-1.jpg' %}" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<img class="img-responsive img-full" src="{% static 'digitalglarus/img/slide-2.jpg' %}" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<img class="img-responsive img-full" src="{% static 'digitalglarus/img/slide-3.jpg' %}" alt="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Controls -->
|
||||||
|
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
|
||||||
|
<span class="icon-prev"></span>
|
||||||
|
</a>
|
||||||
|
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
|
||||||
|
<span class="icon-next"></span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<h2 class="brand-before">
|
||||||
|
<small>WELCOME TO</small>
|
||||||
|
</h2>
|
||||||
|
<h1 class="brand-name">Digital Glarus</h1>
|
||||||
|
<hr class="tagline-divider">
|
||||||
|
<h2>
|
||||||
|
<small>By
|
||||||
|
<strong><a href="http://ungleich.ch">ungleich gmbh</a></strong>
|
||||||
|
</small>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="box">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<hr>
|
||||||
|
<h2 class="intro-text text-center">
|
||||||
|
{% placeholder 'digital_glarus_build_a_tech_valley' %}
|
||||||
|
</h2>
|
||||||
|
<hr>
|
||||||
|
<img class="img-responsive img-border img-left" src="{% static 'digitalglarus/img/intro-pic.jpg' %}" alt="">
|
||||||
|
<hr class="visible-xs">
|
||||||
|
{% placeholder 'digital_glarus_build_a_tech_valley_content' %}
|
||||||
|
<p> </p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="box">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<hr>
|
||||||
|
<h2 class="intro-text text-center">
|
||||||
|
{% placeholder 'digital_glarus_a_new_area' %}
|
||||||
|
</h2>
|
||||||
|
<hr>
|
||||||
|
{% placeholder 'digital_glarus_a_new_area_content' %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="box">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<hr>
|
||||||
|
<h2 class="intro-text text-center">
|
||||||
|
{% placeholder 'digital_glarus_why_be_interested' %}
|
||||||
|
</h2>
|
||||||
|
<hr>
|
||||||
|
{% placeholder 'digital_glarus_why_be_interested_content' %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="box">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<hr>
|
||||||
|
<h2 class="intro-text text-center">
|
||||||
|
{% placeholder 'digital_glarus_where_we_are' %}
|
||||||
|
</h2>
|
||||||
|
<hr>
|
||||||
|
{% placeholder 'digital_glarus_where_we_are_content' %}
|
||||||
|
<p> </p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "digitalglarus/base.html" %}
|
{% extends "base_glarus.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles cms_tags %}
|
||||||
{% block title %}crowdfunding{% endblock %}
|
{% block title %}crowdfunding{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -18,34 +18,36 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<hr>
|
<hr>
|
||||||
<h2 class="intro-text text-center">why
|
<h2 class="intro-text text-center">
|
||||||
<strong>glarus?</strong>
|
{% placeholder 'digitalglarus_why_glarus' %}
|
||||||
</h2>
|
</h2>
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 text-center">
|
<div class="col-sm-4 text-center">
|
||||||
<img class="img-responsive" src="{% static 'digitalglarus/img/img_1.jpg' %}" alt="">
|
<img class="img-responsive" src="{% static 'digitalglarus/img/img_1.jpg' %}" alt="">
|
||||||
<h3>BEAUTIFUL
|
<h3>
|
||||||
<small> landscape</small>
|
{% placeholder 'digitalglarus_why_glarus_beautiful_landscape' %}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 text-center">
|
<div class="col-sm-4 text-center">
|
||||||
<img class="img-responsive" src="{% static 'digitalglarus/img/price_1.jpg' %}" alt="">
|
<img class="img-responsive" src="{% static 'digitalglarus/img/price_1.jpg' %}" alt="">
|
||||||
<h3>AFFORDABLE
|
{% placeholder 'digitalglarus_why_glarus_affordable_price' %}
|
||||||
<small>price</small></h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4 text-center">
|
<div class="col-sm-4 text-center">
|
||||||
<img class="img-responsive" src="{% static 'digitalglarus/img/img_3.jpg' %}" alt="">
|
<img class="img-responsive" src="{% static 'digitalglarus/img/img_3.jpg' %}" alt="">
|
||||||
<h3>direct
|
{% placeholder 'digitalglarus_why_glarus_direct_connection_zurich' %}
|
||||||
<small> connection to zurich</small>
|
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- /.container -->
|
<!-- /.container -->
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "digitalglarus/base.html" %}
|
{% extends "base_glarus.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% block title %}About{% endblock %}
|
{% block title %}About{% endblock %}
|
||||||
|
|
|
@ -3,14 +3,9 @@ from django.conf.urls import url
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'old^$', views.index, name='index'),
|
|
||||||
url(r'old_about$', views.about, name='about'),
|
|
||||||
url(r'old_contact$', views.contact, name='contact'),
|
url(r'old_contact$', views.contact, name='contact'),
|
||||||
url(r'old_letscowork$', views.letscowork, name='letscowork'),
|
|
||||||
url(r'old_home$', views.home, name='home'),
|
|
||||||
url(r'supporters/?$', views.supporters, name='supporters'),
|
url(r'supporters/?$', views.supporters, name='supporters'),
|
||||||
url(r'support-us/?$', views.support, name='support'),
|
url(r'support-us/?$', views.support, name='support'), # url(r'', views.index, name='index'),
|
||||||
url(r'', views.index, name='index'),
|
|
||||||
url(r'blog/',views.blog,name='blog'),
|
url(r'blog/',views.blog,name='blog'),
|
||||||
url(r'^blog/(?P<slug>\w[-\w]*)/$', views.blog_detail, name='blog-detail'),
|
url(r'^blog/(?P<slug>\w[-\w]*)/$', views.blog_detail, name='blog-detail'),
|
||||||
]
|
]
|
||||||
|
|
|
@ -83,4 +83,4 @@ def supporters(request):
|
||||||
context = {
|
context = {
|
||||||
'supporters': Supporter.objects.order_by('name')
|
'supporters': Supporter.objects.order_by('name')
|
||||||
}
|
}
|
||||||
return render(request, 'digitalglarus/supporters.html', context)
|
return render(request, 'supporters.html', context)
|
||||||
|
|
|
@ -131,13 +131,14 @@ ROOT_URLCONF = 'dynamicweb.urls'
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
'DIRS': [
|
'DIRS': [os.path.join(PROJECT_DIR,'cms_templates/'),
|
||||||
os.path.join(PROJECT_DIR, 'membership/'), # membership template
|
os.path.join(PROJECT_DIR,'cms_templates/djangocms_blog/'),
|
||||||
os.path.join(PROJECT_DIR, 'templates/'),
|
os.path.join(PROJECT_DIR,'membership'),
|
||||||
os.path.join(PROJECT_DIR, 'templates/digitalglarus/partials'),
|
os.path.join(PROJECT_DIR,'ungleich/templates/djangocms_blog/'),
|
||||||
os.path.join(PROJECT_DIR, 'templates/cms'),
|
os.path.join(PROJECT_DIR,'ungleich/templates/cms/ungleichch'),
|
||||||
os.path.join(PROJECT_DIR, 'templates/digitalglarus'),
|
os.path.join(PROJECT_DIR,'ungleich/templates/ungleich')
|
||||||
],
|
|
||||||
|
],
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
|
@ -158,11 +159,20 @@ TEMPLATES = [
|
||||||
|
|
||||||
WSGI_APPLICATION = 'dynamicweb.wsgi.application'
|
WSGI_APPLICATION = 'dynamicweb.wsgi.application'
|
||||||
|
|
||||||
TDIR = os.path.join(PROJECT_DIR, 'templates')
|
CMS_TEMPLATES = (
|
||||||
|
('base_glarus.html', gettext('default')),
|
||||||
CMS_TEMPLATES_DIR = {
|
('one_column.html', gettext('2 Column')),
|
||||||
1: os.path.join(TDIR, '')
|
('two_columns.html', gettext('3 Column')),
|
||||||
}
|
('about.html', gettext('DG.About')),
|
||||||
|
('contact.html', gettext('DG.Contact')),
|
||||||
|
('index.html', gettext('DG.Home')),
|
||||||
|
('letscowork.html', gettext('DG.CoWork')),
|
||||||
|
# ('detail.html', gettext('DG.Detail')),
|
||||||
|
('one_column.html', gettext('DG.OneColumn')),
|
||||||
|
#ungleich
|
||||||
|
('blog_ungleich.html', gettext('Blog')),
|
||||||
|
('page.html', gettext('Page')),
|
||||||
|
)
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
from .base import *
|
from .base import *
|
||||||
|
|
||||||
DEBUG = False
|
DEBUG = True
|
||||||
|
|
||||||
ADMINS = (
|
ADMINS = (
|
||||||
('Nico Schottelius', 'nico.schottelius@ungleich.ch'),
|
('Nico Schottelius', 'nico.schottelius@ungleich.ch'),
|
||||||
|
('Raul Ascencio', 'raul.ascencio@yandex.com'),
|
||||||
)
|
)
|
||||||
# ('Sanghee Kim', 'sanghee.kim@ungleich.ch'),
|
# ('Sanghee Kim', 'sanghee.kim@ungleich.ch'),
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@ urlpatterns = [
|
||||||
|
|
||||||
# note the django CMS URLs included via i18n_patterns
|
# note the django CMS URLs included via i18n_patterns
|
||||||
urlpatterns += i18n_patterns('',
|
urlpatterns += i18n_patterns('',
|
||||||
|
url(r'^$',include('ungleich.urls')),
|
||||||
|
url(r'^blog/',include('ungleich.urls',namespace='ungleich')),
|
||||||
url(r'^login/',include(membership_urls)),
|
url(r'^login/',include(membership_urls)),
|
||||||
url(r'^admin/', include(admin.site.urls)),
|
url(r'^admin/', include(admin.site.urls)),
|
||||||
url(r'^digitalglarus/', include('digitalglarus.urls',
|
url(r'^digitalglarus/', include('digitalglarus.urls',
|
||||||
|
|
|
@ -101,7 +101,6 @@ class CustomUser(AbstractBaseUser):
|
||||||
return self.email
|
return self.email
|
||||||
|
|
||||||
def has_perm(self, perm, obj=None):
|
def has_perm(self, perm, obj=None):
|
||||||
print(perm)
|
|
||||||
"Does the user have a specific permission?"
|
"Does the user have a specific permission?"
|
||||||
# Simplest possible answer: Yes, always
|
# Simplest possible answer: Yes, always
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from django.utils.translation import ugettext_lazy as _
|
# from django.utils.translation import ugettext_lazy as _
|
||||||
TEMPLATES = {
|
# TEMPLATES = {
|
||||||
'digitalglarus/about.html': _('DG.About'),
|
# 'digitalglarus/about.html': _('DG.About'),
|
||||||
'digitalglarus/contact.html': _('DG.Contact'),
|
# 'digitalglarus/contact.html': _('DG.Contact'),
|
||||||
'digitalglarus/index.html': _('DG.Home'),
|
# 'digitalglarus/index.html': _('DG.Home'),
|
||||||
'digitalglarus/letscowork.html': _('DG.CoWork'),
|
# 'digitalglarus/letscowork.html': _('DG.CoWork'),
|
||||||
'digitalglarus/one_column.html': _('DG.OneColumn'),
|
# 'digitalglarus/one_column.html': _('DG.OneColumn'),
|
||||||
'ungleichch/blog.html': _('Blog'),
|
# 'ungleichch/blog.html': _('Blog'),
|
||||||
'ungleichch/page.html': _('Page'),
|
# 'ungleichch/page.html': _('Page'),
|
||||||
}
|
# }
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
{% extends "glarus_blog/base.html" %}
|
|
||||||
{% load i18n thumbnail cms_tags %}
|
|
||||||
|
|
||||||
{% block meta_description %}{{ post.meta_description }}{% endblock meta_description %}
|
|
||||||
{% block meta_keywords %}{{ post.meta_keywords }}{% endblock meta_keywords %}
|
|
||||||
{% block canonical_url %}
|
|
||||||
<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
|
|
||||||
{% block title %}{{ post.get_title }}{% endblock %}
|
|
||||||
|
|
||||||
{% block content_blog %}{% spaceless %}
|
|
||||||
<article id="post-{{ post.slug }}" class="post-item post-detail">
|
|
||||||
{% if post.main_image_id %}
|
|
||||||
<div class="blog-visual">
|
|
||||||
{% thumbnail post.main_image post.full_image_options.size crop=post.full_image_options.crop upscale=post.full_image_options.upscale subject_location=post.main_image.subject_location as thumb %}
|
|
||||||
<img src="{{ post.main_image.url }}" alt="{{ post.main_image.default_alt_text }}"
|
|
||||||
class="img-responsive img-full"/>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<header class="text-center">
|
|
||||||
<hr></hr>
|
|
||||||
<h2 class="text-center intro-text">
|
|
||||||
<a href="{% url 'djangocms_blog:post-detail' post.slug %}" class="post-title center-block">
|
|
||||||
<b>{{ post.title }}</b>
|
|
||||||
</a>
|
|
||||||
<small>
|
|
||||||
{{ post.date_created }}
|
|
||||||
</small>
|
|
||||||
</h2>
|
|
||||||
<hr></hr>
|
|
||||||
{# {% block blog_meta %}#}
|
|
||||||
{# include "glarus_blog/includes/blog_meta.html"#}
|
|
||||||
{# {% endblock %}#}
|
|
||||||
</header>
|
|
||||||
{% endspaceless %}
|
|
||||||
<div class="digitalglarus-blog-content">{% render_placeholder post.content %}</div>
|
|
||||||
</article>
|
|
||||||
{% endblock content_blog %}
|
|
|
@ -1,35 +0,0 @@
|
||||||
{% extends "glarus_blog/base.html" %}
|
|
||||||
{% load i18n thumbnail %}{% spaceless %}
|
|
||||||
|
|
||||||
{% block canonical_url %}<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
|
|
||||||
|
|
||||||
{% block content_blog %}
|
|
||||||
<section class="blog-list">
|
|
||||||
{% block blog_title %}
|
|
||||||
<header>
|
|
||||||
</header>
|
|
||||||
{% endblock %}
|
|
||||||
{% for post in post_list %}
|
|
||||||
{% include "glarus_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
|
|
||||||
{% empty %}
|
|
||||||
<p class="blog-empty text-center lead">{% trans "No article found." %}</p>
|
|
||||||
{% endfor %}
|
|
||||||
{% if author or archive_date or tagged_entries %}
|
|
||||||
<p class="blog-back"><a href="{% url 'djangocms_blog:posts-latest' %}">{% trans "Back" %}</a></p>
|
|
||||||
{% endif %}
|
|
||||||
{% if is_paginated %}
|
|
||||||
<nav class="{% firstof css_grid instance.css_grid %} pagination">
|
|
||||||
{% if page_obj.has_previous %}
|
|
||||||
<a href="?{{ view.page_kwarg }}={{ page_obj.previous_page_number }}">« {% trans "previous" %}</a>
|
|
||||||
{% endif %}
|
|
||||||
<span class="current">
|
|
||||||
{% trans "Page" %} {{ page_obj.number }} {% trans "of" %} {{ paginator.num_pages }}
|
|
||||||
</span>
|
|
||||||
{% if page_obj.has_next %}
|
|
||||||
<a href="?{{ view.page_kwarg }}={{ page_obj.next_page_number }}">{% trans "next" %} »</a>
|
|
||||||
{% endif %}
|
|
||||||
</nav>
|
|
||||||
{% endif %}
|
|
||||||
</section>
|
|
||||||
{% endblock %}
|
|
||||||
{% endspaceless %}
|
|
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
TEMPLATES = {
|
# TEMPLATES = {
|
||||||
'blog.html': _('Blog'),
|
# 'blog_u.html': _('Blog'),
|
||||||
'page.html': _('Page'),
|
# 'page.html': _('Page'),
|
||||||
}
|
# }
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<!-- Page Header -->
|
<!-- Page Header -->
|
||||||
<!-- Set your background image for this header on the line below. -->
|
<!-- Set your background image for this header on the line below. -->
|
||||||
<header class="intro-header"
|
<header class="intro-header"
|
||||||
{% if request.current_page.ungleichpage %}
|
{% if request.current_page.pagemeta.image.url %}
|
||||||
style="background-image: url('{{ request.current_page.ungleichpage.image.url }}');"
|
style="background-image: url('{{ request.current_page.pagemeta.image.url }}');"
|
||||||
{% else %}
|
{% else %}
|
||||||
style="background-image: url('{% static 'blog.ungleich.ch/img/home-bg.jpg' %}');"
|
style="background-image: url('{% static 'blog.ungleich.ch/img/home-bg.jpg' %}');"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "ungleichch/base.html" %}
|
{% extends "base_ungleich.html" %}
|
||||||
{% block base_content %}
|
{% block base_content %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -1,3 +1,3 @@
|
||||||
{% extends "cms/ungleichch/base.html" %}
|
{% extends "base_ungleich.html" %}
|
||||||
{% block base_content %}
|
{% block base_content %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends "ungleichch/base.html" %}
|
{% extends "base_ungleich.html" %}
|
||||||
{% load cms_tags %}
|
{% load cms_tags %}
|
||||||
{% block base_content %}
|
{% block base_content %}
|
||||||
{% placeholder "page_content" %}
|
{% placeholder "page_content" %}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{% extends CMS_TEMPLATE %}
|
{% extends 'cms/ungleichch/blog_ungleich.html' %}
|
||||||
|
{#{% extends CMS_TEMPLATE %}#}
|
||||||
{% block meta %}
|
{% block meta %}
|
||||||
{% if meta %}
|
{% if meta %}
|
||||||
{% include "meta_mixin/meta.html" %}
|
{% include "meta_mixin/meta.html" %}
|
||||||
|
@ -8,4 +9,4 @@
|
||||||
<div class="app app-blog span8">
|
<div class="app app-blog span8">
|
||||||
{% block content_blog %}{% endblock %}
|
{% block content_blog %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
49
ungleich/templates/ungleich/djangocms_blog/post_detail.html
Normal file
49
ungleich/templates/ungleich/djangocms_blog/post_detail.html
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{% extends "ungleich/djangocms_blog/base.html" %}
|
||||||
|
{% load i18n thumbnail cms_tags %}
|
||||||
|
{% block meta_description %}{{ post.meta_description }}{% endblock meta_description %}
|
||||||
|
{% block meta_keywords %}{{ post.meta_keywords }}{% endblock meta_keywords %}
|
||||||
|
{% block canonical_url %}<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
|
||||||
|
{% block title %}{% page_attribute "page_title" %} - {{ post.get_title }}{% endblock %}
|
||||||
|
<!-- page header -->
|
||||||
|
{% block base_header %}
|
||||||
|
{% include "_header_post_detail.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
<!-- page header -->
|
||||||
|
{% block content_blog %}
|
||||||
|
<article>
|
||||||
|
{% if post.app_config.use_placeholder %}
|
||||||
|
<div class="blog-content">{% render_placeholder post.content %}</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="blog-content">{% render_model post "post_text" "post_text" %}</div>
|
||||||
|
{% endif %}
|
||||||
|
</article>
|
||||||
|
{% endblock content_blog %}
|
||||||
|
{#{% load i18n thumbnail cms_tags %}#}
|
||||||
|
{##}
|
||||||
|
{#{% block meta_description %}{{ post.meta_description }}{% endblock meta_description %}#}
|
||||||
|
{#{% block meta_keywords %}{{ post.meta_keywords }}{% endblock meta_keywords %}#}
|
||||||
|
{#{% block canonical_url %}<link rel="canonical" href="{{ meta.url }}"/>{% endblock canonical_url %}#}
|
||||||
|
{#{% block title %}{{ post.get_title }}{% endblock %}#}
|
||||||
|
{##}
|
||||||
|
{#{% block content_blog %}{% spaceless %}#}
|
||||||
|
{#<article id="post-{{ post.slug }}" class="post-item post-detail">#}
|
||||||
|
{# <header>#}
|
||||||
|
{# <h2>{% render_model post "title" %}</h2>#}
|
||||||
|
{# {% block blog_meta %}#}
|
||||||
|
{# {% include "djangocms_blog/includes/blog_meta.html" %}#}
|
||||||
|
{# {% endblock %}#}
|
||||||
|
{# </header>#}
|
||||||
|
{# {% if post.main_image_id %}#}
|
||||||
|
{# <div class="blog-visual">#}
|
||||||
|
{# {% thumbnail post.main_image post.full_image_options.size crop=post.full_image_options.crop upscale=post.full_image_options.upscale subject_location=post.main_image.subject_location as thumb %}#}
|
||||||
|
{# <img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />#}
|
||||||
|
{# </div>#}
|
||||||
|
{# {% endif %}#}
|
||||||
|
{# {% endspaceless %}#}
|
||||||
|
{# {% if post.app_config.use_placeholder %}#}
|
||||||
|
{# <div class="blog-content">{% render_placeholder post.content %}</div>#}
|
||||||
|
{# {% else %}#}
|
||||||
|
{# <div class="blog-content">{% render_model post "post_text" "post_text" %}</div>#}
|
||||||
|
{# {% endif %}#}
|
||||||
|
{#</article>#}
|
||||||
|
{#{% endblock content_blog %}#}
|
|
@ -0,0 +1,90 @@
|
||||||
|
{% extends "ungleich/djangocms_blog/base.html" %}
|
||||||
|
{% load i18n thumbnail %}{% spaceless %}
|
||||||
|
|
||||||
|
{% block canonical_url %}<link rel="canonical" href="{{ SITE.domain }}{{ view.get_view_url }}"/>{% endblock canonical_url %}
|
||||||
|
|
||||||
|
{% block content_blog %}
|
||||||
|
<section class="blog-list">
|
||||||
|
{% block blog_title %}
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
{% if author %}{% trans "Articles by" %} {{ author.get_full_name }}
|
||||||
|
{% elif archive_date %}{% trans "Archive" %} – {% if month %}{{ archive_date|date:'F' }} {% endif %}{{ year }}
|
||||||
|
{% elif tagged_entries %}{% trans "Tag" %} – {{ tagged_entries|capfirst }}
|
||||||
|
{% elif category %}{% trans "Category" %} – {{ category }}{% endif %}
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
{% for post in post_list %}
|
||||||
|
{% include "ungleich/djangocms_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}
|
||||||
|
{% empty %}
|
||||||
|
<p class="blog-empty">{% trans "No article found." %}</p>
|
||||||
|
{% endfor %}
|
||||||
|
{% if author or archive_date or tagged_entries %}
|
||||||
|
<p class="blog-back"><a href="{% url 'djangocms_blog:posts-latest' %}">{% trans "Back" %}</a></p>
|
||||||
|
{% endif %}
|
||||||
|
{% if is_paginated %}
|
||||||
|
<!-- Pager -->
|
||||||
|
<ul class="pager">
|
||||||
|
{% if page_obj.has_previous %}
|
||||||
|
<li class="previous">
|
||||||
|
<a href="?{{ view.page_kwarg }}={{ page_obj.previous_page_number }}">
|
||||||
|
« {% trans "Newer Posts" %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if page_obj.has_next %}
|
||||||
|
<li class="next">
|
||||||
|
<a href="?{{ view.page_kwarg }}={{ page_obj.next_page_number }}">
|
||||||
|
{% trans "Older Posts" %} →
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</section>
|
||||||
|
{% endblock %}
|
||||||
|
{% endspaceless %}
|
||||||
|
|
||||||
|
|
||||||
|
{#{% load i18n thumbnail %}{% spaceless %}#}
|
||||||
|
{##}
|
||||||
|
{#{% block canonical_url %}<link rel="canonical" href="{{ view.get_view_url }}"/>{% endblock canonical_url %}#}
|
||||||
|
{##}
|
||||||
|
{#{% block content_blog %}#}
|
||||||
|
{#<section class="blog-list">#}
|
||||||
|
{# {% block blog_title %}#}
|
||||||
|
{# <header>#}
|
||||||
|
{# <h2>#}
|
||||||
|
{# {% if author %}{% trans "Articles by" %} {{ author.get_full_name }}#}
|
||||||
|
{# {% elif archive_date %}{% trans "Archive" %} – {% if month %}{{ archive_date|date:'F' }} {% endif %}{{ year }}#}
|
||||||
|
{# {% elif tagged_entries %}{% trans "Tag" %} – {{ tagged_entries|capfirst }}#}
|
||||||
|
{# {% elif category %}{% trans "Category" %} – {{ category }}{% endif %}#}
|
||||||
|
{# </h2>#}
|
||||||
|
{# </header>#}
|
||||||
|
{# {% endblock %}#}
|
||||||
|
{# {% for post in post_list %}#}
|
||||||
|
{# {% include "djangocms_blog/includes/blog_item.html" with post=post image="true" TRUNCWORDS_COUNT=TRUNCWORDS_COUNT %}#}
|
||||||
|
{# {% empty %}#}
|
||||||
|
{# <p class="blog-empty">{% trans "No article found." %}</p>#}
|
||||||
|
{# {% endfor %}#}
|
||||||
|
{# {% if author or archive_date or tagged_entries %}#}
|
||||||
|
{# <p class="blog-back"><a href="{% url 'djangocms_blog:posts-latest' %}">{% trans "Back" %}</a></p>#}
|
||||||
|
{# {% endif %}#}
|
||||||
|
{# {% if is_paginated %}#}
|
||||||
|
{# <nav class="{% firstof css_grid instance.css_grid %} pagination">#}
|
||||||
|
{# {% if page_obj.has_previous %}#}
|
||||||
|
{# <a href="?{{ view.page_kwarg }}={{ page_obj.previous_page_number }}">« {% trans "previous" %}</a>#}
|
||||||
|
{# {% endif %}#}
|
||||||
|
{# <span class="current">#}
|
||||||
|
{# {% trans "Page" %} {{ page_obj.number }} {% trans "of" %} {{ paginator.num_pages }}#}
|
||||||
|
{# </span>#}
|
||||||
|
{# {% if page_obj.has_next %}#}
|
||||||
|
{# <a href="?{{ view.page_kwarg }}={{ page_obj.next_page_number }}">{% trans "next" %} »</a>#}
|
||||||
|
{# {% endif %}#}
|
||||||
|
{# </nav>#}
|
||||||
|
{# {% endif %}#}
|
||||||
|
{#</section>#}
|
||||||
|
{#{% endblock %}#}
|
||||||
|
{#{% endspaceless %}#}
|
8
ungleich/urls.py
Normal file
8
ungleich/urls.py
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
from django.conf.urls import url
|
||||||
|
from . import views
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$',views.PostListViewUngleich.as_view()),
|
||||||
|
# url(r'^$',views.PostListView.as_view()),
|
||||||
|
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$',views.details)
|
||||||
|
]
|
|
@ -1,3 +1,47 @@
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
|
from django.utils.translation import get_language
|
||||||
|
from djangocms_blog.models import Post
|
||||||
|
from django.views.generic import ListView
|
||||||
|
from djangocms_blog.views import PostListView,BaseBlogView
|
||||||
|
from django.core.paginator import Paginator
|
||||||
|
from django.core.paginator import PageNotAnInteger
|
||||||
|
from django.core.paginator import EmptyPage
|
||||||
|
from djangocms_blog.settings import get_setting
|
||||||
|
|
||||||
# Create your views here.
|
|
||||||
|
def blog(request):
|
||||||
|
posts = Post.objects.all()
|
||||||
|
print(posts)
|
||||||
|
context = {
|
||||||
|
'post_list': posts
|
||||||
|
}
|
||||||
|
|
||||||
|
# PostListView.base_template_name='post_list.html'
|
||||||
|
return render(request, 'ungleich/djangocms_blog/post_list_ungleich.html', context=context)
|
||||||
|
|
||||||
|
|
||||||
|
class PostListViewUngleich(PostListView):
|
||||||
|
model = Post
|
||||||
|
context_object_name = 'post_list'
|
||||||
|
base_template_name = 'post_list_ungleich.html'
|
||||||
|
paginate_by = 5
|
||||||
|
|
||||||
|
def get_context_data(self, **kwargs):
|
||||||
|
context = super(PostListView, self).get_context_data(**kwargs)
|
||||||
|
context['TRUNCWORDS_COUNT'] = get_setting('POSTS_LIST_TRUNCWORDS_COUNT')
|
||||||
|
return context
|
||||||
|
|
||||||
|
def get_paginate_by(self, queryset):
|
||||||
|
return get_setting('PAGINATION')
|
||||||
|
|
||||||
|
def get_queryset(self):
|
||||||
|
language = get_language()
|
||||||
|
queryset = self.model.objects.translated(language)
|
||||||
|
setattr(self.request, get_setting('CURRENT_NAMESPACE'), self.config)
|
||||||
|
return queryset
|
||||||
|
|
||||||
|
|
||||||
|
def details(request, year, month, day, slug):
|
||||||
|
post = Post.objects.translated(get_language(), slug=slug).first()
|
||||||
|
context = {'post': post}
|
||||||
|
return render(request, 'ungleich/djangocms_blog/post_detail.html', context=context)
|
||||||
|
|
Loading…
Reference in a new issue