]> _ Git - fluidbook-html5.git/commitdiff
wip #3634 @3
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 2 Jun 2020 18:25:15 +0000 (20:25 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 2 Jun 2020 18:25:15 +0000 (20:25 +0200)
js/libs/fluidbook/fluidbook.search.js
style/articles.less [new file with mode: 0644]
style/menu-articles.less [new file with mode: 0644]

index fbe698e92795a1a5aec4eb704f4ac68ff33d510a..3b946048ee40dac6a101f3e4fa7c044f3bfb62d2 100644 (file)
@@ -496,7 +496,7 @@ FluidbookSearch.prototype = {
         }
         this.clearHighlights();
         if (this.termsToHighlight.length === 0) {
-            console.warn('no terms to highlight');
+            //console.warn('no terms to highlight');
             return;
         }
 
diff --git a/style/articles.less b/style/articles.less
new file mode 100644 (file)
index 0000000..81e1723
--- /dev/null
@@ -0,0 +1,94 @@
+@import "book-variables";
+
+* {
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+}
+
+article {
+  position: relative;
+  font-family: @articles-font;
+  background-color: #fff;
+  color: #000;
+  font-size: 20px;
+  padding: 50px;
+  font-weight: 300;
+  text-align: left;
+
+  .print {
+    position: absolute;
+    top: 55px;
+    right: 45px;
+    color: @articles-title-color;
+
+    svg {
+      fill:currentColor;
+      width: 20px;
+    }
+  }
+
+  h3 {
+    color: #fff;
+    font-size: 14px;
+    padding: 5px 10px;
+    font-weight: 300;
+    text-transform: uppercase;
+    width: ~"calc(100% - 30px)";
+  }
+
+  h2 {
+    color: @articles-title-color;
+    text-transform: uppercase;
+    font-size: 16px;
+    margin: 20px 0;
+    font-weight: 300;
+  }
+
+  h1 {
+    color: @articles-title-color;
+    margin: 20px 0;
+    font-size: 50px;
+    line-height: 40px;
+    font-weight: 600;
+  }
+
+  figure {
+    margin: 30px 0;
+
+    img {
+      display: block;
+      width: 100%;
+    }
+
+    figcaption {
+      color: #fff;
+      font-size: 16px;
+      padding: 15px;
+    }
+  }
+
+  .chapo {
+    font-weight: 600;
+    margin: 20px 0;
+  }
+
+  p {
+    margin: 20px 0;
+  }
+
+  .note {
+    margin: -10px 0 20px;
+    font-size: 12px;
+  }
+
+  blockquote {
+    font-style: italic;
+    margin: 40px 0 20px;
+  }
+
+  .author {
+    font-size: 16px;
+    margin: 20px 0;
+  }
+}
diff --git a/style/menu-articles.less b/style/menu-articles.less
new file mode 100644 (file)
index 0000000..e1a1d3a
--- /dev/null
@@ -0,0 +1,45 @@
+.mview[data-menu="article"] {
+  background-color: #fff;
+
+  iframe {
+    border: 0;
+  }
+
+  .footer {
+    height: 45px;
+    padding: 13px 20px;
+    background-color: @menu-background;
+    color: @menu-text;
+    font-weight: 300;
+    font-size: 16px;
+
+    a {
+
+      vertical-align: top;
+      display: inline-block;
+      width: 50%;
+
+      &.article-prev {
+        text-align: left;
+
+        svg {
+          margin-right: 12px;
+        }
+      }
+
+      &.article-next {
+        text-align: right;
+
+        svg {
+          margin-left: 12px;
+        }
+      }
+
+      svg {
+        width: 8px;
+        position: relative;
+        top: 2px;
+      }
+    }
+  }
+}
\ No newline at end of file