Markup Guide

Script sources

Include script sources in the main html <head> element.

  • Development (test folder)

1
2
3
4
<script src="https://vjs.zencdn.net/7.6.6/video.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/anime.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js"> </script>
<script src="js/require.js" data-main="js/entry.js"></script>
  • Production (examples folder)

1
2
3
4
<script src="https://vjs.zencdn.net/7.6.6/video.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/anime.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js"> </script>
<script src="js/pr3d.min.js"></script>

Stylesheet sources

Include stylesheet sources in the main html <head> element.

  • Development (test folder)

1
2
<link rel="stylesheet" href="https://vjs.zencdn.net/7.6.6/video-js.css">
<link rel="stylesheet" href="css/pr3d.css">
  • Production (examples folder)

1
2
<link rel="stylesheet" href="https://vjs.zencdn.net/7.6.6/video-js.css">
<link rel="stylesheet" href="css/pr3d.min.css">

Define app data

  1. Create the container element

1
2
3
4
 <div class="rs-container">
   <div class="rs-pr3d">
   </div>
 </div>
  1. Inside rs-pr3d, create category element with data-name as the category title:

1
2
3
 <!--New category-->
 <ul data-name="My category">
 </ul>
  1. For each item, add a <li> element with nested <a> element containing the item path

1
2
 <li>
   <a href="path/to/item1.jpg">Item 1 title</a>
  1. Add item description with <p> element

1
2
   <p>Item 1 description</p>
 </li>
  1. Add extended content for MediaViewer

1
2
 <li>
   <a href="path/to/item1.jpg">Item 1 title</a>

Full markup example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<div class="rs-container">

   <!--Gallery element-->
   <div class="rs-pr3d">

     <!--Category 1-->
     <ul data-name="Category 1">
       <!--First item: Photo type-->
       <li>
         <a
           href="assets/category1/1.jpg"
           data-type="photo"
           data-thumbnail="assets/category1/thumbs/1.jpg"
           data-extended="assets/category1/extended/1.jpg">Item 1</a>
         <p>Item 1 description</p>
       </li>

       <!--Second item: Audio type-->
       <li>
         <a
           href="assets/category1/2.jpg"
           data-type="audio"
           data-extended="assets/category1/extended/2.mp3">Item 1</a>
         <p>Item 2 description</p>
       </li>

       <!--Third item: Video type-->
       <li>
         <a
           href="assets/category1/3.jpg"
           data-type="video"
           data-thumbnail="assets/category1/thumbs/3.jpg"
           data-poster="assets/category1/3.jpg"
           data-extended="['assets/videos/extended/sample3.mp4', 'assets/videos/extended/sample3.webm']">Item 3</a>
         <p>Item 3 description</p>
       </li>

       <!--Fourth item: Link type-->
       <li>
         <a
           href="assets/category1/3.jpg"
           data-link="https://raizensoft.com">Item 3</a>
         <p>Item 4 description</p>
       </li>

       <!-- More items... -->
     </ul>
     <!--end 1st category-->

     <!--Category 2-->
     <ul data-name="Category 2">

       <!--First item: inline type, show up content from element with id #inline1-->
       <li>
         <a
           href="assets/category2/1.jpg"
           data-type="inline"
           data-extended="inline1">Item 1</a>
         <p>Item 1 description</p>
       </li>

       <!--Second item: ajax type-->
       <li>
         <a
           href="assets/category2/2.jpg"
           data-type="ajax"
           data-extended="assets/category2/ajax/2.json">Item 2</a>
         <p>Item 2 description</p>
       </li>

       <!--Third item: embed type, show up content from a youtube iframe-->
       <li>
         <a
           href="assets/category2/2.jpg"
           data-type="embed"
           data-extended='<iframe width="600" height="340" src="https://www.youtube.com/embed/TLkA0RELQ1g" </iframe>'>Item 2</a>
         <p>Item 3 description</p>
       </li>

       <!-- More items... -->
     </ul>
     <!--end 2nd category-->

     <!-- More categories... -->
   </div>
 </div>