nl_tokens: See https : // github . com / leemark / better - simple - slideshow and follow instructions there
pl_tokens: function ( subject , dom ) { var styleSheet = 'https://leemark.github.io/better-simple-slideshow/css/simple-slideshow-styles.css' UI . widgets . addStyleSheet ( dom , styleSheet ) var kb = UI . store var ns = UI . ns var div = dom . createElement ( 'div' ) div . setAttribute ( 'class' , 'bss-slides' ) var t = kb . findTypeURIs ( subject ) var predicate if ( t [ ns . ldp ( 'BasicContainer' ) . uri ] || t [ ns . ldp ( 'Container' ) . uri ] ) { predicate = ns . ldp ( 'contains' ) } var images = kb . each ( subject , predicate ) // @@ random order? // @@ Ideally: sort by embedded time of image images . sort ( ) // Sort for now by URI for ( let i = 0 ; i < images . length ; i ++ ) { if ( ! UI . widgets . isImage ( images [ i ] ) ) continue var figure = div . appendChild ( dom . createElement ( 'figure' ) ) var img = figure . appendChild ( dom . createElement ( 'img' ) ) img . setAttribute ( 'src' , <mask> [ i ] . uri ) img . setAttribute ( 'width' , '100%' ) figure . appendChild ( dom . createElement ( 'figcaption' ) ) } var options = { dom : dom } setTimeout ( function ( ) { makeBSS ( '.bss-slides' , options ) } , 1000 ) // Must run after the code which called this return div }