diff --git a/data/rendererTemplates/drstkBrowse.html b/data/rendererTemplates/drstkBrowse.html new file mode 100644 index 0000000..b3cb31d --- /dev/null +++ b/data/rendererTemplates/drstkBrowse.html @@ -0,0 +1,227 @@ + + + + + + +
+
    +
  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. +
+
+ + diff --git a/data/rendererTemplates/drstkBrowseSelect.html b/data/rendererTemplates/drstkBrowseSelect.html new file mode 100644 index 0000000..0f80ea7 --- /dev/null +++ b/data/rendererTemplates/drstkBrowseSelect.html @@ -0,0 +1,18 @@ + + + + + + +
+ Oral history interview + transcript with Maicharia Weir Lytle
Weir Lytle, Maicharia
Mecagni, + Giordana
Rose, Danielle
+
+ ".$img_metadata. + +
+
+ + diff --git a/data/rendererTemplates/drstkMap.html b/data/rendererTemplates/drstkMap.html new file mode 100644 index 0000000..3d5cae5 --- /dev/null +++ b/data/rendererTemplates/drstkMap.html @@ -0,0 +1,14 @@ + + + + + + +
+ +
+ + + + + \ No newline at end of file diff --git a/data/rendererTemplates/drstkMedia.html b/data/rendererTemplates/drstkMedia.html new file mode 100644 index 0000000..6aff868 --- /dev/null +++ b/data/rendererTemplates/drstkMedia.html @@ -0,0 +1,11 @@ + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/data/rendererTemplates/drstkSingle.html b/data/rendererTemplates/drstkSingle.html new file mode 100644 index 0000000..6f7932d --- /dev/null +++ b/data/rendererTemplates/drstkSingle.html @@ -0,0 +1,19 @@ + + + + + + +
+
+ + + +
+
+ + diff --git a/data/rendererTemplates/drstkSlider.html b/data/rendererTemplates/drstkSlider.html new file mode 100644 index 0000000..f875166 --- /dev/null +++ b/data/rendererTemplates/drstkSlider.html @@ -0,0 +1,81 @@ + + + + + + +
+ +
+ + diff --git a/data/rendererTemplates/drstkTile.html b/data/rendererTemplates/drstkTile.html new file mode 100644 index 0000000..ff5b0e6 --- /dev/null +++ b/data/rendererTemplates/drstkTile.html @@ -0,0 +1,67 @@ + + + + + + +
+
+ + + + +
+
+ + diff --git a/data/rendererTemplates/drstkTimeline.html b/data/rendererTemplates/drstkTimeline.html new file mode 100644 index 0000000..96ff256 --- /dev/null +++ b/data/rendererTemplates/drstkTimeline.html @@ -0,0 +1,11 @@ + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/data/testStoryMapStructure.js b/data/testStoryMapStructure.js new file mode 100644 index 0000000..cffe1e3 --- /dev/null +++ b/data/testStoryMapStructure.js @@ -0,0 +1,16 @@ +const storymaps = { + "id1": { + "label": "The storymap title/label/whatever", + "uris": [ + "http://whatever", + "http://whatever2" + ] + }, + "id2": { + "label": "The storymap title/label/whatever", + "uris": [ + "http://whatever", + "http://whatever2" + ] + } +} \ No newline at end of file diff --git a/src/fetchers/AbstractFetcher.php b/src/fetchers/AbstractFetcher.php index bfde615..1a1eb80 100644 --- a/src/fetchers/AbstractFetcher.php +++ b/src/fetchers/AbstractFetcher.php @@ -1,6 +1,6 @@ $value) { $attributeNode = $this->htmlDom->createAttribute($att); $attributeNode->value = $value; diff --git a/src/renderers/mock/DrstkBrowseSelect.php b/src/renderers/mock/DrstkBrowseSelect.php new file mode 100644 index 0000000..0e74fad --- /dev/null +++ b/src/renderers/mock/DrstkBrowseSelect.php @@ -0,0 +1,11 @@ +loadHTMLFile(CERES_ROOT_DIR . '/data/rendererTemplates/drstkSingle.html'); + break; + + case 'tile': + $dom->loadHTMLFile(CERES_ROOT_DIR . '/data/rendererTemplates/drstkTile.html'); + break; + + case 'map': + $dom->loadHTMLFile(CERES_ROOT_DIR . '/data/rendererTemplates/drstkMap.html'); + break; + + case 'media': + $dom->loadHTMLFile(CERES_ROOT_DIR . '/data/rendererTemplates/drstkMedia.html'); + break; + + case 'timeline': + $dom->loadHTMLFile(CERES_ROOT_DIR . '/data/rendererTemplates/drstkTimeline.html'); + break; + + case 'slider': + $dom->loadHTMLFile(CERES_ROOT_DIR . '/data/rendererTemplates/drstkSlider.html'); + break; + + default: + echo "Invalid shortcode type. Valid types are: single, tile, map, media, timeline, slider."; + die(); + } + +} else { + echo "Required GET param shortcodeType not provided."; + die(); +} + +$containerNode = $dom->getElementById('ceres-container'); +echo $dom->saveHTML($containerNode); + +// Wish below worked out of the box, but no such luck. So +die(); //Bart, Die + +if (isset($_GET['shortcodeType'])) { + $shortcodeType = $_GET['shortcodeType']; + switch ($shortcodeType) { + case 'single': + $rendererClass = new DrstkSingle; + break; + + case 'tile': + $rendererClass = new DrstkTile; + break; + + case 'map': + $rendererClass = new DrstkMap; + break; + + case 'media': + $rendererClass = new DrstkMedia; + break; + + case 'timeline': + $rendererClass = new DrstkTimeline; + break; + + case 'slider': + $rendererClass = new DrstkSlider; + break; + + default: + echo "Invalid shortcode type. Valid types are: single, tile, map, media, rimeline, slider."; + die(); + } + +} else { + echo "Required GET param shortcodeType not provided."; + die(); +} + +$rendererClass->render(); \ No newline at end of file