[[PageOutline]] = User Interface Guidelines = This page contains guidelines for developing Indico's user interface. == Common elements == This section covers common elements to be used throughout Indico providing examples and snippets. === Icons === Indico uses [http://icomoon.io Icomoon.io] web-fonts as vector icons. To embed an icon simply use the following snippet making the class fit the icon of your preference. ''(*)'' {{{#!text/html Copy link }}} Available icons are listed as CSS classes in [https://github.com/indico/indico/blob/master/indico/htdocs/sass/partials/_icons.scss _icons.scss]. To add new icons to Indico: 1. Login in [http://icomoon.io/#app-features Icomoon.io] and start the App 1. Import icons and upload [https://github.com/indico/indico/blob/master/indico/htdocs/fonts/selection.json selection.json] 1. Click on ''Add more icon sets...'' and add Icomoon Ultimate and WebHostingHub Glyphs 1. Select new icons to be added and click on {{{Font ->}}} 1. In Preferences, set {{{icomoon}}} as the font name and download the package 1. Extract files from {{{icomoon/fonts}}} and overwrite existing ones in [https://github.com/indico/indico/tree/master/indico/htdocs/fonts indico/htdocs/fonts] 1. Overwrite [https://github.com/indico/indico/tree/master/indico/htdocs/fonts/selection.json selection.json] with {{{icomoon/selection.json}}} 1. Append new icon classes from {{{icomoon/style.css}}} to [https://github.com/indico/indico/blob/master/indico/htdocs/sass/partials/_icons.scss _icons.scss] 1. Make sure to comply with the license of the new icons and reference their corresponding authors in [https://github.com/indico/indico/blob/master/THANKS.md THANKS.md] if needed ''(*)'' Why are we using the tag? Read this: [http://stackoverflow.com/a/14555422/1901977 tag for icons?] === Buttons === Buttons are intended to be used for providing a way to perform '''actions'''. ==== Regular buttons ==== [[Image(action.png)]] Standard buttons: {{{#!text/html Action Action }}} [[Image(buttonflavors.png)]] Meaning can be added to buttons with the following classes: {{{accept}}}, {{{danger}}}, {{{highlight}}}, and {{{warning}}}. {{{#!text/html Confirmation Dangerous Action Highlighted Action Slightly Dangerous Action }}} [[Image(disabledbutton.png)]] A button can appear as disabled by adding the class {{{disabled}}}. Be wary that this will only affect its appearance. {{{#!text/html Disabled Action }}} ==== Buttons with icons ==== [[Image(iconbuttons.png)]] Icons can also be used in buttons. If the tag is empty a margin-right will be added to the icon automatically. * With text: {{{#!text/html Add }}} * Icon only: {{{#!text/html }}} === Toolbars === [[Image(toolbar.png)]] Toolbars usually congregate a set of buttons to be displayed within a block element and can be created with {{{
}}}. They come in two sizes: normal and thin. For the thin version, simply add {{{class="thin"}}}. {{{#!text/html }}} Most of the times it's useful to have buttons visually grouped within a toolbar. For doing so, a {{{
}}} can be nested in the toolbar enclosing all buttons to be grouped. An useful element in order to make clearer what kind of tools the group is a special label button that can be added with {{{class="i-button label"}}}. Add {{{class="right"}}} for having groups aligned to the right side of the toolbar. {{{#!text/html
Participants
}}} ==== Dropdown buttons in toolbars ==== [[Image(dropdown.png)]] Dropdown buttons can be added to toolbars. This can be achieved adding {{{data-toggle="dropdown"}}} to a button element and placing a {{{