Web Content Accessibility Guidelines (WCAG) 2.0
All websites using the framework need to target a Level A compliance. Level AA should be reached whenever possible.
WAI-ARIA
Content is annotated using WAI-ARIA roles and states and properties. All widgets are WAI-ARIA compatible.
Access keys
All modern browsers support access keys to make keyboard-only navigation easier. To activate the access keys, they all need some modifier keys combination. Below is the list of theses combinations by browser and platform:
Browser | Platform | Modifier keys |
---|---|---|
Chrome | Windows/Linux | Alt |
Mac | Ctrl + Opt |
|
Firefox | Windows/Linux | Alt + Shift |
Mac | Ctrl + Opt |
|
Internet Explorer | Windows | Alt |
Safari | Mac | Ctrl + Opt |
Windows | Alt |
|
Opera | All | Shift + Esc |
The EPFL websites use an access key system derived from the UK Government Access Key Systems:
Shortcut | Target |
---|---|
C | Skip to content |
N | Skip to main navigation |
T | Back to the top of the page |
0 | Go the the accessibility page |
1 | Go to the Homepage of the site |
2 | Go to the News page (if any) |
3 | Go to the sitemap |
4 | Focus the search field |
5 | Go to the FAQ page (if any) |
6 | Go to the Help page (if any) |
7 | Complaints procedure and feedback (if any) |
8 | Terms and conditions (if any) |
9 | Contact the website team (mailto link or link to a contact form) |
Installation
First choose one of the page templates as starting point.
Then make sure to include the auto-updating header into your html head:
http://static.epfl.ch/latest/includes/head.html
or include the optimized auto-updating head links, head scripts and footer scripts into your html head/foot for optimal performances:
http://static.epfl.ch/latest/includes/head-links.html
http://static.epfl.ch/latest/includes/head-scripts.html
http://static.epfl.ch/latest/includes/foot-scripts.html
As most templating languages do not support including content from a remote server, including the files usually comes down to:
- Creating a cron job that retrieves the remote files and creates a local copy on your server every day, via wget for insance.
- Including the local copy into your application templates.
Optimized head/foot files
For better performances it is recommended to separate the CSS and JS loading.
Include the CSS using the head links into your <head>
tag.
http://static.epfl.ch/latest/includes/head-links.html
Add your custom CSS just after and before the scripts for optimal performances.
Include the head scripts before the closing of your </head>
tag.
http://static.epfl.ch/latest/includes/head-scripts.html
And include the scripts before the closing of your </body>
tag.
http://static.epfl.ch/latest/includes/foot-scripts.html
or
http://static.epfl.ch/latest/includes/foot-scripts-notracking.html
if you do not want Google Analytics tracking on your site.
Version | File name |
---|---|
EPFL | head-links.html |
CDH | head-links-cdh.html |
CDM | head-links-cdm.html |
ENAC | head-links-enac.html |
IC | head-links-ic.html |
INTER | head-links-inter.html |
SB | head-links-sb.html |
STI | head-links-sti.html |
SV | head-links-sv.html |
Associations | head-links-associations.html |
Neutral | head-links-neutral.html |
All-in-one head files
The simplest way to use the framework is to use the all-in-one head files versions:
Version | File name |
---|---|
EPFL | head.html |
CDH | head-cdh.html |
CDM | head-cdm.html |
ENAC | head-enac.html |
IC | head-ic.html |
INTER | head-inter.html |
SB | head-sb.html |
STI | head-sti.html |
SV | head-sv.html |
Associations | head-associations.html |
Neutral | head-neutral.html |
Just include these into your html <head>
tag.
If for some reason the latest
version is not compatible with your system, specific versions can be accessed via:
http://static.epfl.ch/vX.Y.Z/includes/head.html
Integration of the EPFL banner in a site
Put the file head-links.html
, head-script.html
, foot-scripts.html
together.
<head>
<title>Website name </title>
<meta charset="utf-8" />
<link rel="import" href="//static.epfl.ch/latest/includes/head-links.html">
<link rel="import" href="//static.epfl.ch/latest/includes/head-scripts.html">
</head>
<body>
<div id="page" class="site site-wrapper" itemscope itemtype="http://schema.org/WebPage">
<header id="epfl-header" class="site-header epfl" role="banner" aria-label="Global EPFL banner" data-ajax-header="https://static.epfl.ch/latest/includes/epfl-header.en.html"></header>
</div>
<link rel="import" href="//static.epfl.ch/latest/includes/foot-scripts.html">
</body>
Dynamically load the global header
Finally make sure your template includes a fallback global header that will dynamically load the full header:
<header id="epfl-header" class="site-header epfl" role="banner" aria-label="Global EPFL banner" data-ajax-header="https://static.epfl.ch/latest/includes/epfl-header.en.html">
...
</header>
The header version that will be loaded is specified by the data-ajax-header
attribute, and can be one of:
Version | File name |
---|---|
Header with full search form | epfl-header.en.html |
Header with no local site search | epfl-header-no-localsearch.en.html |
data-ajax-header
to point to your local copy.
Otherwise you may end up with different versions that might not work properly together.
You can then further customize the search URLs and parameters as follows:
Local search
Add the following script at the end of your template:
// Overwrite local site search
require(["epfl-jquery"], function($){
require(["search"], function(s){
$("#epfl-header").epfl_search("update", {engines:{site:{url: "search.html", param: "q", ac: false}}});
});
});
site
is the name of the engine that handles the local site searchurl
is the url where the search form will be submittedparam
is the name of the parameter containing the search queryac: false
means that the default auto-complete is disabled
Global search
Add the following script at the end of your template:
// Overwrite global EPFL sites search
require(["epfl-jquery"], function($){
require(["search"], function(s){
$("#epfl-header").epfl_search("update", {engines:{epfl:{url: "search.html", param: "q", ac: false}}});
});
});
epfl
is the name of the engine that handles the global sites searchurl
is the url where the search form will be submittedparam
is the name of the parameter containing the search queryac: false
means that the default auto-complete is disabled
Custom Scripts
Load a custom jQuery plugin
At the end of your page, before the </body>
tag, load the desired plugins as:
<script>
require(["epfl-jquery", "../relative/path/to/jquery-plugin.js", "/absolute/path/to/jquery-plugin.js"], function($) {
// jQuery is available as $ with the plugins included
$(".my-class").myPlugin();
});
</script>
If your plugin is not AMD compatible, you may need to load it as:
<script>
require(["epfl-jquery"], function($) {
// jQuery is available as $ with the plugins included
$.getScript("../relative/path/to/jquery-plugin.js", function(){
$(".my-class").myPlugin();
});
});
</script>
If you used epfl-jquery-notracking.js
instead of epfl-jquery.js
, or if you included footer-scripts-notracking.html
instead of
footer-scripts
, you will need to call require with epfl-jquery-notracking
instead of epfl-jquery
.
Load datatables script
In the <head>
of the page import:
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.6/css/jquery.dataTables.css">
<script>
require(["epfl-jquery", "//cdn.datatables.net/1.10.6/js/jquery.dataTables.js"], function($) {
"use strict";
require(["datatables"], function() {
$(function() {
$('#example').dataTable( {
"order": [[ 3, "desc" ]]
} );
});
})
});
</script>
Load a jQuery plug-in different from epfl-jquery
<script>
require(['epfl-jquery'], function($){
//disable epfl-jquery
requirejs.undef('jquery');
//jQuery new variable
require(['http://code.jquery.com/jquery-1.11.2.min.js'], function(){
console.log($.fn.jquery, jQuery.fn.jquery);
});
});
</script>
Load a custom script
Define your scripts as AMD modules:
define("script1", ["epfl-jquery"] , function ($) {
// jQuery is available as $
var _foo = function(){
...
};
var _bar = function(){
...
};
return {
foo: _foo,
bar: _bar,
};
});
define("script2", ["epfl-jquery"] , function ($) {
// jQuery is available as $
var _baz = function(){
...
};
var _qux = function(){
...
};
return {
baz: _baz,
qux: _qux,
};
});
At the end of your page, before the </body>
tag, load the desired scripts as:
<script>
require(["epfl-jquery", "../relative/path/to/custom/script1.js", "/absolute/path/to/custom/script2.js"], function($, s1, s2) {
// jQuery is available as $
// script1 is available as s1
s1.foo()
s1.bar()
// script2 is available as s2
s2.baz()
s2.qux()
});
</script>
Analytics
If you use the default scripts, you will have Google Universal Analytics tracking included.
To collect the data on your account, just use the following code:
<script>
require(["epfl-jquery", "analytics"], function($, ga) {
ga("create", "UA-000000-01", "auto");
ga("set", "anonymizeIp", true);
ga("send", "pageview");
});
</script>
Remember to replace UA-000000-01
with your tracking identifier.
You can find more information in the Google Universal Analytics documentation.
Browser support
The framework is expected to work in all modern web browsers. Basically:
Browser | Supported versions |
---|---|
Chrome | 43 42 |
Firefox | 38 37 |
Safari | 8 7 |
Internet Explorer | 11 10 |
Tablette | Ipad Air 2 |
Iphone | iPhone 6/iPhone 5 |
3rd-party libraries
The framework uses various 3rd-party libraries, some are packaged inside the scripts, others are lazy-loaded from a CDN for better performances.
Packaged libraries
These libraries are included in the framework and constitute some of its building blocks.
Library | Version | Role |
---|---|---|
jQuery | 1.11.3 | Base JavaScript library for DOM traversal and manipulation, event handling and ajax requests |
TouchSwipe | 1.6.12 | A jQuery plugin that adds support for touch events on mobile devices |
jQuery Autocomplete | 1.2.24 | A jQuery plugin that adds asynchronous auto-complete to search forms |
Normalize.css | 3.0.3 | CSS normalization of default browser styles |
html5shiv | 3.7.3 | HTML5 sectioning elements support for legacy Internet Explorer |
Respond.js | 1.4.2 | CSS3 media queries polyfill for browsers that do not support it |
RequireJS | 2.1.20 | JavaScript file and module loader |
zeptojs | 1.1.6 | JavaScript library for modern browsers |
CDN libraries
These plugin libraries are lazy-loaded on demand from cdnjs for better performances.
Library | Version | Role |
---|---|---|
highlight.js | 8.0 | Syntax highlighting for the Web |
MathJax | 2.3 | JavaScript display engine for mathematics (LaTeX, MathML & AsciiMath) |
marked | 0.3.1 | A markdown parser and compiler |
Changelog
v0.28.0 - 2018.08.28
- Remove search filters
- Remove autocomplete
v0.27.5 - 2018.08.22
- Fix search 'This website'
- Fix links in header
v0.27.4 - 2018.07.18
- Add EPFL Middle East Section in header
- Fix sub section in changelog
v0.27.3 - 2018.07.02
- Fix server name in templates and includes
- Update dev dependencies
v0.27.2 - 2018.06.11
- Remove timestamp in ajax request for header
- Fix link in header
- Fix ajax cors
- Clean readme
v0.27.1 - 2018.04.04
- Improve README
- Disable
package-lock.json
- Fix logo size with mobile
v0.27.0 - 2018.04.03
- Improve svg fallback
- Fix autocomplete position
- Fix bfdocs path
- Fix dependencies
- Fix color of logo (color too dark in previous)
- Fix inline style in header
- Copy the archive during the deployment to download project
v0.26.1 - 2017.11.21
- Fix resolution of html lang attribute
- Fix html of headers (remove extra tag ul & strong)
- Fix related links
- Fix
grunt-contrib-coffee
version
v0.26.0 - 2017.10.18
- Set cookie (from Cookie Consent) on localhost and external domain
- Remove protocols in header
v0.25.0 - 2017.10.11
- Add science and society link in header
- Add Travis-CI testing
- Fix image visual.jpg
- Fix scoped style in documentation
- Fix HTML tag in documentation
- Fix typo in README.md
- Clean Google Analytics example (with anonymization)
- Remove injection of CSS in Cookie Consent
v0.24.0 - 2017.08.29
- Add cookie policy banner
- Update package
grunt-w3c-html-validation
- Fix unclosed element b
- Remove HTTP in css
- Remove HTTP in docs
- Remove useless example Thumbnail Box (not in doc)
- Remove tag on
grunt bump
v0.23.1 - 2017.06.13
- Show complete news title
- Update copyright date
- Fix some unit tests
v0.23.0 - 2017.03.20
- add ip anonymization in analytics
- specifies automatic cookie domain configuration
v0.22.12 - 2016.04.27
- change dimensions EPFL Logo
- Update link in EPFL banner
v0.22.9 - 2016.04.14
- New logo EPFL
v0.22.8 - 2016.03.18
- How to integrate the EPFL banner in a site
- Change "Help" link in EPFL banner
- Examples: Standard Popup Image & Popup Image for downloading
- Update library documentation
v0.22.6 - 2016.08.01
- Slideshow delay to 7 sec
- Adding horizontal bar for Portal layout
v0.22.2 - 2015.10.30
- Image section to help users
- Creation Thumbnail Box
- Add mail button
v0.22.0 - 2015.10.12
- Final Integration of vertical navigation in horizontal navigation for mobile device
- Carousel Slideshow with custom controls
- Carousel With custom controls and cycleItems=True
- Authorisation https in search bar
v0.21.3 - 2015.09.03
- First Integration of vertical navigation in horizontal navigation for mobile device
v0.20.3 - 2015.06.22
General
- feat - Organigramme add hashed-bg class to create hashed backgrounds
- feat - auto-add code examples in the doc
- fix - search form in the doc to use the new form-input-group logic
- feat - improve mainnav/epflnav/search loading to avoid jumping/flickering
v0.20.2 - 2015.06.18
General
- feat - style select inputs in IE9+
- fix vertical alignment on form input group
- fix remove border on auto truncate
v0.20.1 - 2015.06.16
General
- suppression warning in people section
v0.20.0 - 2015.06.15
General
- Generic search form for actu et memento section
- Improving People for enac faculty
- Bug left menu on a first level faculty page
- Bug logo EPFL cut in Firefox
v0.19.1 - 2015.06.06
General
- Update bandeau with last content
- Red title in bandeau
- Suppression soulignement bandeau
v0.19.0 - 2015.06.04
General
- Adding responsive-embeds for video
- Refactoring people on 4 columns
- Bug checkbox & radio buttons on mobile
- Bug au-truncate for memento & alignement code source with html
- Alignement code source with html for actu
v0.18.0 - 2015.05.20
General
- Refactoring people on 1/2 columns
- Adding actu 4 images vertical/horizontal
- Elimination zoom effet layout/boxes size:l/xl/xxl
- Bug au-truncate for memento
v0.17.0 - 2015.05.12
General
- Adding study plan
- Adding people on 1/2 columns
v0.16.0 - 2015.05.04
General
- Creation memento calendar
- Improving memento box for mobile in sub-pages
- Improving actu box in sub-pages
- Adding datatables compatibility in doc
- Fix adding .btn-multiline-list for buttons on more lines
- Fix truncate removes all text on small devices
v0.15.0 - 2015.04.17
Homepage
- Add icon-home and social widgets
- Improving memento box for mobile
- Improving actu box
- Adding horizontal bar
- Adding separation white lines between boxes in tablette/mobile mode
v0.14.0 - 2014.11.09
Styles
- Add possibility to disable font size increase in big screens using
.site-no-sizeadjust
- Fix select dropdown icon position on firefox
v0.13.4 - 2014.11.01
General
- Add new icon and update message styles accordingly
- Fix search form
- Keyboard navigation on menubar sub-items
- Fix input fields not working in some browsers
Styles
- Fix icons vertical alignment
v0.13.3 - 2014.09.03
General
- Fix custom search and its documentation
- Fix various labels in search form for better clarity and rendering
Styles
- Try fixing icon font problem reports by moving the start codepoint
- Fix letter spacing on global navigation items and paddings on panels
- Fix search and global nav buttons highlight color
- Fix top margin on global header
- Adjust height for media visuals on mobile devices
Documentation
- Fix styleguide not including css/js/jpg files from the theme
v0.13.2 - 2014.07.15
General
- Add charset and description meta tags to the templates and doc
- Add favicon.ico path to templates and doc
Styles
- Fix banner image size
- Adjust icon line height
- Adjust mainav color on mobile devices
Scripts
- Remove tabindex when leaving accessibility link targets to avoid mouse focus
- Fix auto-truncate (ellipsis)
Documentation
- Accessibility improvements
- Fix incorrect tab numbering
- Update human.txt
- Update visual image
- Add auto-truncate example
v0.13.1 - 2014.07.09
Scripts
- Fix JS loading issues on IE7
Styles
- Adjust vertical alignment on icons
- Fix themed headgins color
Documentation
- Fix some typos
- Update git repository link
v0.13.0 - 2014.07.03
General
- Add support for pagination navigation
- Add support for plain icon buttons
- Add various rel attributes to links for better SEO
Styles
- Improve support for un-styled lists
- Fix media element height when not in list
- Do not speak out presentation only element on screen readers
Scripts
- Improve tree widget accessibility
- Fix scripts not loading when missing require call in the footer
Documentation
- Add Google Analytics documentation
- Update custom scripts documentation
v0.12.1 - 2014.06.25
Documentation
- Fix website name template example
- Add documentation for add new icons
Styles
- Add 'more' icon and fixed some others
v0.12.0 - 2014.06.25
General
- Fix some accessibility issues
- Follow 1st child link when
mainnav
link is just a toggle - Add test suite
Styles
- Adjust media list margins
- Add missing neutral CSS theme
- Fix vertical alignment on buttons
- Add media banner (
media-banner
) - Add support for disabled buttons (
btn-disabled
) and menu items (menu-item-disabled
) - Add support for disabled and active toolbar items (
toolbar-item-disabled
,toolbar-item-active
) - Add support for nested tabs
- Small adjustments
Scripts
- Fix JS
trim
error on IE, switch to jQuery'strim
instead - Fix no-tracking libraries still including google analytics code
- Fix basic destroy procedure, and validate toggle and tooltip destruction
- Ignore events on disabled widgets
- Various fixes
Documentation
- Add jQuery module documentation
- Add media banner examples
- Update buttons, menubar and toolbar examples
- Fix links to file includes
- Add example of collapse working with mouseenter/mouseleave event
v0.11.0 – 2014.06.06
Scripts
- Fix JS errors on older browsers (IE<9)
- Fix no-tracking JS loading
Styles
- Fix some XS styles do not overwrite S styles
- Add
s
-grid to overwrite default grid on tablets - Add in-line icons
Documentation
- Fix templates path
- Update templates to use the
s
-grid - Various fixes to the templates
- Update search and sitemap pages
- Document custom scripts/plugins usage
- Add changelog to the doc
v0.10.2 – 2014.06.04
Scripts
- Add no-tracking version of the foot scripts
- Fix respondjs CDN loading
- Fix broken header links toggles
Styles
- Fix z-index and width of notifications
- Fix border on links not having the same color as the text
- Add more space around links on small devices
- Fix word break in code blocks
Documentation
- Fix some typos and links to the templates
v0.10.1 – 2014.05.28
General
- Do not add heading anchors on secondary headings
Scripts
- Remove tracking lib from the notracking scripts
- Add missing notracking scripts
- Various performance optimizations
Styles
- Adjust tooltip pointer border size
Documentation
- Fix background colors being all gray
- Fix 3rd-party library version not showing
- Various performance optimizations
v0.10.0 – 2014.05.27
General
- Move the documentation to the production server : bootstrap.epfl.ch
- Static files are served by static.epfl.ch
- Open project blog for news and maintenance announcements : bootstrap blog
- Open project wiki for developer documentation : bootstrap wiki
- Open git repository to the public: bootstrap git
Scripts
- Enable GoogleAnalytics by default
- Add no-tracking variants of the libraries
- Fix jQuery noConflict mode and dependency with touch library
Styles
- Fix the grid cells for small devices
- Fix tooltip pointer position
- Fix heading anchors positioning
- Add styling for figure/figcaption
- Add highlighting of social media links
- Add some default styling for when JS is disabled
- Add link to all results in auto-complete
- Add
panel-cell
versions of panels for easier inclusion in grid cells - Update stroked tables styles
- Adjust margin and spacing on in-line buttons, headings, media elements and table captions
- Fix full-width cells not taking 100% width
- Update print styles
- Limit text area width to content width
Documentation
- Update installation procedure and page templates
- Update to include modules and widget structures as well as more examples.
- Add link to JS documentation
- Updated page structure documentation
- Place the page header in the correct place instead of the page content
- Fix link to templates folder
- Add documentation for
panel-cell
- Update 3rd-party libraries documentation and add version numbers
- Open navigation tree to show current page
- Load header from the static server
Templates
- Update the global homepage template
- Update
localnav structure to match the
mainnav` - Fix images sizes
- Add EPFL header includes without the local search
- Add minimal template examples
v0.9.0 – 2014.05.09
First public beta
Page Structure
The pages have the following structure:
.a11y
: the accessibility quick navigation links.site
: the site wrapper#epfl-header.epfl.site-header
: the global EPFL header.logo
: the EPFL logo.epflnav
: the global navigation links wrapper#epfl-navigation
: the global navigation links
.search
: the search wrapper#search
: the search section#search-form
: the search form
#header.site-header
: the site header.site-title
: the site title.bcnav
: the breadcrumb navigation.lang
: the language selector.mainnav
: the main/horizontal navigation wrapper#main-navigation
: the main/horizontal navigation
#tools.tools
: the tools bar
#content.site-content.page
: the actual page.page-header
: the page header.page-title
: the page title
.page-content
: the page content.page-footer
: the page footer#sidebar.sidebar
: the side bar.localnav
: the secondary/vertical navigation wrapper#secondary-navigation
: the secondary/vertical navigation
#footer.site-footer
: the site footer.login
: the login link
Grid
The framework is based on a 12-columns grid for easier scaffolding.
Each major block/row in the grid is defined using the g-row
class.
Individual divisions inside a block/row are then defined using the g-span-*
classes.
Grid horizontal classes
Cell width
The width of a cell in the grid is defined using the following classes:
Cell horizontal offset
If for some reason, a cell needs to be offset from its original horizontal position, you can use:
Convenience classes
Some additional classes have been added for easier structuring.
They respectively allow to create cells that span 1/12, 1/6, 1/4, 1/3, 1/2, 2/3, 3/4, 5/6, 11/12 or the full width of a row:g-span-1_12
, g-span-1_6
, g-span-1_4
, g-span-1_3
, g-span-1_2
, g-span-2_3
, g-span-3_4
, g-span-5_6
, g-span-11_12
and g-span-1_1
.
The same has been done for the cell offset g-offset-…
.
There is also a g-fill-cell
class to have an element take up all the cell space.
Grid vertical classes
Cell height
The height of a cell in the grid can be fixed using the following classes:
Cell vertical offset
If for some reason, a cell needs to be offset from its original vertical position, you can use:
Nested grids
Grids can easily be nested to offer infinite scaffolding possibilities.
Overwrite grid in tablet layout
All grid-span-…
and grid-offset-…
classes also exist in a grid-span-s-…
and grid-offset-s-…
version to overwrite the layout for tablets (s
-layout).
See
homepage-faculty.en.html
and
homepage-global.html
for an example.
Fixed vs fluid layout
By default the width of the layout is constrained by the .site
element, but it can be set to fluid by simply adding the site-fluid
class to it.
Font size adjustments
By default, the grid will adapt to larger screens and increase the font-size for easier reading when the space allows it. This feature can be disabled by adding the site-no-sizeadjust
class to the .site
element.
Visibility
The visibility of individual elements can be adjusted for each screen sizes.
Hiding
Hidden
Using the hidden
class, the element is hidden from the users and the screen readers.
There are also size-specific equivalents of this class to only hide elements at specific sizes:
Visually hidden
Using the visuallyhidden
class, the element is hidden from the users only, but still be visible to screen readers.
There are also size-specific equivalents of this class to only hide the elements at specific sizes:
Hidden from screen readers
If you add the role="presentation"
attribute on an element, it will be ignored by screen readers but still shown to normal users.
Visible
Elements that have been hidden
by default can be made visible at specific sizes using the following classes:
The same goes for visuallyhidden
elements:
Colors
Base
Primary font color |
|
---|---|
Secondary font color |
|
Primary border color |
|
Secondary border color |
|
1st neutral color |
|
2nd neutral color |
|
3rd neutral color |
|
4th neutral color |
|
Information
Color codes are also used to convey some information, such as operation state, problem severity, etc. Various references exist for this, such as:
- The design and evaluation of interactive systems – Chapter 12
- Microsoft's color meaning guidelines
- NASA's hierarchy of color usage guidelines
- Ubuntu's guidelines for web colours
The EPFL framework is based on these references and defines the following color codes:
State | Danger | Caution | Non-safe | Safe | Neutral |
---|---|---|---|---|---|
Error | Error | Warning | Info | Success | Message |
Severity | Critical | High | Low | Normal | Medium |
Operation | Stop | Start | Continue/Finish | More | |
Themes
The EPFL framework has the particularity to exist in various themes to better identify the different domains (mainly schools). The color palette is defined by the head includes that will load the corresponding style sheet.
The following table goes over these various colors:
Name | 1st color | 2nd color | 3rd color | 4th color |
---|---|---|---|---|
EPFL |
|
|
|
|
ENAC |
|
|
|
|
SB |
|
|
|
|
STI |
|
|
|
|
IC |
|
|
|
|
SV |
|
|
|
|
CDM |
|
|
|
|
CDH |
|
|
|
|
INTER |
|
|
|
|
Associations |
|
|
|
|
Theme classes
Each theme provides a set of classes to easily access the color palette:
Palette | Foreground class | Background class |
---|---|---|
Current theme | local-color1 | local-bg-color1 |
local-color2 | local-bg-color2 | |
local-color3 | local-bg-color3 | |
local-color4 | local-bg-color4 | |
Neutral theme | neutral-color1 | neutral-bg-color1 |
neutral-color2 | neutral-bg-color2 | |
neutral-color3 | neutral-bg-color3 | |
neutral-color4 | neutral-bg-color4 | |
Hashed Background | hashed-bg |
If you wish to use the color of another theme in one of the pages, you can use one of the following classes:
Theme | Foreground class | Background class |
---|---|---|
EPFL | epfl-color | epfl-bg-color |
epfl-color2 | epfl-bg-color2 | |
ENAC | enac-color | enac-bg-color |
SB | sb-color | sb-bg-color |
STI | sti-color | sti-bg-color |
IC | ic-color | ic-bg-color |
SV | sv-color | sv-bg-color |
CDM | cdm-color | cdm-bg-color |
CDH | cdh-color | cdh-bg-color |
INTER | inter-color | inter-bg-color |
Associations | associations-color | associations-bg-color |
Typography
Fonts
Type | Font Styles | Usage |
---|---|---|
Primary content | Arial, Helvetica, Verdana, sans-serif | generic content |
Secondary content | Georgia, 'Times New Roman', Times, serif | button-links, toolbar headers, … |
Headings | "Arial Black", Arial, Helvetica, Verdana, sans-serif | content headings |
Title | Impact, "Arial Black", Arial, sans-serif | site title, panel titles, sidebar headings, external content headings, … |
Code | Monaco, Courier, "Lucida console", "Consolas", monospace | Code samples |
Icons | epfl-symbols | Icons to illustrate an action |
Headings
Common content
In Pellentesque Faucibus Vestibulum. Nulla At Nulla Justo
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur.
Themed content
In Pellentesque Faucibus Vestibulum. Nulla At Nulla Justo
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur.
Code blocks
A sample Java code block:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
Images
To add images to your content, you need to add the following code:
The image will be displayed at its original size by default, as below:
You can also specify the size of the image, using the width
and height
attributes:
Bootstrap will take care of resizing the image if its width is larger than the content area, while keeping the aspect ratio intact. So if the content area has a width of 200 pixels, your image will be downsized to 200 pixels. Here is an example:
Positioning images
You can place the image to the left/right of your content using the following .left
and .right
CSS classes.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Images with a fixed proportion
If you want your image to have a width that is always a percentage of the content area, you can use the following code:
This will make sure your image is 50% of the content area width whether you are viewing the page on a desktop or on a mobile.
Images with a forced size
If you need your image to have a specific size, and you do not want bootstrap to do any resizing, you just need to specify its size using an inline style
attribute:
Note that you will need your own CSS overrides if you want to do any resizing on such images.
Showing different images for different screen sizes
By default, when you add an image to your content, bootstrap will just resize it to make sure it is not cropped. But you will still have the same image for each screen size.
This is not always the optimal experience and you might want to serve a different image to mobile users than the one you show to desktop users.
There are several solutions to address this.
Using CSS classes
Bootstrap provides some CSS visibility helper classes that you can leverage for such a use case:
Using the HTML5 picture element
HTML5 provides a new element to address this particular issue. You can use it as follows:
You can read more on this approach in Responsive Images Done Right from the guys at Smashing Magazine, and also in Built-in Browser Support for Responsive Images from the HTML5 Rocks team.
Lists
Ordered lists
- Nulla Facilisi. Duis Aliquet Egestas
- Nullam In Dui Mauris. Vivamus Hendrerit
- Donec Congue Lacinia Dui, A Porttitor Lectus
- Ut In Nulla Enim. Phasellus
- Vestibulum Ante Ipsum Primis
- Nullam In Dui
- Praesent Id Metus Massa, Ut Blandit
- Lorem Ipsum Dolor Sit
- Proin Quis Tortor Orci. Etiam At
- Curabitur Vulputate, Ligula Lacinia Scelerisque
Unordered lists
- Nulla Facilisi. Duis Aliquet Egestas
- Nullam In Dui Mauris. Vivamus Hendrerit
- Donec Congue Lacinia Dui, A Porttitor Lectus
- Ut In Nulla Enim. Phasellus
- Vestibulum Ante Ipsum Primis
- Nullam In Dui
- Praesent Id Metus Massa, Ut Blandit
- Lorem Ipsum Dolor Sit
- Proin Quis Tortor Orci. Etiam At
- Curabitur Vulputate, Ligula Lacinia Scelerisque
Definition lists
- Proin Quis Tortor Orci
- Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla.
- Donec Congue Lacinia
- Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla.
- Proin Quis Tortor
- In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet.
- Suspendisse Dictum
- Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie.
- Lorem Ipsum Dolor
- Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per.
Unstyled lists
If you need to have a bare list, you can use the list-unstyled
class to remove all the default list styles.
- Nulla Facilisi. Duis Aliquet Egestas
- Nullam In Dui Mauris. Vivamus Hendrerit
- Donec Congue Lacinia Dui, A Porttitor Lectus
- Ut In Nulla Enim. Phasellus
- Vestibulum Ante Ipsum Primis
- Lorem Ipsum Dolor Sit
- Proin Quis Tortor Orci. Etiam At
- Curabitur Vulputate, Ligula Lacinia Scelerisque
Tables
Styled table
To style a table, add the table
class to it.
Entry Header 1 | Entry Header 2 | Entry Header 3 | Entry Header 4 |
---|---|---|---|
Entry First Line 1 | Entry First Line 2 | Entry First Line 3 | Entry First Line 4 |
Entry Line 1 | Entry Line 2 | Entry Line 3 | Entry Line 4 |
Entry Last Line 1 | Entry Last Line 2 | Entry Last Line 3 | Entry Last Line 4 |
Narrow table
By default, tables will take up all the horizontal space available. If you wish to have a narrow table, just add the table-narrow
class to it.
Entry Header 1 | Entry Header 2 | Entry Header 3 | Entry Header 4 |
---|---|---|---|
Entry First Line 1 | Entry First Line 2 | Entry First Line 3 | Entry First Line 4 |
Entry Line 1 | Entry Line 2 | Entry Line 3 | Entry Line 4 |
Entry Last Line 1 | Entry Last Line 2 | Entry Last Line 3 | Entry Last Line 4 |
Smaller table
You can reduce the overall text size in the table to fit in more content by adding the table-small
.
Entry Header 1 | Entry Header 2 | Entry Header 3 | Entry Header 4 |
---|---|---|---|
Entry First Line 1 | Entry First Line 2 | Entry First Line 3 | Entry First Line 4 |
Entry Line 1 | Entry Line 2 | Entry Line 3 | Entry Line 4 |
Entry Last Line 1 | Entry Last Line 2 | Entry Last Line 3 | Entry Last Line 4 |
Stroked table
To emphasize the division between the table rows, you can use the table-stroke
class that will add full lines between the table rows.
Entry Header 1 | Entry Header 2 | Entry Header 3 | Entry Header 4 |
---|---|---|---|
Entry First Line 1 | Entry First Line 2 | Entry First Line 3 | Entry First Line 4 |
Entry Line 1 | Entry Line 2 | Entry Line 3 | Entry Line 4 |
Entry Last Line 1 | Entry Last Line 2 | Entry Last Line 3 | Entry Last Line 4 |
Striped table
To add zebra-stripes to the table, use the table-striped
class.
Entry Header 1 | Entry Header 2 | Entry Header 3 | Entry Header 4 |
---|---|---|---|
Entry First Line 1 | Entry First Line 2 | Entry First Line 3 | Entry First Line 4 |
Entry Line 1 | Entry Line 2 | Entry Line 3 | Entry Line 4 |
Entry Last Line 1 | Entry Last Line 2 | Entry Last Line 3 | Entry Last Line 4 |
Hoverable table
To add a hover effect on the table, use the table-hover
class.
Entry Header 1 | Entry Header 2 | Entry Header 3 | Entry Header 4 |
---|---|---|---|
Entry First Line 1 | Entry First Line 2 | Entry First Line 3 | Entry First Line 4 |
Entry Line 1 | Entry Line 2 | Entry Line 3 | Entry Line 4 |
Entry Last Line 1 | Entry Last Line 2 | Entry Last Line 3 | Entry Last Line 4 |
Responsive table
To make tables scrollable on small devices, wrap it inside an element with the table-container
class.
Entry Header 1 | Entry Header 2 | Entry Header 3 | Entry Header 4 |
---|---|---|---|
Entry First Line 1 | Entry First Line 2 | Entry First Line 3 | Entry First Line 4 |
Entry Line 1 | Entry Line 2 | Entry Line 3 | Entry Line 4 |
Entry Last Line 1 | Entry Last Line 2 | Entry Last Line 3 | Entry Last Line 4 |
Quotes
Block quotes
Adding the <cite>
attribute to a <blockquote>
(and its <footer>
):
You know the golden rule, don’t you boy? Those who have the gold make the rules.
A quote from a specification:
A person's name is not the title of a work — even if people call that person a piece of work
An academic-style book citation:
Citations … all include the following: author (or editor, compiler, or translator standing in place of the author), title (and usually subtitle), and date of publication.
Inline quotes
An academic-style journal citation:
- The information capacity of the human motor system in controlling the amplitude of movement, Paul M. Fitts (1954). Journal of Experimental Psychology, volume 47, number 6, June 1954, pp. 381–391
Nested quotations:
Luke continued, And then she called him a
The poor naive fool…scruffy-looking nerf-herder
! I think I’ve got a chance!
Forms
Styled form
Inline form
Vertical form
Horizontal form
Input group
Icons
The icon
module makes it easy to illustrate various actions with an icon for easier comprehension.
Default icons
CSS class name (to append after icon- ) |
preview |
---|---|
home | |
arrow-head-top | |
arrow-head-right | |
arrow-head-bottom | |
arrow-head-left | |
arrow-top | |
arrow-right | |
arrow-bottom | |
arrow-left | |
arrow-top-left | |
arrow-top-right | |
arrow-bottom-right | |
arrow-bottom-left | |
arrow-stop-top | |
arrow-stop-right | |
arrow-stop-bottom | |
arrow-stop-left | |
arrow-line-top | |
arrow-line-right | |
arrow-line-bottom | |
arrow-line-left | |
arrow-forward | |
arrow-backward | |
refresh | |
out | |
plus | |
minus | |
checkmark | |
cross | |
pencil | |
lock-locked | |
lock-unlocked | |
cogwheel | |
admin | |
access | |
info | |
question | |
ok | |
stats | |
text | |
magnifier | |
user | |
user-profile | |
group | |
hierarchy | |
hierarchy2 | |
bulb-off | |
bulb-on | |
link | |
map-pointer | |
target | |
share | |
share-facebook | |
share-twitter | |
share-linkedin | |
share-googleplus | |
mailinglist | |
rss | |
time | |
message | |
podcast | |
download | |
upload | |
file | |
file-pdf | |
files | |
area | |
ruler | |
menu | |
more | |
important |
Button icons
CSS class name (to append after icon- ) |
Preview |
---|---|
home_button | |
arrow-head-top_button | |
arrow-head-right_button | |
arrow-head-bottom_button | |
arrow-head-left_button | |
arrow-top_button | |
arrow-right_button | |
arrow-bottom_button | |
arrow-left_button | |
arrow-top-left_button | |
arrow-top-right_button | |
arrow-bottom-right_button | |
arrow-bottom-left_button | |
arrow-stop-top_button | |
arrow-stop-right_button | |
arrow-stop-bottom_button | |
arrow-stop-left_button | |
arrow-line-top_button | |
arrow-line-right_button | |
arrow-line-bottom_button | |
arrow-line-left_button | |
arrow-forward_button | |
arrow-backward_button | |
refresh_button | |
out_button | |
plus_button | |
minus_button | |
checkmark_button | |
cross_button | |
pencil_button | |
lock-locked_button | |
lock-unlocked_button | |
cogwheel_button | |
admin_button | |
access_button | |
info_button | |
question_button | |
ok_button | |
stats_button | |
text_button | |
magnifier_button | |
user_button | |
user-profile_button | |
group_button | |
hierarchy_button | |
hierarchy2_button | |
print_button | |
bulb-off_button | |
bulb-on_button | |
link_button | |
map-pointer_button | |
target_button | |
share_button | |
share-facebook_button | |
share-twitter_button | |
share-linkedin_button | |
share-googleplus_button | |
mail_button | |
mailinglist_button | |
rss_button | |
time_button | |
message_button | |
podcast_button | |
download_button | |
upload_button | |
file_button | |
file-pdf_button | |
files_button | |
area_button | |
ruler_button | |
menu_button | |
more_button | |
important_button |
Themed icons
Inline icons
Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu.
Bigger icons
Use the .icon-big
class.
Mauris iaculis porttitor posuere
Buttons
The btn
module allows to create styled buttons. It is especially useful to convey information using colors and icons.
Default buttons
Icon buttons
Operations
Data manipulation
Information notification
Long buttons
If you need buttons that span multiple lines, you can use the .btn-multiline-list
class and the following markup:
Trigger button
Requires the collapse and menu widgets
Split button
Requires the collapse and menu widgets
Badges
The badge
module is meant to convey secondary information such as the category of a media item, a quantity associated with a list item, etc.
Default badge
Information badges
Error Warning Success Info Neutral
Action badges
Create Update Delete More
Messages
The msg
module allows to show a message to the user, give feedback on an operation, etc.
The message module structure
msg
: the message wrappermsg-content
: the actual content for the panel
Various message types
Neutral
Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus.
Error
Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus.
Warning
Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula.
Success
Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus.
Info
Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin vel ante a orci tempus eleifend ut et magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus luctus urna sed urna ultricies ac tempor dui sagittis. In condimentum facilisis.
Navigation
The nav
module allows to create various styles of navigation.
The navigation module structure
nav
: the navigation wrappernav-list
: the list grouping items having the same depth in the navigationnav-item
: the individual items in the navigationnav-link
: the link inside eachnav-item
Inline navigation
To get an in-line navigation just add the nav-inline
class.
Horizontal navigation
To get a horizontal navigation just add the nav-horizontal
class.
Vertical navigation
To get a vertical navigation just add the nav-vertical
class.
Pagination navigation
Use the nav-pagination
class on the nav
element:
Horizontal block navigation
For a horizontal block navigation, just add nav-block
to a horizontal navigation, like this:
Vertical block navigation
For a vertical block navigation, just add nav-block
to a vertical navigation, like this:
Themed horizontal navigation
Just add the themed
class to the horizontal nav
element:
Themed vertical navigation
Just add the themed
class to the vertical nav
element:
Panels
The panel
module creates content blocks that stand out of the rest of the content, allowing to highlight important information.
The panel module structure
panel
: the panel wrapperpanel-header
: the panel headerpanel-content
: the actual content for the panelpanel-footer
: the panel footer
Default panels
Class Aptent Taciti Sociosqu Ad Litora Torquent
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus luctus urna sed urna ultricies ac tempor dui sagittis. In condimentum facilisis porta. Sed.
Themed panels
Class Aptent Taciti Sociosqu Ad Litora Torquent
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus luctus urna sed urna ultricies ac tempor dui sagittis. In condimentum facilisis porta. Sed.
Cell panels
You can also add panels inside cells using the panel-cell
class and mix them with the background color classes to create content mosaics:
Panel buttons
Media
The media
module is meant to present structured data to the user in the form of a list.
It is usually recommended to annotate the structured data with relevant semantic information to optimize search engine indexing. Schema.org provides a list of possible data types that can be used, and we have various examples for Courses, Events, News articles, Persons and Publications.
The media module structure
media-list
: a wrapper for media elements displayed as a list (optional)media
: the media element wrappermedia-visual
: a visual representation for the media elementmedia-banner
: a banner to put over the visualmedia-header
: the media headermedia-header-full
: disables auto-truncating of the header
media-content
: the media contentmedia-info
: secondary information for the media elementmedia-info-quiet
: a more lightweight version of the media info
media-footer
: the media footer
Media list
Nulla Facilisi. Duis Aliquet
In condimentum facilisis porta. Sed nec diam eu diam mattis viverra. Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec.
Class Aptent Taciti Sociosqu Ad
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in.
Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Note that you can add the .media-header-expandable
class to the header in a list in order to have the full title display when the mouse is hovering on it (instead of only seeing the truncated version).
You can also use .media-list-bordered
to wrap the list with a top and bottom border.
Media list (auto-truncated)
Nulla Facilisi. Duis Aliquet
In condimentum facilisis porta. Sed nec diam eu diam mattis viverra. Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec.
Class Aptent Taciti Sociosqu Ad
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in.
Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Minimal list
Class Aptent Taciti Sociosqu Ad
Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus
Media grid
Nulla Facilisi. Duis Aliquet
In condimentum facilisis porta. Sed nec diam eu diam mattis viverra. Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec.
Class Aptent Taciti Sociosqu Ad
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in.
Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
A media list with the first element emphasized
Nulla Facilisi. Duis Aliquet
In condimentum facilisis porta. Sed nec diam eu diam mattis viverra. Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Class Aptent Taciti Sociosqu Ad
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Nulla Facilisi. Duis Aliquet
In condimentum facilisis porta. Sed nec diam eu diam mattis viverra. Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Class Aptent Taciti Sociosqu Ad
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Or on a single column:
Nulla Facilisi. Duis Aliquet
In condimentum facilisis porta. Sed nec diam eu diam mattis viverra. Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Class Aptent Taciti Sociosqu Ad
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Nulla Facilisi. Duis Aliquet
In condimentum facilisis porta. Sed nec diam eu diam mattis viverra. Nulla fringilla, orci ac euismod semper, magna diam porttitor mauris, quis sollicitudin sapien justo in libero. Vestibulum mollis mauris enim. Morbi euismod magna ac lorem rutrum elementum. Donec. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Class Aptent Taciti Sociosqu Ad
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor
Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora. Read more about "Curabitur Vulputate, Ligula Lacinia Scelerisque Tempor, Lacus"
Responsive Embeds
This module allows embedding external content by keeping its aspect ratio while resizing.
Just use the .embed-responsive
class, and nest a <iframe>
, <video>
, <object>
or <embed>
.
You can also nest a .embed-responsive-item
class for other types of elements.
For example, to force a 16:9 aspect ratio, use the .embed-responsive-16by9
class.
All supported aspect ratios
- 1:1
embed-responsive-1by1
- 16:9 (1.77:1)
embed-responsive-16by9
- 3:2 (1.50:1)
embed-responsive-3by2
andembed-responsive-2by3
- 4:3 (1.33:1)
embed-responsive-4by3
andembed-responsive-3by4
- 5:4 (1.25:1)
embed-responsive-5by4
andembed-responsive-4by5
Collapse
The collapse
widget allows to collapse/expand (hide/show) portions of information when the user clicks on its trigger.
Collapse overview
The collapse widget structure
- trigger: the collapse trigger, specified as:
- element with
data-widget="collapse"
- element with
- panel: the panel that will be collapsed/expanded, specified as one of:
- the
aria-controls
attribute with a space-separated list of element ids to toggle - using
data-target
option, specified as a jQuery selector relative to the widget, or its parent - using
href
attribute, specified as an id reference starting with#
- the second child element of the toggle
- the element that follows the toggle
- the
Options for the collapse widget
data-event
: what event to respond to (click
by default)data-overlay
: whether to show the panel as an overlayaria-expanded
: whether to expand the panel by default (true
orfalse
,false
by default)
Events for the collapse widget
beforeToggle
: triggered on the trigger and the panel elements before the toggle happensafterToggle
: triggered on the trigger and the panel elements after the toggle happens
Both events have the following parameters:
toggle
: a reference to the trigger elementtargets
: a reference to the panel elementsstatus
: a boolean indicating whether the targets are visible (true
) or hidden (false
)event
: the actual event that triggered the toggle
Default collapse
Only label will toggle
Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante.
<span data-widget="collapse"><!-- toggle label --></span>
<div><!-- panel content --></div>
Collapse with custom targets
Collapse the content
Click anywhere inside element to toggle
Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante.
<div data-widget="collapse">
<span><!-- toggle label --></span>
<div><!-- panel content --></div>
</div>
Collapse the link target
will not be toggled
Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante.
<a href="#myId" data-widget="collapse"><!-- toggle label --></span>
<div id="myId"><!-- panel content --></div>
Collapse targets specified in the target option
will not be toggled
Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante.
will not be toggled
Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio.
will not be toggled
Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante.
will not be toggled
Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio.
<span data-widget="collapse" data-target=".myClass"><!-- toggle label --></span>
<div class="myClass"><!-- panel content --></div>
Collapse targets specified in the controls option
Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante.
will not be toggled
Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio.
<span data-widget="collapse" aria-controls="myId"><!-- toggle label --></span>
<div id="myId"><!-- panel content --></div>
Collapse with overlay
It is also possible to have the toggled panel displayed as an overlay by adding the data-overlay="true"
attribute:
Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante.
<span data-widget="collapse" data-overlay="true"><!-- toggle label --></span>
<div><!-- panel content --></div>
Collapse on mouseenter/mouseleave
It is also possible to have the collapse reacting on other events, like mouseeneter mouseleave
for instance:
Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie augue sit amet leo consequat posuere. Vestibulum ante.
<div data-widget="collapse" data-event="mouseenter mouseleave">
<span><!-- toggle label --></span>
<p><!-- panel content --></p>
</div>
Tooltip
The tooltip
widget allows showing an information popup when the mouse is moved over its trigger.
Tooltip overview
The tooltip widget structure
- trigger: the tooltip trigger, specified as:
- element with
data-widget="tooltip"
- element with
- tooltip: the tooltip content, specified as one of:
- an
aria-describedby
attribute with a space-separated list of element ids to toggle - using the content of the
data-tooltip
option - using
data-target
option, specified as a jQuery selector relative to the widget, or its parent - using
href
attribute, specified as an id reference starting with#
- the second child element of the toggle
- the element that follows the toggle
- an
Options for the tooltip widget
data-event
: what event to respond to (mouseenter mouseleave
by default)data-overlay
: whether to show the tooltip as an overlay
Events for the tooltip widget
beforeToggle
: triggered on the trigger and the tooltip elements before the toggle happensafterToggle
: triggered on the trigger and the tooltip elements after the toggle happens
Both events have the following parameters:
toggle
: a reference to the trigger elementtargets
: a reference to the tooltip elementsstatus
: a boolean indicating whether the targets are visible (true
) or hidden (false
)event
: the actual event that triggered the toggle
Default tooltip
<!-- trigger element -->
<span data-widget="tooltip"><!-- trigger label --></span>
<!-- tooltip element -->
<div><!-- tooltip content --></div>
Tooltip on specific events
Using the data-event
option, and specifying a valid jQuery event.
Click tooltip
<!-- trigger element -->
<span data-widget="tooltip" data-event="click"><!-- trigger label --></span>
<!-- tooltip element -->
<div><!-- tooltip content --></div>
Double-click tooltip
<!-- trigger element -->
<span data-widget="tooltip" data-event="dblclick"><!-- trigger label --></span>
<!-- tooltip element -->
<div><!-- tooltip content --></div>
Tooltip with custom targets
Via aria-describedby with a list of target ids
<!-- trigger element -->
<span data-widget="tooltip" aria-describedby="myId"><!-- trigger label --></span>
<!-- tooltip element -->
<div id="myId"><!-- tooltip content --></div>
Via data-tooltip
<!-- trigger element -->
<span data-widget="tooltip" data-tooltip="tooltip content"><!-- trigger label --></span>
Via data-target with a css selector to the targets (relative to parent)
<!-- trigger element -->
<span data-widget="tooltip" data-target=".myClass"><!-- trigger label --></span>
<!-- tooltip element -->
<div class="myClass"><!-- tooltip content --></div>
Via href with reference to element id (single target only)
<!-- trigger element -->
<a href="#myId" data-widget="tooltip"><!-- trigger label --></span>
<!-- tooltip element -->
<div id="myId"><!-- tooltip content --></div>
Overlay tooltip
<!-- trigger element -->
<span data-widget="tooltip" data-overlay="true"><!-- trigger label --></span>
<!-- tooltip element -->
<div><!-- tooltip content --></div>
Menu, Menubar & Toolbar
The menu
, menubar
and toolbar
widgets provide various menu types.
Menu widget
The menu widget structure
- menu: the menu element, specified as:
- element with
data-widget="menu"
- element with
- menuitem: the items of the menu, specified as one of:
- elements with
role="menuitem"
- using the
data-items
option, specified as a jQuery selector relative to the widget - the children elements of the widget
- elements with
Simple menu
Multi-level menu
Tool bar widget
The toolbar widget structure
- menu: the menu element, specified as:
- element with
data-widget="toolbar"
- element with
- group: the item groups of the menu, specified as one of:
- elements with
role="group"
- using the
data-groups
option, specified as a jQuery selector relative to the widget
- elements with
- toolbar item: the items of the menu, specified as one of:
- using the
data-items
option, specified as a jQuery selector relative to the widget - the children elements of the groups if any
- the children elements of the widget
- using the
Simple toolbar example
Menu bar
The menubar widget structure
- menu: the menu element, specified as:
- element with
data-widget="menubar"
- element with
- group: the item groups of the menu, specified as one of:
- elements with
role="group"
- using the
data-groups
option, specified as a jQuery selector relative to the widget
- elements with
- menubar item: the items of the menu, specified as one of:
- using the
data-items
option, specified as a jQuery selector relative to the widget - the children elements of the groups if any
- the children elements of the widget
- using the
Simple menubar example
Accordions
Accordions overview
The accordion widget structure
- accordions: the accordions widget, specified as:
- element with
data-widget="accordions"
- element with
- tab: the accordion tabs/labels, specified as:
- elements with
role="tab"
- using the
data-tabs
option, specified as a jQuery selector relative to the widget - even elements if the tabs are on the top
- odd elements if the tabs are on the bottom
- elements with
- panel: the accordion panels, specified as one of:
- elements with
role="tabpanel"
- using the
data-panels
option, specified as a jQuery selector relative to the widget - odd elements if the tabs are on the top
- even elements if the tabs are on the bottom
- elements with
Options for the accordion widget
data-event
: what event to respond to (click
by default)data-position
: where the accordion tabs are placed relative to their panels (top
orbottom
,top
by default)
Events for the accordion widget
beforeToggle
: triggered on the tab and its panel element before the toggle happensafterToggle
: triggered on the tab and its panel element after the toggle happens
Both events have the following parameters:
toggle
: a reference to the tab elementtargets
: a reference to the panel elementstatus
: a boolean indicating whether the targets are visible (true
) or hidden (false
)event
: the actual event that triggered the toggle
Default accordions (top positioned)
Accordion1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Accordion2
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Accordion3
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Bottom positioned accordions
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Accordion1
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Accordion2
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Accordion3
Tabs
Tabs overview
The tabs widget structure
- tabs: the tabs widget, specified as:
- element with
data-widget="tabs"
- element with
- tab: the tabs labels, specified as:
- elements with
role="tab"
- using the
data-tabs
option, specified as a jQuery selector relative to the widget - children of the first child element if the tabs are on the top or left
- children of the second child element if the tabs are at the bottom or on the right
- elements with
- panel: the tab panels, specified as one of:
- elements with
role="tabpanel"
- using the
data-panels
option, specified as a jQuery selector relative to the widget - children of the second child element if the tabs are on the top or left
- children of the first child element if the tabs are at the bottom or on the right
- elements with
Options for the tabs widget
data-event
: what event to respond to (click
by default)data-position
: where the tabs are placed relative to the panels (top
,left
,right
orbottom
,top
by default)
Events for the tabs widget
beforeToggle
: triggered on the tab and its panel element before the toggle happensafterToggle
: triggered on the tab and its panel element after the toggle happens
Both events have the following parameters:
toggle
: a reference to the tab elementtargets
: a reference to the panel elementstatus
: a boolean indicating whether the targets are visible (true
) or hidden (false
)event
: the actual event that triggered the toggle
Default tabs (top)
- Tab1
- Tab2
- Tab3
Duis Aliquet Egestas Purus In Blandit. Curabitur Vulputate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Nulla Facilisi. Duis
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Left tabs
- Tab1
- Tab2
- Tab3
Duis Aliquet Egestas Purus In Blandit. Curabitur Vulputate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Nulla Facilisi. Duis
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Right tabs
Duis Aliquet Egestas Purus In Blandit. Curabitur Vulputate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Nulla Facilisi. Duis
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
- Tab1
- Tab2
- Tab3
Bottom tabs
Duis Aliquet Egestas Purus In Blandit. Curabitur Vulputate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Nulla Facilisi. Duis
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
- Tab1
- Tab2
- Tab3
Nested tabs (horizontal-vertical)
- Tab1
- Tab2
- Tab3
- Tab1.1
- Tab1.2
- Tab1.3
Duis Aliquet Egestas Purus In Blandit. Curabitur Vulputate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Nulla Facilisi. Duis
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
- Tab2.1
- Tab2.2
- Tab2.3
Duis Aliquet Egestas Purus In Blandit. Curabitur Vulputate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Nulla Facilisi. Duis
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Nested tabs (vertical-horizontal)
- Tab1
- Tab2
- Tab3
- Tab1.1
- Tab1.2
- Tab1.3
Duis Aliquet Egestas Purus In Blandit. Curabitur Vulputate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Nulla Facilisi. Duis
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
- Tab2.1
- Tab2.2
- Tab2.3
Duis Aliquet Egestas Purus In Blandit. Curabitur Vulputate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis tortor orci. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu ullamcorper orci. Quisque eget odio ac lectus vestibulum faucibus eget in metus. In pellentesque faucibus vestibulum. Nulla at nulla justo, eget luctus tortor. Nulla facilisi. Duis aliquet egestas purus in blandit. Curabitur vulputate, ligula lacinia scelerisque tempor, lacus lacus ornare ante, ac egestas est urna sit amet arcu. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed.
Nulla Facilisi. Duis
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis.
Porttitor posuere. Praesent id metus massa, ut blandit odio. Proin quis.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Quisque Eget Odio Ac Lectus Vestibulum Faucibus Eget
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie vehicula. Sed auctor neque eu tellus rhoncus ut eleifend nibh porttitor. Ut in nulla enim. Phasellus molestie magna non est bibendum non venenatis nisl tempor. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit.
Tree
The tree
widget allows organising hierarchical information in the form of a tree with branches and leaves.
Individual branches can be collapsed and expanded depending on the needs.
Tree overview
The tree widget structure
- tree: the tree widget, specified as:
- element with
data-widget="tree"
- element with
- treeitems: the individual node in the tree, specified as:
- elements with
role="treeitem"
- using
data-items
option, specified as a jQuery selector relative to the widget - direct children of groups and the widget itself that have no specific role defined
- direct children of the widget itself that have no specific role defined
- elements with
- groups: wrapper for all the child-nodes of a specific node (tree acts as the top group), specified as:
- elements with
role="group"
- using
data-groups
option, specified as a jQuery selector relative to the widget
- elements with
Options for the tree widget
data-autocollapse
: a boolean indicating whether or not to collapse the nodes automatically (false
by default)
Events for the tree widget
beforeToggle
: triggered on the treeitem toggle and its group element before the toggle happensafterToggle
: triggered on the treeitem toggle and its group element after the toggle happens
Both events have the following parameters:
toggle
: a reference to the treeitem toggle elementtargets
: a reference to the group elementstatus
: a boolean indicating whether the targets are visible (true
) or hidden (false
)event
: the actual event that triggered the toggle
In-line tree
The in-line tree is meant to be in-lined into a paragraph of text.
Default in-line tree
- Vivamus hendrerit arcu
-
sed erat molestie vehicula
- Sed auctor neque eu tellus
- rhoncus ut eleifend nibh porttitor
-
Ut in nulla enim
- Phasellus molestie magna
-
non est bibendum non venenatis nisl tempor
- Suspendisse dictum
- feugiat nisl ut dapibus
- Mauris iaculis porttitor posuere
- Praesent id metus massa
-
ut blandit odio
- Proin quis tortor orci
- Etiam at risus et
-
justo dignissim congue
- Donec congue lacinia dui
- a porttitor lectus condimentum laoreet
- Nunc eu ullamcorper orci
<ul data-widget="tree">
<!-- for each treeitem that has no children -->
<li>
<span><!-- treeitem label --></span>
<!-- if treeitem has children -->
<ul role="group">
<!-- for each treeitem -->
<!-- recursive use of the treeitem template -->
<!-- /for each -->
</ul>
<!-- /if -->
</li>
<!-- /for each -->
</ul>
In-line tree with auto-collapsing branches
The auto-collapse option (data-autoCollapse="true"
) automatically closes branches when navigating the tree.
- Vivamus hendrerit arcu
-
sed erat molestie vehicula
- Sed auctor neque eu tellus
- rhoncus ut eleifend nibh porttitor
-
Ut in nulla enim
- Phasellus molestie magna
-
non est bibendum non venenatis nisl tempor
- Suspendisse dictum
- feugiat nisl ut dapibus
- Mauris iaculis porttitor posuere
- Praesent id metus massa
-
ut blandit odio
- Proin quis tortor orci
- Etiam at risus et
-
justo dignissim congue
- Donec congue lacinia dui
- a porttitor lectus condimentum laoreet
- Nunc eu ullamcorper orci
<ul data-widget="tree" data-autoCollapse="true">
<!-- for each treeitem -->
<li>
<span><!-- treeitem label --></span>
<!-- if treeitem has children -->
<ul role="group">
<!-- for each treeitem -->
<!-- recursive use of the treeitem template -->
<!-- /for each -->
</ul>
<!-- /if -->
</li>
<!-- /for each -->
</ul>
Block tree
The block tree is meant to be used as a navigation menu.
Default block tree
<nav class="nav nav-block nav-vertical">
<!-- tree widget -->
<ul class="nav-list" data-widget="tree">
<!-- for each treeitem -->
<li class="nav-item">
<a href="..." class="nav-link"><!-- treeitem label --></a>
<!-- if treeitem has children -->
<ul class="nav-list" role="group">
<!-- for each treeitem -->
<!-- recursive use of the treeitem template -->
<!-- /for each -->
</ul>
<!-- /if -->
</li>
<!-- /for each -->
</ul>
<!-- /tree widget -->
</nav>
Block tree with auto-collapse of branches
<nav class="nav nav-block nav-vertical">
<!-- tree widget -->
<ul class="nav-list" data-widget="tree" data-autoCollapse="true">
<!-- for each treeitem -->
<li class="nav-item">
<a href="..." class="nav-link"><!-- treeitem label --></a>
<!-- if treeitem has children -->
<ul class="nav-list" role="group">
<!-- for each treeitem -->
<!-- recursive use of the treeitem template -->
<!-- /for each -->
</ul>
<!-- /if -->
</li>
<!-- /for each -->
</ul>
<!-- /tree widget -->
</nav>
Dialog
The dialog
widget provides a way to display content in an in-page popup.
Dialog overview
The dialog widget structure
- dialog: the dialog widget, specified as:
- element with
data-widget="dialog"
- element with
- close button: the close button, specified as:
- elements with
data-role="close"
- auto-generated
- elements with
Options for the dialog widget
data-overlay
: whether to show the dialog in an overlay (true
orfalse
,false
by default)
Simple dialog
Modal dialog
Standard Popup Image
Popup Image click for downloading
Carousel & Slideshow
The carousel
widget allows organizing items into panels and flipping through them easily, showing only the active panel. The slideshow
adds auto-playing and navigation on top of the carousel
.
Carousel overview
The carousel widget structure
- carousel: the carousel widget, specified as:
- element with
data-widget="carousel"
- element with
- panel: the panels that contain the various items, specified as one of:
- elements with
role="group"
- using the
data-panels
option, specified as a jQuery selector relative to the widget - children of the 1st child of the widget if the controls are below the panels
- children of the 2nd child of the widget
- elements with
- item: the individual items in the carousel, specified as one of:
- elements with
role="option"
- using the
data-items
option, specified as a jQuery selector relative to the widget - children of the panels
- elements with
- controls: the controls that allow switching panels, specified as one of:
- elements with
role="toolbar"
, if thedata-controls
option is notfalse
- children of the 2nd child of the widget if the controls are below the panels
- children of the 1st child of the widget if the widget has several children
- auto-generated
- elements with
- previous button: the button that allows switching to the previous panel, specified as one of:
- elements with
data-role="previous"
, if thedata-prev
option is notfalse
- using the
data-prev
option, specified as a jQuery selector relative to the widget - auto-generated
- elements with
- next button: the button that allows switching to the next panel, specified as one of:
- elements with
data-role="next"
, if thedata-next
option is notfalse
- using the
data-next
option, specified as a jQuery selector relative to the widget - auto-generated
- elements with
Options for the carousel widget
data-event
: what event to respond to (click
by default)data-cycleItems
: whether to cycle through the items or not (true
orfalse
, default isfalse
)
Events for the carousel widget
beforeSelect
: triggered on the carousel element before the selection happensafterSelect
: triggered on the carousel element after the selection happens
Both events have the following parameters:
item
: a reference to the current itempanel
: a reference to the current panel
Default carousel
With inline preview
Inline previews for each option can be set, by adding:
data-target
: jQuery selector to the target element that contains the previewdata-url
: url to use for the content of the target element (for itssrc
attribute)
With controls
Vertical with controls
With custom controls
With custom controls and cycleItems=True
Slideshow
The slideshow widget structure
- slideshow: the carousel widget, specified as:
- element with
data-widget="slideshow"
- element with
- panel: same as carousel
- item: same as carousel
- controls: same as carousel
- previous button: same as carousel
- next button: same as carousel
- play button: the button that allows auto-playing the items, specified as one of:
- elements with
data-role="play"
, if thedata-play
option is notfalse
- using the
data-play
option, specified as a jQuery selector relative to the widget - auto-generated
- elements with
- pause button: the button that allows pausing the items, specified as one of:
- elements with
data-role="pause"
, if thedata-pause
option is notfalse
- using the
data-pause
option, specified as a jQuery selector relative to the widget - auto-generated
- elements with
- selectors: the selectors that allow jumping to a specific item, specified as one of:
- elements with
data-role="selector"
- using the
data-selectors
option, specified as a jQuery selector relative to the widget - auto-generated
- elements with
Options for the slideshow widget
Same as carousel, plus:
data-autoplay
: whether to auto-play the items (true
orfalse
, default istrue
)data-duration
: how long each item in the slideshow should be shown (in ms, default is5000
)
Events for the slideshow widget
Same as carousel.
Default slideshow
With controls (no selectors)
Slideshow with custom controls
Alerts & Notifications
The alert
and notification
widgets are extensions of the message module and provide a way to display disposable messages to the user, in-line or growl-style.
Alert
Class Aptent Taciti Sociosqu
Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie.
Etiam At Risus Et
Nulla at nulla justo, eget luctus tortor. Nulla.
Etiam At Risus Et
Nulla at nulla justo, eget luctus tortor. Nulla.
Etiam At Risus Et
Nulla at nulla justo, eget luctus tortor. Nulla.
Etiam At Risus Et
Nulla at nulla justo, eget luctus tortor. Nulla.
Notification
Class Aptent Taciti Sociosqu
Nullam in dui mauris. Vivamus hendrerit arcu sed erat molestie.
Etiam At Risus Et
Nulla at nulla justo, eget luctus tortor. Nulla.
Etiam At Risus Et
Nulla at nulla justo, eget luctus tortor. Nulla.
Etiam At Risus Et
Nulla at nulla justo, eget luctus tortor. Nulla.
Etiam At Risus Et
Nulla at nulla justo, eget luctus tortor. Nulla.
Filter
Country | Spoken language |
---|---|
France | French |
Germany | German |
Switzerland | German, French, Italian |
Sort
List
- Mauris Iaculis Porttitor Posuere. Praesent
- Lorem Ipsum Dolor Sit Amet
- In Pellentesque Faucibus Vestibulum. Nulla At
- Duis Aliquet Egestas Purus
- Ut In Nulla Enim. Phasellus
Table
Country | Population | Date | Exchange rate to USD | GDP |
---|---|---|---|---|
United States | 317,227,000 | December 9, 2013 | 1.00 | 14,991,300 |
China | 1,361,520,000 | December 9, 2013 | 0.16 | 7,203,784 |
Japan | 127,290,000 | November 1, 2013 | 0.0097 | 5,870,357 |
Germany | 80,548,000 | May 31, 2013 | 1.37 | 3,604,061 |
France | 65,834,000 | November 1, 2013 | 1.37 | 2,775,518 |
Total | 1,952,419,000 | 34,445,020 |
Markdown
Maths
Tex Example
MathML
AsciiMath
When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and they are
`x = (-b +- sqrt(b^2-4ac))/(2a) .`
Syntax Highlighting
Java
public class HelloWorld {
public static void main(String [] args) {
System.out.println("Hello World!");
}
}
Python
print "Hello World!"
JavaScript
console.log("Hello World!");
PHP
<?php echo("Hello World!"); ?>
Perl
#!/usr/bin/perl
print "Hello World!";
Other
Syntax highlighting is provided by highlisght.js. See their documentation for more info.
Page templates
Templates for the various page layouts are also available in the templates folder.
Do note that these template have the html head in-lined to allow previewing, but the developer should replace the head by including one of the auto-updating ones.
Page type | Template file | |
---|---|---|
English | French | |
Default content page | page.en.html | page.fr.html |
Default neutral content page | page-neutral.en.html | page-neutral.fr.html |
Minimal structure (header only) | minimal.en.html | minimal.fr.html |
Default homepage | homepage.en.html | homepage.fr.html |
Faculty homepage | homepage-faculty.en.html | homepage-faculty.fr.html |
Portal homepage | homepage-portal.en.html | homepage-portal.fr.html |
Global homepage | homepage-global.html |
Accessibility links template
<nav class="a11y">
<a class="nav-link visuallyhidden focusable" href="#content" accesskey="c">Skip to content</a>
<a class="nav-link visuallyhidden focusable" href="#main-navigation" accesskey="n">Skip to navigation</a>
</nav>
Minimal global header
<header id="epfl-header" class="site-header epfl" role="banner" aria-label="Global EPFL banner" data-ajax-header="https://static.epfl.ch/latest/includes/epfl-header.en.html">
<div class="logo">
<a href="//www.epfl.ch">
<span class="visuallyhidden">EPFL Homepage</span>
<object type="image/svg+xml" class="logo-object" data="//static.epfl.ch/latest/images/logo.svg">
<img alt="EPFL Logo" width="95" height="46" src="//static.epfl.ch/latest/images/logo.png" />
</object>
</a>
</div>
<div class="search search-simple">
<a href="#search" class="icon icon-magnifier" data-widget="toggle">
<span class="visuallyhidden">Search</span>
</a>
<div id="search" role="search">
<form id="search-form" class="form form-inline" action="//search.epfl.ch">
<div class="form-input-group">
<div class="form-input">
<label class="visuallyhidden" for="search-query">Search query</label>
<input id="search-query" class="search-query" type="text" placeholder="search" name="q" accesskey="4" />
</div>
<div class="form-input form-input-mini">
<button class="themed search-submit" type="submit">
<span class="icon icon-magnifier"></span><span class="visuallyhidden">Search</span>
</button>
</div>
</div>
</form>
</div>
</div>
</header>
Website name template
<h1 class="site-title" itemprop="isPartOf" itemscope itemtype="http://schema.org/CollectionPage">
<a href="..." itemprop="url" accesskey="1">
<span itemprop="name">
<span class="visuallyhidden-xs visuallyhidden-xxs">The </span>
<abbr title="A long description for the site acronym">site</abbr>
<span class="visuallyhidden-xs visuallyhidden-xxs"> title</span>
</span>
</a>
</h1>
Breadcrumb navigation template
<nav class="nav nav-inline bcnav" itemprop="breadcrumb">
<ol class="nav-list">
<li class="nav-item" itemprop="sourceOrganization" itemscope itemtype="http://schema.org/CollegeOrUniversity">
<a class="nav-link" href="http://www.epfl.ch" itemprop="url"><span itemprop="name">EPFL</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="...">Parent page</a>
</li>
<!-- ... -->
<li class="nav-item nav-item-active">
<a class="nav-link" href="...">Current page</a>
</li>
</ol>
</nav>
Language navigation template
<nav class="nav nav-inline lang">
<ul class="nav-list">
<li class="nav-item nav-item-active">
<a class="nav-link" href="..." lang="en"><span class="visuallyhidden-xxs visuallyhidden-xs">English</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="..." lang="fr" ref="alternate"><span class="visuallyhidden-xxs visuallyhidden-xs">français</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="..." lang="de" ref="alternate"><span class="visuallyhidden-xxs visuallyhidden-xs">Deutsch</span></a>
</li>
<!-- ... -->
</ul>
</nav>
Tool bar template
<div id="tools" class="tools">
<div role="toolbar" aria-label="Page tools">
<span class="secondary-content" data-role="label">Share:</span>
</div>
</div>
Main navigation template
<div class="mainnav">
<a id="main-navigation-label" class="hidden visible-xxs visible-xs" href="#main-navigation" data-widget="collapse">Main navigation</a>
<nav id="main-navigation" class="nav nav-block nav-horizontal themed visible-s visible-m visible-l visible-xl visible-xxl" aria-labelledby="main-navigation-label">
<ul class="nav-list" data-widget="menubar">
<li class="nav-item hidden-xxs hidden-xs">
<a class="nav-link" href="/">
<span class="hidden-xxs hidden-xs icon icon-inline icon-big icon-home" role="presentation" hidden="hidden"></span>
<span class="hidden-s hidden-m hidden-l hidden-xl hidden-xxl">Homepage</span>
</a>
</li>
<li class="nav-item">
<span class="nav-link" data-widget="collapse">Menu 1 [dropdown]</span>
<ul class="nav-list nav-vertical" data-widget="menu">
<li class="nav-item">
<a class="nav-link" href="...">Menu 1.1</a>
<ul class="nav-list">
<li class="nav-item">
<a class="nav-link" href="...">Menu 1.1.1</a>
</li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="...">Menu 2 [combo]</a>
<span data-widget="collapse"></span>
<ul class="nav-list nav-vertical" data-widget="menu">
<li class="nav-item">
<a class="nav-link" href="...">Menu 2.1</a>
<ul class="nav-list">
<li class="nav-item">
<a class="nav-link" href="...">Menu 2.1.1</a>
</li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="...">Menu 3 [combo]</a>
<span data-widget="collapse"></span>
<ul class="nav-list nav-vertical" data-widget="menu">
<li class="nav-item">
<a class="nav-link" href="...">Menu 3.1</a>
<ul class="nav-list">
<li class="nav-item">
<a class="nav-link" href="...">Menu 3.1.1</a>
</li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul>
</nav>
</div>
Secondary navigation template
<div class="localnav panel">
<nav id="secondary-navigation" class="nav nav-block nav-vertical themed">
<ul class="nav-list" data-widget="tree">
<li class="nav-item">
<a class="nav-link" href="...">Level 1 item</a>
<ul class="nav-list" role="group">
<li class="nav-item">
<a class="nav-link" href="...">Level 2 item</a>
<ul class="nav-list" role="group">
<li class="nav-item nav-item-active">
<a class="nav-link" href="...">Level 3 item</a>
<ul class="nav-list" role="group">
<li class="nav-item">
<a class="nav-link" href="...">Level 4 item</a>
<ul class="nav-list" role="group">
<li class="nav-item">
<a class="nav-link" href="...">Level 5 item</a>
</li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul>
</li>
<!-- ... -->
</ul>
</nav>
</div>
Article list
Based on the News Article Schema and the Media module.
Finally GeoBeer makes it to French-speaking Switzerland…
Lifehand 2 prosthetic grips and senses like a real hand
IDEAS Seminar | 14 April 2014
Fixed height articles (auto-truncate)
Finally GeoBeer makes it to French-speaking Switzerland…
Lifehand 2 prosthetic grips and senses like a real hand
IDEAS Seminar | 14 April 2014
Paginated news list
Finally GeoBeer makes it to French-speaking Switzerland…
Lifehand 2 prosthetic grips and senses like a real hand
IDEAS Seminar | 14 April 2014
Minimal article list
News list with emphasized first item
Finally GeoBeer makes it to French-speaking Switzerland…
Lifehand 2 prosthetic grips and senses like a real hand
IDEAS Seminar | 14 April 2014
Ateliers Lego pour de futurs ingénieurs
And on a single column:
Finally GeoBeer makes it to French-speaking Switzerland…
Lifehand 2 prosthetic grips and senses like a real hand
IDEAS Seminar | 14 April 2014
Ateliers Lego pour de futurs ingénieurs
Course list
Based on the CreativeWork Schema, the LRMI specification and the Media module.
Information, Computation, Communication
- Propedeutics > Computer Science
- Propedeutics > Communication Systems
Fall semester
French
x: 3
L: 2h
E: 1h
Advanced algorithms
- Master cycle > Computational science and Engineering
- Master cycle > Communication Systems
- Master cycle > Computer Science
- Minor > Information security minor
Fall semester
English
x: 7
L: 4h
E: 2h
P: 1h
Quantum optics and quantum information
- Master cycle > Applied Physics
- Master cycle > Physics - master program
Spring semester
English
x: 4
L: 2h
E: 2h
Event list
Based on the Event Schema and the Media module.
Networked Cyber-Physical Systems for a Smarter World
30jun
ERBRA - an artistic performance by Anne Rochat
15jun
Certificate of Advanced Studies in Management of Development Projects
Event-list (auto-truncated)
Networked Cyber-Physical Systems for a Smarter World
30jun
ERBRA - an artistic performance by Anne Rochat
15jun
Certificate of Advanced Studies in Management of Development Projects
Agenda version
Networked Cyber-Physical Systems for a Smarter World
30jun
ERBRA - an artistic performance by Anne Rochat
People list
Based on the Person Schema and the Media module.
Marilyne Andersen
Prof. Andersen holds a MSc in Physics and a PhD in Building Physics from EPFL. She was a faculty member of MIT's Department of Architecture in 2004-2010 where she founded the MIT Daylighting Lab. View full profile for "Marilyne Andersen"
Martine Tiercy
Mrs. Tiercy takes care of LIPID’s administrative duties and shares her time with the Laboratory of Architecture and Sustainable Technologies (LAST). View full profile for "Martine Tiercy"
Boris Karamata
Dr. Karamata investigates novel methods for solar energy collection and climate-adaptive facades. He holds a MSc in Microtechnical Engineering and a PhD in Optical Physics from EPFL. View full profile for "Boris Karamata"
Condensed people grid layout (2 columns)
Some CSS has to be added to display this layout (see code).
People grid layout
3 columns
4 columns
Condensed people list
Some CSS has to be added to display this layout (see code).
Publication list
Based on the Scholarly Article Schema and the Media module.
Interactive expert support for early stage full-year daylighting design: a user’s perspective on Lightsolve.
Detailed record for "Interactive expert support for early stage full-year daylighting design: a user’s perspective on Lightsolve." Full text for "Interactive expert support for early stage full-year daylighting design: a user’s perspective on Lightsolve."
Modelling 'non-visual' effects of daylighting in a residential environment.
Detailed record for "Modelling 'non-visual' effects of daylighting in a residential environment." Full text for "Modelling 'non-visual' effects of daylighting in a residential environment."
A framework for predicting the non-visual effects of daylight – Part II: The simulation model.
Detailed record for "A framework for predicting the non-visual effects of daylight – Part II: The simulation model." Full text for "A framework for predicting the non-visual effects of daylight – Part II: The simulation model."
Study plan
Global issues: Propedeutic BA1
Courses
|
Bachelor 1
|
Bachelor 2
|
Exam | Credits |
---|---|---|---|---|
|
||||
|
Bachelor 1
|
Bachelor 2
|
Exam
|
Credits
|
|
||||
|
Bachelor 1
|
Bachelor 2
|
Exam
|
Credits
|
Global issues: Propedeutic BA2
Courses
|
Bachelor 2
|
Exam | Credits |
---|---|---|---|
|
|||
|
Bachelor 2
|
Exam
|
Credits
|
|
|||
|
Bachelor 2
|
Exam
|
Credits
|
|
|||
Bachelor 2
|
Exam
|
Credits
|
Organigramme
Schools | ||
---|---|---|
ENAC - Dean's Office | ENAC-DEC | Andersen Marilyne |
Section | ||
ENAC - Architecture Section | ENAC-SAR | Gargiani Roberto |
SAR - Administration | SAR-GE | Gargiani Roberto |
Instituts | ||
Institute of Architecture | IA | Ortelli Luca |
IA - Administration | IA-GE | Ortelli Luca |
Center | ||
Hosted units | EH-ENAC | Andersen Marilyne |
Responsive Image
image sans attributs
<img src="…"/>
Le framework se charge de la rendre responsive
image avec attributs width et height
<img src="…" width="…" height="…"/>
Le framework se charge de la rendre responsive
image avec l'attribut style
<img src="…" style="width:…;height=…;"/>
Il faut forcer une css
<style>
img { width: 100%; height: auto; }
</style>
max-width: 100%
On limite la largeur au max à la page, mais si l'image est plus petite, elle ne remplit pas toute la largeur.
L'image sera adaptée au container div
<img src="..." style="max-width:100%; height:auto;" >
width: 100%
On force la largeur à la largeur de la page, même si l'image est plus petite
Si l'image est plus haute que la page, on ne voit pas tout.
<img src="..." style="width:100%; height:auto;" >
Image entièrement visible sur l'écran
Il faut jajouter un div qui remplit tout l'écran et une image de fond :
div { position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: url('/path/to/image.jpg') no-repeat center center / contain; }
Image qui remplit tout l'écran
On change le background :
div { position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: url('/path/to/image.jpg') no-repeat center center / cover; }
Différentes solutions
https://css-tricks.com/which-responsive-images-solution-should-you-use/