From 615cc576e883b3912ef81f5ac232da24c481a625 Mon Sep 17 00:00:00 2001 From: Igor Guastalla de Lima Date: Fri, 8 Feb 2019 21:58:59 -0200 Subject: [PATCH] feat(index.html): add dialogs/texts to index. changed table to tables --- demo/style.css | 23 +++++++++++++- index.html | 82 +++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 97 insertions(+), 8 deletions(-) diff --git a/demo/style.css b/demo/style.css index 2e09a03..ed74a92 100644 --- a/demo/style.css +++ b/demo/style.css @@ -56,7 +56,7 @@ div.containers > .nes-container { margin-bottom: 1rem; } -#table { +#tables { margin: 35px auto; } @@ -147,6 +147,27 @@ div.containers > .nes-container { bottom: -4px; } +#dialogs { + display: flex; + flex-flow: row wrap; + align-items: baseline; +} + +.nes-dialog { + z-index: 1; + flex: 1; + position: relative; + margin: 0em 2em 1em 0; +} + +#texts { + display: inline-block; +} + +.nes-text { + margin-right: 2em; +} + @media screen and (max-width: 1280px) { .code p:first-child { width: 99%; diff --git a/index.html b/index.html index c96b062..2af6854 100644 --- a/index.html +++ b/index.html @@ -106,6 +106,50 @@ </div> + +
+

Dialogs

+
+ +

Dialog

+

Alert: this is a dialog.

+
+ +

Dialog

+

Alert: this is a dialog.

+
+ +

Dialog

+

Alert: this is a dialog.

+
+ +

Dialog

+

Alert: this is a dialog.

+
+
+ + Copied! +
+
+
<dialog class="nes-dialog" open>
+  <p class="title">Dialog</p>
+  <p>Alert: this is a dialog.</p>
+</dialog>
+<dialog class="nes-dialog is-dark" open>
+  <p class="title">Dialog</p>
+  <p>Alert: this is a dialog.</p>
+</dialog>
+<dialog class="nes-dialog is-rounded" open>
+  <p class="title">Dialog</p>
+  <p>Alert: this is a dialog.</p>
+</dialog>
+<dialog class="nes-dialog is-rounded is-dark" open>
+  <p class="title">Dialog</p>
+  <p>Alert: this is a dialog.</p>
+</dialog>
+ +
+

Radios

@@ -383,8 +427,31 @@
-

Table

-
+

Texts

+
+ Normal + Primary + Success + Warning + Error + Disabled +
+ + Copied! +
+
+
<span class="nes-text">Normal</span>
+<span class="nes-text is-primary">Primary</span>
+<span class="nes-text is-success">Success</span>
+<span class="nes-text is-warning">Warning</span>
+<span class="nes-text is-error">Error</span>
+<span class="nes-text is-disabled">Disabled</span>
+ +
+ +
+

Tables

+
@@ -436,10 +503,10 @@
- - Copied! + + Copied!
-
+
<div class="nes-table-responsive">
   <table class="nes-table is-bordered is-centered">
     <thead>
@@ -492,7 +559,7 @@
     </tbody>
   </table>
 </div>
- +
@@ -898,7 +965,8 @@ }); var elements = ['buttons', 'containers', 'radios', 'checkboxes', 'avatars', 'form', - 'balloons', 'lists', 'table', 'progress', 'badges', 'reaction', 'sns', 'others', 'controllers']; + 'balloons', 'lists', 'tables', 'progress', 'badges', 'reaction', 'sns', 'others', + 'controllers', 'dialogs', 'texts']; for (var i = 0; i < elements.length; i++) { let showEl = document.querySelector("#show-" + elements[i] + "-code"); let codeEl = document.querySelector("#code-" + elements[i]);