migrations
@ -1,7 +1,6 @@
|
||||
{
|
||||
"disable_default_language_prefix": false,
|
||||
"enable_gis": false,
|
||||
"languages": "[\"en\"]",
|
||||
"session_timeout": 1209600,
|
||||
"languages": "[\"de\", \"en\"]",
|
||||
"use_manifeststaticfilesstorage": false
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"installed-apps": [
|
||||
"djangocms_file"
|
||||
],
|
||||
"package-name": "djangocms-file"
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from aldryn_client import forms
|
||||
|
||||
|
||||
def split_and_strip(string):
|
||||
return [item.strip() for item in string.split(',') if item]
|
||||
|
||||
|
||||
class Form(forms.BaseForm):
|
||||
templates = forms.CharField(
|
||||
'List of additional templates (comma separated)',
|
||||
required=False,
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
data = super(Form, self).clean()
|
||||
|
||||
# prettify
|
||||
data['templates'] = ', '.join(split_and_strip(data['templates']))
|
||||
return data
|
||||
|
||||
def to_settings(self, data, settings):
|
||||
if data['templates']:
|
||||
settings['DJANGOCMS_FILE_TEMPLATES'] = [
|
||||
(item, item)
|
||||
for item in split_and_strip(data['templates'])
|
||||
]
|
||||
|
||||
return settings
|
||||
@ -0,0 +1,3 @@
|
||||
{
|
||||
"templates": null
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"installed-apps": [
|
||||
"djangocms_googlemap"
|
||||
],
|
||||
"package-name": "djangocms-googlemap"
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from aldryn_client import forms
|
||||
|
||||
|
||||
def split_and_strip(string):
|
||||
return [item.strip() for item in string.split(',') if item]
|
||||
|
||||
|
||||
class Form(forms.BaseForm):
|
||||
templates = forms.CharField(
|
||||
'List of additional templates (comma separated)',
|
||||
required=False,
|
||||
)
|
||||
api_key = forms.CharField(
|
||||
'You need to provide a valid Google Maps API key '
|
||||
'https://developers.google.com/maps/documentation/javascript/get-api-key',
|
||||
required=True,
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
data = super(Form, self).clean()
|
||||
# prettify
|
||||
data['templates'] = ', '.join(split_and_strip(data['templates']))
|
||||
return data
|
||||
|
||||
def to_settings(self, data, settings):
|
||||
if data['templates']:
|
||||
settings['DJANGOCMS_GOOGLEMAP_TEMPLATES'] = [
|
||||
(item, item)
|
||||
for item in split_and_strip(data['templates'])
|
||||
]
|
||||
if data['api_key']:
|
||||
settings['DJANGOCMS_GOOGLEMAP_API_KEY'] = data['api_key']
|
||||
|
||||
return settings
|
||||
@ -0,0 +1,4 @@
|
||||
{
|
||||
"api_key": null,
|
||||
"templates": null
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
{
|
||||
"templates": null
|
||||
"templates": ""
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"alignment": null,
|
||||
"alignment": "",
|
||||
"nesting": false,
|
||||
"ratio": null,
|
||||
"templates": null
|
||||
"ratio": "",
|
||||
"templates": ""
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"installed-apps": [
|
||||
"djangocms_snippet"
|
||||
],
|
||||
"package-name": "djangocms-snippet"
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from aldryn_client import forms
|
||||
|
||||
|
||||
class Form(forms.BaseForm):
|
||||
editor_theme = forms.CharField(
|
||||
'Custom editor theme, (e.g. "twilight", default: "github")',
|
||||
required=False,
|
||||
)
|
||||
editor_mode = forms.CharField(
|
||||
'Custom editor mode (e.g. "javascript", default: "html")',
|
||||
required=False,
|
||||
)
|
||||
enable_search = forms.CheckboxField(
|
||||
'Enable snippet content to be searchable.',
|
||||
required=False,
|
||||
initial=False,
|
||||
)
|
||||
|
||||
def to_settings(self, data, settings):
|
||||
if data['editor_theme']:
|
||||
settings['DJANGOCMS_SNIPPET_THEME'] = data['editor_theme']
|
||||
if data['editor_mode']:
|
||||
settings['DJANGOCMS_SNIPPET_MODE'] = data['editor_mode']
|
||||
if data['enable_search']:
|
||||
settings['DJANGOCMS_SNIPPET_SEARCH'] = data['enable_search']
|
||||
return settings
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"editor_mode": null,
|
||||
"editor_theme": null,
|
||||
"enable_search": false
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"installed-apps": [
|
||||
"djangocms_style"
|
||||
],
|
||||
"package-name": "djangocms-style"
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from aldryn_client import forms
|
||||
|
||||
|
||||
def split_and_strip(string):
|
||||
return [item.strip() for item in string.split(',') if item]
|
||||
|
||||
|
||||
class Form(forms.BaseForm):
|
||||
templates = forms.CharField(
|
||||
'List of additional templates (comma separated)',
|
||||
required=False,
|
||||
)
|
||||
class_names = forms.CharField(
|
||||
'List of classes (comma separated)',
|
||||
required=False,
|
||||
)
|
||||
tag_types = forms.CharField(
|
||||
'List of HTML tags (comma separated)',
|
||||
required=False,
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
data = super(Form, self).clean()
|
||||
|
||||
# prettify
|
||||
data['templates'] = ', '.join(split_and_strip(data['templates']))
|
||||
data['class_names'] = ', '.join(split_and_strip(data['class_names']))
|
||||
data['tag_types'] = ', '.join(split_and_strip(data['tag_types']))
|
||||
return data
|
||||
|
||||
def to_settings(self, data, settings):
|
||||
if data['templates']:
|
||||
settings['DJANGOCMS_STYLE_TEMPLATES'] = [
|
||||
(item, item)
|
||||
for item in split_and_strip(data['templates'])
|
||||
]
|
||||
if data['class_names']:
|
||||
settings['DJANGOCMS_STYLE_CHOICES'] = split_and_strip(data['class_names'])
|
||||
if data['tag_types']:
|
||||
settings['DJANGOCMS_STYLE_TAGS'] = split_and_strip(data['tag_types'])
|
||||
|
||||
return settings
|
||||
@ -0,0 +1,5 @@
|
||||
{
|
||||
"class_names": null,
|
||||
"tag_types": null,
|
||||
"templates": null
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
{
|
||||
"content_css": null,
|
||||
"style_set": null
|
||||
"content_css": "",
|
||||
"style_set": ""
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
{
|
||||
"installed-apps": [
|
||||
"djangocms_video"
|
||||
],
|
||||
"package-name": "djangocms-video"
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from aldryn_client import forms
|
||||
|
||||
|
||||
def split_and_strip(string):
|
||||
return [item.strip() for item in string.split(',') if item]
|
||||
|
||||
|
||||
class Form(forms.BaseForm):
|
||||
templates = forms.CharField(
|
||||
'List of additional templates (comma separated)',
|
||||
required=False,
|
||||
)
|
||||
extensions = forms.CharField(
|
||||
'List of allowed extensions, default "mp4, webm, ogv" when empty (comma separated)',
|
||||
required=False,
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
data = super(Form, self).clean()
|
||||
|
||||
# older versions of this addon had a bug where the values would be
|
||||
# saved to settings.json as a list instead of a string.
|
||||
if isinstance(data['templates'], list):
|
||||
data['templates'] = ', '.join(data['templates'])
|
||||
if isinstance(data['extensions'], list):
|
||||
data['extensions'] = ', '.join(data['extensions'])
|
||||
|
||||
# prettify
|
||||
data['templates'] = ', '.join(split_and_strip(data['templates']))
|
||||
data['extensions'] = ', '.join(split_and_strip(data['extensions']))
|
||||
return data
|
||||
|
||||
def to_settings(self, data, settings):
|
||||
if data['templates']:
|
||||
settings['DJANGOCMS_VIDEO_TEMPLATES'] = [
|
||||
(item, item)
|
||||
for item in split_and_strip(data['templates'])
|
||||
]
|
||||
if data['extensions']:
|
||||
settings['DJANGOCMS_VIDEO_ALLOWED_EXTENSIONS'] = split_and_strip(data['extensions'])
|
||||
|
||||
return settings
|
||||
@ -0,0 +1,4 @@
|
||||
{
|
||||
"extensions": null,
|
||||
"templates": null
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Formebene 3","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[20,20,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0]],"o":[[0,0]],"v":[[14.688,-20.562]],"c":false}},"nm":"Pfad 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","fillEnabled":true,"c":{"k":[0,0.64,0.65,1]},"o":{"k":100},"w":{"k":3},"lc":1,"lj":1,"ml":4,"nm":"Kontur 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transformieren"}],"nm":"Form 1","np":3,"mn":"ADBE Vector Group"}],"ip":0,"op":75,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":4,"nm":"Formebene 2","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[20,20,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[13.875,-8.125],[5.875,-3.688],[5.938,2.938],[13.938,7.438]],"c":true}},"nm":"Pfad 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","fillEnabled":true,"c":{"k":[0,0.64,0.65,1]},"o":{"k":100},"w":{"k":1.6},"lc":1,"lj":1,"ml":4,"nm":"Kontur 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transformieren"}],"nm":"Form 1","np":3,"mn":"ADBE Vector Group"},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[19.538,15.46]},"p":{"k":[0,0]},"r":{"k":0},"nm":"Rechteckpfad: 1","mn":"ADBE Vector Shape - Rect"},{"ty":"st","fillEnabled":true,"c":{"k":[0,0.64,0.65,1]},"o":{"k":100},"w":{"k":1.6},"lc":1,"lj":1,"ml":4,"nm":"Kontur 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[-3.856,-0.145],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transformieren"}],"nm":"Rechteck 1","np":3,"mn":"ADBE Vector Group"},{"ty":"rd","nm":"Runde Ecken 1","r":{"k":2},"mn":"ADBE Vector Filter - RC"}],"ip":0,"op":75,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":2,"ty":4,"nm":"Formebene 1","ks":{"o":{"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":9,"s":[100],"e":[0]},{"i":{"x":[0.667],"y":[0.667]},"o":{"x":[0.333],"y":[0.333]},"n":["0p667_0p667_0p333_0p333"],"t":12,"s":[0],"e":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p833_1_0p333_0"],"t":20,"s":[0],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":25,"s":[100],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.333],"y":[0.333]},"n":["0p833_0p833_0p333_0p333"],"t":28,"s":[100],"e":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":45,"s":[100],"e":[0]},{"i":{"x":[0.667],"y":[0.667]},"o":{"x":[0.333],"y":[0.333]},"n":["0p667_0p667_0p333_0p333"],"t":48,"s":[0],"e":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p833_1_0p333_0"],"t":56,"s":[0],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":61,"s":[100],"e":[100]},{"t":64}]},"r":{"k":0},"p":{"k":[16.375,20,0]},"a":{"k":[-3.625,0,0]},"s":{"k":[80,80,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"k":[7.043,7.043]},"p":{"k":[0,0]},"nm":"Elliptischer Pfad 1","mn":"ADBE Vector Shape - Ellipse"},{"ty":"fl","fillEnabled":true,"c":{"k":[0,0.64,0.65,1]},"o":{"k":100},"nm":"Fläche 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[-3.604,0.01],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transformieren"}],"nm":"Ellipse 1","np":3,"mn":"ADBE Vector Group"}],"ip":0,"op":75,"st":0,"bm":0,"sr":1}],"v":"4.5.0","ddd":0,"ip":0,"op":75,"fr":25,"w":40,"h":40}
|
||||
@ -0,0 +1 @@
|
||||
{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"noun_548592 Outlines 2","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[20,20,0]},"a":{"k":[50,50,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[2.8,0],[1.7,-1.2],[2.2,0],[1.9,-1.9],[0,-2.7],[-1.9,-1.9],[0,0],[-1,0],[-0.7,0.7],[0,0],[0,2.7],[1.9,1.9]],"o":[[-2.1,0],[-1.7,-1.2],[-2.7,0],[-1.9,1.9],[0,2.7],[0,0],[0.7,0.7],[1,0],[0,0],[1.9,-1.9],[0,-2.7],[-1.9,-2]],"v":[[5.9,-14.5],[0,-12.6],[-5.9,-14.5],[-13.1,-11.5],[-16.1,-4.3],[-13.1,2.9],[-2.6,13.4],[0,14.5],[2.6,13.4],[13.1,2.9],[16.1,-4.3],[13.1,-11.5]],"c":true}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","fillEnabled":true,"c":{"k":[0,0.64,0.65,1]},"o":{"k":100},"w":{"k":6},"lc":1,"lj":1,"ml":10,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[49.999,50.814],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0"],"t":0,"s":[40.506,40.506],"e":[45,45]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0"],"t":24,"s":[45,45],"e":[40.506,40.506]},{"i":{"x":[0.667,0.667],"y":[0.667,0.667]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"n":["0p667_0p667_0p167_0p167","0p667_0p667_0p167_0p167"],"t":43,"s":[40.506,40.506],"e":[40.506,40.506]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0"],"t":50,"s":[40.506,40.506],"e":[45,45]},{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0"],"t":79,"s":[45,45],"e":[40.506,40.506]},{"t":91}],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"mn":"ADBE Vector Group"},{"ty":"tm","s":{"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":54,"s":[0],"e":[100]},{"t":65}],"ix":1},"e":{"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":0,"s":[0],"e":[100]},{"t":20}],"ix":2},"o":{"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim"}],"ip":0,"op":75,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":4,"nm":"noun_548592 Outlines","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[20,20,0]},"a":{"k":[50,50,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[4.7,-5.1],[-0.3,-0.9],[-1.5,-1.6],[2.4,1.4],[0.8,-0.5],[6.4,0],[0,15.6],[-18,0],[0,-15.6]],"o":[[-0.6,0.7],[0.8,2.2],[-3,-0.1],[-0.8,-0.5],[-5.3,3],[-18,0],[0,-15.6],[18,0],[0.1,6.4]],"v":[[25.45,17.6],[24.95,20.2],[28.45,26],[20.35,23.7],[17.85,23.7],[-0.05,28.3],[-32.65,0],[-0.05,-28.3],[32.55,0]],"c":true}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","fillEnabled":true,"c":{"k":[0,0.64,0.65,1]},"o":{"k":100},"w":{"k":6},"lc":1,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[50.049,50],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[47.801,47.801],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"mn":"ADBE Vector Group"}],"ip":0,"op":75,"st":0,"bm":0,"sr":1}],"v":"4.5.0","ddd":0,"ip":0,"op":75,"fr":25,"w":40,"h":40}
|
||||
@ -0,0 +1 @@
|
||||
{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"Shape Layer 6","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[20,21.5,0],"e":[20,18,0],"to":[0,-0.58333331346512,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":38,"s":[20,18,0],"e":[20,21.5,0],"to":[0,0,0],"ti":[0,-0.58333331346512,0]},{"t":74}]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-0.599,-9.361],[4.801,-13.414],[8.942,-8.143]],"c":false}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","fillEnabled":true,"c":{"k":[0,0.64,0.65,1]},"o":{"k":100},"w":{"k":2},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transformieren"}],"nm":"Shape 2","np":3,"mn":"ADBE Vector Group"},{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0],[-3.195,12.249],[0,0]],"o":[[0,0],[0.75,-2.875],[0,0]],"v":[[-15.25,8.125],[3.5,-4.875],[4.812,-13.312]],"c":false}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","fillEnabled":true,"c":{"k":[0,0.64,0.65,1]},"o":{"k":100},"w":{"k":2},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transformieren"}],"nm":"Shape 1","np":3,"mn":"ADBE Vector Group"}],"ip":0,"op":75,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 5","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[21.062,21.125,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[15.125,-17.125],[15.125,14.875],[-17.25,14.875]],"c":false}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","fillEnabled":true,"c":{"k":[0,0.64,0.65,1]},"o":{"k":100},"w":{"k":2.5},"lc":2,"lj":2,"d":[{"n":"d","nm":"strich","v":{"k":0.4}},{"n":"g","nm":"abstand","v":{"k":6}},{"n":"o","nm":"versatz","v":{"k":0}}],"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transformieren"}],"nm":"Shape 1","np":3,"mn":"ADBE Vector Group"}],"ip":0,"op":75,"st":0,"bm":0,"sr":1}],"v":"4.5.0","ddd":0,"ip":0,"op":75,"fr":25,"w":40,"h":40}
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 24 KiB |
@ -0,0 +1,183 @@
|
||||
/*!
|
||||
* VERSION: 1.9.0
|
||||
* DATE: 2017-06-19
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
||||
* This work is subject to the terms at http://greensock.com/standard-license or for
|
||||
* Club GreenSock members, the software agreement that was issued with your membership.
|
||||
*
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
**/
|
||||
var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(global) !== "undefined") ? global : this || window; //helps ensure compatibility with AMD/RequireJS and CommonJS/Node
|
||||
(_gsScope._gsQueue || (_gsScope._gsQueue = [])).push( function() {
|
||||
|
||||
"use strict";
|
||||
|
||||
var _doc = (_gsScope.document || {}).documentElement,
|
||||
_window = _gsScope,
|
||||
_max = function(element, axis) {
|
||||
var dim = (axis === "x") ? "Width" : "Height",
|
||||
scroll = "scroll" + dim,
|
||||
client = "client" + dim,
|
||||
body = document.body;
|
||||
return (element === _window || element === _doc || element === body) ? Math.max(_doc[scroll], body[scroll]) - (_window["inner" + dim] || _doc[client] || body[client]) : element[scroll] - element["offset" + dim];
|
||||
},
|
||||
_unwrapElement = function(value) {
|
||||
if (typeof(value) === "string") {
|
||||
value = TweenLite.selector(value);
|
||||
}
|
||||
if (value.length && value !== _window && value[0] && value[0].style && !value.nodeType) {
|
||||
value = value[0];
|
||||
}
|
||||
return (value === _window || (value.nodeType && value.style)) ? value : null;
|
||||
},
|
||||
_buildGetter = function(e, axis) { //pass in an element and an axis ("x" or "y") and it'll return a getter function for the scroll position of that element (like scrollTop or scrollLeft, although if the element is the window, it'll use the pageXOffset/pageYOffset or the documentElement's scrollTop/scrollLeft or document.body's. Basically this streamlines things and makes a very fast getter across browsers.
|
||||
var p = "scroll" + ((axis === "x") ? "Left" : "Top");
|
||||
if (e === _window) {
|
||||
if (e.pageXOffset != null) {
|
||||
p = "page" + axis.toUpperCase() + "Offset";
|
||||
} else if (_doc[p] != null) {
|
||||
e = _doc;
|
||||
} else {
|
||||
e = document.body;
|
||||
}
|
||||
}
|
||||
return function() {
|
||||
return e[p];
|
||||
};
|
||||
},
|
||||
_getOffset = function(element, container) {
|
||||
var rect = _unwrapElement(element).getBoundingClientRect(),
|
||||
isRoot = (!container || container === _window || container === document.body),
|
||||
cRect = (isRoot ? _doc : container).getBoundingClientRect(),
|
||||
offsets = {x: rect.left - cRect.left, y: rect.top - cRect.top};
|
||||
if (!isRoot && container) { //only add the current scroll position if it's not the window/body.
|
||||
offsets.x += _buildGetter(container, "x")();
|
||||
offsets.y += _buildGetter(container, "y")();
|
||||
}
|
||||
return offsets;
|
||||
},
|
||||
_parseVal = function(value, target, axis) {
|
||||
var type = typeof(value);
|
||||
return !isNaN(value) ? parseFloat(value) : (type === "number" || (type === "string" && value.charAt(1) === "=")) ? value : (value === "max") ? _max(target, axis) : Math.min(_max(target, axis), _getOffset(value, target)[axis]);
|
||||
},
|
||||
|
||||
ScrollToPlugin = _gsScope._gsDefine.plugin({
|
||||
propName: "scrollTo",
|
||||
API: 2,
|
||||
global: true,
|
||||
version:"1.9.0",
|
||||
|
||||
//called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
|
||||
init: function(target, value, tween) {
|
||||
this._wdw = (target === _window);
|
||||
this._target = target;
|
||||
this._tween = tween;
|
||||
if (typeof(value) !== "object") {
|
||||
value = {y:value}; //if we don't receive an object as the parameter, assume the user intends "y".
|
||||
if (typeof(value.y) === "string" && value.y !== "max" && value.y.charAt(1) !== "=") {
|
||||
value.x = value.y;
|
||||
}
|
||||
} else if (value.nodeType) {
|
||||
value = {y:value, x:value};
|
||||
}
|
||||
this.vars = value;
|
||||
this._autoKill = (value.autoKill !== false);
|
||||
this.getX = _buildGetter(target, "x");
|
||||
this.getY = _buildGetter(target, "y");
|
||||
this.x = this.xPrev = this.getX();
|
||||
this.y = this.yPrev = this.getY();
|
||||
if (value.x != null) {
|
||||
this._addTween(this, "x", this.x, _parseVal(value.x, target, "x") - (value.offsetX || 0), "scrollTo_x", true);
|
||||
this._overwriteProps.push("scrollTo_x");
|
||||
} else {
|
||||
this.skipX = true;
|
||||
}
|
||||
if (value.y != null) {
|
||||
this._addTween(this, "y", this.y, _parseVal(value.y, target, "y") - (value.offsetY || 0), "scrollTo_y", true);
|
||||
this._overwriteProps.push("scrollTo_y");
|
||||
} else {
|
||||
this.skipY = true;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
//called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
|
||||
set: function(v) {
|
||||
this._super.setRatio.call(this, v);
|
||||
|
||||
var x = (this._wdw || !this.skipX) ? this.getX() : this.xPrev,
|
||||
y = (this._wdw || !this.skipY) ? this.getY() : this.yPrev,
|
||||
yDif = y - this.yPrev,
|
||||
xDif = x - this.xPrev,
|
||||
threshold = ScrollToPlugin.autoKillThreshold;
|
||||
|
||||
if (this.x < 0) { //can't scroll to a position less than 0! Might happen if someone uses a Back.easeOut or Elastic.easeOut when scrolling back to the top of the page (for example)
|
||||
this.x = 0;
|
||||
}
|
||||
if (this.y < 0) {
|
||||
this.y = 0;
|
||||
}
|
||||
if (this._autoKill) {
|
||||
//note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match.
|
||||
if (!this.skipX && (xDif > threshold || xDif < -threshold) && x < _max(this._target, "x")) {
|
||||
this.skipX = true; //if the user scrolls separately, we should stop tweening!
|
||||
}
|
||||
if (!this.skipY && (yDif > threshold || yDif < -threshold) && y < _max(this._target, "y")) {
|
||||
this.skipY = true; //if the user scrolls separately, we should stop tweening!
|
||||
}
|
||||
if (this.skipX && this.skipY) {
|
||||
this._tween.kill();
|
||||
if (this.vars.onAutoKill) {
|
||||
this.vars.onAutoKill.apply(this.vars.onAutoKillScope || this._tween, this.vars.onAutoKillParams || []);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this._wdw) {
|
||||
_window.scrollTo((!this.skipX) ? this.x : x, (!this.skipY) ? this.y : y);
|
||||
} else {
|
||||
if (!this.skipY) {
|
||||
this._target.scrollTop = this.y;
|
||||
}
|
||||
if (!this.skipX) {
|
||||
this._target.scrollLeft = this.x;
|
||||
}
|
||||
}
|
||||
this.xPrev = this.x;
|
||||
this.yPrev = this.y;
|
||||
}
|
||||
|
||||
}),
|
||||
p = ScrollToPlugin.prototype;
|
||||
|
||||
ScrollToPlugin.max = _max;
|
||||
ScrollToPlugin.getOffset = _getOffset;
|
||||
ScrollToPlugin.buildGetter = _buildGetter;
|
||||
ScrollToPlugin.autoKillThreshold = 7;
|
||||
|
||||
p._kill = function(lookup) {
|
||||
if (lookup.scrollTo_x) {
|
||||
this.skipX = true;
|
||||
}
|
||||
if (lookup.scrollTo_y) {
|
||||
this.skipY = true;
|
||||
}
|
||||
return this._super._kill.call(this, lookup);
|
||||
};
|
||||
|
||||
}); if (_gsScope._gsDefine) { _gsScope._gsQueue.pop()(); }
|
||||
|
||||
//export to AMD/RequireJS and CommonJS/Node (precursor to full modular build system coming at a later date)
|
||||
(function(name) {
|
||||
"use strict";
|
||||
var getGlobal = function() {
|
||||
return (_gsScope.GreenSockGlobals || _gsScope)[name];
|
||||
};
|
||||
if (typeof(module) !== "undefined" && module.exports) { //node
|
||||
require("../TweenLite.js");
|
||||
module.exports = getGlobal();
|
||||
} else if (typeof(define) === "function" && define.amd) { //AMD
|
||||
define(["TweenLite"], getGlobal);
|
||||
}
|
||||
}("ScrollToPlugin"));
|
||||
@ -0,0 +1,267 @@
|
||||
/*
|
||||
|
||||
countUp.js
|
||||
by @inorganik
|
||||
|
||||
*/
|
||||
|
||||
// target = id of html element or var of previously selected html element where counting occurs
|
||||
// startVal = the value you want to begin at
|
||||
// endVal = the value you want to arrive at
|
||||
// decimals = number of decimal places, default 0
|
||||
// duration = duration of animation in seconds, default 2
|
||||
// options = optional object of options (see below)
|
||||
|
||||
var CountUp = function(target, startVal, endVal, decimals, duration, options) {
|
||||
|
||||
var self = this;
|
||||
self.version = function() {
|
||||
return '1.9.3';
|
||||
};
|
||||
|
||||
// default options
|
||||
self.options = {
|
||||
useEasing: true, // toggle easing
|
||||
useGrouping: true, // 1,000,000 vs 1000000
|
||||
separator: ',', // character to use as a separator
|
||||
decimal: '.', // character to use as a decimal
|
||||
easingFn: easeOutExpo, // optional custom easing function, default is Robert Penner's easeOutExpo
|
||||
formattingFn: formatNumber, // optional custom formatting function, default is formatNumber above
|
||||
prefix: '', // optional text before the result
|
||||
suffix: '', // optional text after the result
|
||||
numerals: [] // optionally pass an array of custom numerals for 0-9
|
||||
};
|
||||
|
||||
// extend default options with passed options object
|
||||
if (options && typeof options === 'object') {
|
||||
for (var key in self.options) {
|
||||
if (options.hasOwnProperty(key) && options[key] !== null) {
|
||||
self.options[key] = options[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (self.options.separator === '') {
|
||||
self.options.useGrouping = false;
|
||||
}
|
||||
else {
|
||||
// ensure the separator is a string (formatNumber assumes this)
|
||||
self.options.separator = '' + self.options.separator;
|
||||
}
|
||||
|
||||
// make sure requestAnimationFrame and cancelAnimationFrame are defined
|
||||
// polyfill for browsers without native support
|
||||
// by Opera engineer Erik Möller
|
||||
var lastTime = 0;
|
||||
var vendors = ['webkit', 'moz', 'ms', 'o'];
|
||||
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
||||
window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
|
||||
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
|
||||
}
|
||||
if (!window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame = function(callback, element) {
|
||||
var currTime = new Date().getTime();
|
||||
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
||||
var id = window.setTimeout(function() {
|
||||
callback(currTime + timeToCall);
|
||||
}, timeToCall);
|
||||
lastTime = currTime + timeToCall;
|
||||
return id;
|
||||
};
|
||||
}
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function(id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}
|
||||
|
||||
function formatNumber(num) {
|
||||
var neg = (num < 0),
|
||||
x, x1, x2, x3, i, len;
|
||||
num = Math.abs(num).toFixed(self.decimals);
|
||||
num += '';
|
||||
x = num.split('.');
|
||||
x1 = x[0];
|
||||
x2 = x.length > 1 ? self.options.decimal + x[1] : '';
|
||||
if (self.options.useGrouping) {
|
||||
x3 = '';
|
||||
for (i = 0, len = x1.length; i < len; ++i) {
|
||||
if (i !== 0 && ((i % 3) === 0)) {
|
||||
x3 = self.options.separator + x3;
|
||||
}
|
||||
x3 = x1[len - i - 1] + x3;
|
||||
}
|
||||
x1 = x3;
|
||||
}
|
||||
// optional numeral substitution
|
||||
if (self.options.numerals.length) {
|
||||
x1 = x1.replace(/[0-9]/g, function(w) {
|
||||
return self.options.numerals[+w];
|
||||
})
|
||||
x2 = x2.replace(/[0-9]/g, function(w) {
|
||||
return self.options.numerals[+w];
|
||||
})
|
||||
}
|
||||
return (neg ? '-' : '') + self.options.prefix + x1 + x2 + self.options.suffix;
|
||||
}
|
||||
|
||||
// Robert Penner's easeOutExpo
|
||||
function easeOutExpo(t, b, c, d) {
|
||||
return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
|
||||
}
|
||||
|
||||
function ensureNumber(n) {
|
||||
return (typeof n === 'number' && !isNaN(n));
|
||||
}
|
||||
|
||||
self.initialize = function() {
|
||||
if (self.initialized) return true;
|
||||
|
||||
self.error = '';
|
||||
self.d = (typeof target === 'string') ? document.getElementById(target) : target;
|
||||
if (!self.d) {
|
||||
self.error = '[CountUp] target is null or undefined'
|
||||
return false;
|
||||
}
|
||||
self.startVal = Number(startVal);
|
||||
self.endVal = Number(endVal);
|
||||
// error checks
|
||||
if (ensureNumber(self.startVal) && ensureNumber(self.endVal)) {
|
||||
self.decimals = Math.max(0, decimals || 0);
|
||||
self.dec = Math.pow(10, self.decimals);
|
||||
self.duration = Number(duration) * 1000 || 2000;
|
||||
self.countDown = (self.startVal > self.endVal);
|
||||
self.frameVal = self.startVal;
|
||||
self.initialized = true;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
self.error = '[CountUp] startVal (' + startVal + ') or endVal (' + endVal + ') is not a number';
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Print value to target
|
||||
self.printValue = function(value) {
|
||||
var result = self.options.formattingFn(value);
|
||||
|
||||
var hours = Math.floor(result / 60);
|
||||
var minutes = Math.floor(result % 60);
|
||||
|
||||
if (hours < 10) {
|
||||
hours = '0' + hours;
|
||||
}
|
||||
|
||||
if (minutes < 10) {
|
||||
minutes = '0' + minutes;
|
||||
}
|
||||
|
||||
result = hours + ' <span>:</span> ' + minutes;
|
||||
|
||||
if (self.d.tagName === 'INPUT') {
|
||||
this.d.value = result;
|
||||
}
|
||||
else if (self.d.tagName === 'text' || self.d.tagName === 'tspan') {
|
||||
this.d.textContent = result;
|
||||
}
|
||||
else {
|
||||
this.d.innerHTML = result;
|
||||
}
|
||||
};
|
||||
|
||||
self.count = function(timestamp) {
|
||||
|
||||
if (!self.startTime) {
|
||||
self.startTime = timestamp;
|
||||
}
|
||||
|
||||
self.timestamp = timestamp;
|
||||
var progress = timestamp - self.startTime;
|
||||
self.remaining = self.duration - progress;
|
||||
|
||||
// to ease or not to ease
|
||||
if (self.options.useEasing) {
|
||||
if (self.countDown) {
|
||||
self.frameVal = self.startVal - self.options.easingFn(progress, 0, self.startVal - self.endVal, self.duration);
|
||||
} else {
|
||||
self.frameVal = self.options.easingFn(progress, self.startVal, self.endVal - self.startVal, self.duration);
|
||||
}
|
||||
} else {
|
||||
if (self.countDown) {
|
||||
self.frameVal = self.startVal - ((self.startVal - self.endVal) * (progress / self.duration));
|
||||
} else {
|
||||
self.frameVal = self.startVal + (self.endVal - self.startVal) * (progress / self.duration);
|
||||
}
|
||||
}
|
||||
|
||||
// don't go past endVal since progress can exceed duration in the last frame
|
||||
if (self.countDown) {
|
||||
self.frameVal = (self.frameVal < self.endVal) ? self.endVal : self.frameVal;
|
||||
} else {
|
||||
self.frameVal = (self.frameVal > self.endVal) ? self.endVal : self.frameVal;
|
||||
}
|
||||
|
||||
// decimal
|
||||
self.frameVal = Math.round(self.frameVal * self.dec) / self.dec;
|
||||
|
||||
// format and print value
|
||||
self.printValue(self.frameVal);
|
||||
|
||||
// whether to continue
|
||||
if (progress < self.duration) {
|
||||
self.rAF = requestAnimationFrame(self.count);
|
||||
} else {
|
||||
if (self.callback) self.callback();
|
||||
}
|
||||
};
|
||||
// start your animation
|
||||
self.start = function(callback) {
|
||||
if (!self.initialize()) return;
|
||||
self.callback = callback;
|
||||
self.rAF = requestAnimationFrame(self.count);
|
||||
};
|
||||
// toggles pause/resume animation
|
||||
self.pauseResume = function() {
|
||||
if (!self.paused) {
|
||||
self.paused = true;
|
||||
cancelAnimationFrame(self.rAF);
|
||||
} else {
|
||||
self.paused = false;
|
||||
delete self.startTime;
|
||||
self.duration = self.remaining;
|
||||
self.startVal = self.frameVal;
|
||||
requestAnimationFrame(self.count);
|
||||
}
|
||||
};
|
||||
// reset to startVal so animation can be run again
|
||||
self.reset = function() {
|
||||
self.paused = false;
|
||||
delete self.startTime;
|
||||
self.initialized = false;
|
||||
if (self.initialize()) {
|
||||
cancelAnimationFrame(self.rAF);
|
||||
self.printValue(self.startVal);
|
||||
}
|
||||
};
|
||||
// pass a new endVal and start animation
|
||||
self.update = function(newEndVal) {
|
||||
if (!self.initialize()) return;
|
||||
newEndVal = Number(newEndVal);
|
||||
if (!ensureNumber(newEndVal)) {
|
||||
self.error = '[CountUp] update() - new endVal is not a number: ' + newEndVal;
|
||||
return;
|
||||
}
|
||||
self.error = '';
|
||||
if (newEndVal === self.frameVal) return;
|
||||
cancelAnimationFrame(self.rAF);
|
||||
self.paused = false;
|
||||
delete self.startTime;
|
||||
self.startVal = self.frameVal;
|
||||
self.endVal = newEndVal;
|
||||
self.countDown = (self.startVal > self.endVal);
|
||||
self.rAF = requestAnimationFrame(self.count);
|
||||
};
|
||||
|
||||
// format startVal on initialization
|
||||
if (self.initialize()) self.printValue(self.startVal);
|
||||
};
|
||||
@ -1 +0,0 @@
|
||||
window.transitionend = 'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend';
|
||||
@ -0,0 +1,43 @@
|
||||
window.transitionend = 'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend';
|
||||
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
window.enable_touch_swipe = function(selector, function_swipe_left, function_swipe_right) {
|
||||
var touch_position_x = 0;
|
||||
var delta = 0;
|
||||
|
||||
$body.on('touchstart', selector, function(event) {
|
||||
touch_position_x = event.originalEvent.touches[0].pageX;
|
||||
});
|
||||
|
||||
$body.on('touchmove', selector, function(event) {
|
||||
delta = event.originalEvent.touches[0].pageX - touch_position_x;
|
||||
});
|
||||
|
||||
$body.on('touchend', selector, function(event) {
|
||||
var width_trigger = 50;
|
||||
if (delta > width_trigger) {
|
||||
function_swipe_left($(this))
|
||||
} else if (delta < (width_trigger * -1)) {
|
||||
function_swipe_right($(this));
|
||||
}
|
||||
delta = 0;
|
||||
});
|
||||
};
|
||||
|
||||
window.document_height = $(document).height();
|
||||
window.window_height = $(window).height();
|
||||
window.window_width = $(window).width();
|
||||
window.scroll_top = $(window).scrollTop();
|
||||
|
||||
$(window).on('scroll', function(event) {
|
||||
window.scroll_top = $(window).scrollTop();
|
||||
});
|
||||
|
||||
$(window).on('resize', function(event) {
|
||||
window.document_height = $(document).height();
|
||||
window.window_height = $(window).height();
|
||||
window.window_width = $(window).width();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,59 @@
|
||||
$(function() {
|
||||
|
||||
function create_reveal_elements($container) {
|
||||
var $reveal_containers = $container.find('.reveal_container');
|
||||
$reveal_containers.each(function() {
|
||||
var reveal_container = this;
|
||||
var elementWatcher = scrollMonitor.create(reveal_container);
|
||||
elementWatcher.enterViewport(function() {
|
||||
reveal_elements(reveal_container);
|
||||
});
|
||||
elementWatcher.fullyEnterViewport(function() {
|
||||
reveal_elements(reveal_container);
|
||||
});
|
||||
});
|
||||
|
||||
var $reveal_selfs = $container.find('.reveal_self');
|
||||
$reveal_selfs.each(function() {
|
||||
var reveal_self = this;
|
||||
var elementWatcher = scrollMonitor.create(reveal_self);
|
||||
elementWatcher.enterViewport(function() {
|
||||
reveal_element(reveal_self);
|
||||
});
|
||||
elementWatcher.fullyEnterViewport(function() {
|
||||
reveal_element(reveal_self);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
create_reveal_elements($('html'));
|
||||
|
||||
function remove_reveal_animation(event) {
|
||||
if (event.target === this) {
|
||||
$(this).removeClass('reveal_animation');
|
||||
$(this).off(window.transitionend, remove_reveal_animation);
|
||||
}
|
||||
}
|
||||
|
||||
function reveal_elements(reveal_container) {
|
||||
$(reveal_container).find('.reveal').each(function() {
|
||||
reveal_element(this);
|
||||
});
|
||||
}
|
||||
|
||||
function reveal_element(element) {
|
||||
window.requestAnimationFrame(function() {
|
||||
$(element).on(window.transitionend, remove_reveal_animation);
|
||||
$(element).removeClass('reveal');
|
||||
});
|
||||
}
|
||||
|
||||
window.create_reveal_elements = create_reveal_elements;
|
||||
|
||||
reveal_element($('.header'));
|
||||
reveal_element($('.header__logo'));
|
||||
reveal_elements($('.timetable__clock__frame'));
|
||||
reveal_element($('.timetable__next'));
|
||||
reveal_element($('.timetable__start__background'));
|
||||
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
$body.find('.animated_icon').each(function() {
|
||||
$(this).html('');
|
||||
var animation_name = $(this).attr('data-icon');
|
||||
var animation = bodymovin.loadAnimation({
|
||||
container: this,
|
||||
path: '/static/animation/' + animation_name + '.json',
|
||||
renderer: 'svg',
|
||||
loop: true,
|
||||
autoplay: true
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,114 @@
|
||||
function init_map() {
|
||||
var location = {lat: 47.20388, lng: 8.58176};
|
||||
var center;
|
||||
if ($(window).width() > 840) {
|
||||
center = {lat: location.lat, lng: location.lng + 0.06};
|
||||
} else {
|
||||
center = {lat: location.lat - 0.06, lng: location.lng};
|
||||
}
|
||||
|
||||
var map = new google.maps.Map(document.getElementById('map'), {
|
||||
zoom: 12,
|
||||
center: center,
|
||||
disableDefaultUI: true,
|
||||
scrollwheel: false,
|
||||
zoomControl: true,
|
||||
zoomControlOptions: {
|
||||
position: google.maps.ControlPosition.RIGHT_TOP
|
||||
},
|
||||
styles: [
|
||||
{
|
||||
"featureType": "administrative.neighborhood",
|
||||
"stylers": [
|
||||
{
|
||||
"visibility": "off"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"featureType": "poi",
|
||||
"elementType": "labels.text",
|
||||
"stylers": [
|
||||
{
|
||||
"visibility": "off"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"featureType": "road",
|
||||
"elementType": "labels",
|
||||
"stylers": [
|
||||
{
|
||||
"visibility": "off"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"featureType": "water",
|
||||
"elementType": "labels.text",
|
||||
"stylers": [
|
||||
{
|
||||
"visibility": "off"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
var image = {
|
||||
url: '/static/img/marker.png',
|
||||
size: new google.maps.Size(50, 60),
|
||||
origin: new google.maps.Point(0, 0),
|
||||
anchor: new google.maps.Point(25, 60),
|
||||
scaledSize: new google.maps.Size(50, 60)
|
||||
};
|
||||
var marker = new google.maps.Marker({
|
||||
position: location,
|
||||
map: map,
|
||||
icon: image
|
||||
});
|
||||
|
||||
var input = document.getElementById('journey_calculator__input');
|
||||
if (input) {
|
||||
var result = input.parentNode.querySelector('.journey_calculator__result');
|
||||
var autocomplete = new google.maps.places.Autocomplete(input, {
|
||||
types: ['geocode'],
|
||||
componentRestrictions: {country: 'ch'}
|
||||
}
|
||||
);
|
||||
|
||||
var callback_timeout;
|
||||
autocomplete.addListener('place_changed', function() {
|
||||
input.parentNode.classList.remove('error');
|
||||
input.parentNode.classList.add('loaded');
|
||||
result.classList.add('loading');
|
||||
var place = autocomplete.getPlace();
|
||||
|
||||
if (!place.geometry) {
|
||||
input.blur();
|
||||
input.parentNode.classList.add('error');
|
||||
}
|
||||
|
||||
var origin = new google.maps.LatLng(place.geometry.location.lat(), place.geometry.location.lng());
|
||||
var destination = new google.maps.LatLng(location);
|
||||
|
||||
var service = new google.maps.DistanceMatrixService();
|
||||
service.getDistanceMatrix(
|
||||
{
|
||||
origins: [origin],
|
||||
destinations: [destination],
|
||||
travelMode: 'DRIVING'
|
||||
}, callback);
|
||||
|
||||
function callback(response, status) {
|
||||
window.clearTimeout(callback_timeout);
|
||||
callback_timeout = window.setTimeout(function() {
|
||||
var duration = response.rows[0].elements[0].duration.value;
|
||||
var minutes = Math.round(duration / 60);
|
||||
result.setAttribute('data-duration', minutes);
|
||||
result.classList.remove('loading');
|
||||
}, 300);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
var $content_navigation = $('.content__navigation');
|
||||
var $content = $('.content');
|
||||
var content_navigation_class = 'content__navigation__anchor';
|
||||
|
||||
if ($content_navigation.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$content.find('.section').each(function() {
|
||||
var $this = $(this);
|
||||
var id = $this.attr('id');
|
||||
var text = $this.find('h2').text();
|
||||
var content_navigation_link = '<a class="' + content_navigation_class + '" href="#' + id + '">' + text + '</a>';
|
||||
$content_navigation.find('ul').append('<li>' + content_navigation_link + '</li>');
|
||||
$this.find('.section__title__content').html(text);
|
||||
});
|
||||
|
||||
if (window.location.hash) {
|
||||
var hash = window.location.hash;
|
||||
window.requestAnimationFrame(function() {
|
||||
window.location.hash = hash;
|
||||
});
|
||||
}
|
||||
|
||||
$body.on('click', '.' + content_navigation_class, function(event) {
|
||||
event.preventDefault();
|
||||
var $this = $(this);
|
||||
$content_navigation.find('.active').removeClass('active');
|
||||
$this.addClass('active');
|
||||
TweenLite.to(window, 0.5, {
|
||||
scrollTo: $this.attr('href')
|
||||
});
|
||||
});
|
||||
|
||||
var $navigation_watchers = $content.find('.section');
|
||||
$navigation_watchers.each(function() {
|
||||
var element = this;
|
||||
var elementWatcher = scrollMonitor.create(element);
|
||||
elementWatcher.fullyEnterViewport(function() {
|
||||
$content_navigation.find('.active').removeClass('active');
|
||||
$content_navigation.find('a[href="#' + $(element).attr('id') + '"]').addClass('active');
|
||||
});
|
||||
});
|
||||
|
||||
var content_navigation_offset_top = $content_navigation.offset().top;
|
||||
$(window).on('resize', function() {
|
||||
content_navigation_offset_top = $content_navigation.offset().top;
|
||||
});
|
||||
|
||||
var $content_navigation_progress_fill = $('.content__navigation__progress__fill');
|
||||
|
||||
function content_navigation_scroll() {
|
||||
var progress = Math.round(100 / window.document_height * (window.scroll_top + window.window_height));
|
||||
$content_navigation_progress_fill.height(progress + '%');
|
||||
|
||||
if (content_navigation_offset_top && window.scroll_top >= content_navigation_offset_top) {
|
||||
$content_navigation.addClass('fixed');
|
||||
} else {
|
||||
$content_navigation.removeClass('fixed');
|
||||
}
|
||||
}
|
||||
|
||||
function watch_content_navigation_scroll() {
|
||||
if (!window.navigation_is_open) {
|
||||
content_navigation_scroll();
|
||||
}
|
||||
window.requestAnimationFrame(watch_content_navigation_scroll);
|
||||
}
|
||||
|
||||
watch_content_navigation_scroll();
|
||||
});
|
||||
@ -0,0 +1,69 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
var $canvas = $('#canvas');
|
||||
var $navigation = $('#navigation');
|
||||
|
||||
window.onpageshow = function(event) {
|
||||
if (event.persisted) {
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
$body.on('click', 'a', function(event) {
|
||||
var href = $(this).attr('href');
|
||||
var target = $(this).attr('target');
|
||||
if (href.indexOf('/') === 0 && !target && !event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey && !$('html').hasClass('cms-ready')) {
|
||||
event.preventDefault();
|
||||
$body.addClass('unload loading');
|
||||
window.setTimeout(function() {
|
||||
window.location = href;
|
||||
}, 50);
|
||||
}
|
||||
});
|
||||
|
||||
$body.on('click', '.header__button--navigation', function(event) {
|
||||
event.preventDefault();
|
||||
open_navigation();
|
||||
});
|
||||
|
||||
$body.on('click', '.navigation__close', function(event) {
|
||||
event.preventDefault();
|
||||
close_navigation();
|
||||
});
|
||||
|
||||
var scroll_top = 0;
|
||||
|
||||
function open_navigation() {
|
||||
window.timetable_can_scroll = false;
|
||||
window.navigation_is_open = true;
|
||||
|
||||
$navigation.one(window.transitionend, function() {
|
||||
window.requestAnimationFrame(function() {
|
||||
$navigation.css('position', 'relative');
|
||||
$navigation.off(window.transitionend);
|
||||
});
|
||||
});
|
||||
|
||||
window.requestAnimationFrame(function() {
|
||||
scroll_top = $(window).scrollTop();
|
||||
$canvas.css({
|
||||
'top': scroll_top * -1,
|
||||
'position': 'fixed'
|
||||
});
|
||||
window.requestAnimationFrame(function() {
|
||||
$body.addClass('navigation_open');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function close_navigation() {
|
||||
$navigation.removeAttr('style');
|
||||
$body.removeClass('navigation_open');
|
||||
window.requestAnimationFrame(function() {
|
||||
$canvas.removeAttr('style');
|
||||
$(window).scrollTop(scroll_top);
|
||||
window.navigation_is_open = false;
|
||||
window.timetable_can_scroll = true;
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,24 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
$body.on('submit', '.form', function(event) {
|
||||
event.preventDefault();
|
||||
var $form = $(this);
|
||||
var id = $form.attr('id');
|
||||
|
||||
$form.addClass('loading');
|
||||
|
||||
$.ajax({
|
||||
type: $form.attr('method'),
|
||||
url: $form.attr('action'),
|
||||
data: $form.serialize(),
|
||||
success: function(data) {
|
||||
var $new = $(data).find('#' + id);
|
||||
$new.find('.reveal').each(function() {
|
||||
$(this).removeClass('reveal reveal_animation');
|
||||
});
|
||||
$form.replaceWith($new);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,29 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
$body.on('click', '.reference_list__item', function(event) {
|
||||
event.preventDefault();
|
||||
var $this = $(this);
|
||||
var $reference_list = $this.parents('.reference_list');
|
||||
var active = $reference_list.attr('data-active');
|
||||
var id = $this.parents('.reference_list__item__frame').attr('data-id');
|
||||
var iframe;
|
||||
var player;
|
||||
|
||||
if (active) {
|
||||
iframe = $reference_list.find('.reference_list__video__item.data_id_' + active).find('iframe').get(0);
|
||||
player = new Vimeo.Player(iframe);
|
||||
player.pause();
|
||||
}
|
||||
|
||||
if (id === 'x') {
|
||||
$reference_list.removeAttr('data-active');
|
||||
} else {
|
||||
$reference_list.attr('data-active', id);
|
||||
|
||||
iframe = $reference_list.find('.reference_list__video__item.data_id_' + id).find('iframe').get(0);
|
||||
player = new Vimeo.Player(iframe);
|
||||
player.play();
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,40 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
function slider_prev_item($slider) {
|
||||
var active = parseInt($slider.attr('data-active'));
|
||||
if (active > 0) {
|
||||
window.requestAnimationFrame(function() {
|
||||
$slider.attr('data-active', active - 1);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function slider_next_item($slider) {
|
||||
var active = parseInt($slider.attr('data-active'));
|
||||
var last = parseInt($slider.attr('data-last'));
|
||||
if (active < last) {
|
||||
window.requestAnimationFrame(function() {
|
||||
$slider.attr('data-active', active + 1);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$body.on('click', '.slider__navigation', function(event) {
|
||||
event.preventDefault();
|
||||
var $this = $(this);
|
||||
var $slider = $this.parents('.slider');
|
||||
if ($slider.length === 0) {
|
||||
$slider = $this.parents('.text_slider');
|
||||
}
|
||||
var prev = $this.hasClass('slider__navigation--prev');
|
||||
if (prev) {
|
||||
slider_prev_item($slider);
|
||||
} else {
|
||||
slider_next_item($slider);
|
||||
}
|
||||
});
|
||||
|
||||
window.enable_touch_swipe('.slider', slider_prev_item, slider_next_item);
|
||||
window.enable_touch_swipe('.text_slider', slider_prev_item, slider_next_item);
|
||||
});
|
||||
@ -0,0 +1,144 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
var $timetable = $('#timetable');
|
||||
|
||||
if ($timetable.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$(window).scrollTop(0);
|
||||
|
||||
window.timetable_can_scroll = false;
|
||||
window.setTimeout(function() {
|
||||
window.timetable_can_scroll = true;
|
||||
}, 2500);
|
||||
|
||||
var activated = false;
|
||||
|
||||
function test_scroll() {
|
||||
if (activated) {
|
||||
if ($(window).scrollTop() < $(window).height() * 0.05 && window.timetable_can_scroll) {
|
||||
window.prevent_scroll_calc = true;
|
||||
$timetable.attr('data-active', 0);
|
||||
$timetable.removeClass('active');
|
||||
activated = false;
|
||||
}
|
||||
} else {
|
||||
if ($(window).scrollTop() > $(window).height() * 0.05 && window.timetable_can_scroll) {
|
||||
init_timetable_items();
|
||||
}
|
||||
}
|
||||
window.requestAnimationFrame(test_scroll);
|
||||
}
|
||||
|
||||
function init_timetable_items() {
|
||||
$timetable.attr('data-active', 1);
|
||||
|
||||
$timetable.find('.timetable__item').each(function() {
|
||||
$(this).addClass('reveal_container')
|
||||
});
|
||||
window.setTimeout(function() {
|
||||
$timetable.addClass('active');
|
||||
|
||||
window.requestAnimationFrame(function() {
|
||||
$timetable.find('.timetable__item').each(function() {
|
||||
var index = parseInt($(this).attr('data-id'));
|
||||
var elementWatcher = scrollMonitor.create(this);
|
||||
elementWatcher.enterViewport(function() {
|
||||
set_timetable_item(index);
|
||||
});
|
||||
});
|
||||
|
||||
window.create_reveal_elements($timetable);
|
||||
|
||||
window.prevent_scroll_calc = false;
|
||||
window.calc_scrolls();
|
||||
|
||||
activated = true;
|
||||
});
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
window.requestAnimationFrame(test_scroll);
|
||||
|
||||
var current_index = 0;
|
||||
var last_index = parseInt($timetable.attr('data-last'));
|
||||
var elements = document.getElementsByClassName('timetable__item');
|
||||
|
||||
var $timetable_next = $('.timetable__next');
|
||||
var $timetable_clock_digital_time = $('#timetable__clock__digital__time');
|
||||
|
||||
var $timetable_progress = $('#timetable__clock__progress');
|
||||
var timetable_clock_progress_max = parseFloat($timetable_progress.attr('stroke-dasharray'));
|
||||
|
||||
$body.on('click', '.timetable__next', function(event) {
|
||||
event.preventDefault();
|
||||
if (!activated) {
|
||||
$(window).scrollTop($(window).height());
|
||||
init_timetable_items();
|
||||
}
|
||||
});
|
||||
|
||||
// var handle_scroll = function(evt) {
|
||||
// if (!can_scroll) {
|
||||
// return false;
|
||||
// }
|
||||
// if (!evt) evt = event;
|
||||
// var delta = event.wheelDelta;
|
||||
// if (event.webkitDirectionInvertedFromDevice) delta = -delta;
|
||||
// if (Math.abs(delta) > 20) {
|
||||
// if (delta < 0) {
|
||||
// prev_timetable_item();
|
||||
// } else {
|
||||
// next_timetable_item();
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
// document.addEventListener('DOMMouseScroll', handle_scroll, false); // for Firefox
|
||||
// document.addEventListener('mousewheel', handle_scroll, false);
|
||||
|
||||
function next_timetable_item() {
|
||||
set_timetable_item(current_index + 1);
|
||||
}
|
||||
|
||||
//
|
||||
// function prev_timetable_item() {
|
||||
// set_timetable_item(current_index - 1);
|
||||
// }
|
||||
//
|
||||
function set_timetable_item(index) {
|
||||
if (index <= last_index && index >= 0) {
|
||||
current_index = index;
|
||||
|
||||
$timetable.attr('data-active', current_index);
|
||||
|
||||
if (current_index === last_index) {
|
||||
$timetable_next.addClass('hidden');
|
||||
} else {
|
||||
$timetable_next.removeClass('hidden');
|
||||
}
|
||||
|
||||
update_time_progess();
|
||||
}
|
||||
}
|
||||
|
||||
function update_time_progess() {
|
||||
var $to = $(elements[current_index - 1]);
|
||||
var to_minutes = parseInt($to.attr('data-hour')) * 60 + parseInt($to.attr('data-minute'));
|
||||
var to_minutes_with_offset = to_minutes - (6 * 60);
|
||||
var total_progress = (1 / (12 * 60)) * to_minutes_with_offset;
|
||||
|
||||
var start = $timetable_clock_digital_time.text();
|
||||
var start_time = start.split(':');
|
||||
var start_minutes = parseInt(start_time[0]) * 60 + parseInt(start_time[1]);
|
||||
var count_up = new CountUp('timetable__clock__digital__time', start_minutes, to_minutes, 0, 1.5, {
|
||||
useEasing: true,
|
||||
separator: ''
|
||||
});
|
||||
count_up.start();
|
||||
|
||||
if (to_minutes) {
|
||||
$timetable_progress.attr('stroke-dashoffset', timetable_clock_progress_max * Math.abs(total_progress - 1));
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,40 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
|
||||
$body.find('.video').each(function() {
|
||||
var $video = $(this);
|
||||
var iframe = this.querySelector('iframe');
|
||||
var player = new Vimeo.Player(iframe);
|
||||
var is_playing = false;
|
||||
|
||||
$video.on('click', '.video__thumbnail', function(event) {
|
||||
event.preventDefault();
|
||||
if (is_playing) {
|
||||
player.pause();
|
||||
} else {
|
||||
player.play();
|
||||
}
|
||||
});
|
||||
|
||||
player.on('play', function() {
|
||||
is_playing = true;
|
||||
window.requestAnimationFrame(function() {
|
||||
$video.addClass('playing');
|
||||
});
|
||||
});
|
||||
|
||||
player.on('pause', function() {
|
||||
is_playing = false;
|
||||
window.requestAnimationFrame(function() {
|
||||
$video.removeClass('playing');
|
||||
});
|
||||
});
|
||||
|
||||
player.on('ended', function() {
|
||||
is_playing = false;
|
||||
window.requestAnimationFrame(function() {
|
||||
$video.removeClass('playing');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,102 @@
|
||||
$(function() {
|
||||
var scrolls = [];
|
||||
|
||||
window.prevent_scroll_calc = false;
|
||||
var $timetable = $('#timetable');
|
||||
if ($timetable.length > 0) {
|
||||
window.prevent_scroll_calc = true;
|
||||
}
|
||||
|
||||
function calc_scrolls() {
|
||||
scrolls = [];
|
||||
var i;
|
||||
var scroll_elements = document.querySelectorAll('.scroll');
|
||||
for (i = 0; i < scroll_elements.length; i++) {
|
||||
var element = scroll_elements[i];
|
||||
var height = element.offsetHeight;
|
||||
var offset_top = $(element).offset().top;
|
||||
var center_offset = offset_top + (height / 2);
|
||||
|
||||
var ease_multiplier = parseFloat(element.getAttribute('data-ease-multiplier'));
|
||||
if (!ease_multiplier) {
|
||||
ease_multiplier = 1;
|
||||
}
|
||||
|
||||
scrolls.push({
|
||||
offset: center_offset,
|
||||
element: element,
|
||||
mod: element.getAttribute('data-scroll-mod'),
|
||||
ease_multiplier: ease_multiplier
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (!window.prevent_scroll_calc) {
|
||||
calc_scrolls();
|
||||
}
|
||||
window.calc_scrolls = calc_scrolls;
|
||||
|
||||
var scroll_top = 0;
|
||||
|
||||
function change_scrolls() {
|
||||
// if (window.is_scroll_animating) {
|
||||
// return false;
|
||||
// }
|
||||
var window_height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
|
||||
var half_window_height = window_height / 2;
|
||||
var window_scroll_top = document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop;
|
||||
scroll_top = window_scroll_top + half_window_height;
|
||||
for (var i = 0; i < scrolls.length; i++) {
|
||||
var item = scrolls[i];
|
||||
var relative_offset = item.offset - scroll_top;
|
||||
relative_offset = relative_offset * 0.05;
|
||||
|
||||
var css_value = 'translateY';
|
||||
var css_unit = 'px';
|
||||
var appling_offset = relative_offset * item.ease_multiplier;
|
||||
|
||||
if (item.mod === 'rotate') {
|
||||
css_value = 'rotate';
|
||||
css_unit = 'deg';
|
||||
}
|
||||
if (item.mod === 'horizontal') {
|
||||
css_value = 'translateX';
|
||||
}
|
||||
|
||||
item.element.style.transform = "" +
|
||||
css_value + "(" + appling_offset + css_unit + ")";
|
||||
item.element.style.webkitTransform = "" +
|
||||
css_value + "(" + appling_offset + css_unit + ")";
|
||||
item.element.style.MozTransform = "" +
|
||||
css_value + "(" + appling_offset + css_unit + ")";
|
||||
item.element.style.msTransform = "" +
|
||||
css_value + "(" + appling_offset + css_unit + ")";
|
||||
item.element.style.OTransform = "" +
|
||||
css_value + "(" + appling_offset + css_unit + ")";
|
||||
}
|
||||
}
|
||||
|
||||
function watch_scrolls() {
|
||||
if (!window.navigation_is_open) {
|
||||
change_scrolls();
|
||||
}
|
||||
window.requestAnimationFrame(watch_scrolls);
|
||||
}
|
||||
|
||||
window.requestAnimationFrame(watch_scrolls);
|
||||
|
||||
var resize_window_width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
window.addEventListener('resize', function(event) {
|
||||
var window_width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
if (document.querySelector('html').classList.contains('touchevents') && resize_window_width === window_width) {
|
||||
return false;
|
||||
}
|
||||
resize_window_width = window_width;
|
||||
if (!window.prevent_scroll_calc) {
|
||||
calc_scrolls();
|
||||
}
|
||||
window.requestAnimationFrame(function() {
|
||||
change_scrolls();
|
||||
});
|
||||
}, false);
|
||||
});
|
||||
@ -0,0 +1,83 @@
|
||||
$(function() {
|
||||
var $body = $('body');
|
||||
var $canvas = $('#canvas');
|
||||
|
||||
$body.on('click', '.header__button--search', function(event) {
|
||||
event.preventDefault();
|
||||
open_search();
|
||||
});
|
||||
|
||||
$body.on('click', '.search__close', function(event) {
|
||||
if (!$body.hasClass('_search') && !$body.hasClass('search_results')) {
|
||||
event.preventDefault();
|
||||
close_search();
|
||||
}
|
||||
});
|
||||
|
||||
var scroll_top = 0;
|
||||
var search_input_timeout;
|
||||
|
||||
function open_search() {
|
||||
window.timetable_can_scroll = false;
|
||||
window.navigation_is_open = true;
|
||||
window.requestAnimationFrame(function() {
|
||||
scroll_top = $(window).scrollTop();
|
||||
$canvas.css({
|
||||
'top': scroll_top * -1,
|
||||
'position': 'fixed'
|
||||
});
|
||||
window.requestAnimationFrame(function() {
|
||||
$body.addClass('search_open');
|
||||
window.clearTimeout(search_input_timeout);
|
||||
search_input_timeout = window.setTimeout(function() {
|
||||
$body.find('#search__query').focus();
|
||||
}, 800);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function close_search() {
|
||||
window.clearTimeout(search_input_timeout);
|
||||
$body.find('#search__query').blur();
|
||||
window.requestAnimationFrame(function() {
|
||||
$body.removeClass('search_open');
|
||||
$canvas.removeAttr('style');
|
||||
$(window).scrollTop(scroll_top);
|
||||
window.navigation_is_open = false;
|
||||
window.timetable_can_scroll = true;
|
||||
});
|
||||
}
|
||||
|
||||
$body.on('submit', '.search__form', function(event) {
|
||||
event.preventDefault();
|
||||
var $form = $(this);
|
||||
|
||||
$body.find('#search__query').blur();
|
||||
|
||||
var form_url = $form.attr('action');
|
||||
var serialized_form = $form.serialize();
|
||||
history.pushState({}, 'search', form_url + '?' + serialized_form);
|
||||
|
||||
if (serialized_form !== 'q=') {
|
||||
if ($body.hasClass('search_results')) {
|
||||
$body.find('.search__results').addClass('loading');
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: $form.attr('method'),
|
||||
url: form_url,
|
||||
data: serialized_form,
|
||||
success: function(data) {
|
||||
$body.find('#canvas').remove();
|
||||
$body.addClass('_search');
|
||||
$body.find('.search__results').replaceWith($(data).find('.search__results'));
|
||||
window.requestAnimationFrame(function() {
|
||||
$body.addClass('search_results');
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$body.removeClass('search_results');
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -1,7 +1,35 @@
|
||||
$white: #FFFFFF;
|
||||
$light_gray: #F4F4F4;
|
||||
$medium_light_gray: #E6E6E6;
|
||||
$gray: #ADADAD;
|
||||
$dark_gray: #8f8f8f;
|
||||
$near_black: #444444;
|
||||
$black: #000000;
|
||||
|
||||
$default_font_family: sans-serif;
|
||||
$green: #98C53A;
|
||||
|
||||
$red: rgba(200, 0, 0, 0.66);
|
||||
|
||||
$default_font_family: 'Muli', sans-serif;
|
||||
$default_font_size: 16px;
|
||||
|
||||
$max_breakpoint: 1600px;
|
||||
@function em($pixels, $context: $default_font_size) {
|
||||
@if (unitless($pixels)) {
|
||||
$pixels: $pixels * 1px;
|
||||
}
|
||||
|
||||
@if (unitless($context)) {
|
||||
$context: $context * 1px;
|
||||
}
|
||||
|
||||
@return $pixels / $context * 1rem;
|
||||
}
|
||||
|
||||
$huge_breakpoint: 1700px;
|
||||
$large_breakpoint: 1200px;
|
||||
$medium_breakpoint: 840px;
|
||||
$small_breakpoint: 600px;
|
||||
$tiny_breakpoint: 350px;
|
||||
|
||||
$reveal_duration: 1.5s;
|
||||
$reveal_timing_function: $easeOutQuart;
|
||||
@ -1,38 +1,24 @@
|
||||
// Follows Google Fonts Naming Convention with Font Squirrel generation
|
||||
// Font Specification: Weight, Code, Italic
|
||||
$fonts: ('extralight', 200, 1),
|
||||
('light', 300, 1),
|
||||
('regular', 400, 1),
|
||||
('semibold', 500, 1),
|
||||
('bold', 700, 1),
|
||||
('extrabold', 800, 1),
|
||||
('black', 900, 1);
|
||||
|
||||
$typefaces: (
|
||||
'Example': (
|
||||
('thin', 100, true),
|
||||
('extralight', 200, true),
|
||||
('light', 300, true),
|
||||
('regular', 400, true),
|
||||
('medium', 500, true),
|
||||
('semibold', 600, true),
|
||||
('bold', 700, true),
|
||||
('extrabold', 800, true),
|
||||
('black', 900, true),
|
||||
),
|
||||
);
|
||||
|
||||
@each $name, $typeface in $typefaces {
|
||||
@each $font in $typeface {
|
||||
$path_prefix: '../fonts/#{$name}/#{to-lower-case($name)}';
|
||||
@font-face {
|
||||
font-family: $name;
|
||||
src: url('#{$path_prefix}-#{nth($font, 1)}.woff2') format('woff2'),
|
||||
url('#{$path_prefix}-#{nth($font, 1)}.woff') format('woff');
|
||||
font-weight: nth($font, 2);
|
||||
font-style: normal;
|
||||
}
|
||||
@if (nth($font, 3)) {
|
||||
@font-face {
|
||||
font-family: $name;
|
||||
src: url('#{$path_prefix}-#{nth($font, 1)}italic.woff2') format('woff2'),
|
||||
url('#{$path_prefix}-#{nth($font, 1)}italic.woff') format('woff');
|
||||
font-weight: nth($font, 2);
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
@each $font in $fonts {
|
||||
@font-face {
|
||||
font-family: 'Muli';
|
||||
src: url('../fonts/Muli/muli-#{nth($font, 1)}.woff2') format('woff2'),
|
||||
url('../fonts/Muli/muli-#{nth($font, 1)}.woff') format('woff');
|
||||
font-weight: nth($font, 2);
|
||||
font-style: normal;
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'Muli';
|
||||
src: url('../fonts/Muli/muli-#{nth($font, 1)}italic.woff2') format('woff2'),
|
||||
url('../fonts/Muli/muli-#{nth($font, 1)}italic.woff') format('woff');
|
||||
font-weight: nth($font, 2);
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,73 @@
|
||||
*, *:before, *:after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
&.r {
|
||||
font-size: 20px !important;
|
||||
@media screen and (max-width: $huge_breakpoint) {
|
||||
font-size: 18px !important;
|
||||
}
|
||||
@media screen and (max-width: 1440px) {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
&.unload {
|
||||
> * {
|
||||
will-change: opacity;
|
||||
transition: opacity 0.3s $easeOutQuart !important;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
&:before {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding-top: em(50px);
|
||||
position: relative;
|
||||
.search_results & {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll {
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
@mixin reveal_transition() {
|
||||
transition: opacity $reveal_duration $reveal_timing_function,
|
||||
transform $reveal_duration $reveal_timing_function !important;
|
||||
}
|
||||
|
||||
.reveal_animation {
|
||||
@include reveal_transition();
|
||||
@for $i from 0 through 30 {
|
||||
&.data_delay_#{$i} {
|
||||
transition-delay: $i * 0.1s !important;
|
||||
}
|
||||
}
|
||||
&.reveal {
|
||||
transform: translateX(100px);
|
||||
opacity: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.cms-toolbar-expanded {
|
||||
*.reveal {
|
||||
transform: none;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,42 @@
|
||||
html {
|
||||
font-family: $default_font_family;
|
||||
font-size: $default_font_size;
|
||||
@include font_smoothing();
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
h1, .h1 {
|
||||
font-size: em(60px);
|
||||
font-weight: 500;
|
||||
line-height: 1.3;
|
||||
color: $green;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
text-align: center;
|
||||
@media screen and (max-width: $medium_breakpoint) {
|
||||
font-size: em(30px);
|
||||
}
|
||||
}
|
||||
|
||||
.h1 {
|
||||
text-transform: none;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h2, .h2 {
|
||||
font-size: em(40px);
|
||||
color: $green;
|
||||
font-weight: 400;
|
||||
line-height: 1.3;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
& + * {
|
||||
margin-top: em(30px) !important;
|
||||
}
|
||||
& + .text_slider {
|
||||
margin-top: em(70px) !important;
|
||||
}
|
||||
@media screen and (max-width: $medium_breakpoint) {
|
||||
font-size: em(30px);
|
||||
}
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
$transform_ems: false;
|
||||
|
||||
@function em($pixels, $context: $default_font_size) {
|
||||
@if ($transform_ems) {
|
||||
@if (unitless($pixels)) {
|
||||
$pixels: $pixels * 1px;
|
||||
}
|
||||
|
||||
@if (unitless($context)) {
|
||||
$context: $context * 1px;
|
||||
}
|
||||
|
||||
@return $pixels / $context * 1rem;
|
||||
} @else {
|
||||
@return $pixels;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin font_smoothing {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
@mixin absolute_properties() {
|
||||
@content;
|
||||
@media screen and (min-width: $max_breakpoint) {
|
||||
$transform_ems: true !global;
|
||||
@content;
|
||||
$transform_ems: false !global;
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,30 @@
|
||||
@import "_reset.scss";
|
||||
@import "_animation.scss";
|
||||
@import "_util.scss";
|
||||
@import "_config.scss";
|
||||
@import "_fonts.scss";
|
||||
@import "_typography.scss";
|
||||
@import "_layout.scss";
|
||||
@import "_layout.scss";
|
||||
@import "modules/_header.scss";
|
||||
@import "modules/_search.scss";
|
||||
@import "modules/_navigation.scss";
|
||||
@import "modules/_pages.scss";
|
||||
@import "modules/_contact.scss";
|
||||
@import "modules/_content.scss";
|
||||
@import "modules/_admin_editor.scss";
|
||||
@import "modules/plugins/_quote.scss";
|
||||
@import "modules/plugins/_slider.scss";
|
||||
@import "modules/plugins/_section.scss";
|
||||
@import "modules/plugins/_title_list.scss";
|
||||
@import "modules/plugins/_section_title.scss";
|
||||
@import "modules/plugins/_section_text.scss";
|
||||
@import "modules/plugins/_video.scss";
|
||||
@import "modules/plugins/_partner.scss";
|
||||
@import "modules/plugins/_picture.scss";
|
||||
@import "modules/plugins/_social_media.scss";
|
||||
@import "modules/plugins/_journey_calculator.scss";
|
||||
@import "modules/plugins/_download_section.scss";
|
||||
@import "modules/plugins/_text_slider.scss";
|
||||
@import "modules/plugins/_highlight_list.scss";
|
||||
@import "modules/plugins/_timetable.scss";
|
||||
@import "modules/plugins/_reference_list.scss";
|
||||
@import "modules/plugins/_form.scss";
|
||||
@ -0,0 +1,5 @@
|
||||
#admin_editor {
|
||||
padding: 30px;
|
||||
margin: 0 !important;
|
||||
text-align: left !important;
|
||||
}
|
||||