Description
Foliodot configuration object definition.
Examples
Usage
Learn more configuration file and configuration object
Foliodot options and settings presented as full javascript configuration file or configuration object
Displayed settings below are default values along with custom examples for particular option.
Hint:
;(function( FOLIO, undefined ) {
'use strict';
FOLIO.config = {
FOLIO.init({
Foliodot configuration object definition.
Learn more configuration file and configuration object
project : {
Configuration object for project section.
transition : 'left',
transition : 'name'
Default project page transition type. Reefers to name of transition defined in transitions
object.
right, left, up, down, fade, scale, none
If transition name passed as string is incorrect or such transition is not defined, default transition apply.
views : 'normal contain cover',
views : 'cover normal contain',
views : 'cover normal',
views : 'normal',
views : 'normal || contain || cover'
List of available views/sizes for single photo page visitor is able to cycle through by views button.
normal
- default photo size.contain
- photo fits to page container.cover
- photo covers whole page container.
buttonSection : 'thumbnails',
buttonSection : 'icon',
buttonSection : '<div class="ui button button-section"><span>{{label}}</span></div>',
buttonSection : false,
buttonSection : 'label' | 'icon' | '<html>' | true | false
Switch to thumbnails section.
true
— include previously removed buttonfalse
— remove buttonbuttonPrevious : 'prev',
buttonPrevious : 'icon',
buttonPrevious : '<div class="ui ui-button ui-button-prev" title="Previous page (←)"><span>{{label}}</span></div>',
buttonPrevious : false,
buttonPrevious : 'label' | 'icon' | '<html>' | true | false
Navigate to previous project page
true
— include previously removed buttonfalse
— remove buttonfalse
to remove button from project sectionbuttonNext : 'next',
buttonNext : 'icon',
buttonNext : '<div class="ui ui-button ui-button-next" title="Next page (→)"><span>{{label}}</span></div>',
buttonNext : false,
buttonNext : 'label' | 'icon' | 'html-string' | true | false
Navigate to the next project page.
true
— include previously removed buttonfalse
— remove buttonfalse
to remove button from project section
buttonViews : '<div class="ui ui-button ui-button-views" title="Toggle photo view (v)"><span>{{label}}</span></div>',
buttonViews : false,
buttonViews : 'html-string' | true | false
Cycle through photo views defined in views setting
true
— include previously removed buttonfalse
— remove button
buttonClose : 'close'
buttonClose : 'icon'
buttonClose : '<div class="ui-button ui-button-close" title="Close page (Esc)">{{label}}</div>'
buttonClose : false
buttonClose : 'label' | 'icon' | '<html>' | true | false
Closes hidden project page.
true
— include previously removed buttonfalse
— remove button
pagination : '<ul class="ui pagination horizontal">@@<li><a><span class="dot"></span></a></li>@@</ul>',
pagination : false,
pagination : 'vertical',
pagination : '<html>' | 'vertical' | 'horizontal' | true | false
Navigate to the particular project page.
Pagination accept one of the following values:
'<html>'
string to define pagination html template
@@
will be looped'horizontal'
— horizontal pagination orientation (default)'vertical'
— vertical pagination orientationtrue
— include previously removed paginationfalse
— remove paginationfalse
to remove pagination from project section
enumeration : '<div class="enumeration">{{current}} / {{total}}</div>'
enumeration : false
enumeration : 'html-string' | true | false
Current page indicator in project section
{{current}}
for current page index{{total}}
for number of total pagetrue
— include previously removed enumerationfalse
— remove enumerationfalse
to enumeration from project section
hiddenPages : true
hiddenPages : false
hiddenPages : true | false
Hide inner pages from the main project flow.
true
false
false
to disable hidden pages
},
thumbnails : {
Configuration object for thumbnails section.
grid : '4x2',
grid : '3x3',
grid : '5xall',
grid : 'rows x columns'
Grid (rows x columns) distribution of thumbnails per page.
size : '240x180',
size : '200x200',
size : '<width> x <height>'
Defines the maximum size (in pixels) of the thumb image content box.
fit
enables versatile thumbnail presentation.fit : 'cover',
fit : 'contain',
fit : 'cover' | 'contain'
Defines how thumb image responds to the width and height of its content box.
cover
— thumb image is scaled to cover (fill) all available space preserving aspect ratio. contain
— thumb image is scaled to fit within content box preserving it's aspect ratio.transition : 'left',
transition : (string)
Default thumbnails page transition type. Reefers to name of transition defined in transitions
object.
If transition name passed as string is incorrect or such transition is not defined, default transition apply.
buttonSection : 'project',
buttonSection : 'icon',
buttonSection : '<div class="ui button button-grid"><span>{{label}}</span></div>',
buttonSection : false,
buttonSection : 'label' | 'icon' | '<html>' | true | false
Switch to project section.
true
— include previously removed buttonfalse
— remove buttonbuttonPrevious : 'prev',
buttonPrevious : 'icon',
buttonPrevious : '<div class="ui ui-button ui-button-prev" title="Previous page (←)"><span>{{label}}</span></div>',
buttonPrevious : false,
buttonNext : 'label' | 'icon' | 'html-string' | true | false
Navigate to previous thumbnails page.
true
— include previously removed buttonfalse
— remove buttonfalse
to remove button from thumbnails sectionbuttonNext : 'next',
buttonNext : 'icon',
buttonNext : '<div class="ui ui-button ui-button-next" title="Next page (→)"><span>{{label}}</span></div>',
buttonNext : false,
buttonNext : 'label' | 'icon' | 'html-string' | true | false
Navigate to the next thumbnails page.
true
— include previously removed buttonfalse
— remove buttonfalse
to remove button from thumbnails section
pagination : '<ul class="ui pagination horizontal">@@<li><a><span class="dot"></span></a></li>@@</ul>',
pagination : false,
pagination : 'vertical,
pagination : '<html>' | 'vertical' | 'horizontal' | true | false
Navigate to the particular thumbnails page.
Pagination accept one of the following values:
'<html>'
string to define pagination html template
@@
will be looped'horizontal'
— horizontal pagination orientation (default)'vertical'
— vertical pagination orientationtrue
— include previously removed paginationfalse
— remove paginationfalse
to remove pagination from thumbnails section
enumeration : '<div class="enumeration">{{current}} / {{total}}</div>'
enumeration : false
enumeration : 'html-string' | true | false
Current page indicator in thumbnails section
{{current}}
for current page index{{total}}
for number of total pagetrue
— include previously removed enumerationfalse
— remove enumerationfalse
to enumeration from thumbnails section
},
align : 'left',
align : 'top',
align : 'position'
Set sidebar align within web page
left
right
top
bottom
left
or right
sidebar position.hidden : true
hidden : false
hidden : true | false
Set initial sidebar visibility upon web page load
false
— sidebar is visible (opened) true
— sidebar is hidden (closed)true
initial visibility apply only is screen device width is 800+ pixels
buttonToggle : 'menu',
buttonToggle : 'icon',
buttonToggle : '<div class="ui ui-button ui-button-toggle" title="Toggle menu (m)"><span>{{label}}</span></div>',
buttonToggle : false,
buttonToggle : 'label' | 'icon' | '<html>' | true | false
Toggle sidebar section of the web page.
true
— include previously removed buttonfalse
— remove buttonaside
element)
buttonClose : '×'
buttonClose : 'icon'
buttonClose : '<div class="ui-button ui-button-close" title="Close menu (m)">{{label}}</div>'
buttonClose : false
buttonClose : 'label' | 'icon' | '<html>' | true | false
Closes sidebar section of the web page.
true
— include previously removed buttonfalse
— remove button},
content : {
General foliodot content configuration object
transition : 'up',
transition : 'name'
Type of transition between project and thumbnails section. Reefers to name of transition defined in transitions
object.
'right', 'left', 'up' (default), 'down', 'fold-down', 'fold-right', 'fold-left', 'fold-up', 'fold-down', 'fade', 'scale', 'none'
If transition name passed as string is incorrect or such transition is not defined, default transition apply.
inactivity : false,
inactivity : integer | true | false
Detect mouse/touch inactivity after defined period of time.
If inactivity is detected 'on-inactive' class is added to body
element and user interface is hidden.
false
— inactivity disabled (default value)true
— enable inactivity3
— enable inactivity and pass duration value (default value is 3 seconds)error404 : '404.html'
error404 : 'page-not-found.html'
error404 : 'http://website.com/upss.html'
error404 : 'url string'
Default error page used by foliodot router in case requested web page or inner page don't exist.
'url string'
— absolute or relative url to error pagegestures : true
gestures : false
gestures : true | false
Enable swipe gesture navigation through project and thumbnails inner pages. Only horizontal swipe (left/right) gesture is supported.
true
— force swipe navigation for all devicesfalse
— disable swipe navigationmouseWheel : true
mouseWheel : false
mouseWheel : true | false
Enable mouse wheel (or trackpad) navigation through project and thumbnails inner pages.
true
— use mouse wheel navigationfalse
— disable mouse wheel navigationui : 'text'
ui : 'icon'
ui : 'string'
Define global type of UI buttons.
'icon'
— UI buttons with SVG icons'text'
— UI buttons as text},
transitions : {
Configuration object to define new page/section transitions.
'right', 'left', 'up', 'down', 'fold-down', 'fold-right', 'fold-left', 'fold-up', 'fold-down', 'fade', 'scale', 'left-scale', 'right-scale', up-scale', 'down-scale', 'scale-left', 'scale-right', scale-up', 'scale-down', ,'none'
fade : {
from : { autoAlpha : 0 },
to : { autoAlpha : 1 },
out : { autoAlpha : 0 }
}
scale : {
from: { scale: 1.25, transformOrigin:"center", autoAlpha : 0},
to : { scale: 1, transformOrigin:"center", autoAlpha : 1},
out : { scale: 0.65, transformOrigin:"center", autoAlpha : 0}
}
left : {
from: { xPercent:100 },
to : { xPercent:0 },
out : { xPercent:-100 }
}
myTransition : {
from : { ... },
to : { ... },
out : { ... }
},
anotherTransition : {
from : { ... },
to : { ... },
out : { ... }
}
},
email : {
Anti spam email object
text : 'email me' ,
address : 'name@somedomain.com'
text : 'Email Us' ,
address : 'name@somedomain.com',
subject : 'Hey...',
body : 'What you have to say'
Set custom html attribute email
to any element. Foliodot template engine will convert it to standard email link (mailto).
},
key : {
Configuration object for keyboard shortcuts.
close : 'esc',
next : 'right',
prev : 'left',
first : 'home',
last : 'end',
sidebar : 'm',
views : 'v'
next : 'j',
prev : 'k'
KEY : 'key'
Set custom keyboard shortcuts:
backspace
, tab
, enter
, return
, capslock
, esc
, escape
, space
, pageup
, pagedown
, end
, home
, left
, up
, right
, down
, ins
, del
, and plus
.
},
}; // End of FOLIO.config object
}( window.FOLIO = window.FOLIO || {} ));
}); // End of FOLIO.init();
Learn next: Introduction