From 835e030c65b94b3480e74c8a28814c246f09bf5f Mon Sep 17 00:00:00 2001 From: NBTX Date: Sat, 24 Aug 2019 15:51:03 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8C=20Add=20websocket=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/styles.scss | 11 +- layouts/default.vue | 47 +++++++++ pages/index.vue | 2 +- pages/websocket.vue | 225 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 282 insertions(+), 3 deletions(-) create mode 100644 pages/websocket.vue diff --git a/assets/css/styles.scss b/assets/css/styles.scss index ed3e08281..05e894ed2 100644 --- a/assets/css/styles.scss +++ b/assets/css/styles.scss @@ -70,6 +70,12 @@ footer { justify-content: space-between; } +nav { + a:not(:last-of-type) { + margin-right: 15px; + } +} + body.sticky-footer footer { position: fixed; bottom: 0; @@ -104,7 +110,7 @@ legend { cursor: pointer; } -fieldset textarea { +fieldset textarea, fieldset pre { resize: vertical; } @@ -163,7 +169,8 @@ fieldset.response legend { select, input, option, -textarea { +textarea, +pre { margin: 4px; padding: 8px 16px; width: calc(100% - 8px); diff --git a/layouts/default.vue b/layouts/default.vue index 6a17733d9..d3f92bedc 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -7,6 +7,11 @@

Lightweight API request builder

+ + @@ -41,6 +46,43 @@ margin: 0 auto; max-width: 1200px; } + + header { padding-right: 0; } + + nav { + a { + display: inline-block; + position: relative; + padding: 8px 16px; + + &.nuxt-link-exact-active { + color: black; + &:before { width: 100%; height: 100% } + } + + &:before { + content: ""; + position: absolute; + bottom: 0; + left: 0; + right: 0; + z-index: -1; + + background-color: var(--ac-color); + border-radius: 4px; + margin: auto; + } + + &:not(.nuxt-link-exact-active):hover:before { + animation: linkHover 0.3s forwards ease-in-out; + } + + @keyframes linkHover { + 0% { width: 0; height: 2px; } + 100% { width: 100%; height: 2px; } + } + } + }