0.4.16-dev • Published 1 month ago

@sewatech/bespoke-course v0.4.16-dev

Weekly downloads
25
License
-
Repository
github
Last release
1 month ago

= Bespoke for Course template :uri-bespoke: http://markdalgleish.com/projects/bespoke.js/ :uri-asciidoctor-bespoke: https://github.com/asciidoctor/asciidoctor-bespoke/ :bespoke-course-version: 0.4.3

== Overview

The goal of the bespoke-course project is to enable the writing of course slidedecks based on {uri-bespoke}Bespoke.js and the {uri-asciidoctor-bespoke}Asciidoctor converter for Bespoke.js.

== Prerequisites

In order to use bespoke-course, you must satisfy the same prerequisites as {uri-asciidoctor-bespoke}#prerequisitesasciidoctor-bespoke.

. NodeJS + tested with v9, v10 and v12

$ npm install

. Ruby et Bundler + tested with Ruby 2.5

bundle install

It is not mandatory to install Gulp globally, as the npm run-script command uses a local installation of Gulp.

== Setup

=== All by hand

Create a directory, add a package.json file and define the JavaScript dependendies:

source,json,subs="verbatim,quotes,attributes"

{ "name": "example-course", "version": "1.0.0", "scripts": { "build": "gulp build", "start": "gulp serve", "print": "print-slides --bc_course=$npm_package_name" }, "dependencies": { "@sewatech/bespoke-course": "^{bespoke-course-version}" }, "devDependencies": { "gulp": "4.x" }

}

Download the dependencies:

$ npm install

Add a Gemfile file and define the Ruby dependencies:

source,subs="verbatim,quotes"

source 'https://rubygems.org'

gem 'asciidoctor', '~> 1.5', '>= 1.5.6.2'

gem 'asciidoctor-bespoke', github: 'sewatech/asciidoctor-bespoke'

Download the dependencies:

$ bundle install

Add a gulpfile.js file:

source,javascript,subs="verbatim,quotes"

'use strict';

require('@sewatech/bespoke-course/gulpfile.js');

Create the main source file src/index.adoc:

source,asciidoc,subs="verbatim,quotes"

= Sample Slidedeck \include::{template_dir}/headers.adoc[]

\include::{template_dir}/start.adoc[]

\include::{template_dir}/end.adoc[]

Build the slidedeck:

$ npm run build

Or run it in a local server:

$ npm start

=== From example

The node module provides an empty project in its template/ directory.

Initialize the JavaScrip project, and add the dependency:

$ npm init -y $ npm install @sewatech/bespoke-course $ cp -r node_modules/@sewatech/bespoke-course/template/* ./

Download the dependencies (JS and Ruby):

$ npm install $ bundle install

Build the slidedeck:

$ npm run build

Or run it in a local server:

$ npm start

=== Yeoman

-TBD-

== Creating Slides

=== One file per chapter

Create a new src/chapter1.adoc file with a second level title, and 2 styles: title and chapter.

source,asciidoc,subs=""

.title.chapter == Chapter 1

  • Subject 1
  • Subject 2

.cue


This chapter is the first one.



Include the file in the index.adoc:

source,asciidoc,subs="verbatim,quotes"

= Sample Slidedeck \include::{template_dir}/headers.adoc[]

\include::{template_dir}/start.adoc[]

//======================== \include::chapter1.adoc[] //========================

\include::{template_dir}/end.adoc[]

=== Content slides

The other slides are regular https://github.com/asciidoctor/asciidoctor-bespoke#content-slides[asciidoc content slides], with https://github.com/asciidoctor/asciidoctor-bespoke/blob/master/README.adoc#speaker-notes[speaker notes].

source,asciidoc,subs=""

== Slide 1.1

  • Bla Bla

.cue


Notes for the first slide


== Slide 1.2

  • Bla Bla Bla

.cue


Notes for the second slide



To show the speaker notes on the screen, just hover the title of the slide.

=== Formatting

The template provides some CSS classes.

  • Margin and padding margin-top-1, margin-top-2,... (up to 20) margin-bottom-N, margin-left-N, margin-right-N padding-top-1, margin-top-2,... margin-bottom-N, margin-left-N, margin-right-N

  • Absolute position top-1, top-2,... (up to 20) bottom-N, left-N, right-N

  • Alignment ** center

  • Width width-100, width-95, width-90,..., width-5 5 by 5, in %

  • Text small, big line-through, underline ** Maximum 3 levels of bullet points

=== Grid

CSS styles for grids:

  • Unable grid by default, A slide is a grid, with 1 column grid

  • Columns col-2, col-3, col-4 col-2-third

  • Gap between columns and rows ** gap-0, gap-1

=== Image

The best unit for the size of images is rem.

  • It is proportional, so it fits well with resizing.
  • It's better than % when we change the ratio.
  • It's supported in the PDF export.

If the unit is rem, then we can set either the width or the height.

source,asciidoc,subs=""

image:general/java-editions.png"Java Editions", , 20rem

CSS styles for images:

  • full-screen, background, foreground

=== Special content

  • UML ** uml

source,asciidoc,subs=""

.uml

  • fr.sewatech.course.SomeClass echo(input: String) : String isValid() : boolean

  • Not ** not

source,asciidoc,subs=""

.not

  • This is no more relevant


  • Hand-on On slide: hands-on In notes: hands-on

=== Table of content

== Configurable slidedeck

Configurable settings

  • Ratio
  • Server Port
  • Skipped classes

// skip, config

== Export to PDF

-TBD-

0.4.16-dev

1 month ago

0.4.15

1 month ago

0.4.14

1 month ago

0.4.13

2 months ago

0.4.12

2 months ago

0.4.11

2 years ago

0.4.9

2 years ago

0.4.8

2 years ago

0.4.10

2 years ago

0.4.7

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.6

3 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago