]> _ Git - fluidbook_tools.git/commitdiff
wip #4793 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Oct 2021 07:56:10 +0000 (09:56 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Oct 2021 07:56:10 +0000 (09:56 +0200)
src/Compiler/Compiler.php
src/Compiler/Styles.php

index 9f82fb084066e60ae8dbf10024f2468fa42d8030..c35f8dd320778854f7c62c1f462ff34181f508af 100644 (file)
@@ -322,7 +322,7 @@ class Compiler implements ShouldQueue, ShouldBeUnique
 
     public function addVideoJs()
     {
-
+        $this->addLess('videojs/videojs');
     }
 
     public function addSlideshowLibrary($inline = true)
@@ -330,4 +330,6 @@ class Compiler implements ShouldQueue, ShouldBeUnique
         $l = ($inline ? $this->config->inlineSlideshowLibrary : $this->config->popupSlideshowLibrary);
         $this->addLess('slideshow/' . $l);
     }
+
+
 }
index f1bfdf55c76401d26df08d10d3f18b258a33546b..7219829074c9130a5a96503230abe6d606260197 100644 (file)
@@ -13,13 +13,25 @@ trait Styles
     protected $stylesheets = [];
     protected $lessSource;
     protected $cssfont = [];
-    public $lessFiles = ['fluidbook', 'videojs/videojs'];
+    public $lessFiles = ['fluidbook'];
 
     public function isMobileFirst()
     {
         return $this->config->mobileNavigationType === 'mobilefirst';
     }
 
+    /**
+     * Helper function to add a unique stylesheet entry to the LESS stack for compilation
+     * Duplicate paths are ignored.
+     * @param $path string The path of the file relative to the /style folder, without any extension
+     */
+    public function addLess($path)
+    {
+        if (!in_array($path, $this->lessFiles)) {
+            $this->lessFiles[] = $path;
+        }
+    }
+
     public function addFontKit($font)
     {
         if ($font === 'sans-serif') {