Class: Presentation

@bldr/vue-app-presentation/content-file.Presentation

A presentation

new module:@bldr/vue-app-presentation/content-file.Presentation ()

Properties:
Name Type Description
path String
parentDir String
meta object
slides object
media object
rawYamlString_ string
rawYamlObject_ string

Members

curriculum

Relation to the curriculum.

meta:
  curriculum: Relation to the curriculum

grade

The grade the presentation belongs to.

meta:
  grade: 7

id

The ID of the presentation

meta:
  id: My-Presentation

media Object

meta object

The meta object.

meta:
  title: A title
  id: An unique id
  grade: The grade the presentation belongs to.
  curriculum: Relation to the curriculum.
Properties:
Name Type Description
id String

An unique id.

title String

The title of the presentation.

subtitle String

The subtitle of the presentation.

grade String

The grade the presentation belongs to.

curriculum String

Relation to the curriculum.

curriculum_url String

URL of the curriculum web page.

slides Array

A flat list of slide objects. All child slides are included in this array.

slidesTree Array

Only the top level slide objects are included in this array. Child slides can be accessed under the slides property.

subtitle

The subtitle of the presentation specified in:

meta:
  subtitle: My Title

title

The title of the presentation specified in:

meta:
  title: My Title

Methods

mergeFromMongo (presentationMongo)

Some meta data fields are only available in the mongodb object, for example the path of the presentation. We prefer the object fetched over axios from the HTTP media server to be able to update the presentations without updating the whole mongo db. This fields are merged from the mongodb object:

this.path
this.parentDir
this.meta.id
this.meta.title
this.meta.subtitle
this.meta.grade
this.meta.curriculum
Name Type Description
presentationMongo Object

parseYamlFile (rawYamlString) async

Convert a YAML string into a Javascript object. Normalize properties. Parse slides recursive. Add a placeholder slide if the presentation is empty.

Name Type Description
rawYamlString String