bmstu-mt-wp/docs/features.md

402 lines
12 KiB
Markdown
Raw Normal View History

2016-04-09 14:56:19 +03:00
# Features
2016-07-28 18:55:20 +03:00
All themes features are demonstrated in the [index.html](index.html) file. Use it as a reference while building your presentation. More detailed features overview follows below.
2016-04-09 14:56:19 +03:00
- [Anatomy](#anatomy)
- [Common](#common)
2018-08-24 11:48:59 +03:00
- [Language](#language)
- [Canvas](#canvas)
- [Title](#title)
- [Badge](#badge)
- [Progress](#progress)
2016-04-09 14:56:19 +03:00
- [Slide](#slide)
2018-08-24 11:48:59 +03:00
- [Number](#number)
- [Types](#types)
- [White](#white)
- [Black](#black)
- [Grid](#grid)
- [Content](#content)
- [Header](#header)
- [Paragraphs](#paragraphs)
- [Inline](#inline)
- [Quotes](#quotes)
- [Lists](#lists)
- [Columns](#columns)
- [Tables](#tables)
- [Code](#code)
- [Elements](#elements)
- [Cover](#cover)
- [Shout](#shout)
- [Place](#place)
- [Notes](#notes)
2016-04-09 14:56:19 +03:00
## Anatomy
2016-07-28 18:55:20 +03:00
Theme package consists of the following folders and files:
2016-04-09 14:56:19 +03:00
2017-03-21 16:30:31 +03:00
2. `fonts` folder with fonts in WOFF format.
2016-04-09 14:56:19 +03:00
3. `images` folder with decoration images.
4. `pictures` folder with sample pictures.
5. `styles` folder with built styles in 16×10 and 4×3 ratios.
6. `index.html` file with demonstration of all features.
2017-03-21 16:30:31 +03:00
In addition to files themes repository contains source files:
2016-04-09 14:56:19 +03:00
1. `source` folder with font source files in TTF and design in [Sketch](http://bohemiancoding.com/sketch/).
2. `styles` folder also contains source styles in SCSS format.
## Common
### Language
The main presentation language is set on the root element of the document, please note it and set the right one:
2018-08-24 11:48:59 +03:00
<html lang="en">
<html lang="ru">
2016-04-09 14:56:19 +03:00
2017-03-21 16:30:31 +03:00
Appropriate typography traditions are used based on this value. `lang` attribute could also be set on separate slides or elements.
2016-04-09 14:56:19 +03:00
### Canvas
2016-07-28 18:55:20 +03:00
The root presentation element has the main `shower` class and additional mode class: `list` for the list and `full` for the full screen. `list` mode is usually set by default, but if theres no one, itll be set to `list` anyway and slides will be opened in the list mode. If `full` is set instead of `list` then slides will be opened in the full screen mode.
2016-04-09 14:56:19 +03:00
List:
2018-08-24 11:48:59 +03:00
<body class="shower list">
2016-04-09 14:56:19 +03:00
2016-07-28 18:55:20 +03:00
Full:
2016-04-09 14:56:19 +03:00
2018-08-24 11:48:59 +03:00
<body class="shower full">
2016-04-09 14:56:19 +03:00
2016-07-28 18:55:20 +03:00
Themes architecture is based on agreement that all presentation elements are nested in `shower` element and mode classes are hiding or showing needed elements depending on current mode.
2016-04-09 14:56:19 +03:00
2016-07-28 18:55:20 +03:00
### Caption
2016-04-09 14:56:19 +03:00
Presentation title is marked with the `caption` element, which has following elements provided: `<h1>` for the header, `<p>` for the description and also links.
2018-08-24 11:48:59 +03:00
<header class="caption">
<h1>Presentation Title</h1>
<p><a href="">Yours Truly</a>, Famous Inc.</p>
</header>
2016-04-09 14:56:19 +03:00
2017-03-21 16:30:31 +03:00
Caption is visible only in the list mode. Dont forget to also specify presentation title in documents `<title>` element.
2016-07-28 18:55:20 +03:00
2016-04-09 14:56:19 +03:00
### Badge
2017-03-21 16:30:31 +03:00
Badge with “Fork me on GitHub” link (or any other call to action) is marked with `badge` element.
2016-04-09 14:56:19 +03:00
2018-08-24 11:48:59 +03:00
<footer class="badge">
<a href="…">Fork me on Github</a>
</footer>
2016-04-09 14:56:19 +03:00
2016-07-28 18:55:20 +03:00
Badge is visible only in the list mode.
2016-04-09 14:56:19 +03:00
### Progress
2016-07-28 18:55:20 +03:00
Progress bar shows how much is left until presentation end and marked with `progress` element visible only in full screen mode:
2016-04-09 14:56:19 +03:00
2018-08-24 11:48:59 +03:00
<div class="progress"></div>
2016-04-09 14:56:19 +03:00
2017-03-21 16:30:31 +03:00
To remove it from presentation just remove this element from document. Theres no way to hide it for specific slides.
2016-04-09 14:56:19 +03:00
## Slide
2017-03-21 16:30:31 +03:00
Slides are marked with `slide` class. Please dont nest slides and dont forget closing tags, things could go wrong.
2016-04-09 14:56:19 +03:00
2018-08-24 11:48:59 +03:00
<section class="slide">
</section>
<section class="slide">
</section>
2016-04-09 14:56:19 +03:00
2016-07-28 18:55:20 +03:00
There are two slide ratios supported: 16×10 and 4×3. To enable needed one include appropriate file `screen-4x3.css` or `screen-16x10.css`. Wide screen 16×10 format is included by default.
2016-04-09 14:56:19 +03:00
2017-03-21 16:30:31 +03:00
Slide width is 1024 px for the both ratios, for 16×10 height is 640 px, for 4×3 its 768. Bare in mind these sizes while preparing presentation pictures. In list mode slides are scaled down 2 or 4 times and in full screen mode they are scaled dynamically based on window size.
2016-04-09 14:56:19 +03:00
### Number
2017-03-21 16:30:31 +03:00
Slide numbers help audience to remember slides for questions and open needed slide by changing number in address field. Numbers are generated automatically using CSS counters and could be turned off for specific slides.
2016-07-28 18:55:20 +03:00
You can hide number manually:
2018-08-24 11:48:59 +03:00
<section class="slide" id="off">
<style>
#off::after {
visibility: hidden;
}
</style>
</section>
2016-07-28 18:55:20 +03:00
Slide type `clear` could also hide slide number.
2016-04-09 14:56:19 +03:00
### Types
2016-07-28 18:55:20 +03:00
Types are changing slides look. You can set type by adding class to the main `slide`. There are few built-in types available in the theme, you could also describe custom types for each presention or add it to your theme.
2016-04-09 14:56:19 +03:00
#### White
White type sets white background.
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<section class="slide white">
2016-04-09 14:56:19 +03:00
#### Black
Black type sets black background.
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<section class="slide black">
2016-07-28 18:55:20 +03:00
2018-01-25 19:10:06 +03:00
Please note that black slide type doesnt change text color.
2016-04-09 14:56:19 +03:00
2018-01-24 23:41:39 +03:00
#### Clear
Clear type turns off slide number. Use it when you need a pure slide. May be mixed with `white` or `black` type.
2018-08-24 11:48:59 +03:00
<section class="slide clear">
2016-04-09 14:56:19 +03:00
#### Grid
2016-07-28 18:55:20 +03:00
Grid set a background with two guide types: main magenta guides and additional cyan guides, setting margins, rows and columns.
2018-08-24 11:48:59 +03:00
<section class="slide grid">
</section>
2016-07-28 18:55:20 +03:00
All theme elements are aligned by this grid and its recommended to follow it while changing or extending a theme.
2016-04-09 14:56:19 +03:00
### Content
2016-07-28 18:55:20 +03:00
Simple content: headers, paragraphs, lists.
2016-04-09 14:56:19 +03:00
#### Header
2016-07-28 18:55:20 +03:00
Slide header is marked with `<h2>` element:
2018-08-24 11:48:59 +03:00
<section class="slide">
<h2>Slide Header</h2>
</section>
2016-07-28 18:55:20 +03:00
We havent introduced next heading levels to not provoke slides complexity.
2016-04-09 14:56:19 +03:00
#### Paragraphs
2016-07-28 18:55:20 +03:00
Paragraphs are marked with `<p>` element. You could also make a note, less important part of a slide, by adding a `note` class to a paragraph:
2018-08-24 11:48:59 +03:00
<section class="slide">
<p>Text</p>
<p class="note">Note</p>
</section>
2016-04-09 14:56:19 +03:00
#### Inline
2016-07-28 18:55:20 +03:00
There are following inline elements styled in the theme:
- `<a>` is underlined;
- `<strong>` and `<b>` are bold;
- `<em>` and `<i>` are italic;
- `<code>`, `<samp>`, and `<kbd>` are monospaced;
2017-03-21 16:30:31 +03:00
- `<sup>` and `<sub>` make superscript and subscript indexes;
- `<mark>` highlights text with background color.
2016-04-09 14:56:19 +03:00
#### Quotes
2016-07-28 18:55:20 +03:00
Quotes are marked with `<blockquote>` element which contains one or more paragraphs:
2018-08-24 11:48:59 +03:00
<blockquote>
<p>Flannel bicycle rights locavore selfies.</p>
</blockquote>
2016-07-28 18:55:20 +03:00
To add quotes author wrap a quote to a `<figure>` element and put a caption in the `<figcaption>` right after:
2018-08-24 11:48:59 +03:00
<figure>
<blockquote>
<p>Post-ironic fashion axe flexitarian</p>
</blockquote>
<figcaption>Yours Truly</figcaption>
</figure>
2016-04-09 14:56:19 +03:00
#### Lists
2017-10-23 16:06:58 +03:00
For creating list you must use `ul` (`ol` for numerical list).
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<ol>
<li>Literally viral vegan</li>
<li>Wes Anderson chillwave Marfa
<ul>
<li>Retro meh brunch aesthetic</li>
<li>Messenger bag retro cred</li>
</ul>
</li>
</ol>
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
You can also create list with inner navigation by adding `next` class to each elements following after element from each you want start navigation:
2018-08-24 11:48:59 +03:00
<h2>Inner navigation</h2>
<ol>
<li>I'll be seen right away.</li>
<li>Just navigate to next slide and you'll see others.</li>
<li class="next">Hey! It's all okay ?</li>
<li class="next"> ... </li>
</ol>
2017-10-23 16:06:58 +03:00
And even so:
2018-08-24 11:48:59 +03:00
<h2>Benefits</h2>
<ol>
<li class="next">The most important advantage</li>
<li class="next">Less important advantage</li>
</ol>
<h2 class="next">Disadvantages</h2>
<ol class="next">
<li class="next">There's nothing here</li>
<li class="next"> ... </li>
</ol>
2016-04-09 14:56:19 +03:00
#### Columns
2017-10-23 16:06:58 +03:00
If you want to form text in two or three columns use `double` or `triple` class
2016-04-09 14:56:19 +03:00
2018-08-24 11:48:59 +03:00
<p class="double">
Echo Park 8-bit sustainable umami deep v Kickstarter.
</p>
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
Also work with lists:
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<ul class="triple">
<li>Occupy locavore blog</li>
<li>Mustache you havent heard of</li>
<li>Something else</li>
</ul>
2016-07-28 18:55:20 +03:00
2016-04-09 14:56:19 +03:00
#### Tables
2017-10-23 16:06:58 +03:00
Create table by using usual `table`, `tr`, `th`
2016-04-09 14:56:19 +03:00
2018-08-24 11:48:59 +03:00
<table>
<tr>
<th scope="col">Gentrify</th>
<th>Twee</th>
</tr>
<tr>
<th scope="row">Messenger</th>
<td>Mixtape</td>
</tr>
</table>
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
Class `striped` stylizes your table: even rows will turn gray background
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<table class="striped">
2016-07-28 18:55:20 +03:00
2016-04-09 14:56:19 +03:00
#### Code
2017-10-23 16:06:58 +03:00
`Code` tag define your program code
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<pre><code>function action() {
// TODO
return true;
}</code></pre>
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
If you want to add lines numbers use next construction:
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<pre>
<code>function action() {</code>
<code> // TODO</code>
<code> return true;</code>
<code>}<code>
</pre>
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
When neccessary emphasize that code is commented, you need to use span element with `comment` class;
If you want to color part of code, wrap this part with `mark` to add yellow background and `mark` with `important` class to add red background;
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<pre><code>function <mark>action()</mark> {
<span class="comment">// TODO<span>
return <mark class="important">true</mark>;
}</code></pre>
2016-07-28 18:55:20 +03:00
2016-04-09 14:56:19 +03:00
### Elements
#### Cover
2017-10-23 16:06:58 +03:00
`Cover` class on img attribute indicates that picture will be background for slide
2016-04-09 14:56:19 +03:00
2018-08-24 11:48:59 +03:00
<section class="slide">
<img class="cover" src="picture.png">
</section>
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
To stretch the picture in width or height, you need to set a `width` or `height` class respectively;
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
Use both classes `width height`, if you want to stretch the picture in width and height
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<img class="cover width" src="picture.png">
<img class="cover height" src="picture.png">
<img class="cover width height" src="picture.png">
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
Shortcut for `width`, `height`:
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<img class="cover w" src="picture.png">
<img class="cover h" src="picture.png">
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
To insert an image description, links to the author's site or other information use `figure` tag with `figcaption`
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<figure>
<img class="cover" src="picture.png">
<figcaption class="white">
© Yours Truly
</figcaption>
</figure>
2016-07-28 18:55:20 +03:00
2016-04-09 14:56:19 +03:00
#### Shout
2017-10-23 16:06:58 +03:00
There are slides, which need to be described in only a few words. Usually they display a call for action, define common themes, link to project or something else. To stylize this text, use the `shout` class.
2016-04-09 14:56:19 +03:00
2018-08-24 11:48:59 +03:00
<section class="slide">
<h2 class="shout">Shout</h2>
</section>
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
Add `grow` class to animate text from small to big size
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<section class="slide">
<h2 class="shout grow">Growing Shout</h2>
</section>
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
Or, on the contrary, for animate text size from big to small add `shrink` class.
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<section class="slide">
<h2 class="shout shrink">Shrinking Shout</h2>
</section>
2016-07-28 18:55:20 +03:00
2016-04-09 14:56:19 +03:00
#### Place
2017-10-23 16:06:58 +03:00
Use `place` class on img attribute give same effect as `cover` class - set background image
2016-04-09 14:56:19 +03:00
2018-08-24 11:48:59 +03:00
<section class="slide">
<img class="place" src="picture.png">
</section>
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
If you want collocate picture at a certain side, you need to use `top` / `right` / `bottom` / `left` class as shown below
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<img class="place top" src="picture.png">
<img class="place right" src="picture.png">
<img class="place bottom" src="picture.png">
<img class="place left" src="picture.png">
2016-07-28 18:55:20 +03:00
2017-10-23 16:06:58 +03:00
You can also combine classes for location in corners:
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<img class="place top left" src="picture.png">
<img class="place top right" src="picture.png">
<img class="place bottom left" src="picture.png">
<img class="place bottom right" src="picture.png">
2016-07-28 18:55:20 +03:00
2016-04-09 14:56:19 +03:00
#### Notes
2017-10-23 16:06:58 +03:00
When neccessary to add some notes for slide, you may use `footer` class, that hide your notes at all time and show them when you hover to slide:
2016-07-28 18:55:20 +03:00
2018-08-24 11:48:59 +03:00
<section class="slide">
<p>Retro meh brunch aesthetic.</p>
<footer class="footer">
<p>Cosby sweater Shoreditch.</p>
</footer>
</section>