From: Geoff Kimball Date: Tue, 23 Feb 2016 01:25:27 +0000 (-0800) Subject: Add docs-specific JavaScript, and add toggle between HTML/Inky samples X-Git-Tag: v2.0.0-rc.3~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6b6a591592ee57249fd9e83d33ad6d19c4fdb4e;p=thirdparty%2Ffoundation%2Ffoundation-emails.git Add docs-specific JavaScript, and add toggle between HTML/Inky samples --- diff --git a/docs/assets/js/codeSample.js b/docs/assets/js/codeSample.js new file mode 100644 index 00000000..571a067a --- /dev/null +++ b/docs/assets/js/codeSample.js @@ -0,0 +1,19 @@ +!function() { + +var $currentText = $('[data-docs-code-current]'); +var $toggleButtons = $('[data-docs-code-toggle]'); + +$toggleButtons.click(function() { + $('body').toggleClass('is-inky-enabled'); + + if ($('body').hasClass('is-inky-enabled')) { + $currentText.text('Inky'); + $toggleButtons.text('Switch to HTML'); + } + else { + $currentText.text('HTML'); + $toggleButtons.text('Switch to Inky'); + } +}); + +}(); diff --git a/docs/layouts/default.html b/docs/layouts/default.html index 77f896af..ed8329aa 100644 --- a/docs/layouts/default.html +++ b/docs/layouts/default.html @@ -12,17 +12,17 @@ - +
- + {{> navigation}} {{> mobile-navigation}} @@ -59,6 +59,7 @@ + diff --git a/docs/pages/button.md b/docs/pages/button.md index ba53b148..ba069633 100644 --- a/docs/pages/button.md +++ b/docs/pages/button.md @@ -9,95 +9,58 @@ To get buttons that look awesome in most clients we make a table with the class Check out this basic button: ```inky -
- - - - - - -
- Button! -
-
-
-
+
+ + + + + +
``` You can quickly modify the size of our buttons by adding these classes: ```inky -
- - - - - - -
- Button! -
-
-
- - - - - - -
- Button! -
-
-
- - - - - - -
- Button! -
-
-
-
+
+ + + + + + + + + + + + + + + +
``` You can also change the color using our color classes here: ```inky -
- - - - - - -
- Button! -
-
-
- - - - - - -
- Button! -
-
-
- - - - - - -
- Button! -
-
-
-
+
+ + + + + + + + + + + + + + + + + + + + +
``` diff --git a/docs/partials/component-list.html b/docs/partials/component-list.html index fb56f9ec..78793892 100644 --- a/docs/partials/component-list.html +++ b/docs/partials/component-list.html @@ -1,17 +1,17 @@ -