Merge branch 'feature/django-cms-setup' into develop
This commit is contained in:
commit
ca21514136
42 changed files with 1857 additions and 30 deletions
16
.gitignore
vendored
16
.gitignore
vendored
|
@ -1 +1,17 @@
|
|||
db.sqlite3
|
||||
*.pyc
|
||||
build/
|
||||
dist/
|
||||
*.egg_info
|
||||
#editors && utilites.
|
||||
*.swp
|
||||
*~
|
||||
__pycache__/
|
||||
.ropeproject/
|
||||
#django
|
||||
local_settings.py
|
||||
|
||||
media/*
|
||||
!media/keep
|
||||
|
||||
CACHE/
|
||||
|
|
20
digital_glarus/migrations/0002_auto_20150522_0450.py
Normal file
20
digital_glarus/migrations/0002_auto_20150522_0450.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('digital_glarus', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='message',
|
||||
name='email',
|
||||
field=models.EmailField(max_length=75),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
0
dynamicweb/local/__init__.py
Normal file
0
dynamicweb/local/__init__.py
Normal file
13
dynamicweb/local/local_settings.py.example
Normal file
13
dynamicweb/local/local_settings.py.example
Normal file
|
@ -0,0 +1,13 @@
|
|||
# from dynamicweb.settings import SITE_ROOT
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'NAME': 'db_name',
|
||||
'USER': 'username',
|
||||
'PASSWORD': 'password',
|
||||
}
|
||||
}
|
|
@ -1,24 +1,27 @@
|
|||
"""
|
||||
Django settings for dynamicweb project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 1.8.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/1.8/topics/settings/
|
||||
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/1.8/ref/settings/
|
||||
Copyright 2015 Ungleich.
|
||||
"""
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
import os
|
||||
import logging
|
||||
import django.db.backends.postgresql_psycopg2
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
gettext = lambda s: s
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
|
||||
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
APP_ROOT_ENDPOINT = "/"
|
||||
|
||||
LOGIN_URL = None
|
||||
LOGOUT_URL = None
|
||||
LOGIN_REDIRECT_URL = None
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'xlhyv_l5-z6e8_@q6)n0up1a0$5-aad7d)om2t8g$bi6*@q44i'
|
||||
|
@ -34,13 +37,52 @@ ALLOWED_HOSTS = [
|
|||
# Application definition
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'djangocms_admin_style',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'digital_glarus'
|
||||
'django.contrib.sites',
|
||||
'cms', # django CMS itself
|
||||
'digital_glarus',
|
||||
'treebeard', # utilities for implementing a tree
|
||||
'menus', # helper for model independent hierarchical website navigation
|
||||
'sekizai', # for javascript and css management
|
||||
#django-cms plugins
|
||||
'djangocms_flash',
|
||||
'djangocms_googlemap',
|
||||
'djangocms_inherit',
|
||||
'djangocms_link',
|
||||
'djangocms_snippet',
|
||||
'djangocms_teaser',
|
||||
#django-filer
|
||||
'cmsplugin_filer_file',
|
||||
'cmsplugin_filer_folder',
|
||||
'cmsplugin_filer_link',
|
||||
'cmsplugin_filer_teaser',
|
||||
'cmsplugin_filer_video',
|
||||
# versioning
|
||||
'reversion',
|
||||
#ck-editor
|
||||
'djangocms_text_ckeditor',
|
||||
# djangocms-blog
|
||||
'filer',
|
||||
'easy_thumbnails',
|
||||
'cmsplugin_filer_image',
|
||||
'parler',
|
||||
'taggit',
|
||||
'taggit_autosuggest',
|
||||
'django_select2',
|
||||
'meta',
|
||||
'meta_mixin',
|
||||
'admin_enhancer',
|
||||
'djangocms_blog',
|
||||
'bootstrap3',
|
||||
'compressor',
|
||||
# ungleich
|
||||
'ungleich',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
|
@ -51,7 +93,13 @@ MIDDLEWARE_CLASSES = (
|
|||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
# django-cms middlewares
|
||||
'cms.middleware.user.CurrentUserMiddleware',
|
||||
'cms.middleware.page.CurrentPageMiddleware',
|
||||
'cms.middleware.toolbar.ToolbarMiddleware',
|
||||
'cms.middleware.language.LanguageCookieMiddleware',
|
||||
# /djangocms-middlewares
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'dynamicweb.urls'
|
||||
|
@ -74,6 +122,31 @@ TEMPLATES = [
|
|||
|
||||
WSGI_APPLICATION = 'dynamicweb.wsgi.application'
|
||||
|
||||
# Deprecated since version 1.8.
|
||||
# callables take a request object as their argument and return a dictionary of
|
||||
# items to be merged into the context.
|
||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
"django.contrib.auth.context_processors.auth",
|
||||
"django.core.context_processors.debug",
|
||||
"django.core.context_processors.i18n",
|
||||
"django.core.context_processors.media",
|
||||
"django.core.context_processors.static",
|
||||
"django.core.context_processors.tz",
|
||||
"django.contrib.messages.context_processors.messages",
|
||||
"django.core.context_processors.request",
|
||||
'sekizai.context_processors.sekizai',
|
||||
'cms.context_processors.cms_settings',
|
||||
)
|
||||
|
||||
TEMPLATE_DIRS = (
|
||||
os.path.join(BASE_DIR, 'templates'),
|
||||
)
|
||||
|
||||
CMS_TEMPLATES_DIR = {
|
||||
1: os.path.join(TEMPLATE_DIRS[0], 'cms/ungleich.ch/'),
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
|
||||
|
@ -86,9 +159,7 @@ DATABASES = {
|
|||
}
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/1.8/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
# https://docs.djangoproject.com/en/1.7/topics/i18n/
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
|
@ -98,15 +169,138 @@ USE_L10N = True
|
|||
|
||||
USE_TZ = True
|
||||
|
||||
LANGUAGES = (
|
||||
('en-us', _('US English')),
|
||||
)
|
||||
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
CMS_PLACEHOLDER_CONF = {
|
||||
'logo_image': {
|
||||
'name': 'Logo Image',
|
||||
'plugins': ['FilerImagePlugin'],
|
||||
'limits': {
|
||||
'global': 1,
|
||||
}
|
||||
},
|
||||
'page-title': {
|
||||
'name': 'Page Title',
|
||||
'plugins': ['TextPlugin'],
|
||||
'default_plugins': [
|
||||
{
|
||||
'plugin_type': 'TextPlugin',
|
||||
'values': {
|
||||
'body': 'Page Title...'
|
||||
}
|
||||
}
|
||||
],
|
||||
'limits': {
|
||||
'global': 1,
|
||||
}
|
||||
},
|
||||
'page-subtitle': {
|
||||
'name': 'Page Subtitle',
|
||||
'inherit': 'page-title',
|
||||
'default_plugins': [
|
||||
{
|
||||
'plugin_type': 'TextPlugin',
|
||||
'values': {
|
||||
'body': 'Page subtitle...'
|
||||
}
|
||||
}
|
||||
],
|
||||
},
|
||||
'footer_copyright': {
|
||||
'name': 'Copyright',
|
||||
'inherit': 'page-title',
|
||||
'default_plugins': [
|
||||
{
|
||||
'plugin_type': 'TextPlugin',
|
||||
'values': {
|
||||
'body': 'Copyright...'
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try:
|
||||
from dynamicweb.local.local_settings import *
|
||||
except ImportError:
|
||||
logging.warning("No local_settings file found.")
|
||||
|
||||
if not APP_ROOT_ENDPOINT.endswith('/'):
|
||||
APP_ROOT += '/'
|
||||
if LOGIN_URL is None:
|
||||
LOGIN_URL = APP_ROOT_ENDPOINT + 'accounts/login/'
|
||||
if LOGOUT_URL is None:
|
||||
LOGOUT_URL = APP_ROOT_ENDPOINT + 'accounts/logout/'
|
||||
if LOGIN_REDIRECT_URL is None:
|
||||
LOGIN_REDIRECT_URL = APP_ROOT_ENDPOINT
|
||||
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/1.8/howto/static-files/
|
||||
# https://docs.djangoproject.com/en/1.7/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||
|
||||
try:
|
||||
from .settings_local import *
|
||||
except ImportError as e:
|
||||
pass
|
||||
# Media files.
|
||||
MEDIA_ROOT = os.path.abspath(os.path.join(BASE_DIR, '..', 'media'))
|
||||
MEDIA_URL = APP_ROOT_ENDPOINT + 'media/'
|
||||
|
||||
# Templates confs
|
||||
TEMPLATE_DIRS = (
|
||||
os.path.join(BASE_DIR, "templates"),
|
||||
)
|
||||
|
||||
META_SITE_PROTOCOL = 'http'
|
||||
META_USE_SITES = True
|
||||
|
||||
MIGRATION_MODULES = {
|
||||
'cms': 'cms.migrations',
|
||||
'filer': 'filer.migrations_django',
|
||||
'menus': 'menus.migrations_django',
|
||||
'djangocms_flash': 'djangocms_flash.migrations_django',
|
||||
'djangocms_googlemap': 'djangocms_googlemap.migrations_django',
|
||||
'djangocms_inherit': 'djangocms_inherit.migrations_django',
|
||||
'djangocms_link': 'djangocms_link.migrations_django',
|
||||
'djangocms_snippet': 'djangocms_snippet.migrations_django',
|
||||
'djangocms_teaser': 'djangocms_teaser.migrations_django',
|
||||
'djangocms_column': 'djangocms_column.migrations_django',
|
||||
'djangocms_flash': 'djangocms_flash.migrations_django',
|
||||
'djangocms_googlemap': 'djangocms_googlemap.migrations_django',
|
||||
'djangocms_inherit': 'djangocms_inherit.migrations_django',
|
||||
'djangocms_style': 'djangocms_style.migrations_django',
|
||||
'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django',
|
||||
'cmsplugin_filer_file': 'cmsplugin_filer_file.migrations_django',
|
||||
'cmsplugin_filer_folder': 'cmsplugin_filer_folder.migrations_django',
|
||||
'cmsplugin_filer_link': 'cmsplugin_filer_link.migrations_django',
|
||||
'cmsplugin_filer_teaser': 'cmsplugin_filer_teaser.migrations_django',
|
||||
'cmsplugin_filer_utils': 'cmsplugin_filer_utils.migrations_django',
|
||||
'cmsplugin_filer_video': 'cmsplugin_filer_video.migrations_django',
|
||||
'djangocms_text_ckeditor': 'djangocms_text_ckeditor.migrations_django',
|
||||
}
|
||||
|
||||
STATICFILES_FINDERS = (
|
||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||
'compressor.finders.CompressorFinder',
|
||||
)
|
||||
|
||||
COMPRESS_PRECOMPILERS = (
|
||||
('text/less', 'lesscpy {infile}'),
|
||||
)
|
||||
|
||||
THUMBNAIL_PROCESSORS = (
|
||||
'easy_thumbnails.processors.colorspace',
|
||||
'easy_thumbnails.processors.autocrop',
|
||||
'filer.thumbnail_processors.scale_and_crop_with_subject_location',
|
||||
'easy_thumbnails.processors.filters',
|
||||
)
|
||||
|
||||
# django-cms-text-ckeditor
|
||||
TEXT_SAVE_IMAGE_FUNCTION='cmsplugin_filer_image.integrations.ckeditor.create_image_plugin'
|
||||
|
|
|
@ -1,11 +1,21 @@
|
|||
from django.conf.urls import include, url
|
||||
from django.conf.urls import patterns, include, url
|
||||
from django.contrib import admin
|
||||
# deprecated in version 1.8
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
from django.conf.urls.static import static
|
||||
from dynamicweb import settings
|
||||
|
||||
urlpatterns = [
|
||||
# Examples:
|
||||
# url(r'^$', 'dynamicweb.views.home', name='home'),
|
||||
# url(r'^blog/', include('blog.urls')),
|
||||
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^digital.glarus/', include('digital_glarus.urls', namespace="digital_glarus")),
|
||||
]
|
||||
url(r'^digital.glarus/', include('digital_glarus.urls',
|
||||
namespace="digital_glarus")),
|
||||
url(r'^', include('cms.urls')),
|
||||
url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
if settings.DEBUG:
|
||||
urlpatterns += patterns('',
|
||||
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
|
||||
'document_root': settings.MEDIA_ROOT,
|
||||
}),
|
||||
)
|
||||
|
|
0
foo.txt
Normal file
0
foo.txt
Normal file
0
media/keep
Normal file
0
media/keep
Normal file
|
@ -1,2 +1,44 @@
|
|||
# lib
|
||||
psycopg2>=2.6
|
||||
django>=1.7
|
||||
Pillow>=2
|
||||
html5lib==0.999
|
||||
six==1.3.0 #compat
|
||||
|
||||
# django
|
||||
django==1.7.8
|
||||
|
||||
#django-assets
|
||||
django-bootstrap3
|
||||
lesscpy
|
||||
django_compressor
|
||||
|
||||
# django apps
|
||||
django-treebeard==3.0
|
||||
django-sekizai==0.7
|
||||
django-classy-tags==0.5
|
||||
django-filer==0.9.9
|
||||
django-reversion
|
||||
|
||||
# django-cms
|
||||
django-cms
|
||||
|
||||
# django-cms-plugins
|
||||
djangocms-admin-style==0.2.5
|
||||
djangocms-text-ckeditor>=2.4
|
||||
-e git+git@github.com:applegrew/django-select2.git#egg=django-select2-py3
|
||||
djangocms-blog>=0.4.0
|
||||
|
||||
djangocms-flash
|
||||
djangocms-googlemap
|
||||
djangocms-inherit
|
||||
djangocms-teaser
|
||||
|
||||
djangocms-link
|
||||
djangocms-snippet
|
||||
djangocms-style
|
||||
djangocms-column
|
||||
djangocms-grid
|
||||
djangocms-oembed
|
||||
djangocms-table
|
||||
|
||||
cmsplugin-filer==0.10.1
|
||||
|
|
78
stable_requirements.txt
Normal file
78
stable_requirements.txt
Normal file
|
@ -0,0 +1,78 @@
|
|||
# lib
|
||||
psycopg2==2.6
|
||||
Pillow==2.8.1
|
||||
html5lib==0.999
|
||||
six==1.3.0
|
||||
|
||||
# django
|
||||
django==1.7.8
|
||||
|
||||
#django-assets
|
||||
django-bootstrap3==5.4.0
|
||||
lesscpy==0.10.2
|
||||
django-compressor==1.5
|
||||
|
||||
# django apps
|
||||
django-treebeard==3.0
|
||||
django-sekizai==0.7
|
||||
django-classy-tags==0.5
|
||||
django-filer==0.9.9
|
||||
django-reversion==1.8.7
|
||||
|
||||
# django-cms
|
||||
django-cms==3.1.0
|
||||
|
||||
# django-cms-plugins
|
||||
djangocms-admin-style==0.2.5
|
||||
djangocms-text-ckeditor==2.4.3
|
||||
djangocms-blog==0.4.0
|
||||
|
||||
djangocms-flash==0.2.0
|
||||
djangocms-googlemap==0.2
|
||||
djangocms-inherit==0.1
|
||||
djangocms-teaser==0.1
|
||||
|
||||
djangocms-link==1.6.1
|
||||
djangocms-snippet==1.5
|
||||
djangocms-style==1.5
|
||||
djangocms-column==1.5
|
||||
djangocms-grid==1.2
|
||||
djangocms-oembed==0.5
|
||||
djangocms-table==1.2
|
||||
|
||||
cmsplugin-filer==0.10.1
|
||||
## The following requirements were added by pip freeze:
|
||||
aldryn-blog==0.4.6
|
||||
aldryn-boilerplates==0.7
|
||||
aldryn-common==0.1.3
|
||||
aldryn-search==0.2.7
|
||||
cssselect==0.9.1
|
||||
Django==1.7.8
|
||||
django-admin-enhancer==1.0.0
|
||||
django-appconf==1.0.1
|
||||
django-appdata==0.1.4
|
||||
django-haystack==2.3.1
|
||||
django-hvad==1.2.1
|
||||
django-meta==0.2.1
|
||||
django-meta-mixin==0.1.1
|
||||
django-mptt==0.6.1
|
||||
django-parler==1.4
|
||||
django-polymorphic==0.7.1
|
||||
-e git+git@github.com:applegrew/django-select2.git@7850d52b648eaa6748f1640edbc9897114e4b3ac#egg=Django_Select2-master
|
||||
django-sortedm2m==0.10.0
|
||||
django-spurl==0.6
|
||||
django-standard-form==1.1.1
|
||||
django-taggit==0.14.0
|
||||
django-taggit-autosuggest==0.2.7
|
||||
django-taggit-templatetags==0.2.5
|
||||
django-templatetag-sugar==1.0
|
||||
easy-thumbnails==2.2
|
||||
lxml==3.4.4
|
||||
micawber==0.3.2
|
||||
ply==3.6
|
||||
pyquery==1.2.9
|
||||
pytz==2015.4
|
||||
South==1.0.2
|
||||
Unidecode==0.4.17
|
||||
URLObject==2.4.0
|
||||
YURL==0.13
|
399
static/blog.ungleich.ch/css/clean-blog.css
Executable file
399
static/blog.ungleich.ch/css/clean-blog.css
Executable file
|
@ -0,0 +1,399 @@
|
|||
/*!
|
||||
* Clean Blog v1.0.0 (http://startbootstrap.com)
|
||||
* Copyright 2014 Start Bootstrap
|
||||
* Licensed under Apache 2.0 (https://github.com/IronSummitMedia/startbootstrap/blob/gh-pages/LICENSE)
|
||||
*/
|
||||
|
||||
body {
|
||||
font-family: 'Lora', 'Times New Roman', serif;
|
||||
font-size: 20px;
|
||||
color: #404040;
|
||||
}
|
||||
p {
|
||||
line-height: 1.5;
|
||||
margin: 30px 0;
|
||||
}
|
||||
p a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-weight: 800;
|
||||
}
|
||||
a {
|
||||
color: #404040;
|
||||
}
|
||||
a:hover,
|
||||
a:focus {
|
||||
color: #0085a1;
|
||||
}
|
||||
a img:hover,
|
||||
a img:focus {
|
||||
cursor: zoom-in;
|
||||
}
|
||||
blockquote {
|
||||
color: #808080;
|
||||
font-style: italic;
|
||||
}
|
||||
hr.small {
|
||||
max-width: 100px;
|
||||
margin: 15px auto;
|
||||
border-width: 4px;
|
||||
border-color: white;
|
||||
}
|
||||
.navbar-custom {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 3;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.navbar-custom .navbar-brand {
|
||||
font-weight: 800;
|
||||
}
|
||||
.navbar-custom .nav li a {
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
.navbar-custom {
|
||||
background: transparent;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
.navbar-custom .navbar-brand {
|
||||
color: white;
|
||||
padding: 20px;
|
||||
}
|
||||
.navbar-custom .navbar-brand:hover,
|
||||
.navbar-custom .navbar-brand:focus {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
.navbar-custom .nav li a {
|
||||
color: white;
|
||||
padding: 20px;
|
||||
}
|
||||
.navbar-custom .nav li a:hover,
|
||||
.navbar-custom .nav li a:focus {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1170px) {
|
||||
.navbar-custom {
|
||||
-webkit-transition: background-color 0.3s;
|
||||
-moz-transition: background-color 0.3s;
|
||||
transition: background-color 0.3s;
|
||||
/* Force Hardware Acceleration in WebKit */
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
.navbar-custom.is-fixed {
|
||||
/* when the user scrolls down, we hide the header right above the viewport */
|
||||
position: fixed;
|
||||
top: -61px;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
-webkit-transition: -webkit-transform 0.3s;
|
||||
-moz-transition: -moz-transform 0.3s;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
.navbar-custom.is-fixed .navbar-brand {
|
||||
color: #404040;
|
||||
}
|
||||
.navbar-custom.is-fixed .navbar-brand:hover,
|
||||
.navbar-custom.is-fixed .navbar-brand:focus {
|
||||
color: #0085a1;
|
||||
}
|
||||
.navbar-custom.is-fixed .nav li a {
|
||||
color: #404040;
|
||||
}
|
||||
.navbar-custom.is-fixed .nav li a:hover,
|
||||
.navbar-custom.is-fixed .nav li a:focus {
|
||||
color: #0085a1;
|
||||
}
|
||||
.navbar-custom.is-visible {
|
||||
/* if the user changes the scrolling direction, we show the header */
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-moz-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
-o-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
}
|
||||
.intro-header {
|
||||
background-color: #808080;
|
||||
background: no-repeat center center;
|
||||
background-attachment: scroll;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
background-size: cover;
|
||||
-o-background-size: cover;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.intro-header .site-heading,
|
||||
.intro-header .post-heading,
|
||||
.intro-header .page-heading {
|
||||
padding: 100px 0 50px;
|
||||
color: white;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
.intro-header .site-heading,
|
||||
.intro-header .post-heading,
|
||||
.intro-header .page-heading {
|
||||
padding: 150px 0;
|
||||
}
|
||||
}
|
||||
.intro-header .site-heading,
|
||||
.intro-header .page-heading {
|
||||
text-align: center;
|
||||
}
|
||||
.intro-header .site-heading h1,
|
||||
.intro-header .page-heading h1 {
|
||||
margin-top: 0;
|
||||
font-size: 50px;
|
||||
}
|
||||
.intro-header .site-heading .subheading,
|
||||
.intro-header .page-heading .subheading {
|
||||
font-size: 24px;
|
||||
line-height: 1.1;
|
||||
display: block;
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-weight: 300;
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
.intro-header .site-heading h1,
|
||||
.intro-header .page-heading h1 {
|
||||
font-size: 80px;
|
||||
}
|
||||
}
|
||||
.intro-header .post-heading h1 {
|
||||
font-size: 35px;
|
||||
}
|
||||
.intro-header .post-heading .subheading,
|
||||
.intro-header .post-heading .meta {
|
||||
line-height: 1.1;
|
||||
display: block;
|
||||
}
|
||||
.intro-header .post-heading .subheading {
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size: 24px;
|
||||
margin: 10px 0 30px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.intro-header .post-heading .meta {
|
||||
font-family: 'Lora', 'Times New Roman', serif;
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
font-size: 20px;
|
||||
}
|
||||
.intro-header .post-heading .meta a {
|
||||
color: white;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
.intro-header .post-heading h1 {
|
||||
font-size: 55px;
|
||||
}
|
||||
.intro-header .post-heading .subheading {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
.post-preview > a {
|
||||
color: #404040;
|
||||
}
|
||||
.post-preview > a:hover,
|
||||
.post-preview > a:focus {
|
||||
text-decoration: none;
|
||||
color: #0085a1;
|
||||
}
|
||||
.post-preview > a > .post-title {
|
||||
font-size: 30px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.post-preview > a > .post-subtitle {
|
||||
margin: 0;
|
||||
font-weight: 300;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.post-preview > .post-meta {
|
||||
color: #808080;
|
||||
font-size: 18px;
|
||||
font-style: italic;
|
||||
margin-top: 0;
|
||||
}
|
||||
.post-preview > .post-meta > a {
|
||||
text-decoration: none;
|
||||
color: #404040;
|
||||
}
|
||||
.post-preview > .post-meta > a:hover,
|
||||
.post-preview > .post-meta > a:focus {
|
||||
color: #0085a1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
.post-preview > a > .post-title {
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
.section-heading {
|
||||
font-size: 36px;
|
||||
margin-top: 60px;
|
||||
font-weight: 700;
|
||||
}
|
||||
.caption {
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
padding: 10px;
|
||||
font-style: italic;
|
||||
margin: 0;
|
||||
display: block;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
footer {
|
||||
padding: 50px 0 65px;
|
||||
}
|
||||
footer .list-inline {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
footer .copyright {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.floating-label-form-group {
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0.5em;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
}
|
||||
.floating-label-form-group input,
|
||||
.floating-label-form-group textarea {
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-size: 1.5em;
|
||||
background: none;
|
||||
box-shadow: none !important;
|
||||
resize: none;
|
||||
}
|
||||
.floating-label-form-group label {
|
||||
display: block;
|
||||
z-index: 0;
|
||||
position: relative;
|
||||
top: 2em;
|
||||
margin: 0;
|
||||
font-size: 0.85em;
|
||||
line-height: 1.764705882em;
|
||||
vertical-align: middle;
|
||||
vertical-align: baseline;
|
||||
opacity: 0;
|
||||
-webkit-transition: top 0.3s ease,opacity 0.3s ease;
|
||||
-moz-transition: top 0.3s ease,opacity 0.3s ease;
|
||||
-ms-transition: top 0.3s ease,opacity 0.3s ease;
|
||||
transition: top 0.3s ease,opacity 0.3s ease;
|
||||
}
|
||||
.floating-label-form-group::not(:first-child) {
|
||||
padding-left: 14px;
|
||||
border-left: 1px solid #eeeeee;
|
||||
}
|
||||
.floating-label-form-group-with-value label {
|
||||
top: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
.floating-label-form-group-with-focus label {
|
||||
color: #0085a1;
|
||||
}
|
||||
form .row:first-child .floating-label-form-group {
|
||||
border-top: 1px solid #eeeeee;
|
||||
}
|
||||
.btn {
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1px;
|
||||
border-radius: 0;
|
||||
padding: 15px 25px;
|
||||
}
|
||||
.btn-lg {
|
||||
font-size: 16px;
|
||||
padding: 25px 35px;
|
||||
}
|
||||
.btn-default:hover,
|
||||
.btn-default:focus {
|
||||
background-color: #0085a1;
|
||||
border: 1px solid #0085a1;
|
||||
color: white;
|
||||
}
|
||||
.pager {
|
||||
margin: 20px 0 0;
|
||||
}
|
||||
.pager li > a,
|
||||
.pager li > span {
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1px;
|
||||
padding: 15px 25px;
|
||||
background-color: white;
|
||||
border-radius: 0;
|
||||
}
|
||||
.pager li > a:hover,
|
||||
.pager li > a:focus {
|
||||
color: white;
|
||||
background-color: #0085a1;
|
||||
border: 1px solid #0085a1;
|
||||
}
|
||||
.pager .disabled > a,
|
||||
.pager .disabled > a:hover,
|
||||
.pager .disabled > a:focus,
|
||||
.pager .disabled > span {
|
||||
color: #808080;
|
||||
background-color: #404040;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
::-moz-selection {
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
background: #0085a1;
|
||||
}
|
||||
::selection {
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
background: #0085a1;
|
||||
}
|
||||
img::selection {
|
||||
color: white;
|
||||
background: transparent;
|
||||
}
|
||||
img::-moz-selection {
|
||||
color: white;
|
||||
background: transparent;
|
||||
}
|
||||
body {
|
||||
webkit-tap-highlight-color: #0085a1;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
BIN
static/blog.ungleich.ch/img/home-bg.jpg
Normal file
BIN
static/blog.ungleich.ch/img/home-bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 169 KiB |
70
static/blog.ungleich.ch/img/logo_white.svg
Normal file
70
static/blog.ungleich.ch/img/logo_white.svg
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="130px" height="40px" viewBox="0 0 130 40" enable-background="new 0 0 130 40" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M41.207,31.459c0-0.431,0.15-0.846,0.453-1.25c0.301-0.406,0.733-0.771,1.293-1.094v-0.09
|
||||
c-0.294-0.16-0.552-0.388-0.774-0.675c-0.22-0.287-0.331-0.66-0.331-1.116c0-0.354,0.115-0.711,0.345-1.074
|
||||
c0.227-0.36,0.55-0.681,0.963-0.96v-0.088c-0.386-0.281-0.709-0.655-0.975-1.121c-0.263-0.462-0.396-1.019-0.396-1.666
|
||||
c0-0.605,0.117-1.148,0.352-1.627c0.237-0.48,0.554-0.887,0.954-1.228c0.397-0.34,0.857-0.597,1.382-0.775
|
||||
c0.521-0.177,1.079-0.265,1.667-0.265c0.605,0,1.151,0.088,1.637,0.265h4.444v1.659h-2.698c0.222,0.235,0.42,0.528,0.596,0.874
|
||||
c0.178,0.348,0.267,0.734,0.267,1.161c0,0.592-0.11,1.115-0.332,1.571c-0.221,0.457-0.524,0.844-0.907,1.16
|
||||
c-0.384,0.319-0.833,0.56-1.349,0.717c-0.515,0.162-1.069,0.245-1.659,0.245c-0.263,0-0.548-0.027-0.853-0.088
|
||||
c-0.301-0.057-0.599-0.148-0.895-0.266c-0.502,0.326-0.751,0.701-0.751,1.128c0,0.396,0.184,0.686,0.552,0.861
|
||||
c0.368,0.18,0.899,0.265,1.591,0.265h2.299c1.418,0,2.465,0.205,3.153,0.608c0.685,0.405,1.027,1.075,1.027,2.001
|
||||
c0,0.517-0.145,1.001-0.432,1.46c-0.288,0.457-0.697,0.857-1.229,1.204c-0.529,0.346-1.172,0.621-1.924,0.817
|
||||
c-0.751,0.201-1.591,0.302-2.522,0.302c-1.533,0-2.742-0.249-3.625-0.744C41.65,33.143,41.207,32.416,41.207,31.459z
|
||||
M43.062,31.193c0,0.516,0.284,0.932,0.853,1.249c0.568,0.317,1.39,0.477,2.464,0.477c0.575,0,1.095-0.056,1.56-0.167
|
||||
c0.464-0.109,0.863-0.257,1.195-0.441c0.333-0.186,0.584-0.395,0.763-0.628c0.177-0.235,0.263-0.485,0.263-0.755
|
||||
c0-0.47-0.196-0.782-0.584-0.939c-0.392-0.154-0.978-0.229-1.758-0.229h-1.902c-0.339,0-0.64-0.014-0.905-0.036
|
||||
c-0.267-0.019-0.518-0.066-0.752-0.143c-0.443,0.251-0.751,0.509-0.931,0.773C43.154,30.616,43.062,30.897,43.062,31.193z
|
||||
M46.138,24.668c0.621,0,1.149-0.205,1.594-0.618c0.441-0.414,0.664-0.986,0.664-1.724c0-0.71-0.223-1.276-0.664-1.703
|
||||
c-0.445-0.428-0.973-0.642-1.594-0.642s-1.149,0.213-1.591,0.642c-0.441,0.427-0.663,0.995-0.663,1.703
|
||||
c0,0.737,0.223,1.31,0.663,1.724C44.988,24.462,45.518,24.668,46.138,24.668z"/>
|
||||
</g>
|
||||
<path fill="#FFFFFF" d="M24.624,29.806H22.77l-0.184-1.853h-0.09c-0.55,0.64-1.15,1.154-1.796,1.544
|
||||
c-0.649,0.387-1.4,0.581-2.254,0.581c-1.327,0-2.296-0.385-2.904-1.153c-0.612-0.772-0.916-1.896-0.916-3.376v-5.616l-2.962-0.058
|
||||
l5.249-2.02l-0.022,1.528v5.871c0,0.991,0.175,1.719,0.526,2.186c0.351,0.466,0.953,0.7,1.808,0.7c0.579,0,1.109-0.144,1.589-0.426
|
||||
c0.48-0.282,0.996-0.76,1.544-1.431v-7.665h2.265L24.624,29.806L24.624,29.806z"/>
|
||||
<path fill="#FFFFFF" d="M28.376,18.619h1.851l0.184,1.807h0.091c0.565-0.58,1.174-1.072,1.832-1.476
|
||||
c0.654-0.404,1.418-0.605,2.287-0.605c1.312,0,2.274,0.39,2.882,1.165c0.61,0.777,0.917,1.9,0.917,3.365v6.93h-2.267V23.17
|
||||
c0-0.975-0.173-1.695-0.525-2.161c-0.349-0.468-0.953-0.701-1.808-0.701c-0.596,0-1.128,0.152-1.603,0.447
|
||||
c-0.471,0.298-1,0.743-1.579,1.339v7.709h-2.263L28.376,18.619L28.376,18.619z"/>
|
||||
<path fill="#FFFFFF" d="M63.696,24.225c0-0.917,0.161-1.737,0.481-2.461s0.746-1.343,1.281-1.853c0.532-0.51,1.143-0.9,1.831-1.167
|
||||
c0.687-0.267,1.397-0.399,2.128-0.399c0.823,0,1.551,0.128,2.187,0.389c0.629,0.259,1.17,0.621,1.609,1.084
|
||||
c0.444,0.467,0.781,1.023,1.007,1.672c0.229,0.647,0.346,1.36,0.346,2.139c0,0.23-0.013,0.447-0.035,0.653
|
||||
c-0.022,0.208-0.049,0.378-0.08,0.514H66.03c0.076,1.098,0.483,1.956,1.225,2.574c0.74,0.618,1.673,0.928,2.802,0.928
|
||||
c0.611,0,1.178-0.087,1.705-0.254c0.527-0.166,1.041-0.403,1.541-0.708l0.803,1.439c-0.575,0.366-1.23,0.674-1.956,0.928
|
||||
c-0.724,0.25-1.521,0.376-2.392,0.376c-0.838,0-1.627-0.131-2.366-0.397c-0.74-0.268-1.384-0.652-1.933-1.156
|
||||
c-0.55-0.504-0.981-1.118-1.294-1.844C63.853,25.957,63.696,25.138,63.696,24.225z M72.459,23.241c0-1.01-0.263-1.777-0.78-2.312
|
||||
s-1.256-0.8-2.218-0.8c-0.84,0-1.586,0.266-2.241,0.8c-0.657,0.535-1.063,1.302-1.214,2.312H72.459z"/>
|
||||
<path fill="#FFFFFF" d="M82.007,18.264l0.008,11.77h-2.267V21.44h-4.247L82.007,18.264z M80.688,15.958
|
||||
c-0.488,0-0.891-0.146-1.215-0.434c-0.316-0.29-0.478-0.68-0.478-1.167s0.161-0.879,0.478-1.177
|
||||
c0.324-0.297,0.725-0.446,1.215-0.446c0.486,0,0.894,0.148,1.212,0.446c0.323,0.298,0.483,0.69,0.483,1.177
|
||||
c0,0.487-0.16,0.878-0.483,1.167C81.581,15.811,81.174,15.958,80.688,15.958z"/>
|
||||
<path fill="#FFFFFF" d="M85.153,24.45c0-0.928,0.169-1.762,0.505-2.491c0.336-0.733,0.795-1.351,1.374-1.855
|
||||
c0.577-0.503,1.244-0.882,2-1.143c0.756-0.258,1.56-0.388,2.413-0.388c0.916,0,1.715,0.155,2.402,0.467
|
||||
c0.689,0.312,1.261,0.692,1.717,1.132l-1.096,1.44c-0.444-0.365-0.903-0.652-1.377-0.857c-0.469-0.205-0.981-0.307-1.531-0.307
|
||||
c-0.593,0-1.143,0.095-1.648,0.286c-0.502,0.19-0.933,0.46-1.29,0.812c-0.359,0.352-0.639,0.773-0.834,1.269
|
||||
c-0.199,0.495-0.298,1.043-0.298,1.635c0,0.596,0.096,1.142,0.285,1.636c0.191,0.497,0.466,0.919,0.822,1.271
|
||||
c0.358,0.348,0.782,0.621,1.269,0.812c0.49,0.189,1.029,0.284,1.627,0.284c0.685,0,1.304-0.129,1.852-0.389
|
||||
c0.548-0.259,1.045-0.571,1.487-0.94l0.962,1.467c-0.641,0.548-1.343,0.973-2.104,1.269c-0.763,0.297-1.558,0.444-2.38,0.444
|
||||
c-0.87,0-1.681-0.128-2.437-0.388c-0.755-0.258-1.405-0.641-1.955-1.145c-0.552-0.504-0.982-1.119-1.294-1.843
|
||||
C85.311,26.21,85.153,25.383,85.153,24.45z"/>
|
||||
<path fill="#FFFFFF" d="M95.906,13.877l4.743-2.351v6.589l-0.138,2.517c0.566-0.58,1.173-1.068,1.832-1.465
|
||||
c0.655-0.396,1.416-0.594,2.287-0.594c1.311,0,2.271,0.388,2.881,1.165c0.608,0.778,0.914,1.901,0.914,3.364v6.93h-2.264v-6.635
|
||||
c0-0.977-0.175-1.695-0.527-2.161c-0.351-0.466-0.95-0.699-1.807-0.699c-0.594,0-1.13,0.149-1.599,0.446
|
||||
c-0.477,0.299-1.001,0.745-1.581,1.34v7.709h-2.265l-0.05-16.251L95.906,13.877z"/>
|
||||
<g>
|
||||
<polygon fill="#FFFFFF" points="108.854,8.822 108.09,10.416 117.573,10.456 118.336,8.831 "/>
|
||||
<polygon fill="#FFFFFF" points="108.103,12.298 107.315,13.971 116.812,13.991 117.573,12.336 "/>
|
||||
<polygon fill="#FFFFFF" points="109.955,15.869 114.305,6.606 115.98,6.631 111.682,15.871 "/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#FFFFFF" d="M58.023,26.167c0,0.749,0.188,1.293,0.564,1.625c0.375,0.333,0.864,0.499,1.47,0.499
|
||||
c0.294,0,0.598-0.039,0.907-0.112c0.309-0.074,0.657-0.191,1.038-0.354l0.53,1.639c-0.25,0.086-0.491,0.166-0.718,0.243
|
||||
c-0.23,0.072-0.462,0.134-0.696,0.186c-0.236,0.054-0.482,0.097-0.739,0.133c-0.26,0.037-0.542,0.057-0.852,0.057
|
||||
c-1.21,0-2.128-0.346-2.755-1.041c-0.626-0.691-0.939-1.693-0.939-3.007V11.309h-3.539l5.727-4.035"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
29
static/blog.ungleich.ch/js/navbar-scroll-up.js
Normal file
29
static/blog.ungleich.ch/js/navbar-scroll-up.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
// Navigation Scripts to Show Header on Scroll-Up
|
||||
jQuery(document).ready(function($) {
|
||||
var MQL = 1170;
|
||||
|
||||
//primary navigation slide-in effect
|
||||
if ($(window).width() > MQL) {
|
||||
var headerHeight = $('.navbar-custom').height();
|
||||
$(window).on('scroll', {
|
||||
previousTop: 0
|
||||
},
|
||||
function() {
|
||||
var currentTop = $(window).scrollTop();
|
||||
//check if user is scrolling up
|
||||
if (currentTop < this.previousTop) {
|
||||
//if scrolling up...
|
||||
if (currentTop > 0 && $('.navbar-custom').hasClass('is-fixed')) {
|
||||
$('.navbar-custom').addClass('is-visible');
|
||||
} else {
|
||||
$('.navbar-custom').removeClass('is-visible is-fixed');
|
||||
}
|
||||
} else {
|
||||
//if scrolling down...
|
||||
$('.navbar-custom').removeClass('is-visible');
|
||||
if (currentTop > headerHeight && !$('.navbar-custom').hasClass('is-fixed')) $('.navbar-custom').addClass('is-fixed');
|
||||
}
|
||||
this.previousTop = currentTop;
|
||||
});
|
||||
}
|
||||
});
|
458
static/blog.ungleich.ch/less/clean-blog.less
Executable file
458
static/blog.ungleich.ch/less/clean-blog.less
Executable file
|
@ -0,0 +1,458 @@
|
|||
@import "variables.less";
|
||||
@import "mixins.less";
|
||||
|
||||
// Global Components
|
||||
|
||||
body {
|
||||
.serif;
|
||||
font-size: 20px;
|
||||
color: @gray-dark;
|
||||
}
|
||||
|
||||
// -- Typography
|
||||
|
||||
p {
|
||||
line-height: 1.5;
|
||||
margin: 30px 0;
|
||||
a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
.sans-serif;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
a {
|
||||
color: @gray-dark;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @brand-primary;
|
||||
}
|
||||
}
|
||||
|
||||
a img {
|
||||
&:hover,
|
||||
&:focus {
|
||||
cursor: zoom-in;
|
||||
}
|
||||
}
|
||||
|
||||
blockquote {
|
||||
color: @gray;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
hr.small {
|
||||
max-width: 100px;
|
||||
margin: 15px auto;
|
||||
border-width: 4px;
|
||||
border-color: white;
|
||||
}
|
||||
|
||||
// Navigation
|
||||
|
||||
.navbar-custom {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 3;
|
||||
.sans-serif;
|
||||
.navbar-brand {
|
||||
font-weight: 800;
|
||||
}
|
||||
.nav {
|
||||
li {
|
||||
a {
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
background: transparent;
|
||||
border-bottom: 1px solid transparent;
|
||||
.navbar-brand {
|
||||
color: white;
|
||||
padding: 20px;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @white-faded;
|
||||
}
|
||||
}
|
||||
.nav {
|
||||
li {
|
||||
a {
|
||||
color: white;
|
||||
padding: 20px;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @white-faded;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1170px) {
|
||||
-webkit-transition: background-color 0.3s;
|
||||
-moz-transition: background-color 0.3s;
|
||||
transition: background-color 0.3s;
|
||||
/* Force Hardware Acceleration in WebKit */
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
-ms-transform: translate3d(0, 0, 0);
|
||||
-o-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
-webkit-backface-visibility: hidden;
|
||||
backface-visibility: hidden;
|
||||
&.is-fixed {
|
||||
/* when the user scrolls down, we hide the header right above the viewport */
|
||||
position: fixed;
|
||||
top: -61px;
|
||||
background-color: fade(white, 90%);
|
||||
border-bottom: 1px solid darken(white, 5%);
|
||||
-webkit-transition: -webkit-transform 0.3s;
|
||||
-moz-transition: -moz-transform 0.3s;
|
||||
transition: transform 0.3s;
|
||||
.navbar-brand {
|
||||
color: @gray-dark;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @brand-primary;
|
||||
}
|
||||
}
|
||||
.nav {
|
||||
li {
|
||||
a {
|
||||
color: @gray-dark;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @brand-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.is-visible {
|
||||
/* if the user changes the scrolling direction, we show the header */
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
-moz-transform: translate3d(0, 100%, 0);
|
||||
-ms-transform: translate3d(0, 100%, 0);
|
||||
-o-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Header
|
||||
|
||||
.intro-header {
|
||||
background-color: @gray;
|
||||
background: no-repeat center center;
|
||||
background-attachment: scroll;
|
||||
.background-cover;
|
||||
// NOTE: Background images are set within the HTML using inline CSS!
|
||||
margin-bottom: 50px;
|
||||
.site-heading,
|
||||
.post-heading,
|
||||
.page-heading {
|
||||
padding: 100px 0 50px;
|
||||
color: white;
|
||||
@media only screen and (min-width: 768px) {
|
||||
padding: 150px 0;
|
||||
}
|
||||
}
|
||||
.site-heading,
|
||||
.page-heading {
|
||||
text-align: center;
|
||||
h1 {
|
||||
margin-top: 0;
|
||||
font-size: 50px;
|
||||
}
|
||||
.subheading {
|
||||
font-size: 24px;
|
||||
line-height: 1.1;
|
||||
display: block;
|
||||
.sans-serif;
|
||||
font-weight: 300;
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
h1 {
|
||||
font-size: 80px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.post-heading {
|
||||
h1 {
|
||||
font-size: 35px;
|
||||
}
|
||||
.subheading,
|
||||
.meta {
|
||||
line-height: 1.1;
|
||||
display: block;
|
||||
}
|
||||
.subheading {
|
||||
.sans-serif;
|
||||
font-size: 24px;
|
||||
margin: 10px 0 30px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.meta {
|
||||
.serif;
|
||||
font-style: italic;
|
||||
font-weight: 300;
|
||||
font-size: 20px;
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
h1 {
|
||||
font-size: 55px;
|
||||
}
|
||||
.subheading {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Post Preview Pages
|
||||
|
||||
.post-preview {
|
||||
> a {
|
||||
color: @gray-dark;
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
color: @brand-primary;
|
||||
}
|
||||
> .post-title {
|
||||
font-size: 30px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
> .post-subtitle {
|
||||
margin: 0;
|
||||
font-weight: 300;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
> .post-meta {
|
||||
color: @gray;
|
||||
font-size: 18px;
|
||||
font-style: italic;
|
||||
margin-top: 0;
|
||||
> a {
|
||||
text-decoration: none;
|
||||
color: @gray-dark;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @brand-primary;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
> a {
|
||||
> .post-title {
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sections
|
||||
|
||||
.section-heading {
|
||||
font-size: 36px;
|
||||
margin-top: 60px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.caption {
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
padding: 10px;
|
||||
font-style: italic;
|
||||
margin: 0;
|
||||
display: block;
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 50px 0 65px;
|
||||
.list-inline {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.copyright {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Contact Form Styles
|
||||
|
||||
.floating-label-form-group {
|
||||
font-size: 14px;
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0.5em;
|
||||
border-bottom: 1px solid @gray-light;
|
||||
input,
|
||||
textarea {
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-size: 1.5em;
|
||||
background: none;
|
||||
box-shadow: none !important;
|
||||
resize: none;
|
||||
}
|
||||
label {
|
||||
display: block;
|
||||
z-index: 0;
|
||||
position: relative;
|
||||
top: 2em;
|
||||
margin: 0;
|
||||
font-size: 0.85em;
|
||||
line-height: 1.764705882em;
|
||||
vertical-align: middle;
|
||||
vertical-align: baseline;
|
||||
opacity: 0;
|
||||
-webkit-transition: top 0.3s ease,opacity 0.3s ease;
|
||||
-moz-transition: top 0.3s ease,opacity 0.3s ease;
|
||||
-ms-transition: top 0.3s ease,opacity 0.3s ease;
|
||||
transition: top 0.3s ease,opacity 0.3s ease;
|
||||
}
|
||||
&::not(:first-child) {
|
||||
padding-left: 14px;
|
||||
border-left: 1px solid @gray-light;
|
||||
}
|
||||
}
|
||||
|
||||
.floating-label-form-group-with-value {
|
||||
label {
|
||||
top: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.floating-label-form-group-with-focus {
|
||||
label {
|
||||
color: @brand-primary;
|
||||
}
|
||||
}
|
||||
|
||||
form .row:first-child .floating-label-form-group {
|
||||
border-top: 1px solid @gray-light;
|
||||
}
|
||||
|
||||
// Button Styles
|
||||
|
||||
.btn {
|
||||
.sans-serif;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1px;
|
||||
border-radius: 0;
|
||||
padding: 15px 25px;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
font-size: 16px;
|
||||
padding: 25px 35px;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: @brand-primary;
|
||||
border: 1px solid @brand-primary;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
// Pager Styling
|
||||
|
||||
.pager {
|
||||
|
||||
margin: 20px 0 0;
|
||||
|
||||
li {
|
||||
> a,
|
||||
> span {
|
||||
.sans-serif;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1px;
|
||||
padding: 15px 25px;
|
||||
background-color: white;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
> a:hover,
|
||||
> a:focus {
|
||||
color: white;
|
||||
background-color: @brand-primary;
|
||||
border: 1px solid @brand-primary;
|
||||
}
|
||||
}
|
||||
|
||||
.disabled {
|
||||
> a,
|
||||
> a:hover,
|
||||
> a:focus,
|
||||
> span {
|
||||
color: @gray;
|
||||
background-color: @gray-dark;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -- Highlight Color Customization
|
||||
|
||||
::-moz-selection {
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
background: @brand-primary;
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: white;
|
||||
text-shadow: none;
|
||||
background: @brand-primary;
|
||||
}
|
||||
|
||||
img::selection {
|
||||
color: white;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
img::-moz-selection {
|
||||
color: white;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
body {
|
||||
webkit-tap-highlight-color: @brand-primary;
|
||||
}
|
22
static/blog.ungleich.ch/less/mixins.less
Executable file
22
static/blog.ungleich.ch/less/mixins.less
Executable file
|
@ -0,0 +1,22 @@
|
|||
// Mixins
|
||||
|
||||
.transition-all() {
|
||||
-webkit-transition: all 0.5s;
|
||||
-moz-transition: all 0.5s;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.background-cover() {
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
background-size: cover;
|
||||
-o-background-size: cover;
|
||||
}
|
||||
|
||||
.serif() {
|
||||
font-family: 'Lora', 'Times New Roman', serif;
|
||||
}
|
||||
|
||||
.sans-serif () {
|
||||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
7
static/blog.ungleich.ch/less/variables.less
Executable file
7
static/blog.ungleich.ch/less/variables.less
Executable file
|
@ -0,0 +1,7 @@
|
|||
// Variables
|
||||
|
||||
@brand-primary: #0085A1;
|
||||
@gray-dark: lighten(black, 25%);
|
||||
@gray: lighten(black, 50%);
|
||||
@white-faded: fade(white, 80%);
|
||||
@gray-light: #eee;
|
5
static/blog.ungleich.ch/vendor/js/jquery.min.js
vendored
Executable file
5
static/blog.ungleich.ch/vendor/js/jquery.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
0
static/keep
Normal file
0
static/keep
Normal file
6
templates/cms/ungleich.ch/__init__.py
Normal file
6
templates/cms/ungleich.ch/__init__.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
TEMPLATES = {
|
||||
'blog.html': _('Blog'),
|
||||
'page.html': _('Page'),
|
||||
}
|
40
templates/cms/ungleich.ch/_footer.html
Normal file
40
templates/cms/ungleich.ch/_footer.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
{% load cms_tags %}
|
||||
<hr />
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<ul class="list-inline text-center">
|
||||
<li>
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-linkedin fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<span class="fa-stack fa-lg">
|
||||
<i class="fa fa-circle fa-stack-2x"></i>
|
||||
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="copyright text-muted text-centered">
|
||||
{% static_placeholder "footer_copyright" %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
23
templates/cms/ungleich.ch/_header_base.html
Normal file
23
templates/cms/ungleich.ch/_header_base.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% load cms_tags staticfiles %}
|
||||
<!-- Page Header -->
|
||||
<!-- Set your background image for this header on the line below. -->
|
||||
<header class="intro-header"
|
||||
{% if request.current_page.ungleichpage %}
|
||||
style="background-image: url('{{ request.current_page.ungleichpage.image.url }}');"
|
||||
{% else %}
|
||||
style="background-image: url('{% static 'blog.ungleich.ch/img/home-bg.jpg' %}');"
|
||||
{% endif %}
|
||||
>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="site-heading">
|
||||
<h1> {% page_attribute 'page_title' %} </h1>
|
||||
<hr class="small">
|
||||
<span class="subheading"> {% page_attribute 'meta_description' %}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
36
templates/cms/ungleich.ch/_menu.html
Normal file
36
templates/cms/ungleich.ch/_menu.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{% load menu_tags staticfiles cms_tags %}
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<!-- 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>
|
||||
<a class="navbar-brand" href="/">
|
||||
<img src="{% static "blog.ungleich.ch/img/logo_white.svg" %}" />
|
||||
</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 navbar-right">
|
||||
{% for child in children %}
|
||||
<li class="child{% if child.selected %} selected{% endif %}{% if child.ancestor %} ancestor{% endif %}{% if child.sibling %} sibling{% endif %}{% if child.descendant %} descendant{% endif %}">
|
||||
<a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}">{{ child.get_menu_title }}</a>
|
||||
{% if child.children %}
|
||||
<ul>
|
||||
{% show_menu from_level to_level extra_inactive extra_active template "" "" child %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.navbar-collapse -->
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
</nav>
|
69
templates/cms/ungleich.ch/base.html
Normal file
69
templates/cms/ungleich.ch/base.html
Normal file
|
@ -0,0 +1,69 @@
|
|||
{% load cms_tags menu_tags sekizai_tags staticfiles bootstrap3 %}
|
||||
<html>
|
||||
<head>
|
||||
<title>{% page_attribute "page_title" %}</title>
|
||||
{% addtoblock "external-css" %}
|
||||
{% bootstrap_css %}
|
||||
|
||||
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||
<link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800'
|
||||
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]-->
|
||||
{% endaddtoblock %}
|
||||
|
||||
{% addtoblock "css" %}
|
||||
<link href="{% static 'blog.ungleich.ch/css/clean-blog.css' %}" type="text/css"
|
||||
rel="stylesheet" medial="all" />
|
||||
{% endaddtoblock %}
|
||||
|
||||
{% render_block "external-css" %}
|
||||
{% render_block "css" postprocessor "compressor.contrib.sekizai.compress" %}
|
||||
</head>
|
||||
<body>
|
||||
{% cms_toolbar %}
|
||||
{% show_menu 0 1 100 100 "cms/ungleich.ch/_menu.html" %}
|
||||
<!-- body -->
|
||||
<!-- Main Content -->
|
||||
{% block base_header %}
|
||||
{% include "cms/ungleich.ch/_header_base.html" %}
|
||||
{% endblock %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
{% block base_content %}
|
||||
{% placeholder "default" %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end body -->
|
||||
{% include "cms/ungleich.ch/_footer.html" %}
|
||||
{% addtoblock "external-js" %}
|
||||
{% bootstrap_javascript %}
|
||||
{% endaddtoblock %}
|
||||
{% addtoblock "js" %}
|
||||
<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-4', 'auto');
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
|
||||
<script src="{% static 'blog.ungleich.ch/vendor/js/jquery.min.js' %}" type="text/javascript" />
|
||||
<script src="{% static 'blog.ungleich.ch/js/navbar-scroll-up.js' %}" type="text/javascript" />
|
||||
{% endaddtoblock %}
|
||||
{% render_block "js" postprocessor "compressor.contrib.sekizai.compress" %}
|
||||
{% render_block "external-js" %}
|
||||
</body>
|
||||
</html>
|
5
templates/cms/ungleich.ch/blog.html
Normal file
5
templates/cms/ungleich.ch/blog.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "cms/ungleich.ch/base.html" %}
|
||||
{% block base_content %}
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
3
templates/cms/ungleich.ch/index.html
Normal file
3
templates/cms/ungleich.ch/index.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% extends "cms/ungleich.ch/base.html" %}
|
||||
{% block base_content %}
|
||||
{% endblock %}
|
5
templates/cms/ungleich.ch/page.html
Normal file
5
templates/cms/ungleich.ch/page.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "cms/ungleich.ch/base.html" %}
|
||||
{% load cms_tags %}
|
||||
{% block base_content %}
|
||||
{% placeholder "page_content" %}
|
||||
{% endblock %}
|
37
templates/djangocms_blog/_header_post_detail.html
Normal file
37
templates/djangocms_blog/_header_post_detail.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
{% load cms_tags staticfiles %}
|
||||
<!-- Page Header -->
|
||||
<!-- Set your background image for this header on the line below. -->
|
||||
<header class="intro-header"
|
||||
{% if post.main_image_id %}
|
||||
style="background-image: url('{{ post.main_image.url }}');"
|
||||
{% else %}
|
||||
style="background-image: url('{% static 'blog.ungleich.ch/img/home-bg.jpg' %}');"
|
||||
{% endif %}
|
||||
>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="post-heading">
|
||||
<h1> {% render_model post "title" %} </h1>
|
||||
<h2 class="subheading">
|
||||
{% render_model post "abstract" "" "" 'truncatewords_html:10' %}
|
||||
</h2>
|
||||
<span class="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" }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
11
templates/djangocms_blog/base.html
Normal file
11
templates/djangocms_blog/base.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends CMS_TEMPLATE %}
|
||||
{% block meta %}
|
||||
{% if meta %}
|
||||
{% include "meta_mixin/meta.html" %}
|
||||
{% endif %}
|
||||
{% endblock meta %}
|
||||
{% block content %}
|
||||
<div class="app app-blog span8">
|
||||
{% block content_blog %}{% endblock %}
|
||||
</div>
|
||||
{% endblock content %}
|
32
templates/djangocms_blog/includes/blog_item.html
Normal file
32
templates/djangocms_blog/includes/blog_item.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{% load i18n thumbnail cms_tags %}
|
||||
{% load url from future %}
|
||||
|
||||
<div class="post-preview">
|
||||
<a href=" {{ post.get_absolute_url }} ">
|
||||
<h2 class="post-title">
|
||||
{{ post.title }}
|
||||
</h2>
|
||||
<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>
|
||||
<hr>
|
22
templates/djangocms_blog/post_detail.html
Normal file
22
templates/djangocms_blog/post_detail.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "djangocms_blog/base.html" %}
|
||||
{% load i18n thumbnail cms_tags %}
|
||||
{% load url from future %}
|
||||
|
||||
{% 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 %}
|
||||
<!-- page header -->
|
||||
{% block base_header %}
|
||||
{% include "djangocms_blog/_header_post_detail.html" %}
|
||||
{% endblock %}
|
||||
<!-- page header -->
|
||||
{% block content_blog %}
|
||||
<article>
|
||||
{% if 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 %}
|
47
templates/djangocms_blog/post_list.html
Normal file
47
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 %}
|
0
ungleich/__init__.py
Normal file
0
ungleich/__init__.py
Normal file
12
ungleich/admin.py
Normal file
12
ungleich/admin.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from django.contrib import admin
|
||||
from cms.extensions import PageExtensionAdmin
|
||||
|
||||
# Register your models here.
|
||||
|
||||
from .models import UngleichPage
|
||||
|
||||
|
||||
class UngleichPageAdmin(PageExtensionAdmin):
|
||||
pass
|
||||
|
||||
admin.site.register(UngleichPage, UngleichPageAdmin)
|
25
ungleich/cms_toolbar.py
Normal file
25
ungleich/cms_toolbar.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
from cms.extensions.toolbar import ExtensionToolbar
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from cms.toolbar_pool import toolbar_pool
|
||||
from cms.toolbar_base import CMSToolbar
|
||||
|
||||
from .models import UngleichPage
|
||||
|
||||
|
||||
@toolbar_pool.register
|
||||
class UngleichPageToolbar(ExtensionToolbar):
|
||||
# defineds the model for the current toolbar
|
||||
model = UngleichPage
|
||||
|
||||
def populate(self):
|
||||
# setup the extension toolbar with permissions and sanity checks
|
||||
current_page_menu = self._setup_extension_toolbar()
|
||||
# if it's all ok
|
||||
if current_page_menu:
|
||||
# retrieves the instance of the current extension (if any) and the toolbar item url
|
||||
page_extension, url = self.get_page_extension_admin()
|
||||
if url:
|
||||
# adds a toolbar item
|
||||
current_page_menu.add_modal_item(_('Page Header'), url=url,
|
||||
disabled=not self.toolbar.edit_mode)
|
27
ungleich/migrations/0001_initial.py
Normal file
27
ungleich/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cms', '0011_auto_20150419_1006'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='UngleichPage',
|
||||
fields=[
|
||||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')),
|
||||
('image_header', models.ImageField(upload_to='image_header')),
|
||||
('extended_object', models.OneToOneField(editable=False, to='cms.Page')),
|
||||
('public_extension', models.OneToOneField(editable=False, related_name='draft_extension', null=True, to='ungleich.UngleichPage')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
bases=(models.Model,),
|
||||
),
|
||||
]
|
22
ungleich/migrations/0002_ungleichpage_image.py
Normal file
22
ungleich/migrations/0002_ungleichpage_image.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
import filer.fields.image
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('filer', '0002_auto_20150522_0450'),
|
||||
('ungleich', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ungleichpage',
|
||||
name='image',
|
||||
field=filer.fields.image.FilerImageField(null=True, related_name='ungleinch_page_image', to='filer.Image', blank=True),
|
||||
preserve_default=True,
|
||||
),
|
||||
]
|
18
ungleich/migrations/0003_remove_ungleichpage_image_header.py
Normal file
18
ungleich/migrations/0003_remove_ungleichpage_image_header.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ungleich', '0002_ungleichpage_image'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='ungleichpage',
|
||||
name='image_header',
|
||||
),
|
||||
]
|
0
ungleich/migrations/__init__.py
Normal file
0
ungleich/migrations/__init__.py
Normal file
18
ungleich/models.py
Normal file
18
ungleich/models.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
from django.db import models
|
||||
|
||||
from cms.extensions import PageExtension
|
||||
from cms.extensions.extension_pool import extension_pool
|
||||
from filer.fields.image import FilerImageField
|
||||
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class UngleichPage(PageExtension):
|
||||
#image_header = models.ImageField(upload_to='image_header')
|
||||
image = FilerImageField(null=True, blank=True,
|
||||
related_name="ungleinch_page_image")
|
||||
|
||||
class Meta:
|
||||
app_label = 'ungleich'
|
||||
|
||||
extension_pool.register(UngleichPage)
|
3
ungleich/tests.py
Normal file
3
ungleich/tests.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
3
ungleich/views.py
Normal file
3
ungleich/views.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
Loading…
Reference in a new issue