diff options
[hooks] Updated and reformatted documentation for everything in hooks, including README
1 files changed, 66 insertions, 23 deletions
| -rw-r--r-- | generate-hooks/create-presentation.awk | 89 |
diff --git a/generate-hooks/create-presentation.awk b/generate-hooks/create-presentation.awk index ae7fedf..7f2cd73 100644 --- a/generate-hooks/create-presentation.awk +++ b/generate-hooks/create-presentation.awk @@ -1,30 +1,73 @@ -# A presentation is just a markdown file, with some added ftags for formatting into a presentation layout. -# This means all presentations will change how they look with changes to the main styles.css. It also means -# that they follow the light/dark mode setting. -# Each slide is the size of a horizontal A4 piece of paper. This makes it easy to print (and there is a dedicated -# print button). -# The whole system is based on flexboxes. The only real way to control how items are aligned is via a row and column -# directed flexboxes. This isn't the most efficient, but it's fine. And if there are performance issues, the -# presentation can always be "printed" to a PDF and consumed that way. +# +# == About == +# +# This is my way of making slide-based presentations. In short, it just groups +# Markdown formatting into rectangles and adds options for layout formatting. +# Each slide is the size of a landscape-oriented A4 sheet of paper. Light/dark +# mode settings are respected (of course). +# Currently, this appliest only to pages under the "talks" folder. -# Currently you can have normal paragraphs and heading around a presentation, and those won't be printed out. -# But you can have only ONE presentation per page!!! -# All ftags that have a closing tag, and &&presentation, need one line above and below them (but you don't -# need the first and last line of file to be empty). - -# &&presentation Required. Adds the control panel and JavaScript script. Must be the very first one! -# &&slide Starts a slide. Slides are the main pages that hold content and are used for navigation. +# +# == ftags == +# +# &&presentation Must appear before any other presentation ftags. +# It "loads" everything necessary for a presentation, that being +# the navigation bar and logic script (which also inserts the +# custom stylesheet). +# Can be only one per page. Also refer to -- Surroundings -- +# +# &&slide Everything below this tag is part of a slide. Each slide is +# presented in the order it appears in. # &&/slide Ends (the last started) slide. -# &&flexer An empty container with flex: 1. Use it for spacing out stuff. -# &¢ered Aligns text to the center. -# &&/centered Ends (the last started) centered text. -# &&fow Flexbox, with flex-direction row. -# &&/fow Ends (the last started) fow. -# &&fol Flexbox, with flex-direction column. -# &&/fol Ends (the last started) fol. +# +# &&fow A row of paragraphs, where each item is evenly sized and is +# spaced out horizontally. In the HTML, it is a simple flexbox. +# This is one of the two main ways to configure how content is +# laid out on a slide. +# &&/fow Every HTML element/paragraph between &&fow and &&/fow is an +# item that will be laid out. +# +# &&fol A column of paragraphs, where each item is evenly sized and is +# spaced out vertically. In the HTML, it is a simple flexbox. +# This is one of the two main ways to configure how content is +# laid out on a slide. +# &&/fol Every HTML element/paragraph between &&fol and &&/fol is an +# item that will be laid out. +# +# &&flexer An empty container, which can be used as a blank space item +# inside &&fow or &&fol. In the styling, it just has `flex: 1`. +# +# &¢ered Aligns text to the center, literally. +# &&/centered Text between &¢ered and &&/centered is aligned. +# +# &&fright Aligns element and the text inside to the right. In the styling, +# it just has text-align and float set to right. +# &&/fright Text between &&fright and &&/fright is aligned to the right +# +# &&fontSIZE Changes to font size to SIZE, in pixels. Default size is 24px. +# Available values for SIZE: 18, 20, 27, 30, 37 +# &&/font Text between &&fontSIZE and &&/font is sized accordingly +# +# -- Surroundings -- +# +# As stated, there can only be one presentation per page. +# Everything that is around a presentation and it's slides is normally hidden +# during presenting mode, but will show up if you try to print the presentation. +# Exceptions to this rule are headings and paragraphs, which won't show up in +# presenting mode or during print. +# +# -- Placement/Flow -- +# +# All ftags can be placed on their own line, or in a line with other ftags. +# The only requirement is that such a line must start with an ftag, ftags in the +# middle of text aren't recognized. +# +# -- Example Usage -- +# +# Refer to src/talks/demo.md BEGIN { - if (substr(FILENAME, "talks") == 0) exit + if (substr(ARGV[1], "talks") == 0) exit # FILENAME isn't available yet # Exceptions to the normal format names[ 1] = "presentation" |