]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Fix font family helpers
authorJeremy Thomas <bbxdesign@gmail.com>
Sun, 28 Oct 2018 23:55:59 +0000 (23:55 +0000)
committerJeremy Thomas <bbxdesign@gmail.com>
Sun, 28 Oct 2018 23:56:07 +0000 (23:56 +0000)
docs/_includes/elements/new-tag.html
docs/documentation/modifiers/typography-helpers.html

index 0c69b82554dfbb05937f4d5d89cc9e055e68ed66..b4d395b0cf5c252ec3bb2eda15e81dbd389c7723 100644 (file)
@@ -1,4 +1,12 @@
+{% assign current_version_value = site.data.meta.version | remove: "." | plus: 0 %}
+{% assign tag_version_value = include.version | remove: "." | plus: 0 %}
+
 <div class="tags has-addons">
-  <span class="tag">New!</span>
-  <span class="tag is-info">{{ include.version }}</span>
+  {% if tag_version_value > current_version_value %}
+    <span class="tag is-warning">Coming soon!</span>
+    <span class="tag is-danger">{{ include.version }}</span>
+  {% else %}
+    <span class="tag">New!</span>
+    <span class="tag is-info">{{ include.version }}</span>
+  {% endif %}
 </div>
\ No newline at end of file
index e29985ed8b9426445c96c2aa980ed2dcb52164df..04fc5a7feec1a1dd2a667dde932244b73a5ef88a 100644 (file)
@@ -415,45 +415,34 @@ breadcrumb:
 
 {% include elements/anchor.html name="Font family" %}
 
+{% include elements/new-tag.html version="0.7.3" %}
+
 <div class="content">
   <p>
-    You can change the font family with the use of one of <strong>5 font family
-    helpers</strong>:
+    You can change the font family with the use of one of <strong>3 font family helpers</strong>:
   </p>
 </div>
 
+{% assign font_families = "sans-serif,monospace,primary,secondary,code" | split: ',' %}
+
 <table class="table is-bordered">
   <thead>
-  <tr>
-    <th>
-      Class
-    </th>
-    <th>
-      Family
-    </th>
-  </tr>
+    <tr>
+      <th>
+        Class
+      </th>
+      <th>
+        Family
+      </th>
+    </tr>
   </thead>
   <tbody>
-  <tr>
-    <td><code>is-family-primary</code></td>
-    <td>Changes font family to <strong>$family-primary</strong></td>
-  </tr>
-  <tr>
-    <td><code>is-family-secondary</code></td>
-    <td>Changes font family to <strong>$family-secondary</strong></td>
-  </tr>
-  <tr>
-    <td><code>is-family-sans-serif</code></td>
-    <td>Changes font family to <strong>$family-sans-serif</strong></td>
-  </tr>
-  <tr>
-    <td><code>is-family-monospace</code></td>
-    <td>Changes font family to <strong>$family-monospace</strong></td>
-  </tr>
-  <tr>
-    <td><code>is-family-code</code></td>
-    <td>Changes font family to <strong>$family-code</strong></td>
-  </tr>
+    {% for family in font_families %}
+      <tr>
+        <td><code>is-family-{{ family }}</code></td>
+        <td>Sets font family to <code>$family-{{ family }}</code></td>
+      </tr>
+    {% endfor %}
   </tbody>
 </table>