Skip to content

Commit 7b804cd

Browse files
committed
Textsizing-logic, breakpoints
1 parent 70e97ca commit 7b804cd

File tree

67 files changed

+393
-3959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+393
-3959
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# v1.2.0-beta.1
2+
## 11-01-2019
3+
4+
1. [](#new)
5+
* Customizable breakpoints
6+
2. [](#improved)
7+
* Textsizing-logic
8+
* Purer implementation of Modular Scales
9+
110
# v1.1.0-beta.7
211
## 09-01-2019
312

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ builtin_css: true
6363
builtin_js: true
6464
# Enable Plugin's dynamic text sizing
6565
textsizing: true
66-
# Dynamic text sizing factor for resolution scaling
67-
textsizing_factor: 1.25
6866
# Synchronize Slide-navigation
6967
sync: 'none'
7068
# URL Route to use for Poll-sync
@@ -91,6 +89,22 @@ content: 'Content'
9189
parser: 'Parser'
9290
# Class to use for Styles management
9391
styles: 'Styles'
92+
# Breakpoints for responsive textsizing
93+
breakpoints:
94+
- width: 240
95+
font_size: 8
96+
- width: 320
97+
font_size: 12
98+
- width: 576
99+
font_size: 16
100+
- width: 768
101+
font_size: 20
102+
- width: 992
103+
font_size: 24
104+
- width: 1200
105+
font_size: 28
106+
- width: 1600
107+
font_size: 32
94108
# Options to pass to Reveal.js
95109
options:
96110
width: "100%"
@@ -187,16 +201,16 @@ You can of course also style the plugin using your theme's /css/custom.css-file,
187201

188202
#### Fitting text to a slide
189203

190-
The plugin makes available a method of dynamically scaling text within a slide, which is similar yet distinct from what happens in PowerPoint 2016. Rather than do this scaling entirely automatically, which tends to work poorly across devices and resolutions, you set a _scale_ and a _base_, eg.:
204+
The plugin makes available a method of dynamically scaling text within a slide, which is similar yet distinct from what happens in PowerPoint 2016. Rather than do this scaling entirely automatically, which tends to work poorly across devices and resolutions, you set a _scale_ and an optional _base_, eg.:
191205

192206
[data-textsize-scale=1.125]
193207
[data-textsize-base=16]
194208

195-
If Textsizing is enabled in the plugin's options and on the Page, the relation between block text -- any text not in a header-element -- and header-text (`h1`, `h2`, `h3`, `h4`, `h5`, `h6`) is determined by the `textsize-scale`-property. That is, the size of the header-element's text relative to the base font-size set by `textsize-base`.
209+
If Textsizing is enabled in the plugin's options and on the Page, the relation between block text -- any text not in a header-element -- and header-text (`h1`, `h2`, `h3`, `h4`, `h5`, `h6`) is determined by the `textsize-scale`-property. That is, the size of the header-element's text relative to the base font-size.
196210

197211
In the example above, the scale is set to the "Major Second" rhythm, and with a base of 16 -- the minimum font-size recommended for web -- this yields the following sizes for headers: 28.83 (`h1`), 25.63 (`h2`), 22.78 (`h3`), 20.25 (`h4`), 18 (`h5`), and 16 (`h6`). The base, and hence text, is adjusted upwards as the size of the screen increases to enable dynamic, responsive text-sizing.
198212

199-
**The normal base size is 16, because the recommended minimum font size for text on the web is 16px. The higher the number in the scale is, header-elements will be correspondly larger - exponentially so.**
213+
**Note: The base should be the minimum size of text. The higher the number in the scale is, header-elements will be correspondly larger - exponentially so.**
200214

201215
#### Using section- or slide-specific styles
202216

blueprints.yaml

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Presentation
2-
version: 1.1.0-beta.7
2+
version: 1.2.0-beta.1
33
testing: true
44
description: Responsive navigational slideshows with Reveal.js
55
icon: arrows-alt
@@ -63,40 +63,56 @@ form:
6363
0: PLUGIN_ADMIN.DISABLED
6464
validate:
6565
type: bool
66-
textsizing:
66+
builtin_css:
6767
type: toggle
68-
label: PLUGIN_PRESENTATION.ADMIN.ADVANCED.TEXTSIZING.LABEL
69-
default: 1
68+
label: PLUGIN_PRESENTATION.ADMIN.OPTIONS.ASSETS.BUILTIN_CSS.LABEL
7069
options:
7170
1: PLUGIN_ADMIN.ENABLED
7271
0: PLUGIN_ADMIN.DISABLED
7372
validate:
7473
type: bool
75-
textsizing_factor:
76-
type: number
77-
label: PLUGIN_PRESENTATION.ADMIN.ADVANCED.TEXTSIZING_FACTOR.LABEL
78-
description: PLUGIN_PRESENTATION.ADMIN.ADVANCED.TEXTSIZING_FACTOR.DESCRIPTION
79-
validate:
80-
type: int
81-
min: 0
82-
max: 10
83-
step: 0.05
84-
builtin_css:
74+
builtin_js:
8575
type: toggle
86-
label: PLUGIN_PRESENTATION.ADMIN.OPTIONS.ASSETS.BUILTIN_CSS.LABEL
76+
label: PLUGIN_PRESENTATION.ADMIN.OPTIONS.ASSETS.BUILTIN_JS.LABEL
8777
options:
8878
1: PLUGIN_ADMIN.ENABLED
8979
0: PLUGIN_ADMIN.DISABLED
9080
validate:
9181
type: bool
92-
builtin_js:
82+
textsizing:
9383
type: toggle
94-
label: PLUGIN_PRESENTATION.ADMIN.OPTIONS.ASSETS.BUILTIN_JS.LABEL
84+
label: PLUGIN_PRESENTATION.ADMIN.ADVANCED.TEXTSIZING.LABEL
85+
default: 1
9586
options:
9687
1: PLUGIN_ADMIN.ENABLED
9788
0: PLUGIN_ADMIN.DISABLED
9889
validate:
9990
type: bool
91+
breakpoints_section:
92+
type: section
93+
title: PLUGIN_PRESENTATION.ADMIN.ADVANCED.BREAKPOINTS.LABEL
94+
text: PLUGIN_PRESENTATION.ADMIN.ADVANCED.BREAKPOINTS.DESCRIPTION
95+
underline: true
96+
fields:
97+
breakpoints:
98+
type: list
99+
style: vertical
100+
label: false
101+
fields:
102+
.width:
103+
type: number
104+
label: PLUGIN_PRESENTATION.ADMIN.ADVANCED.BREAKPOINTS.WIDTH.LABEL
105+
validate:
106+
type: int
107+
min: 80
108+
max: 20000
109+
.font_size:
110+
type: number
111+
label: PLUGIN_PRESENTATION.ADMIN.ADVANCED.BREAKPOINTS.FONT_SIZE.LABEL
112+
validate:
113+
type: int
114+
min: 4
115+
max: 4000
100116
sync:
101117
type: tab
102118
title: PLUGIN_PRESENTATION.ADMIN.SYNC.TITLE

css/presentation.css

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fonts/open-sans/LICENSE.txt

Lines changed: 0 additions & 202 deletions
This file was deleted.
-20.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)