]> _ Git - fluidbook-html5.git/commitdiff
fix #3842 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 19 Aug 2020 16:34:34 +0000 (18:34 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 19 Aug 2020 16:34:34 +0000 (18:34 +0200)
js/libs/fluidbook/fluidbook.articles.js
js/libs/fluidbook/fluidbook.stats.js
style/articles.less
style/articles/atlantic.less
style/articles/harmonie-mutuelle.less
style/variables.less

index d907675e577784ae8dbd78ac931ef8de340679c3..1398fe896d90f707266b154ee07467dabba2c4e9 100644 (file)
@@ -75,13 +75,17 @@ FluidbookArticles.prototype = {
     },
 
     resize: function () {
+        var $this=this;
         $(".mview article").each(function () {
             var w = $(this).width();
             var aw = $(this).find('.actions').outerWidth();
+            if ($this.fluidbook.resize.ww < 800) {
+                aw += 20;
+            }
             $(this).find('h3').eq(0).css('width', w - aw);
-            var $this = this;
+            var $thisart = this;
             setTimeout(function () {
-                $($this).closest('.mview').addClass('visible');
+                $($thisart).closest('.mview').addClass('visible');
             }, 10);
         });
     },
index 934a7421293acaf8785b2bf6eb3034d4aeac7802..370b392332b254b70ba5878dcfaa887056169477 100644 (file)
@@ -57,7 +57,11 @@ FluidbookStats.prototype = {
             if ($this.fluidbook.settings.tagcommander_plan[hash]) {\r
                 window.tc_vars = {};\r
                 $.extend(window.tc_vars, $this.fluidbook.settings.tagcommander_default_vars, $this.fluidbook.settings.tagcommander_plan[hash]);\r
-                tC.container.reload({events: {page: [{}, {}]}});\r
+                try {\r
+                    tC.container.reload({events: {page: [{}, {}]}});\r
+                } catch (e) {\r
+\r
+                }\r
             }\r
         });\r
     },\r
index fc751cf0e97e1a0de4c25d494159d149bb603e92..ba3088460e445532a0cc8dfd5843cbf319e15864 100644 (file)
@@ -1,4 +1,7 @@
 @import "book-variables";
+@import "variables";
+
+@articles-mobile-ratio: 0.75;
 
 * {
   box-sizing: border-box;
@@ -25,12 +28,21 @@ article {
   font-weight: 300;
   text-align: left;
 
+  @media @medium {
+    padding: 20px;
+    font-size: unit(20*@articles-mobile-ratio, px);
+  }
+
   .actions {
     position: absolute;
     top: 55px;
     right: 45px;
     color: @articles-title-color;
 
+    @media @medium {
+      top: 23px;
+    }
+
     a {
       width: 20px;
       height: 20px;
@@ -51,6 +63,10 @@ article {
     padding: 5px 10px;
     font-weight: 300;
     text-transform: uppercase;
+
+    @media @medium {
+      font-size: unit(14*@articles-mobile-ratio, px);
+    }
   }
 
   h2 {
@@ -60,10 +76,19 @@ article {
     margin: 20px 0;
     font-weight: 300;
 
+    @media @medium {
+      font-size: unit(16*@articles-mobile-ratio, px);
+    }
+
     &.inter {
       font-size: 18px;
       text-transform: none;
       font-weight: 600;
+
+      @media @medium {
+        font-size: unit(18*@articles-mobile-ratio, px);
+      }
+
     }
   }
 
@@ -73,6 +98,10 @@ article {
     font-size: 50px;
     line-height: 40px;
     font-weight: 600;
+
+    @media @medium {
+      font-size: unit(50*@articles-mobile-ratio, px);
+    }
   }
 
   figure {
@@ -88,6 +117,10 @@ article {
       color: #fff;
       font-size: 16px;
       padding: 15px;
+
+      @media @medium {
+        font-size: unit(16*@articles-mobile-ratio, px);
+      }
     }
   }
 
@@ -104,6 +137,10 @@ article {
   .note {
     margin: -10px 0 20px;
     font-size: 12px;
+
+    @media @medium {
+      font-size: unit(12*@articles-mobile-ratio, px);
+    }
   }
 
   blockquote {
@@ -114,6 +151,10 @@ article {
   .author {
     font-size: 16px;
     margin: 20px 0;
+
+    @media @medium {
+      font-size: unit(16*@articles-mobile-ratio, px);
+    }
   }
 }
 
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d63826be79634586666e092df7b2089147d2f16e 100644 (file)
@@ -0,0 +1,2 @@
+@import "variables";
+@import "book-variables";
\ No newline at end of file
index fc5419e4a748cd07d1414cffee7096ed89e9ba1f..0a07a96137837b5a8af5dc1c0b8af0e53d8af9f9 100644 (file)
@@ -1,4 +1,5 @@
 @import "book-variables";
+@import "variables";
 
 * {
   box-sizing: border-box;
@@ -6,30 +7,51 @@
   padding: 0;
 }
 
+@articles-mobile-ratio: 0.75;
+
 article {
   @color: #333;
-  color:@color;
+  color: @color;
   font-size: 18px;
 
-  h1{
+  @media @medium {
+    font-size: unit(22*@articles-mobile-ratio, px);
+  }
+
+  h1 {
     text-transform: uppercase;
     font-size: 36px;
+
+    @media @medium {
+      font-size: unit(36*@articles-mobile-ratio, px);
+    }
   }
 
   div.chapo {
     color: @color !important;
     font-size: 30px;
+    @media @medium {
+      font-size: unit(30*@articles-mobile-ratio, px);
+    }
   }
 
-  h2.inter{
+  h2.inter {
     font-size: 24px;
     font-weight: 600;
+
+    @media @medium {
+      font-size: unit(24*@articles-mobile-ratio, px);
+    }
   }
 
-  blockquote{
+  blockquote {
     font-style: italic;
     font-size: 24px;
 
+    @media @medium {
+      font-size: unit(24*@articles-mobile-ratio, px);
+    }
+
   }
 
   figcaption {
@@ -37,8 +59,11 @@ article {
     color: @color;
   }
 
-  div.author{
+  div.author {
     font-style: italic;
     font-size: 16px;
+    @media @medium {
+      font-size: unit(18*@articles-mobile-ratio, px);
+    }
   }
 }
\ No newline at end of file
index 3ecc0ba85e54cfd42629d9193e5b4b7e607a20ee..30728781d3f4d620c54bb5950511a91b9857f0ae 100644 (file)
@@ -2,4 +2,5 @@
 
 @font: 'Open Sans', Arial, Helvetica, sans-serif;
 @small: ~"screen and (max-width: 640px)";
+@medium: ~"screen and (max-width: 800px)";
 @large: ~"screen and (min-width: 1280px)";
\ No newline at end of file