diff --git a/.travis.yml b/.travis.yml index 9b6fbac9d..46a545351 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,34 +1,44 @@ - - - - - - +# == INSTRUCTIONS FOR SETTING UP TRAVIS (and GitHub Pages) == +# +# 1. Find this repository in your Travis-CI dashboard. +# open settings and add an environment variable called +# GITHUB_ACCESS_TOKEN and set it to your personal access token.addons: +# See: https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line +# +# **DO NOT TURN ON 'Display value in build log'!!!!** +# +# 2. Push the code to the repository. +# 3. Set the GitHub Pages source in the GitHub repository settings to the +# gh-pages branch. language: node_js node_js: - - "8" + - "12" + +env: + - DEPLOY_ENV=GH_PAGES cache: - directories: - - "node_modules" + directories: + - "node_modules" branches: - only: - - master + only: + - "master" install: - - npm install - - npm run generate + - "npm install" + - "npm run generate" -script: - - echo "Skipping tests" +notifications: + webhooks: https://www.travisbuddy.com deploy: - provider: pages - skip-cleanup: true - github-token: $GITHUB_ACCESS_TOKEN # Set in travis-ci.org dashboard, marked secure https://docs.travis-ci.com/user/deployment/pages/#Setting-the-GitHub-token - target-branch: gh-pages - local-dir: dist - on: - branch: master + provider: pages + skip_cleanup: true + # Refer to: https://docs.travis-ci.com/user/deployment/pages/#Setting-the-GitHub-token + github_token: $GITHUB_ACCESS_TOKEN + target-branch: gh-pages + local_dir: dist + on: + branch: master \ No newline at end of file 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; } + } + } + }