base template
18
website/.editorconfig
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# This file is for unifying the coding style for different editors and IDEs
|
||||||
|
# editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[Makefile]
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
|
[{*.md,*.json}]
|
||||||
|
max_line_length = null
|
||||||
4
website/.eslintrc.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
module.exports = {
|
||||||
|
...require('@hashicorp/nextjs-scripts/.eslintrc.js'),
|
||||||
|
ignorePatterns: ['public/'],
|
||||||
|
}
|
||||||
5
website/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
node_modules
|
||||||
|
.DS_Store
|
||||||
|
.next
|
||||||
|
out
|
||||||
|
.mdx-data
|
||||||
7
website/Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM node:10.16.3-alpine
|
||||||
|
RUN apk add --update --no-cache git make g++ automake autoconf libtool nasm libpng-dev
|
||||||
|
|
||||||
|
COPY ./package.json /website/package.json
|
||||||
|
COPY ./package-lock.json /website/package-lock.json
|
||||||
|
WORKDIR /website
|
||||||
|
RUN npm install
|
||||||
@ -1,3 +0,0 @@
|
|||||||
source "https://rubygems.org"
|
|
||||||
|
|
||||||
gem "middleman-hashicorp", "0.3.44"
|
|
||||||
@ -1,161 +0,0 @@
|
|||||||
GEM
|
|
||||||
remote: https://rubygems.org/
|
|
||||||
specs:
|
|
||||||
activesupport (4.2.11.1)
|
|
||||||
i18n (~> 0.7)
|
|
||||||
minitest (~> 5.1)
|
|
||||||
thread_safe (~> 0.3, >= 0.3.4)
|
|
||||||
tzinfo (~> 1.1)
|
|
||||||
autoprefixer-rails (9.7.4)
|
|
||||||
execjs
|
|
||||||
bootstrap-sass (3.4.1)
|
|
||||||
autoprefixer-rails (>= 5.2.1)
|
|
||||||
sassc (>= 2.0.0)
|
|
||||||
builder (3.2.4)
|
|
||||||
capybara (2.4.4)
|
|
||||||
mime-types (>= 1.16)
|
|
||||||
nokogiri (>= 1.3.3)
|
|
||||||
rack (>= 1.0.0)
|
|
||||||
rack-test (>= 0.5.4)
|
|
||||||
xpath (~> 2.0)
|
|
||||||
chunky_png (1.3.11)
|
|
||||||
coffee-script (2.4.1)
|
|
||||||
coffee-script-source
|
|
||||||
execjs
|
|
||||||
coffee-script-source (1.12.2)
|
|
||||||
compass (1.0.3)
|
|
||||||
chunky_png (~> 1.2)
|
|
||||||
compass-core (~> 1.0.2)
|
|
||||||
compass-import-once (~> 1.0.5)
|
|
||||||
rb-fsevent (>= 0.9.3)
|
|
||||||
rb-inotify (>= 0.9)
|
|
||||||
sass (>= 3.3.13, < 3.5)
|
|
||||||
compass-core (1.0.3)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
sass (>= 3.3.0, < 3.5)
|
|
||||||
compass-import-once (1.0.5)
|
|
||||||
sass (>= 3.2, < 3.5)
|
|
||||||
em-websocket (0.5.1)
|
|
||||||
eventmachine (>= 0.12.9)
|
|
||||||
http_parser.rb (~> 0.6.0)
|
|
||||||
erubis (2.7.0)
|
|
||||||
eventmachine (1.2.7)
|
|
||||||
execjs (2.7.0)
|
|
||||||
ffi (1.12.2)
|
|
||||||
haml (5.1.2)
|
|
||||||
temple (>= 0.8.0)
|
|
||||||
tilt
|
|
||||||
hike (1.2.3)
|
|
||||||
hooks (0.4.1)
|
|
||||||
uber (~> 0.0.14)
|
|
||||||
http_parser.rb (0.6.0)
|
|
||||||
i18n (0.7.0)
|
|
||||||
json (2.3.0)
|
|
||||||
kramdown (1.17.0)
|
|
||||||
listen (3.0.8)
|
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
|
||||||
middleman (3.4.1)
|
|
||||||
coffee-script (~> 2.2)
|
|
||||||
compass (>= 1.0.0, < 2.0.0)
|
|
||||||
compass-import-once (= 1.0.5)
|
|
||||||
execjs (~> 2.0)
|
|
||||||
haml (>= 4.0.5)
|
|
||||||
kramdown (~> 1.2)
|
|
||||||
middleman-core (= 3.4.1)
|
|
||||||
middleman-sprockets (>= 3.1.2)
|
|
||||||
sass (>= 3.4.0, < 4.0)
|
|
||||||
uglifier (~> 2.5)
|
|
||||||
middleman-core (3.4.1)
|
|
||||||
activesupport (~> 4.1)
|
|
||||||
bundler (~> 1.1)
|
|
||||||
capybara (~> 2.4.4)
|
|
||||||
erubis
|
|
||||||
hooks (~> 0.3)
|
|
||||||
i18n (~> 0.7.0)
|
|
||||||
listen (~> 3.0.3)
|
|
||||||
padrino-helpers (~> 0.12.3)
|
|
||||||
rack (>= 1.4.5, < 2.0)
|
|
||||||
thor (>= 0.15.2, < 2.0)
|
|
||||||
tilt (~> 1.4.1, < 2.0)
|
|
||||||
middleman-hashicorp (0.3.44)
|
|
||||||
bootstrap-sass (~> 3.3)
|
|
||||||
builder (~> 3.2)
|
|
||||||
middleman (~> 3.4)
|
|
||||||
middleman-livereload (~> 3.4)
|
|
||||||
middleman-syntax (~> 3.0)
|
|
||||||
redcarpet (~> 3.3)
|
|
||||||
turbolinks (~> 5.0)
|
|
||||||
middleman-livereload (3.4.6)
|
|
||||||
em-websocket (~> 0.5.1)
|
|
||||||
middleman-core (>= 3.3)
|
|
||||||
rack-livereload (~> 0.3.15)
|
|
||||||
middleman-sprockets (3.5.0)
|
|
||||||
middleman-core (>= 3.3)
|
|
||||||
sprockets (~> 2.12.1)
|
|
||||||
sprockets-helpers (~> 1.1.0)
|
|
||||||
sprockets-sass (~> 1.3.0)
|
|
||||||
middleman-syntax (3.2.0)
|
|
||||||
middleman-core (>= 3.2)
|
|
||||||
rouge (~> 3.2)
|
|
||||||
mime-types (3.3.1)
|
|
||||||
mime-types-data (~> 3.2015)
|
|
||||||
mime-types-data (3.2019.1009)
|
|
||||||
mini_portile2 (2.4.0)
|
|
||||||
minitest (5.14.0)
|
|
||||||
multi_json (1.14.1)
|
|
||||||
nokogiri (1.10.9)
|
|
||||||
mini_portile2 (~> 2.4.0)
|
|
||||||
padrino-helpers (0.12.9)
|
|
||||||
i18n (~> 0.6, >= 0.6.7)
|
|
||||||
padrino-support (= 0.12.9)
|
|
||||||
tilt (>= 1.4.1, < 3)
|
|
||||||
padrino-support (0.12.9)
|
|
||||||
activesupport (>= 3.1)
|
|
||||||
rack (1.6.13)
|
|
||||||
rack-livereload (0.3.17)
|
|
||||||
rack
|
|
||||||
rack-test (1.1.0)
|
|
||||||
rack (>= 1.0, < 3)
|
|
||||||
rb-fsevent (0.10.3)
|
|
||||||
rb-inotify (0.10.1)
|
|
||||||
ffi (~> 1.0)
|
|
||||||
redcarpet (3.5.0)
|
|
||||||
rouge (3.16.0)
|
|
||||||
sass (3.4.25)
|
|
||||||
sassc (2.2.1)
|
|
||||||
ffi (~> 1.9)
|
|
||||||
sprockets (2.12.5)
|
|
||||||
hike (~> 1.2)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
rack (~> 1.0)
|
|
||||||
tilt (~> 1.1, != 1.3.0)
|
|
||||||
sprockets-helpers (1.1.0)
|
|
||||||
sprockets (~> 2.0)
|
|
||||||
sprockets-sass (1.3.1)
|
|
||||||
sprockets (~> 2.0)
|
|
||||||
tilt (~> 1.1)
|
|
||||||
temple (0.8.2)
|
|
||||||
thor (1.0.1)
|
|
||||||
thread_safe (0.3.6)
|
|
||||||
tilt (1.4.1)
|
|
||||||
turbolinks (5.2.1)
|
|
||||||
turbolinks-source (~> 5.2)
|
|
||||||
turbolinks-source (5.2.0)
|
|
||||||
tzinfo (1.2.6)
|
|
||||||
thread_safe (~> 0.1)
|
|
||||||
uber (0.0.15)
|
|
||||||
uglifier (2.7.2)
|
|
||||||
execjs (>= 0.3.0)
|
|
||||||
json (>= 1.8.0)
|
|
||||||
xpath (2.1.0)
|
|
||||||
nokogiri (~> 1.3)
|
|
||||||
|
|
||||||
PLATFORMS
|
|
||||||
ruby
|
|
||||||
|
|
||||||
DEPENDENCIES
|
|
||||||
middleman-hashicorp (= 0.3.44)
|
|
||||||
|
|
||||||
BUNDLED WITH
|
|
||||||
1.17.3
|
|
||||||
@ -1,25 +1,54 @@
|
|||||||
VERSION?="0.3.44"
|
# Default: run this if working on the website locally to run in watch mode.
|
||||||
|
|
||||||
build:
|
|
||||||
@echo "==> Starting build in Docker..."
|
|
||||||
@docker run \
|
|
||||||
--interactive \
|
|
||||||
--rm \
|
|
||||||
--tty \
|
|
||||||
--volume "$(shell pwd):/website" \
|
|
||||||
-e "ENV=production" \
|
|
||||||
hashicorp/middleman-hashicorp:${VERSION} \
|
|
||||||
bundle exec middleman build --verbose --clean
|
|
||||||
|
|
||||||
website:
|
website:
|
||||||
|
@echo "==> Downloading latest Docker image..."
|
||||||
|
@docker pull hashicorp/vagrant-website
|
||||||
@echo "==> Starting website in Docker..."
|
@echo "==> Starting website in Docker..."
|
||||||
@docker run \
|
@docker run \
|
||||||
--interactive \
|
--interactive \
|
||||||
--rm \
|
--rm \
|
||||||
--tty \
|
--tty \
|
||||||
--publish "4567:4567" \
|
--workdir "/website" \
|
||||||
--publish "35729:35729" \
|
|
||||||
--volume "$(shell pwd):/website" \
|
--volume "$(shell pwd):/website" \
|
||||||
hashicorp/middleman-hashicorp:${VERSION}
|
--volume "/website/node_modules" \
|
||||||
|
--publish "3000:3000" \
|
||||||
|
hashicorp/vagrant-website \
|
||||||
|
npm start
|
||||||
|
|
||||||
.PHONY: build website
|
# This command will generate a static version of the website to the "out" folder.
|
||||||
|
build:
|
||||||
|
@echo "==> Downloading latest Docker image..."
|
||||||
|
@docker pull hashicorp/vagrant-website
|
||||||
|
@echo "==> Starting build in Docker..."
|
||||||
|
@docker run \
|
||||||
|
--interactive \
|
||||||
|
--rm \
|
||||||
|
--tty \
|
||||||
|
--workdir "/website" \
|
||||||
|
--volume "$(shell pwd):/website" \
|
||||||
|
--volume "/website/node_modules" \
|
||||||
|
hashicorp/vagrant-website \
|
||||||
|
npm run static
|
||||||
|
|
||||||
|
# If you are changing node dependencies locally, run this to generate a new
|
||||||
|
# local Docker image with the dependency changes included.
|
||||||
|
build-image:
|
||||||
|
@echo "==> Building Docker image..."
|
||||||
|
@docker build -t hashicorp-vagrant-website-local .
|
||||||
|
|
||||||
|
# Use this if you have run `build-image` to use the locally built image
|
||||||
|
# rather than our CI-generated image to test dependency changes.
|
||||||
|
website-local:
|
||||||
|
@echo "==> Starting website in Docker..."
|
||||||
|
@docker run \
|
||||||
|
--interactive \
|
||||||
|
--rm \
|
||||||
|
--tty \
|
||||||
|
--workdir "/website" \
|
||||||
|
--volume "$(shell pwd):/website" \
|
||||||
|
--volume "/website/node_modules" \
|
||||||
|
--publish "3000:3000" \
|
||||||
|
hashicorp-vagrant-website-local \
|
||||||
|
npm start
|
||||||
|
|
||||||
|
.DEFAULT_GOAL := website
|
||||||
|
.PHONY: build build-image website website-local
|
||||||
|
|||||||
@ -1,23 +1,195 @@
|
|||||||
# Vagrant Website
|
# Vagrant Website
|
||||||
|
|
||||||
This subdirectory contains the entire source for the [Vagrant Website][vagrant].
|
[](https://app.netlify.com/sites/vagrant-docs/deploys)
|
||||||
This is a [Middleman][middleman] project, which builds a static site from these
|
|
||||||
source files.
|
This subdirectory contains the entire source for the [Vagrant Website](https://vagrant.io/). This is a [NextJS](https://nextjs.org/) project, which builds a static site from these source files.
|
||||||
|
|
||||||
## Contributions Welcome!
|
## Contributions Welcome!
|
||||||
|
|
||||||
If you find a typo or you feel like you can improve the HTML, CSS, or
|
If you find a typo or you feel like you can improve the HTML, CSS, or JavaScript, we welcome contributions. Feel free to open issues or pull requests like any normal GitHub project, and we'll merge it in 🚀
|
||||||
JavaScript, we welcome contributions. Feel free to open issues or pull requests
|
|
||||||
like any normal GitHub project, and we'll merge it in.
|
|
||||||
|
|
||||||
See also the [Vagrant Contributing Guide](https://github.com/hashicorp/vagrant/blob/master/.github/CONTRIBUTING.md) for more details.
|
|
||||||
|
|
||||||
## Running the Site Locally
|
## Running the Site Locally
|
||||||
|
|
||||||
Running the site locally is simple. Clone this repo and run `make website`.
|
The website can be run locally through node.js or Docker. If you choose to run through Docker, everything will be a little bit slower due to the additional overhead, so for frequent contributors it may be worth it to use node.
|
||||||
|
|
||||||
Then open up `http://localhost:4567`. Note that some URLs you may need to append
|
> **Note:** If you are using a text editor that uses a "safe write" save style such as **vim** or **goland**, this can cause issues with the live reload in development. If you turn off safe write, this should solve the problem. In vim, this can be done by running `:set backupcopy=yes`. In goland, search the settings for "safe write" and turn that setting off.
|
||||||
".html" to make them work (in the navigation).
|
|
||||||
|
|
||||||
[middleman]: https://www.middlemanapp.com
|
### With Docker
|
||||||
[vagrant]: https://www.vagrantup.com
|
|
||||||
|
Running the site locally is simple. Provided you have Docker installed, clone this repo, run `make`, and then visit `http://localhost:3000`.
|
||||||
|
|
||||||
|
The docker image is pre-built with all the website dependencies installed, which is what makes it so quick and simple, but also means if you need to change dependencies and test the changes within Docker, you'll need a new image. If this is something you need to do, you can run `make build-image` to generate a local Docker image with updated dependencies, then `make website-local` to use that image and preview.
|
||||||
|
|
||||||
|
### With Node
|
||||||
|
|
||||||
|
If your local development environment has a supported version (v10.0.0+) of [node installed](https://nodejs.org/en/) you can run:
|
||||||
|
|
||||||
|
- `npm install`
|
||||||
|
- `npm start`
|
||||||
|
|
||||||
|
and then visit `http://localhost:3000`.
|
||||||
|
|
||||||
|
If you pull down new code from github, you should run `npm install` again. Otherwise, there's no need to re-run `npm install` each time the site is run, you can just run `npm start` to get it going.
|
||||||
|
|
||||||
|
## Editing Content
|
||||||
|
|
||||||
|
Documentation content is written in [Markdown](https://www.markdownguide.org/cheat-sheet/) and you'll find all files listed under the `/pages` directory.
|
||||||
|
|
||||||
|
To create a new page with Markdown, create a file ending in `.mdx` in the `pages/` directory. The path in the pages directory will be the URL route. For example, `pages/hello/world.mdx` will be served from the `/hello/world` URL.
|
||||||
|
|
||||||
|
This file can be standard Markdown and also supports [YAML frontmatter](https://middlemanapp.com/basics/frontmatter/). YAML frontmatter is optional, there are defaults for all keys.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
title: 'My Title'
|
||||||
|
description: "A thorough, yet succinct description of the page's contents"
|
||||||
|
---
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
The significant keys in the YAML frontmatter are:
|
||||||
|
|
||||||
|
- `title` `(string)` - This is the title of the page that will be set in the HTML title.
|
||||||
|
- `description` `(string)` - This is a description of the page that will be set in the HTML description.
|
||||||
|
|
||||||
|
> ⚠️Since `api` is a reserved directory within NextJS, all `/api/**` pages are listed under the `/pages/api-docs` path.
|
||||||
|
|
||||||
|
### Editing Sidebars
|
||||||
|
|
||||||
|
The structure of the sidebars are controlled by files in the [`/data` directory](data).
|
||||||
|
|
||||||
|
- Edit [this file](data/docs-navigation.js) to change the **docs** sidebar
|
||||||
|
- Edit [this file](data/api-navigation.js) to change the **api** sidebar
|
||||||
|
- Edit [this file](data/guides-navigation.js) to change the **guides** sidebar
|
||||||
|
- Edit [this file](data/intro-navigation.js) to change the **intro** sidebar
|
||||||
|
|
||||||
|
To nest sidebar items, you'll want to add a new `category` key/value accompanied by the appropriate embedded `content` values.
|
||||||
|
|
||||||
|
- `category` values will be **directory names** within the `pages` directory
|
||||||
|
- `content` values will be **file names** within their appropriately nested directory.
|
||||||
|
|
||||||
|
### Creating New Pages
|
||||||
|
|
||||||
|
There is currently a small bug with new page creation - if you create a new page and link it up via subnav data while the server is running, it will report an error saying the page was not found. This can be resolved by restarting the server.
|
||||||
|
|
||||||
|
### Changing the Release Version
|
||||||
|
|
||||||
|
To change the version of vagrant displayed for download on the website, head over to `data/version.js` and change the number there. It's important to note that the version number must match a version that has been released and is live on `releases.hashicorp.com` -- if it does not, the website will be unable to fetch links to the binaries and will not compile. So this version number should be changed _only after a release_.
|
||||||
|
|
||||||
|
#### Displaying a Prerelease
|
||||||
|
|
||||||
|
If there is a prerelease of any type that should be displayed on the downloads page, this can be done by editing `pages/downloads/index.jsx`. By default, the download component might look something like this:
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<ProductDownloader
|
||||||
|
product="Vagrant"
|
||||||
|
version={VERSION}
|
||||||
|
downloads={downloadData}
|
||||||
|
community="/resources"
|
||||||
|
/>
|
||||||
|
```
|
||||||
|
|
||||||
|
To add a prerelease, an extra `prerelease` property can be added to the component as such:
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<ProductDownloader
|
||||||
|
product="Vagrant"
|
||||||
|
version={VERSION}
|
||||||
|
downloads={downloadData}
|
||||||
|
community="/resources"
|
||||||
|
prerelease={{
|
||||||
|
type: 'release candidate', // the type of prerelease: beta, release candidate, etc.
|
||||||
|
name: 'v1.0.0', // the name displayed in text on the website
|
||||||
|
version: '1.0.0-rc1', // the actual version tag that was pushed to releases.hashicorp.com
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
```
|
||||||
|
|
||||||
|
This configuration would display something like the following text on the website, emphasis added to the configurable parameters:
|
||||||
|
|
||||||
|
```
|
||||||
|
A {{ release candidate }} for Vagrant {{ v1.0.0 }} is available! The release can be <a href='https://releases.hashicorp.com/vagrant/{{ 1.0.0-rc1 }}'>downloaded here</a>.
|
||||||
|
```
|
||||||
|
|
||||||
|
You may customize the parameters in any way you'd like. To remove a prerelease from the website, simply delete the `prerelease` paremeter from the above component.
|
||||||
|
|
||||||
|
### Markdown Enhancements
|
||||||
|
|
||||||
|
There are several custom markdown plugins that are available by default that enhance standard markdown to fit our use cases. This set of plugins introduces a couple instances of custom syntax, and a couple specific pitfalls that are not present by default with markdown, detailed below:
|
||||||
|
|
||||||
|
- If you see the symbols `~>`, `->`, `=>`, or `!>`, these represent [custom alerts](https://github.com/hashicorp/remark-plugins/tree/master/plugins/paragraph-custom-alerts#paragraph-custom-alerts). These render as colored boxes to draw the user's attention to some type of aside.
|
||||||
|
- If you see `@include '/some/path.mdx'`, this is a [markdown include](https://github.com/hashicorp/remark-plugins/tree/master/plugins/include-markdown#include-markdown-plugin). It's worth noting as well that all includes resolve from `website/pages/partials` by default.
|
||||||
|
- If you see `# Headline ((#slug))`, this is an example of an [anchor link alias](https://github.com/hashicorp/remark-plugins/tree/je.anchor-link-adjustments/plugins/anchor-links#anchor-link-aliases). It adds an extra permalink to a headline for compatibility and is removed from the output.
|
||||||
|
- Due to [automatically generated permalinks](https://github.com/hashicorp/remark-plugins/tree/je.anchor-link-adjustments/plugins/anchor-links#anchor-links), any text changes to _headlines_ or _list items that begin with inline code_ can and will break existing permalinks. Be very cautious when changing either of these two text items.
|
||||||
|
|
||||||
|
Headlines are fairly self-explanitory, but here's an example of how list items that begin with inline code look.
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
- this is a normal list item
|
||||||
|
- `this` is a list item that begins with inline code
|
||||||
|
```
|
||||||
|
|
||||||
|
Its worth noting that _only the inline code at the beginning of the list item_ will cause problems if changed. So if you changed the above markup to...
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
- lsdhfhksdjf
|
||||||
|
- `this` jsdhfkdsjhkdsfjh
|
||||||
|
```
|
||||||
|
|
||||||
|
...while it perhaps would not be an improved user experience, no links would break because of it. The best approach is to **avoid changing headlines and inline code at the start of a list item**. If you must change one of these items, make sure to tag someone from the digital marketing development team on your pull request, they will help to ensure as much compatibility as possible.
|
||||||
|
|
||||||
|
### Redirects
|
||||||
|
|
||||||
|
This website structures URLs based on the filesystem layout. This means that if a file is moved, removed, or a folder is re-organized, links will break. If a path change is necessary, it can be mitigated using redirects.
|
||||||
|
|
||||||
|
To add a redirect, head over to the `_redirects` file - the format is fairly simple. On the left is the current path, and on the right is the path that should be redirected to. It's important to note that if there are links to a `.html` version of a page, that must also be explicitly redirected. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
/foo /bar 301!
|
||||||
|
/foo.html /bar 301!
|
||||||
|
```
|
||||||
|
|
||||||
|
This redirect rule will send all incoming links to `/foo` and `/foo.html` to `/bar`. For more details on the redirects file format, [check out the docs on netlify](https://docs.netlify.com/routing/redirects/rewrites-proxies). Note that it is critical that `301!` is added to every one-to-one redirect - if it is left off the redirect may not work.
|
||||||
|
|
||||||
|
There are a couple important caveats with redirects. First, redirects are applied at the hosting layer, and therefore will not work by default in local dev mode. To test in local dev mode, you can use [`netlify dev`](https://www.netlify.com/products/dev/), or just push a commit and check using the deploy preview.
|
||||||
|
|
||||||
|
Second, redirects do not apply to client-side navigation. By default, all links in the navigation and docs sidebar will navigate purely on the client side, which makes navigation through the docs significantly faster, especially for those with low-end devices and/or weak internet connections. In the future, we plan to convert all internal links within docs pages to behave this way as well. This means that if there is a link on this website to a given piece of content that has changed locations in some way, we need to also _directly change existing links to the content_. This way, if a user clicks a link that navigates on the client side, or if they hit the url directly and the page renders from the server side, either one will work perfectly.
|
||||||
|
|
||||||
|
Let's look at an example. Say you have a page called `/docs/foo` which needs to be moved to `/docs/nested/foo`. Additionally, this is a page that has been around for a while and we know there are links into `/docs/foo.html` left over from our previous website structure. First, we move the page, then adjust the docs sidenav, in `data/docs-navigation.js`. Find the category the page is in, and move it into the appropriate subcategory. Next, we add to `_redirects` as such:
|
||||||
|
|
||||||
|
```
|
||||||
|
/foo /nested/foo 301!
|
||||||
|
/foo.html /nested/foo 301!
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, we run a global search for internal links to `/foo`, and make sure to adjust them to be `/nested/foo` - this is to ensure that client-side navigation still works correctly. _Adding a redirect alone is not enough_.
|
||||||
|
|
||||||
|
One more example - let's say that content is being moved to an external website. A common example is guides moving to `learn.hashicorp.com`. In this case, we take all the same steps, except that we need to make a different type of change to the `docs-navigation` file. If previously the structure looked like:
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
category: 'docs',
|
||||||
|
content: [
|
||||||
|
'foo'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
If we no longer want the link to be in the side nav, we can simply remove it. If we do still want the link in the side nav, but pointing to an external destnation, we need to slightly change the structure as such:
|
||||||
|
|
||||||
|
```js
|
||||||
|
{
|
||||||
|
category: 'docs',
|
||||||
|
content: [
|
||||||
|
{ title: 'Foo Title', href: 'https://learn.hashicorp.com/vault/foo' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
As the majority of items in the side nav are internal links, the structure makes it as easy as possible to represent these links. This alternate syntax is the most concise manner than an external link can be represented. External links can be used anywhere within the docs sidenav.
|
||||||
|
|
||||||
|
It's also worth noting that it is possible to do glob-based redirects, for example matching `/docs/*`, and you may see this pattern in the `_redirects` file. This type of redirect is much higher risk and the behavior is a bit more nuanced, so if you need to add a glob redirect, please reach out to the website maintainers and ask about it first.
|
||||||
|
|
||||||
|
### Deployment
|
||||||
|
|
||||||
|
This website is hosted on Netlify and configured to automatically deploy anytime you push code to the `stable-website` branch. Any time a pull request is submitted that changes files within the `website` folder, a deployment preview will appear in the github checks which can be used to validate the way docs changes will look live. Deployments from `stable-website` will look and behave the same way as deployment previews.
|
||||||
|
|||||||
4
website/_redirects
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# REDIRECTS FILE
|
||||||
|
#
|
||||||
|
# See the README file in this directory for documentation. Please do not
|
||||||
|
# modify or delete existing redirects without first verifying internally.
|
||||||
4
website/babel.config.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: ['next/babel'],
|
||||||
|
plugins: ['import-glob-array'],
|
||||||
|
}
|
||||||
32
website/components/footer/index.jsx
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
|
export default function Footer({ openConsentManager }) {
|
||||||
|
return (
|
||||||
|
<footer className="g-footer">
|
||||||
|
<div className="g-container">
|
||||||
|
<div className="left">
|
||||||
|
<Link href="/intro">
|
||||||
|
<a>Intro</a>
|
||||||
|
</Link>
|
||||||
|
<Link href="/docs">
|
||||||
|
<a>Docs</a>
|
||||||
|
</Link>
|
||||||
|
<a href="https://www.amazon.com/gp/product/1449335837/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1449335837&linkCode=as2&tag=vagrant-20">
|
||||||
|
Book
|
||||||
|
</a>
|
||||||
|
<Link href="/vmware">
|
||||||
|
<a>VMWare</a>
|
||||||
|
</Link>
|
||||||
|
<a href="https://hashicorp.com/privacy">Privacy</a>
|
||||||
|
<Link href="/security">
|
||||||
|
<a>Security</a>
|
||||||
|
</Link>
|
||||||
|
<Link href="/files/press-kit.zip">
|
||||||
|
<a>Press Kit</a>
|
||||||
|
</Link>
|
||||||
|
<a onClick={openConsentManager}>Consent Manager</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
)
|
||||||
|
}
|
||||||
32
website/components/footer/style.css
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
.g-footer {
|
||||||
|
padding: 25px 0 17px 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
& .g-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
& a {
|
||||||
|
color: black;
|
||||||
|
opacity: 0.5;
|
||||||
|
transition: opacity 0.25s ease;
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& .left > a {
|
||||||
|
margin-right: 20px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
website/components/subnav/index.jsx
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import Subnav from '@hashicorp/react-subnav'
|
||||||
|
import subnavItems from '../../data/subnav'
|
||||||
|
import { useRouter } from 'next/router'
|
||||||
|
|
||||||
|
export default function VagrantSubnav() {
|
||||||
|
const router = useRouter()
|
||||||
|
return (
|
||||||
|
<Subnav
|
||||||
|
titleLink={{
|
||||||
|
text: 'vagrant',
|
||||||
|
url: '/',
|
||||||
|
}}
|
||||||
|
ctaLinks={[
|
||||||
|
{ text: 'GitHub', url: 'https://www.github.com/hashicorp/vagrant' },
|
||||||
|
{ text: 'Download', url: '/downloads' },
|
||||||
|
]}
|
||||||
|
currentPath={router.pathname}
|
||||||
|
menuItemsAlign="right"
|
||||||
|
menuItems={subnavItems}
|
||||||
|
constrainWidth
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -1,114 +0,0 @@
|
|||||||
set :base_url, "https://www.vagrantup.com/"
|
|
||||||
|
|
||||||
set :vmware_utility_name, "vagrant-vmware-utility"
|
|
||||||
set :vmware_utility_version, "1.0.9"
|
|
||||||
|
|
||||||
activate :hashicorp do |h|
|
|
||||||
h.name = "vagrant"
|
|
||||||
h.version = "2.2.9"
|
|
||||||
h.github_slug = "hashicorp/vagrant"
|
|
||||||
h.website_root = "website"
|
|
||||||
end
|
|
||||||
|
|
||||||
helpers do
|
|
||||||
# Returns a segment tracking ID such that local development is not
|
|
||||||
# tracked to production systems.
|
|
||||||
def segmentId()
|
|
||||||
if (ENV['ENV'] == 'production')
|
|
||||||
'wFMyBE4PJCZttWfu0pNhYdWr7ygW0io4'
|
|
||||||
else
|
|
||||||
'0EXTgkNx0Ydje2PGXVbRhpKKoe5wtzcE'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Returns the FQDN of the image URL.
|
|
||||||
#
|
|
||||||
# @param [String] path
|
|
||||||
#
|
|
||||||
# @return [String]
|
|
||||||
def image_url(path)
|
|
||||||
File.join(base_url, image_path(path))
|
|
||||||
end
|
|
||||||
|
|
||||||
# Get the title for the page.
|
|
||||||
#
|
|
||||||
# @param [Middleman::Page] page
|
|
||||||
#
|
|
||||||
# @return [String]
|
|
||||||
def title_for(page)
|
|
||||||
if page && page.data.page_title
|
|
||||||
return "#{page.data.page_title} - Vagrant by HashiCorp"
|
|
||||||
end
|
|
||||||
|
|
||||||
"Vagrant by HashiCorp"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Get the description for the page
|
|
||||||
#
|
|
||||||
# @param [Middleman::Page] page
|
|
||||||
#
|
|
||||||
# @return [String]
|
|
||||||
def description_for(page)
|
|
||||||
description = (page.data.description || "")
|
|
||||||
.gsub('"', '')
|
|
||||||
.gsub(/\n+/, ' ')
|
|
||||||
.squeeze(' ')
|
|
||||||
|
|
||||||
return escape_html(description)
|
|
||||||
end
|
|
||||||
|
|
||||||
# This helps by setting the "active" class for sidebar nav elements
|
|
||||||
# if the YAML frontmatter matches the expected value.
|
|
||||||
def sidebar_current(expected)
|
|
||||||
current = current_page.data.sidebar_current || ""
|
|
||||||
if current.start_with?(expected)
|
|
||||||
return " class=\"active\""
|
|
||||||
else
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Returns the id for this page.
|
|
||||||
# @return [String]
|
|
||||||
def body_id_for(page)
|
|
||||||
if !(name = page.data.sidebar_current).blank?
|
|
||||||
return "page-#{name.strip}"
|
|
||||||
end
|
|
||||||
if page.url == "/" || page.url == "/index.html"
|
|
||||||
return "page-home"
|
|
||||||
end
|
|
||||||
if !(title = page.data.page_title).blank?
|
|
||||||
return title
|
|
||||||
.downcase
|
|
||||||
.gsub('"', '')
|
|
||||||
.gsub(/[^\w]+/, '-')
|
|
||||||
.gsub(/_+/, '-')
|
|
||||||
.squeeze('-')
|
|
||||||
.squeeze(' ')
|
|
||||||
end
|
|
||||||
return ""
|
|
||||||
end
|
|
||||||
|
|
||||||
# Returns the list of classes for this page.
|
|
||||||
# @return [String]
|
|
||||||
def body_classes_for(page)
|
|
||||||
classes = []
|
|
||||||
|
|
||||||
if !(layout = page.data.layout).blank?
|
|
||||||
classes << "layout-#{page.data.layout}"
|
|
||||||
end
|
|
||||||
|
|
||||||
if !(title = page.data.page_title).blank?
|
|
||||||
title = title
|
|
||||||
.downcase
|
|
||||||
.gsub('"', '')
|
|
||||||
.gsub(/[^\w]+/, '-')
|
|
||||||
.gsub(/_+/, '-')
|
|
||||||
.squeeze('-')
|
|
||||||
.squeeze(' ')
|
|
||||||
classes << "page-#{title}"
|
|
||||||
end
|
|
||||||
|
|
||||||
return classes.join(" ")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
9
website/data/docs-navigation.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// The root folder for this documentation category is `pages/docs`
|
||||||
|
//
|
||||||
|
// - A string refers to the name of a file
|
||||||
|
// - A "category" value refers to the name of a directory
|
||||||
|
// - All directories must have an "index.mdx" file to serve as
|
||||||
|
// the landing page for the category, or a "name" property to
|
||||||
|
// serve as the category title in the sidebar
|
||||||
|
|
||||||
|
export default []
|
||||||
9
website/data/intro-navigation.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// The root folder for this documentation category is `pages/vmware`
|
||||||
|
//
|
||||||
|
// - A string refers to the name of a file
|
||||||
|
// - A "category" value refers to the name of a directory
|
||||||
|
// - All directories must have an "index.mdx" file to serve as
|
||||||
|
// the landing page for the category, or a "name" property to
|
||||||
|
// serve as the category title in the sidebar
|
||||||
|
|
||||||
|
export default []
|
||||||
29
website/data/subnav.js
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
export default [
|
||||||
|
{
|
||||||
|
text: 'Intro',
|
||||||
|
url: '/intro',
|
||||||
|
type: 'inbound',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Docs',
|
||||||
|
url: '/docs',
|
||||||
|
type: 'inbound',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Book',
|
||||||
|
url:
|
||||||
|
'https://www.amazon.com/gp/product/1449335837/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1449335837&linkCode=as2&tag=vagrant-20',
|
||||||
|
type: 'outbound',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
text: 'VMWare',
|
||||||
|
url: '/vmware',
|
||||||
|
type: 'inbound',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Community',
|
||||||
|
url: '/community',
|
||||||
|
type: 'inbound',
|
||||||
|
},
|
||||||
|
]
|
||||||
1
website/data/version.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
export default '2.2.8'
|
||||||
9
website/data/vmware-navigation.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// The root folder for this documentation category is `pages/guides`
|
||||||
|
//
|
||||||
|
// - A string refers to the name of a file
|
||||||
|
// - A "category" value refers to the name of a directory
|
||||||
|
// - All directories must have an "index.mdx" file to serve as
|
||||||
|
// the landing page for the category, or a "name" property to
|
||||||
|
// serve as the category title in the sidebar
|
||||||
|
|
||||||
|
export default []
|
||||||
41
website/layouts/docs.jsx
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import DocsPage from '@hashicorp/react-docs-page'
|
||||||
|
import order from '../data/docs-navigation.js'
|
||||||
|
import { frontMatter as data } from '../pages/docs/**/*.mdx'
|
||||||
|
import { MDXProvider } from '@mdx-js/react'
|
||||||
|
import Head from 'next/head'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
|
const DEFAULT_COMPONENTS = {}
|
||||||
|
|
||||||
|
function DocsLayoutWrapper(pageMeta) {
|
||||||
|
function DocsLayout(props) {
|
||||||
|
return (
|
||||||
|
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||||
|
<DocsPage
|
||||||
|
{...props}
|
||||||
|
product="vagrant"
|
||||||
|
head={{
|
||||||
|
is: Head,
|
||||||
|
title: `${pageMeta.page_title} | Vagrant by HashiCorp`,
|
||||||
|
description: pageMeta.description,
|
||||||
|
siteName: 'Vagrant by HashiCorp',
|
||||||
|
}}
|
||||||
|
sidenav={{
|
||||||
|
Link,
|
||||||
|
category: 'docs',
|
||||||
|
currentPage: props.path,
|
||||||
|
data,
|
||||||
|
order,
|
||||||
|
}}
|
||||||
|
resourceURL={`https://github.com/hashicorp/vagrant/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||||
|
/>
|
||||||
|
</MDXProvider>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
DocsLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||||
|
|
||||||
|
return DocsLayout
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DocsLayoutWrapper
|
||||||
35
website/layouts/index.jsx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
import DocsPage from '@hashicorp/react-docs-page'
|
||||||
|
import Head from 'next/head'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
|
function DefaultLayoutWrapper(pageMeta) {
|
||||||
|
function DefaultLayout(props) {
|
||||||
|
return (
|
||||||
|
<DocsPage
|
||||||
|
{...props}
|
||||||
|
product="vagrant"
|
||||||
|
head={{
|
||||||
|
is: Head,
|
||||||
|
title: `${pageMeta.page_title} | Vagrant by HashiCorp`,
|
||||||
|
description: pageMeta.description,
|
||||||
|
siteName: 'Vagrant by HashiCorp',
|
||||||
|
}}
|
||||||
|
sidenav={{
|
||||||
|
Link,
|
||||||
|
category: 'docs',
|
||||||
|
currentPage: props.path,
|
||||||
|
data: [],
|
||||||
|
order: [],
|
||||||
|
disableFilter: true,
|
||||||
|
}}
|
||||||
|
resourceURL={`https://github.com/hashicorp/vagrant/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
DefaultLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||||
|
|
||||||
|
return DefaultLayout
|
||||||
|
}
|
||||||
|
|
||||||
|
export default DefaultLayoutWrapper
|
||||||
41
website/layouts/intro.jsx
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import DocsPage from '@hashicorp/react-docs-page'
|
||||||
|
import order from '../data/intro-navigation.js'
|
||||||
|
import { frontMatter as data } from '../pages/intro/**/*.mdx'
|
||||||
|
import { MDXProvider } from '@mdx-js/react'
|
||||||
|
import Head from 'next/head'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
|
const DEFAULT_COMPONENTS = {}
|
||||||
|
|
||||||
|
function IntroLayoutWrapper(pageMeta) {
|
||||||
|
function IntroLayout(props) {
|
||||||
|
return (
|
||||||
|
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||||
|
<DocsPage
|
||||||
|
{...props}
|
||||||
|
product="vagrant"
|
||||||
|
head={{
|
||||||
|
is: Head,
|
||||||
|
title: `${pageMeta.page_title} | Vagrant by HashiCorp`,
|
||||||
|
description: pageMeta.description,
|
||||||
|
siteName: 'Vagrant by HashiCorp',
|
||||||
|
}}
|
||||||
|
sidenav={{
|
||||||
|
Link,
|
||||||
|
category: 'intro',
|
||||||
|
currentPage: props.path,
|
||||||
|
data,
|
||||||
|
order,
|
||||||
|
}}
|
||||||
|
resourceURL={`https://github.com/hashicorp/vagrant/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||||
|
/>
|
||||||
|
</MDXProvider>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
IntroLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||||
|
|
||||||
|
return IntroLayout
|
||||||
|
}
|
||||||
|
|
||||||
|
export default IntroLayoutWrapper
|
||||||
41
website/layouts/vmware.jsx
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import DocsPage from '@hashicorp/react-docs-page'
|
||||||
|
import order from '../data/vmware-navigation.js'
|
||||||
|
import { frontMatter as data } from '../pages/vmware/**/*.mdx'
|
||||||
|
import { MDXProvider } from '@mdx-js/react'
|
||||||
|
import Head from 'next/head'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
|
const DEFAULT_COMPONENTS = {}
|
||||||
|
|
||||||
|
function VMWareLayoutWrapper(pageMeta) {
|
||||||
|
function VMWareLayout(props) {
|
||||||
|
return (
|
||||||
|
<MDXProvider components={DEFAULT_COMPONENTS}>
|
||||||
|
<DocsPage
|
||||||
|
{...props}
|
||||||
|
product="vagrant"
|
||||||
|
head={{
|
||||||
|
is: Head,
|
||||||
|
title: `${pageMeta.page_title} | Vagrant by HashiCorp`,
|
||||||
|
description: pageMeta.description,
|
||||||
|
siteName: 'Vagrant by HashiCorp',
|
||||||
|
}}
|
||||||
|
sidenav={{
|
||||||
|
Link,
|
||||||
|
category: 'vmware',
|
||||||
|
currentPage: props.path,
|
||||||
|
data,
|
||||||
|
order,
|
||||||
|
}}
|
||||||
|
resourceURL={`https://github.com/hashicorp/vagrant/blob/master/website/pages/${pageMeta.__resourcePath}`}
|
||||||
|
/>
|
||||||
|
</MDXProvider>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
VMWareLayout.getInitialProps = ({ asPath }) => ({ path: asPath })
|
||||||
|
|
||||||
|
return VMWareLayout
|
||||||
|
}
|
||||||
|
|
||||||
|
export default VMWareLayoutWrapper
|
||||||
18
website/netlify.toml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
# This file sets configuration for Netlify
|
||||||
|
# ref: https://www.netlify.com/docs/netlify-toml-reference/
|
||||||
|
|
||||||
|
[build]
|
||||||
|
publish = "out"
|
||||||
|
command = "npm run static"
|
||||||
|
|
||||||
|
[context.production]
|
||||||
|
environment = { HASHI_ENV = "production", NODE_ENV = "production"}
|
||||||
|
|
||||||
|
[context.deploy-preview]
|
||||||
|
environment = { HASHI_ENV = "staging" }
|
||||||
|
|
||||||
|
[[headers]]
|
||||||
|
for = "/*"
|
||||||
|
[headers.values]
|
||||||
|
X-Frame-Options = "SAMEORIGIN"
|
||||||
14
website/next.config.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
const withHashicorp = require('@hashicorp/nextjs-scripts')
|
||||||
|
|
||||||
|
module.exports = withHashicorp({
|
||||||
|
defaultLayout: true,
|
||||||
|
transpileModules: ['is-absolute-url', '@hashicorp/react-mega-nav'],
|
||||||
|
})({
|
||||||
|
experimental: { modern: true },
|
||||||
|
env: {
|
||||||
|
HASHI_ENV: process.env.HASHI_ENV || 'development',
|
||||||
|
SEGMENT_WRITE_KEY: 'wFMyBE4PJCZttWfu0pNhYdWr7ygW0io4',
|
||||||
|
BUGSNAG_CLIENT_KEY: 'c1d6da7a26dc367253f39fae8d83fdac',
|
||||||
|
BUGSNAG_SERVER_KEY: 'c1d6da7a26dc367253f39fae8d83fdac',
|
||||||
|
},
|
||||||
|
})
|
||||||
17575
website/package-lock.json
generated
Normal file
54
website/package.json
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"name": "vagrant-docs",
|
||||||
|
"description": "Documentation website for HashiCorp Vagrant",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": "HashiCorp",
|
||||||
|
"dependencies": {
|
||||||
|
"@hashicorp/nextjs-scripts": "^6.2.0",
|
||||||
|
"@hashicorp/react-button": "^2.1.9",
|
||||||
|
"@hashicorp/react-consent-manager": "^2.0.9",
|
||||||
|
"@hashicorp/react-content": "^3.0.0-0",
|
||||||
|
"@hashicorp/react-docs-page": "^1.3.1",
|
||||||
|
"@hashicorp/react-docs-sidenav": "^3.2.3",
|
||||||
|
"@hashicorp/react-global-styles": "^4.2.0",
|
||||||
|
"@hashicorp/react-head": "^0.1.1",
|
||||||
|
"@hashicorp/react-image": "^2.0.1",
|
||||||
|
"@hashicorp/react-mega-nav": "^4.0.1-2",
|
||||||
|
"@hashicorp/react-product-downloader": "^3.1.2",
|
||||||
|
"@hashicorp/react-section-header": "^2.0.0",
|
||||||
|
"@hashicorp/react-subnav": "^3.1.1",
|
||||||
|
"@hashicorp/react-vertical-text-block-list": "^2.0.1",
|
||||||
|
"babel-plugin-import-glob-array": "^0.2.0",
|
||||||
|
"imagemin-mozjpeg": "^8.0.0",
|
||||||
|
"imagemin-optipng": "^7.1.0",
|
||||||
|
"imagemin-svgo": "^7.1.0",
|
||||||
|
"isomorphic-unfetch": "^3.0.0",
|
||||||
|
"next": "9.3.5",
|
||||||
|
"nprogress": "^0.2.0",
|
||||||
|
"react": "^16.13.1",
|
||||||
|
"react-dom": "^16.13.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"dart-linkcheck": "^2.0.15",
|
||||||
|
"glob": "^7.1.6",
|
||||||
|
"husky": "^4.2.5",
|
||||||
|
"inquirer": "^7.1.0",
|
||||||
|
"prettier": "^2.0.5"
|
||||||
|
},
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-commit": "next-hashicorp precommit"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "node --max-old-space-size=2048 ./node_modules/.bin/next build",
|
||||||
|
"export": "node --max-old-space-size=2048 ./node_modules/.bin/next export",
|
||||||
|
"format": "next-hashicorp format",
|
||||||
|
"generate:component": "next-hashicorp generate component",
|
||||||
|
"lint": "next-hashicorp lint",
|
||||||
|
"start": "rm -rf .next/cache/next-babel-loader/ && next dev",
|
||||||
|
"static": "npm run build && npm run export && cp _redirects out/.",
|
||||||
|
"linkcheck": "linkcheck https://vagrantup.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
32
website/pages/404.jsx
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
import Link from 'next/link'
|
||||||
|
import { useEffect } from 'react'
|
||||||
|
|
||||||
|
export default function NotFound() {
|
||||||
|
useEffect(() => {
|
||||||
|
if (
|
||||||
|
typeof window !== 'undefined' &&
|
||||||
|
typeof window?.analytics?.track === 'function' &&
|
||||||
|
typeof window?.document?.referrer === 'string' &&
|
||||||
|
typeof window?.location?.href === 'string'
|
||||||
|
)
|
||||||
|
window.analytics.track(window.location.href, {
|
||||||
|
category: '404 Response',
|
||||||
|
label: window.document.referrer || 'No Referrer',
|
||||||
|
})
|
||||||
|
}, [])
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div id="p-404" className="g-grid-container">
|
||||||
|
<h1>Page Not Found</h1>
|
||||||
|
<p>
|
||||||
|
We‘re sorry but we can‘t find the page you‘re looking
|
||||||
|
for.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<Link href="/">
|
||||||
|
<a>Back to Home</a>
|
||||||
|
</Link>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
80
website/pages/_app.js
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
import './style.css'
|
||||||
|
import '@hashicorp/nextjs-scripts/lib/nprogress/style.css'
|
||||||
|
|
||||||
|
import NProgress from '@hashicorp/nextjs-scripts/lib/nprogress'
|
||||||
|
import createConsentManager from '@hashicorp/nextjs-scripts/lib/consent-manager'
|
||||||
|
import useAnchorLinkAnalytics from '@hashicorp/nextjs-scripts/lib/anchor-link-analytics'
|
||||||
|
import Router from 'next/router'
|
||||||
|
import HashiHead from '@hashicorp/react-head'
|
||||||
|
import Head from 'next/head'
|
||||||
|
import { ErrorBoundary } from '@hashicorp/nextjs-scripts/lib/bugsnag'
|
||||||
|
import MegaNav from '@hashicorp/react-mega-nav'
|
||||||
|
import ProductSubnav from '../components/subnav'
|
||||||
|
import Footer from '../components/footer'
|
||||||
|
import Error from './_error'
|
||||||
|
|
||||||
|
NProgress({ Router })
|
||||||
|
const { ConsentManager, openConsentManager } = createConsentManager({
|
||||||
|
preset: 'oss',
|
||||||
|
})
|
||||||
|
|
||||||
|
function App({ Component, pageProps }) {
|
||||||
|
useAnchorLinkAnalytics()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ErrorBoundary FallbackComponent={Error}>
|
||||||
|
<HashiHead
|
||||||
|
is={Head}
|
||||||
|
title="Vagrant by HashiCorp"
|
||||||
|
siteName="Vagrant by HashiCorp"
|
||||||
|
description="Vagrant enables users to create and configure lightweight, reproducible, and
|
||||||
|
portable development environments."
|
||||||
|
image="https://www.vagrantup.com/img/og-image.png"
|
||||||
|
stylesheet={[
|
||||||
|
{
|
||||||
|
href:
|
||||||
|
'https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&display=swap',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
icon={[{ href: '/favicon.ico' }]}
|
||||||
|
preload={[
|
||||||
|
{ href: '/fonts/klavika/medium.woff2', as: 'font' },
|
||||||
|
{ href: '/fonts/gilmer/light.woff2', as: 'font' },
|
||||||
|
{ href: '/fonts/gilmer/regular.woff2', as: 'font' },
|
||||||
|
{ href: '/fonts/gilmer/medium.woff2', as: 'font' },
|
||||||
|
{ href: '/fonts/gilmer/bold.woff2', as: 'font' },
|
||||||
|
{ href: '/fonts/metro-sans/book.woff2', as: 'font' },
|
||||||
|
{ href: '/fonts/metro-sans/regular.woff2', as: 'font' },
|
||||||
|
{ href: '/fonts/metro-sans/semi-bold.woff2', as: 'font' },
|
||||||
|
{ href: '/fonts/metro-sans/bold.woff2', as: 'font' },
|
||||||
|
{ href: '/fonts/dejavu/mono.woff2', as: 'font' },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
<MegaNav product="Vagrant" />
|
||||||
|
<ProductSubnav />
|
||||||
|
<div className="content">
|
||||||
|
<Component {...pageProps} />
|
||||||
|
</div>
|
||||||
|
<Footer openConsentManager={openConsentManager} />
|
||||||
|
<ConsentManager />
|
||||||
|
</ErrorBoundary>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
App.getInitialProps = async ({ Component, ctx }) => {
|
||||||
|
let pageProps = {}
|
||||||
|
|
||||||
|
if (Component.getInitialProps) {
|
||||||
|
pageProps = await Component.getInitialProps(ctx)
|
||||||
|
} else if (Component.isMDXComponent) {
|
||||||
|
// fix for https://github.com/mdx-js/mdx/issues/382
|
||||||
|
const mdxLayoutComponent = Component({}).props.originalType
|
||||||
|
if (mdxLayoutComponent.getInitialProps) {
|
||||||
|
pageProps = await mdxLayoutComponent.getInitialProps(ctx)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { pageProps }
|
||||||
|
}
|
||||||
|
|
||||||
|
export default App
|
||||||
27
website/pages/_document.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import Document, { Head, Main, NextScript } from 'next/document'
|
||||||
|
import HashiHead from '@hashicorp/react-head'
|
||||||
|
|
||||||
|
export default class MyDocument extends Document {
|
||||||
|
static async getInitialProps(ctx) {
|
||||||
|
const initialProps = await Document.getInitialProps(ctx)
|
||||||
|
return { ...initialProps }
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<html>
|
||||||
|
<HashiHead is={Head} />
|
||||||
|
<body>
|
||||||
|
<Main />
|
||||||
|
<NextScript />
|
||||||
|
<script
|
||||||
|
noModule
|
||||||
|
dangerouslySetInnerHTML={{
|
||||||
|
__html: `window.MSInputMethodContext && document.documentMode && document.write('<script src="/ie-custom-properties.js"><\\x2fscript>');`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
14
website/pages/_error.jsx
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import NotFound from './404'
|
||||||
|
import Bugsnag from '@hashicorp/nextjs-scripts/lib/bugsnag'
|
||||||
|
|
||||||
|
function Error({ statusCode }) {
|
||||||
|
return <NotFound statusCode={statusCode} />
|
||||||
|
}
|
||||||
|
|
||||||
|
Error.getInitialProps = ({ res, err }) => {
|
||||||
|
if (err) Bugsnag.notify(err)
|
||||||
|
const statusCode = res ? res.statusCode : err ? err.statusCode : 404
|
||||||
|
return { statusCode }
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Error
|
||||||
46
website/pages/community/index.jsx
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import VerticalTextBlockList from '@hashicorp/react-vertical-text-block-list'
|
||||||
|
import SectionHeader from '@hashicorp/react-section-header'
|
||||||
|
import Head from 'next/head'
|
||||||
|
|
||||||
|
export default function CommunityPage() {
|
||||||
|
return (
|
||||||
|
<div id="p-community">
|
||||||
|
<Head>
|
||||||
|
<title key="title">Community | Vagrant by HashiCorp</title>
|
||||||
|
</Head>
|
||||||
|
<SectionHeader
|
||||||
|
headline="Community"
|
||||||
|
description="Vagrant is an open source project with a growing community. There are active, dedicated users willing to help you through various mediums."
|
||||||
|
use_h1={true}
|
||||||
|
/>
|
||||||
|
<VerticalTextBlockList
|
||||||
|
data={[
|
||||||
|
{
|
||||||
|
header: 'IRC',
|
||||||
|
body: '`#vagrant` on freenode',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: 'Announcement List',
|
||||||
|
body:
|
||||||
|
'[HashiCorp Announcement Google Group](https://groups.google.com/group/hashicorp-announce)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: 'Discussion List',
|
||||||
|
body:
|
||||||
|
'[Vagrant Google Group](https://groups.google.com/forum/#!forum/vagrant-up)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: 'Bug Tracker',
|
||||||
|
body:
|
||||||
|
'[Issue tracker on GitHub](https://github.com/hashicorp/vagrant/issues). Please only use this for reporting bugs. Do not ask for general help here. Use IRC or the mailing list for that.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: 'Training',
|
||||||
|
body:
|
||||||
|
'Paid [HashiCorp training courses](https://www.hashicorp.com/training) are also available in a city near you. Private training courses are also available.',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
8
website/pages/community/style.css
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#p-community {
|
||||||
|
max-width: var(--site-max-width);
|
||||||
|
margin: 72px auto;
|
||||||
|
|
||||||
|
& .g-section-header {
|
||||||
|
margin-bottom: 100px;
|
||||||
|
}
|
||||||
|
}
|
||||||
43
website/pages/downloads/index.jsx
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
import fetch from 'isomorphic-unfetch'
|
||||||
|
import VERSION from '../../data/version.js'
|
||||||
|
import ProductDownloader from '@hashicorp/react-product-downloader'
|
||||||
|
import Head from 'next/head'
|
||||||
|
import HashiHead from '@hashicorp/react-head'
|
||||||
|
|
||||||
|
export default function DownloadsPage({ downloadData }) {
|
||||||
|
return (
|
||||||
|
<div id="p-downloads" className="g-container">
|
||||||
|
<HashiHead is={Head} title="Downloads | Vagrant by HashiCorp" />
|
||||||
|
<ProductDownloader
|
||||||
|
product="Vagrant"
|
||||||
|
version={VERSION}
|
||||||
|
downloads={downloadData}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getStaticProps() {
|
||||||
|
return fetch(`https://releases.hashicorp.com/vagrant/${VERSION}/index.json`)
|
||||||
|
.then((r) => r.json())
|
||||||
|
.then((r) => {
|
||||||
|
// TODO: restructure product-downloader to run this logic internally
|
||||||
|
return r.builds.reduce((acc, build) => {
|
||||||
|
if (!acc[build.os]) acc[build.os] = {}
|
||||||
|
acc[build.os][build.arch] = build.url
|
||||||
|
return acc
|
||||||
|
}, {})
|
||||||
|
})
|
||||||
|
.then((r) => ({ props: { downloadData: r } }))
|
||||||
|
.catch(() => {
|
||||||
|
throw new Error(
|
||||||
|
`--------------------------------------------------------
|
||||||
|
Unable to resolve version ${VERSION} on releases.hashicorp.com from link
|
||||||
|
<https://releases.hashicorp.com/vagrant/${VERSION}/index.json>. Usually this
|
||||||
|
means that the specified version has not yet been released. The downloads page
|
||||||
|
version can only be updated after the new version has been released, to ensure
|
||||||
|
that it works for all users.
|
||||||
|
----------------------------------------------------------`
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
4
website/pages/downloads/style.css
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#p-downloads {
|
||||||
|
margin-top: 72px;
|
||||||
|
margin-bottom: 72px;
|
||||||
|
}
|
||||||
3
website/pages/home/index.jsx
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default function HomePage() {
|
||||||
|
return <p className="g-grid-container">Work in progress...</p>
|
||||||
|
}
|
||||||
3
website/pages/home/style.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
p {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
2
website/pages/index.jsx
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
import Homepage from './home'
|
||||||
|
export default Homepage
|
||||||
255
website/pages/print.css
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
/* Print Styles - Hide Elements */
|
||||||
|
@media print {
|
||||||
|
iframe,
|
||||||
|
.g-footer,
|
||||||
|
.g-mega-nav,
|
||||||
|
.g-product-subnav,
|
||||||
|
.g-subnav,
|
||||||
|
[aria-hidden='true'],
|
||||||
|
[id='__next-build-watcher'],
|
||||||
|
[id='edit-this-page'],
|
||||||
|
[id='jump-to-section'],
|
||||||
|
[id='sidebar'] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print Styles - Page Spacing */
|
||||||
|
@media print {
|
||||||
|
@page {
|
||||||
|
margin: 2cm 0.5cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
@page :first {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@page :last {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin-bottom: 2cm;
|
||||||
|
margin-top: 2cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
dl,
|
||||||
|
ol,
|
||||||
|
ul {
|
||||||
|
break-before: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6 {
|
||||||
|
break-after: avoid;
|
||||||
|
break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
break-inside: avoid;
|
||||||
|
break-after: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre,
|
||||||
|
table {
|
||||||
|
break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
/* @todo: remove alongside @hashicorp/react-global-styles/_temporary-to-remove/layout.css */
|
||||||
|
.g-container {
|
||||||
|
/*
|
||||||
|
* A “measure” is the number of characters in a line of text.
|
||||||
|
* Long lines fatique readers as they find the start of a new line of text.
|
||||||
|
* It seems widely accepted that an ideal measure is 66 characters per line.
|
||||||
|
* An average character takes up .5em, and so we define a measure of 33em.
|
||||||
|
* See: https://webtypography.net/2.1.2
|
||||||
|
*/
|
||||||
|
max-width: 33em;
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @todo: remove alongside @hashicorp/react-global-styles/_temporary-to-remove/tables.css */
|
||||||
|
table {
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @todo: move print styles to @hashicorp/react-global-styles/global.css */
|
||||||
|
@media print {
|
||||||
|
pre code,
|
||||||
|
code,
|
||||||
|
pre {
|
||||||
|
font-weight: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background: transparent;
|
||||||
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
|
||||||
|
color: inherit;
|
||||||
|
padding: 0.5em;
|
||||||
|
|
||||||
|
& > code {
|
||||||
|
white-space: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @todo: move print styles to @hashicorp/react-content/dist/style.css */
|
||||||
|
@media print {
|
||||||
|
.g-content {
|
||||||
|
& a {
|
||||||
|
color: inherit;
|
||||||
|
font-weight: 700;
|
||||||
|
|
||||||
|
&:not(.anchor) {
|
||||||
|
&::after {
|
||||||
|
background-color: transparent;
|
||||||
|
position: static;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[href^='http'] {
|
||||||
|
&::after {
|
||||||
|
content: ' <' attr(href) '>';
|
||||||
|
font-size: 0.8em;
|
||||||
|
font-style: italic;
|
||||||
|
letter-spacing: -0.01875em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not([href^='http']) {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > code {
|
||||||
|
color: inherit;
|
||||||
|
font-weight: 700;
|
||||||
|
|
||||||
|
&::before,
|
||||||
|
&::after {
|
||||||
|
content: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& h1,
|
||||||
|
& h2,
|
||||||
|
& h3,
|
||||||
|
& h4,
|
||||||
|
& h5,
|
||||||
|
& h6 {
|
||||||
|
& code {
|
||||||
|
background: none;
|
||||||
|
font-size: 1em;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& h2 {
|
||||||
|
margin: 1em 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& h3 {
|
||||||
|
margin: 1em 0 0;
|
||||||
|
padding-bottom: 0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
& img {
|
||||||
|
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
|
||||||
|
margin: 1em 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& ol,
|
||||||
|
& ul {
|
||||||
|
margin: 1em 0 0;
|
||||||
|
|
||||||
|
& li {
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-top: 0.5em;
|
||||||
|
|
||||||
|
& p:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& p {
|
||||||
|
margin: 1em 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& pre {
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 0;
|
||||||
|
margin: 1.5em 0 0;
|
||||||
|
|
||||||
|
& code {
|
||||||
|
background: transparent;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& dd,
|
||||||
|
& dt,
|
||||||
|
& li,
|
||||||
|
& p,
|
||||||
|
& td,
|
||||||
|
& th {
|
||||||
|
& > :not(pre) code,
|
||||||
|
& > code {
|
||||||
|
background: transparent;
|
||||||
|
font-weight: 700;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& .alert.alert-danger,
|
||||||
|
& .alert.alert-info,
|
||||||
|
& .alert.alert-success,
|
||||||
|
& .alert.alert-warning {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @todo: move print styles to @hashicorp/react-global-styles/code-highlighting.css */
|
||||||
|
@media print {
|
||||||
|
.hljs {
|
||||||
|
& * {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* @todo: remove when working on website/components/docs-page/style.css */
|
||||||
|
@media print {
|
||||||
|
#p-docs {
|
||||||
|
& #inner {
|
||||||
|
overflow: visible;
|
||||||
|
width: auto;
|
||||||
|
|
||||||
|
& pre,
|
||||||
|
& code {
|
||||||
|
font-size: 0.844rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
website/pages/security/index.mdx
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
layout: index
|
||||||
|
page_title: Security
|
||||||
|
description: >-
|
||||||
|
Vagrant takes security very seriously. Please responsibly disclose any security
|
||||||
|
vulnerabilities found and we'll handle it quickly.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Security
|
||||||
|
|
||||||
|
We understand that many users place a high level of trust in HashiCorp and
|
||||||
|
the tools we build. We apply best practices and focus on security to make
|
||||||
|
sure we can maintain the trust of the community.
|
||||||
|
|
||||||
|
We deeply appreciate any effort to disclose vulnerabilities responsibly.
|
||||||
|
|
||||||
|
If you would like to report a vulnerability, please see the
|
||||||
|
[HashiCorp security page](https://www.hashicorp.com/security),
|
||||||
|
which has the proper email to communicate with as well as our PGP key.
|
||||||
|
|
||||||
|
If you aren't reporting a security sensitive vulnerability, please
|
||||||
|
open an issue on the standard [GitHub](https://github.com/hashicorp/vagrant)
|
||||||
|
repository.
|
||||||
139
website/pages/style.css
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
/* Global Component Styles */
|
||||||
|
@import '~@hashicorp/react-global-styles/style.css';
|
||||||
|
@import '~@hashicorp/react-global-styles/code-highlighting.css';
|
||||||
|
@import '~@hashicorp/react-global-styles/custom-properties/color.css';
|
||||||
|
@import '~@hashicorp/react-global-styles/custom-properties/font.css';
|
||||||
|
@import '~@hashicorp/react-global-styles/_temporary-to-remove/layout.css';
|
||||||
|
@import '~@hashicorp/react-global-styles/_temporary-to-remove/tables.css';
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--highlight-color: var(--consul);
|
||||||
|
}
|
||||||
|
|
||||||
|
@import '~@hashicorp/react-button/dist/style.css';
|
||||||
|
@import '~@hashicorp/react-consent-manager/dist/style.css';
|
||||||
|
@import '~@hashicorp/react-section-header/dist/style.css';
|
||||||
|
@import '~@hashicorp/react-product-downloader/dist/style.css';
|
||||||
|
@import '~@hashicorp/react-vertical-text-block-list/dist/style.css';
|
||||||
|
@import '~@hashicorp/react-docs-sidenav/dist/style.css';
|
||||||
|
@import '~@hashicorp/react-content/dist/style.css';
|
||||||
|
@import '~@hashicorp/react-subnav/dist/style.css';
|
||||||
|
@import '~@hashicorp/react-mega-nav/style.css';
|
||||||
|
@import '~@hashicorp/react-docs-page/style.css';
|
||||||
|
|
||||||
|
/* Local Components */
|
||||||
|
@import '../components/footer/style.css';
|
||||||
|
|
||||||
|
/* Local Pages */
|
||||||
|
@import './downloads/style.css';
|
||||||
|
@import './community/style.css';
|
||||||
|
@import './home/style.css';
|
||||||
|
|
||||||
|
/* Print Styles */
|
||||||
|
@import './print.css';
|
||||||
|
|
||||||
|
/* Expand content so footer is always at the bottom */
|
||||||
|
.content {
|
||||||
|
min-height: calc(100vh - 260px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* About this selector:
|
||||||
|
* `.g-subnav ~ *` finds all elements after the navigation.
|
||||||
|
* `:target` finds the active permalink on the page.
|
||||||
|
*
|
||||||
|
* About this style:
|
||||||
|
* `scroll-margin-top` adjusts the vertical scroll of a permalink.
|
||||||
|
* `64px` adjusts the scroll to account for the navigation.
|
||||||
|
* `0.5em` further adjusts the scroll to give the permalink breathing room.
|
||||||
|
*
|
||||||
|
* See: https://developer.mozilla.org/en-US/docs/Web/CSS/:target
|
||||||
|
* See: https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-top
|
||||||
|
*/
|
||||||
|
.g-subnav ~ * :target {
|
||||||
|
scroll-margin-top: calc(64px + 0.5em);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Web Fonts */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'klavika-web';
|
||||||
|
src: url('/fonts/klavika/medium.woff2') format('woff2'),
|
||||||
|
url('/fonts/klavika/medium.woff') format('woff');
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Display Font (Gilmer) */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'gilmer-web';
|
||||||
|
src: url('/fonts/gilmer/light.woff2') format('woff2'),
|
||||||
|
url('/fonts/gilmer/light.woff') format('woff');
|
||||||
|
font-weight: 300;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'gilmer-web';
|
||||||
|
src: url('/fonts/gilmer/regular.woff2') format('woff2'),
|
||||||
|
url('/fonts/gilmer/regular.woff') format('woff');
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'gilmer-web';
|
||||||
|
src: url('/fonts/gilmer/medium.woff2') format('woff2'),
|
||||||
|
url('/fonts/gilmer/medium.woff') format('woff');
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'gilmer-web';
|
||||||
|
src: url('/fonts/gilmer/bold.woff2') format('woff2'),
|
||||||
|
url('/fonts/gilmer/bold.woff') format('woff');
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Body Font (Metro) */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'metro-web';
|
||||||
|
src: url('/fonts/metro-sans/book.woff2') format('woff2'),
|
||||||
|
url('/fonts/metro-sans/book.woff') format('woff');
|
||||||
|
font-weight: 300;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'metro-web';
|
||||||
|
src: url('/fonts/metro-sans/regular.woff2') format('woff2'),
|
||||||
|
url('/fonts/metro-sans/regular.woff') format('woff');
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'metro-web';
|
||||||
|
src: url('/fonts/metro-sans/semi-bold.woff2') format('woff2'),
|
||||||
|
url('/fonts/metro-sans/semi-bold.woff') format('woff');
|
||||||
|
font-weight: 600;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'metro-web';
|
||||||
|
src: url('/fonts/metro-sans/bold.woff2') format('woff2'),
|
||||||
|
url('/fonts/metro-sans/bold.woff') format('woff');
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Code Font (Deja Vu) */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'dejavu-sans-mono-web';
|
||||||
|
src: url('/fonts/dejavu/mono.woff2') format('woff2'),
|
||||||
|
url('/fonts/dejavu/mono.woff') format('woff');
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
3
website/prettier.config.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
...require('@hashicorp/nextjs-scripts/prettier.config.js'),
|
||||||
|
}
|
||||||
81
website/public/css/nprogress.css
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
/* Make clicks pass-through */
|
||||||
|
#nprogress {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#nprogress .bar {
|
||||||
|
background: #29d;
|
||||||
|
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1031;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
height: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fancy blur effect */
|
||||||
|
#nprogress .peg {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
width: 100px;
|
||||||
|
height: 100%;
|
||||||
|
box-shadow: 0 0 10px #29d, 0 0 5px #29d;
|
||||||
|
opacity: 1;
|
||||||
|
|
||||||
|
-webkit-transform: rotate(3deg) translate(0px, -4px);
|
||||||
|
-ms-transform: rotate(3deg) translate(0px, -4px);
|
||||||
|
transform: rotate(3deg) translate(0px, -4px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove these to get rid of the spinner */
|
||||||
|
#nprogress .spinner {
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1031;
|
||||||
|
top: 15px;
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#nprogress .spinner-icon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
border: solid 2px transparent;
|
||||||
|
border-top-color: #29d;
|
||||||
|
border-left-color: #29d;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
-webkit-animation: nprogress-spinner 400ms linear infinite;
|
||||||
|
animation: nprogress-spinner 400ms linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nprogress-custom-parent {
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nprogress-custom-parent #nprogress .spinner,
|
||||||
|
.nprogress-custom-parent #nprogress .bar {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
@-webkit-keyframes nprogress-spinner {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes nprogress-spinner {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
website/public/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
website/public/files/press-kit.zip
Normal file
BIN
website/public/fonts/klavika/medium.woff
Normal file
BIN
website/public/fonts/klavika/medium.woff2
Normal file
639
website/public/ie-custom-properties.js
Normal file
@ -0,0 +1,639 @@
|
|||||||
|
/*! ie11CustomProperties.js v2.7.2 | MIT License | https://git.io/fjXMN */
|
||||||
|
// c1.onElement helper
|
||||||
|
!(function () {
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
if (!Element.prototype.matches)
|
||||||
|
Element.prototype.matches = Element.prototype.msMatchesSelector
|
||||||
|
|
||||||
|
var w = window
|
||||||
|
if (!w.c1) w.c1 = {}
|
||||||
|
var listeners = [],
|
||||||
|
root = document,
|
||||||
|
Observer
|
||||||
|
|
||||||
|
c1.onElement = function (selector, options /*, disconnectedCallback*/) {
|
||||||
|
if (typeof options === 'function') {
|
||||||
|
options = { parsed: options }
|
||||||
|
}
|
||||||
|
var listener = {
|
||||||
|
selector: selector,
|
||||||
|
immediate: options.immediate,
|
||||||
|
//disconnectedCallback: disconnectedCallback,
|
||||||
|
elements: new WeakMap(),
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.parsed) {
|
||||||
|
listener.parsed = function (el) {
|
||||||
|
requestAnimationFrame(function () {
|
||||||
|
options.parsed(el)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var els = root.querySelectorAll(listener.selector),
|
||||||
|
i = 0,
|
||||||
|
el
|
||||||
|
while ((el = els[i++])) {
|
||||||
|
listener.elements.set(el, true)
|
||||||
|
listener.parsed && listener.parsed.call(el, el)
|
||||||
|
listener.immediate && listener.immediate.call(el, el)
|
||||||
|
}
|
||||||
|
|
||||||
|
listeners.push(listener)
|
||||||
|
if (!Observer) {
|
||||||
|
Observer = new MutationObserver(checkMutations)
|
||||||
|
Observer.observe(root, {
|
||||||
|
childList: true,
|
||||||
|
subtree: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
checkListener(listener)
|
||||||
|
}
|
||||||
|
function checkListener(listener, target) {
|
||||||
|
var i = 0,
|
||||||
|
el,
|
||||||
|
els = []
|
||||||
|
target && target.matches(listener.selector) && els.push(target)
|
||||||
|
if (loaded) {
|
||||||
|
// ok? check inside node on innerHTML - only when loaded
|
||||||
|
Array.prototype.push.apply(
|
||||||
|
els,
|
||||||
|
(target || root).querySelectorAll(listener.selector)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
while ((el = els[i++])) {
|
||||||
|
if (listener.elements.has(el)) continue
|
||||||
|
listener.elements.set(el, true)
|
||||||
|
//listener.connectedCallback.call(el, el);
|
||||||
|
listener.parsed && listener.parsed.call(el, el)
|
||||||
|
listener.immediate && listener.immediate.call(el, el)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function checkListeners(inside) {
|
||||||
|
var i = 0,
|
||||||
|
listener
|
||||||
|
while ((listener = listeners[i++])) checkListener(listener, inside)
|
||||||
|
}
|
||||||
|
function checkMutations(mutations) {
|
||||||
|
var j = 0,
|
||||||
|
i,
|
||||||
|
mutation,
|
||||||
|
nodes,
|
||||||
|
target
|
||||||
|
while ((mutation = mutations[j++])) {
|
||||||
|
;(nodes = mutation.addedNodes), (i = 0)
|
||||||
|
while ((target = nodes[i++]))
|
||||||
|
target.nodeType === 1 && checkListeners(target)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var loaded = false
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
loaded = true
|
||||||
|
})
|
||||||
|
|
||||||
|
// svg polyfills
|
||||||
|
function copyProperty(prop, from, to) {
|
||||||
|
var desc = Object.getOwnPropertyDescriptor(from, prop)
|
||||||
|
Object.defineProperty(to, prop, desc)
|
||||||
|
}
|
||||||
|
if (!('classList' in Element.prototype)) {
|
||||||
|
copyProperty('classList', HTMLElement.prototype, Element.prototype)
|
||||||
|
}
|
||||||
|
if (!('innerHTML' in Element.prototype)) {
|
||||||
|
copyProperty('innerHTML', HTMLElement.prototype, Element.prototype)
|
||||||
|
}
|
||||||
|
if (!('sheet' in SVGStyleElement.prototype)) {
|
||||||
|
Object.defineProperty(SVGStyleElement.prototype, 'sheet', {
|
||||||
|
get: function () {
|
||||||
|
var all = document.styleSheets
|
||||||
|
for (var i = 0, sheet; (sheet = all[i++]); ) {
|
||||||
|
if (sheet.ownerNode === this) return sheet
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// if ('children' in HTMLElement.prototype && !('children' in Element.prototype)) {
|
||||||
|
// copyProperty('children', HTMLElement.prototype, Element.prototype);
|
||||||
|
// }
|
||||||
|
// if ('contains' in HTMLElement.prototype && !('contains' in Element.prototype)) {
|
||||||
|
// copyProperty('contains', HTMLElement.prototype, Element.prototype);
|
||||||
|
// }
|
||||||
|
// if ('getElementsByClassName' in HTMLElement.prototype && !('getElementsByClassName' in Element.prototype)) {
|
||||||
|
// copyProperty('getElementsByClassName', HTMLElement.prototype, Element.prototype);
|
||||||
|
// }
|
||||||
|
})()
|
||||||
|
|
||||||
|
// main logic
|
||||||
|
!(function () {
|
||||||
|
'use strict'
|
||||||
|
var testEl = document.createElement('i')
|
||||||
|
testEl.style.setProperty('--x', 'y')
|
||||||
|
if (testEl.style.getPropertyValue('--x') === 'y' || !testEl.msMatchesSelector)
|
||||||
|
return
|
||||||
|
|
||||||
|
// cached regexps, better performance
|
||||||
|
const regFindSetters = /([\s{;])(--([A-Za-z0-9-_]+\s*:[^;!}{]+)(!important)?)(?=\s*([;}]|$))/g
|
||||||
|
const regFindGetters = /([{;]\s*)([A-Za-z0-9-_]+\s*:[^;}{]*var\([^!;}{]+)(!important)?(?=\s*([;}$]|$))/g
|
||||||
|
const regRuleIEGetters = /-ieVar-([^:]+):/g
|
||||||
|
const regRuleIESetters = /-ie-([^};]+)/g
|
||||||
|
const regHasVar = /var\(/
|
||||||
|
const regPseudos = /:(hover|active|focus|target|:before|:after)/
|
||||||
|
|
||||||
|
c1.onElement('link[rel="stylesheet"]', {
|
||||||
|
immediate: function (el) {
|
||||||
|
fetchCss(el.href, function (css) {
|
||||||
|
var newCss = rewriteCss(css)
|
||||||
|
if (css === newCss) return
|
||||||
|
newCss = relToAbs(el.href, newCss)
|
||||||
|
el.disabled = true
|
||||||
|
var style = document.createElement('style')
|
||||||
|
el.parentNode.insertBefore(style, el)
|
||||||
|
activateStyleElement(style, newCss)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
})
|
||||||
|
c1.onElement('style', {
|
||||||
|
immediate: function (el) {
|
||||||
|
if (el.hasAttribute('ie-polyfilled')) return
|
||||||
|
if (el.ieCP_elementSheet) return
|
||||||
|
var css = el.innerHTML
|
||||||
|
var newCss = rewriteCss(css)
|
||||||
|
if (css === newCss) return
|
||||||
|
activateStyleElement(el, newCss)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
c1.onElement('[ie-style]', {
|
||||||
|
immediate: function (el) {
|
||||||
|
var newCss = rewriteCss('{' + el.getAttribute('ie-style')).substr(1)
|
||||||
|
el.style.cssText += ';' + newCss
|
||||||
|
var found = parseRewrittenStyle(el.style)
|
||||||
|
if (found.getters) addGetterElement(el, found.getters, '%styleAttr')
|
||||||
|
if (found.setters) addSetterElement(el, found.setters)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
function relToAbs(base, css) {
|
||||||
|
return css.replace(/url\(([^)]+)\)/g, function ($0, $1) {
|
||||||
|
$1 = $1.trim().replace(/(^['"]|['"]$)/g, '')
|
||||||
|
if ($1.match(/^([a-z]+:|\/)/)) return $0
|
||||||
|
base = base.replace(/\?.*/, '')
|
||||||
|
return 'url(' + base + './../' + $1 + ')'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// ie has a bug, where unknown properties at pseudo-selectors are computed at the element
|
||||||
|
// #el::after { -content:'x'; } => getComputedStyle(el)['-content'] == 'x'
|
||||||
|
// should we add something like -ieVar-pseudo_after-content:'x'?
|
||||||
|
function rewriteCss(css) {
|
||||||
|
/* uncomment if spec finished and needed by someone
|
||||||
|
css = css.replace(/@property ([^{]+){([^}]+)}/, function($0, prop, body){
|
||||||
|
prop = prop.trim();
|
||||||
|
const declaration = {name:prop};
|
||||||
|
body.split(';').forEach(function(pair){
|
||||||
|
const x = pair.split(':');
|
||||||
|
if (x[1]) declaration[ x[0].trim() ] = x[1];
|
||||||
|
});
|
||||||
|
declaration['inherits'] = declaration['inherits'].trim()==='true' ? true : false;
|
||||||
|
declaration['initialValue'] = declaration['initial-value'];
|
||||||
|
CSS.registerProperty(declaration)
|
||||||
|
return '/*\n @property ... removed \n*'+'/';
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
return css
|
||||||
|
.replace(regFindSetters, function ($0, $1, $2, $3, important) {
|
||||||
|
return $1 + '-ie-' + (important ? '❗' : '') + $3
|
||||||
|
})
|
||||||
|
.replace(regFindGetters, function ($0, $1, $2, important) {
|
||||||
|
return $1 + '-ieVar-' + (important ? '❗' : '') + $2 + '; ' + $2 // keep the original, so chaining works "--x:var(--y)"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// beta
|
||||||
|
const styles_of_getter_properties = {}
|
||||||
|
|
||||||
|
function parseRewrittenStyle(style) {
|
||||||
|
// less memory then parameter cssText?
|
||||||
|
|
||||||
|
// beta
|
||||||
|
style['z-index'] // ie11 can access unknown properties in stylesheets only if accessed a dashed known property
|
||||||
|
|
||||||
|
const cssText = style.cssText
|
||||||
|
var matchesGetters = cssText.match(regRuleIEGetters),
|
||||||
|
j,
|
||||||
|
match
|
||||||
|
if (matchesGetters) {
|
||||||
|
var getters = [] // eg. [border,color]
|
||||||
|
for (j = 0; (match = matchesGetters[j++]); ) {
|
||||||
|
let propName = match.slice(7, -1)
|
||||||
|
if (propName[0] === '❗') propName = propName.substr(1)
|
||||||
|
getters.push(propName)
|
||||||
|
|
||||||
|
// beta
|
||||||
|
if (!styles_of_getter_properties[propName])
|
||||||
|
styles_of_getter_properties[propName] = []
|
||||||
|
styles_of_getter_properties[propName].push(style)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var matchesSetters = cssText.match(regRuleIESetters)
|
||||||
|
if (matchesSetters) {
|
||||||
|
var setters = {} // eg. [--color:#fff, --padding:10px];
|
||||||
|
for (j = 0; (match = matchesSetters[j++]); ) {
|
||||||
|
let x = match.substr(4).split(':')
|
||||||
|
let propName = x[0]
|
||||||
|
let propValue = x[1]
|
||||||
|
if (propName[0] === '❗') propName = propName.substr(1)
|
||||||
|
setters[propName] = propValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return { getters: getters, setters: setters }
|
||||||
|
}
|
||||||
|
function activateStyleElement(style, css) {
|
||||||
|
style.innerHTML = css
|
||||||
|
style.setAttribute('ie-polyfilled', true)
|
||||||
|
var rules = style.sheet.rules,
|
||||||
|
i = 0,
|
||||||
|
rule // cssRules = CSSRuleList, rules = MSCSSRuleList
|
||||||
|
while ((rule = rules[i++])) {
|
||||||
|
const found = parseRewrittenStyle(rule.style)
|
||||||
|
if (found.getters) addGettersSelector(rule.selectorText, found.getters)
|
||||||
|
if (found.setters) addSettersSelector(rule.selectorText, found.setters)
|
||||||
|
|
||||||
|
// mediaQueries: redraw the hole document
|
||||||
|
// better add events for each element?
|
||||||
|
const media =
|
||||||
|
rule.parentRule &&
|
||||||
|
rule.parentRule.media &&
|
||||||
|
rule.parentRule.media.mediaText
|
||||||
|
if (media && (found.getters || found.setters)) {
|
||||||
|
matchMedia(media).addListener(function () {
|
||||||
|
drawTree(document.documentElement)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// beta
|
||||||
|
redrawStyleSheets()
|
||||||
|
}
|
||||||
|
|
||||||
|
function addGettersSelector(selector, properties) {
|
||||||
|
selectorAddPseudoListeners(selector)
|
||||||
|
c1.onElement(unPseudo(selector), {
|
||||||
|
immediate: function (el) {
|
||||||
|
addGetterElement(el, properties, selector)
|
||||||
|
drawElement(el)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function addGetterElement(el, properties, selector) {
|
||||||
|
var i = 0,
|
||||||
|
prop,
|
||||||
|
j
|
||||||
|
const selectors = selector.split(',') // split grouped selectors
|
||||||
|
el.setAttribute('iecp-needed', true)
|
||||||
|
if (!el.ieCPSelectors) el.ieCPSelectors = {}
|
||||||
|
while ((prop = properties[i++])) {
|
||||||
|
for (j = 0; (selector = selectors[j++]); ) {
|
||||||
|
const parts = selector.trim().split('::')
|
||||||
|
if (!el.ieCPSelectors[prop]) el.ieCPSelectors[prop] = []
|
||||||
|
el.ieCPSelectors[prop].push({
|
||||||
|
selector: parts[0],
|
||||||
|
pseudo: parts[1] ? '::' + parts[1] : '',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function addSettersSelector(selector, propVals) {
|
||||||
|
selectorAddPseudoListeners(selector)
|
||||||
|
c1.onElement(unPseudo(selector), {
|
||||||
|
immediate: function (el) {
|
||||||
|
addSetterElement(el, propVals)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function addSetterElement(el, propVals) {
|
||||||
|
if (!el.ieCP_setters) el.ieCP_setters = {}
|
||||||
|
for (var prop in propVals) {
|
||||||
|
// eg. {foo:#fff, bar:baz}
|
||||||
|
el.ieCP_setters['--' + prop] = 1
|
||||||
|
}
|
||||||
|
drawTree(el)
|
||||||
|
}
|
||||||
|
|
||||||
|
//beta
|
||||||
|
function redrawStyleSheets() {
|
||||||
|
for (var prop in styles_of_getter_properties) {
|
||||||
|
let styles = styles_of_getter_properties[prop]
|
||||||
|
for (var i = 0, style; (style = styles[i++]); ) {
|
||||||
|
if (style.owningElement) continue
|
||||||
|
var value = style['-ieVar-' + prop]
|
||||||
|
if (!value) continue
|
||||||
|
var value = styleComputeValueWidthVars(
|
||||||
|
getComputedStyle(document.documentElement),
|
||||||
|
value
|
||||||
|
)
|
||||||
|
if (value === '') continue
|
||||||
|
style[prop] = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const pseudos = {
|
||||||
|
hover: {
|
||||||
|
on: 'mouseenter',
|
||||||
|
off: 'mouseleave',
|
||||||
|
},
|
||||||
|
focus: {
|
||||||
|
on: 'focusin',
|
||||||
|
off: 'focusout',
|
||||||
|
},
|
||||||
|
active: {
|
||||||
|
on: 'CSSActivate',
|
||||||
|
off: 'CSSDeactivate',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
function selectorAddPseudoListeners(selector) {
|
||||||
|
// ie11 has the strange behavoir, that groups of selectors are individual rules, but starting with the full selector:
|
||||||
|
// td, th, button { color:red } results in this rules:
|
||||||
|
// "td, th, button" | "th, th" | "th"
|
||||||
|
selector = selector.split(',')[0]
|
||||||
|
for (var pseudo in pseudos) {
|
||||||
|
var parts = selector.split(':' + pseudo)
|
||||||
|
if (parts.length > 1) {
|
||||||
|
var ending = parts[1].match(/^[^\s]*/) // ending elementpart of selector (used for not(:active))
|
||||||
|
let sel = unPseudo(parts[0] + ending)
|
||||||
|
const listeners = pseudos[pseudo]
|
||||||
|
c1.onElement(sel, function (el) {
|
||||||
|
el.addEventListener(listeners.on, drawTreeEvent)
|
||||||
|
el.addEventListener(listeners.off, drawTreeEvent)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let CSSActive = null
|
||||||
|
document.addEventListener('mousedown', function (e) {
|
||||||
|
setTimeout(function () {
|
||||||
|
if (e.target === document.activeElement) {
|
||||||
|
var evt = document.createEvent('Event')
|
||||||
|
evt.initEvent('CSSActivate', true, true)
|
||||||
|
CSSActive = e.target
|
||||||
|
CSSActive.dispatchEvent(evt)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
document.addEventListener('mouseup', function () {
|
||||||
|
if (CSSActive) {
|
||||||
|
var evt = document.createEvent('Event')
|
||||||
|
evt.initEvent('CSSDeactivate', true, true)
|
||||||
|
CSSActive.dispatchEvent(evt)
|
||||||
|
CSSActive = null
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
function unPseudo(selector) {
|
||||||
|
return selector.replace(regPseudos, '').replace(':not()', '')
|
||||||
|
}
|
||||||
|
|
||||||
|
var uniqueCounter = 0
|
||||||
|
|
||||||
|
function _drawElement(el) {
|
||||||
|
if (!el.ieCP_unique) {
|
||||||
|
// use el.uniqueNumber? but needs class for the css-selector => test performance
|
||||||
|
el.ieCP_unique = ++uniqueCounter
|
||||||
|
el.classList.add('iecp-u' + el.ieCP_unique)
|
||||||
|
}
|
||||||
|
var style = getComputedStyle(el)
|
||||||
|
if (el.ieCP_sheet)
|
||||||
|
while (el.ieCP_sheet.rules[0]) el.ieCP_sheet.deleteRule(0)
|
||||||
|
for (var prop in el.ieCPSelectors) {
|
||||||
|
var important = style['-ieVar-❗' + prop]
|
||||||
|
let valueWithVar = important || style['-ieVar-' + prop]
|
||||||
|
if (!valueWithVar) continue // todo, what if '0'
|
||||||
|
|
||||||
|
var details = {}
|
||||||
|
var value = styleComputeValueWidthVars(style, valueWithVar, details)
|
||||||
|
|
||||||
|
if (important) value += ' !important'
|
||||||
|
for (var i = 0, item; (item = el.ieCPSelectors[prop][i++]); ) {
|
||||||
|
// todo: split and use requestAnimationFrame?
|
||||||
|
if (item.selector === '%styleAttr') {
|
||||||
|
el.style[prop] = value
|
||||||
|
} else {
|
||||||
|
// beta
|
||||||
|
if (!important && details.allByRoot !== false) continue // dont have to draw root-properties
|
||||||
|
|
||||||
|
//let selector = item.selector.replace(/>? \.[^ ]+/, ' ', item.selector); // todo: try to equalize specificity
|
||||||
|
let selector = item.selector
|
||||||
|
elementStyleSheet(el).insertRule(
|
||||||
|
selector +
|
||||||
|
'.iecp-u' +
|
||||||
|
el.ieCP_unique +
|
||||||
|
item.pseudo +
|
||||||
|
' {' +
|
||||||
|
prop +
|
||||||
|
':' +
|
||||||
|
value +
|
||||||
|
'}',
|
||||||
|
0
|
||||||
|
) // faster then innerHTML
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function elementStyleSheet(el) {
|
||||||
|
if (!el.ieCP_sheet) {
|
||||||
|
var tag = document.createElement('style')
|
||||||
|
tag.ieCP_elementSheet = 1
|
||||||
|
//el.appendChild(tag); // yes! self-closing tags can have style as children, but - if i set innerHTML, the stylesheet is lost
|
||||||
|
document.head.appendChild(tag)
|
||||||
|
el.ieCP_sheet = tag.sheet
|
||||||
|
}
|
||||||
|
return el.ieCP_sheet
|
||||||
|
}
|
||||||
|
function drawTree(target) {
|
||||||
|
if (!target) return
|
||||||
|
var els = target.querySelectorAll('[iecp-needed]')
|
||||||
|
if (target.hasAttribute && target.hasAttribute('iecp-needed'))
|
||||||
|
drawElement(target) // self
|
||||||
|
for (var i = 0, el; (el = els[i++]); ) drawElement(el) // tree
|
||||||
|
}
|
||||||
|
// draw queue
|
||||||
|
let drawQueue = new Set()
|
||||||
|
let collecting = false
|
||||||
|
let drawing = false
|
||||||
|
function drawElement(el) {
|
||||||
|
drawQueue.add(el)
|
||||||
|
if (collecting) return
|
||||||
|
collecting = true
|
||||||
|
requestAnimationFrame(function () {
|
||||||
|
collecting = false
|
||||||
|
drawing = true
|
||||||
|
drawQueue.forEach(_drawElement)
|
||||||
|
requestAnimationFrame(function () {
|
||||||
|
// mutationObserver will trigger delayed
|
||||||
|
drawing = false
|
||||||
|
})
|
||||||
|
drawQueue.clear()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function drawTreeEvent(e) {
|
||||||
|
drawTree(e.target)
|
||||||
|
}
|
||||||
|
|
||||||
|
const regValueGetters = /var\(([^),]+)(\,(.+))?\)/g
|
||||||
|
function styleComputeValueWidthVars(style, valueWithVar, details) {
|
||||||
|
return valueWithVar.replace(regValueGetters, function (
|
||||||
|
full,
|
||||||
|
variable,
|
||||||
|
x,
|
||||||
|
fallback
|
||||||
|
) {
|
||||||
|
variable = variable.trim()
|
||||||
|
var pValue = style.getPropertyValue(variable)
|
||||||
|
if (details && style.lastPropertyServedBy !== document.documentElement)
|
||||||
|
details.allByRoot = false
|
||||||
|
if (pValue === '' && fallback !== undefined) pValue = fallback.trim() // fallback
|
||||||
|
return pValue
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// mutation listener
|
||||||
|
var observer = new MutationObserver(function (mutations) {
|
||||||
|
if (drawing) return
|
||||||
|
for (var i = 0, mutation; (mutation = mutations[i++]); ) {
|
||||||
|
if (mutation.attributeName === 'ie-polyfilled') continue
|
||||||
|
if (mutation.attributeName === 'iecp-needed') continue
|
||||||
|
// recheck all selectors if it targets new elements?
|
||||||
|
drawTree(mutation.target)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
setTimeout(function () {
|
||||||
|
observer.observe(document, { attributes: true, subtree: true })
|
||||||
|
})
|
||||||
|
|
||||||
|
// :target listener
|
||||||
|
var oldHash = location.hash
|
||||||
|
addEventListener('hashchange', function (e) {
|
||||||
|
var newEl = document.getElementById(location.hash.substr(1))
|
||||||
|
if (newEl) {
|
||||||
|
var oldEl = document.getElementById(oldHash.substr(1))
|
||||||
|
drawTree(newEl)
|
||||||
|
drawTree(oldEl)
|
||||||
|
} else {
|
||||||
|
drawTree(document)
|
||||||
|
}
|
||||||
|
oldHash = location.hash
|
||||||
|
})
|
||||||
|
|
||||||
|
// add owningElement to Element.style
|
||||||
|
var descriptor = Object.getOwnPropertyDescriptor(
|
||||||
|
HTMLElement.prototype,
|
||||||
|
'style'
|
||||||
|
)
|
||||||
|
var styleGetter = descriptor.get
|
||||||
|
descriptor.get = function () {
|
||||||
|
const style = styleGetter.call(this)
|
||||||
|
style.owningElement = this
|
||||||
|
return style
|
||||||
|
}
|
||||||
|
Object.defineProperty(HTMLElement.prototype, 'style', descriptor)
|
||||||
|
|
||||||
|
// add computedFor to computed style-objects
|
||||||
|
var originalGetComputed = getComputedStyle
|
||||||
|
window.getComputedStyle = function (el) {
|
||||||
|
var style = originalGetComputed.apply(this, arguments)
|
||||||
|
style.computedFor = el
|
||||||
|
//style.pseudoElt = pseudoElt; //not needed at the moment
|
||||||
|
return style
|
||||||
|
}
|
||||||
|
|
||||||
|
// getPropertyValue / setProperty hooks
|
||||||
|
const StyleProto = CSSStyleDeclaration.prototype
|
||||||
|
|
||||||
|
const oldGetP = StyleProto.getPropertyValue
|
||||||
|
StyleProto.getPropertyValue = function (property) {
|
||||||
|
this.lastPropertyServedBy = false
|
||||||
|
if (property[0] !== '-' || property[1] !== '-')
|
||||||
|
return oldGetP.apply(this, arguments)
|
||||||
|
const undashed = property.substr(2)
|
||||||
|
const ieProperty = '-ie-' + undashed
|
||||||
|
const iePropertyImportant = '-ie-❗' + undashed
|
||||||
|
let value = this[iePropertyImportant] || this[ieProperty]
|
||||||
|
if (this.computedFor) {
|
||||||
|
// computedStyle
|
||||||
|
if (value !== undefined) {
|
||||||
|
if (regHasVar.test(value)) {
|
||||||
|
value = styleComputeValueWidthVars(this, value)
|
||||||
|
}
|
||||||
|
this.lastPropertyServedBy = this.computedFor
|
||||||
|
} else {
|
||||||
|
if (!register[property] || register[property].inherits) {
|
||||||
|
// inherited
|
||||||
|
//let el = this.pseudoElt ? this.computedFor : this.computedFor.parentNode;
|
||||||
|
let el = this.computedFor.parentNode
|
||||||
|
while (el.nodeType === 1) {
|
||||||
|
// how slower would it be to getComputedStyle for every element, not just with defined ieCP_setters
|
||||||
|
if (el.ieCP_setters && el.ieCP_setters[property]) {
|
||||||
|
// i could make
|
||||||
|
// value = el.nodeType ? getComputedStyle(this.computedFor.parentNode).getPropertyValue(property)
|
||||||
|
// but i fear performance, stupid?
|
||||||
|
var style = getComputedStyle(el)
|
||||||
|
var tmpVal = style[iePropertyImportant] || style[ieProperty]
|
||||||
|
if (tmpVal !== undefined) {
|
||||||
|
value = tmpVal
|
||||||
|
if (regHasVar.test(value)) {
|
||||||
|
// calculated style from current element not from the element the value was inherited from! (style, value)
|
||||||
|
value = styleComputeValueWidthVars(this, value)
|
||||||
|
}
|
||||||
|
this.lastPropertyServedBy = el
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
el = el.parentNode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (value === undefined && register[property])
|
||||||
|
value = register[property].initialValue
|
||||||
|
if (value === undefined) value = ''
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
|
const oldSetP = StyleProto.setProperty
|
||||||
|
StyleProto.setProperty = function (property, value, prio) {
|
||||||
|
if (property[0] !== '-' || property[1] !== '-')
|
||||||
|
return oldSetP.apply(this, arguments)
|
||||||
|
if (this.owningElement) {
|
||||||
|
const el = this.owningElement
|
||||||
|
if (!el.ieCP_setters) el.ieCP_setters = {}
|
||||||
|
el.ieCP_setters[property] = 1
|
||||||
|
drawTree(el)
|
||||||
|
}
|
||||||
|
property = '-ie-' + (prio === 'important' ? '❗' : '') + property.substr(2)
|
||||||
|
this.cssText += '; ' + property + ':' + value + ';'
|
||||||
|
//this[property] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!window.CSS) window.CSS = {}
|
||||||
|
const register = {}
|
||||||
|
CSS.registerProperty = function (options) {
|
||||||
|
register[options.name] = options
|
||||||
|
}
|
||||||
|
|
||||||
|
// utils
|
||||||
|
function fetchCss(url, callback) {
|
||||||
|
var request = new XMLHttpRequest()
|
||||||
|
request.open('GET', url)
|
||||||
|
request.overrideMimeType('text/css')
|
||||||
|
request.onload = function () {
|
||||||
|
if (request.status >= 200 && request.status < 400) {
|
||||||
|
callback(request.responseText)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
request.send()
|
||||||
|
}
|
||||||
|
})()
|
||||||
@ -1,41 +0,0 @@
|
|||||||
#
|
|
||||||
# REDIRECTS FILE
|
|
||||||
#
|
|
||||||
# This is a sample redirect file. Redirects allow individual projects to add
|
|
||||||
# their own redirect rules in a declarative manner using Fastly edge
|
|
||||||
# dictionaries.
|
|
||||||
#
|
|
||||||
# FORMAT
|
|
||||||
#
|
|
||||||
# Redirects are in the format. There must be at least one space between the
|
|
||||||
# original path and the new path, and there must be exactly two entries per
|
|
||||||
# line.
|
|
||||||
#
|
|
||||||
# /original-path /new-path
|
|
||||||
#
|
|
||||||
# GLOB MATCHING
|
|
||||||
#
|
|
||||||
# Because of the way lookup tables work, there is no support for glob matching.
|
|
||||||
# Fastly does not provide a way to iterate through the lookup table, so it is
|
|
||||||
# not possible to run through the table and find anything that matches. As such
|
|
||||||
# URLs must match directly.
|
|
||||||
#
|
|
||||||
# More complex redirects are possible, but must be added directly to the
|
|
||||||
# configuration. Please contact the release engineering team for assistance.
|
|
||||||
#
|
|
||||||
# DELETING
|
|
||||||
#
|
|
||||||
# Deleting items is not supported at this time. To delete an item, contact the
|
|
||||||
# release engineering team and they will delete the dictionary item.
|
|
||||||
#
|
|
||||||
# MISC
|
|
||||||
#
|
|
||||||
# - Blank lines are ignored
|
|
||||||
# - Comments are hash-style
|
|
||||||
# - URLs are limited to 256 characters
|
|
||||||
# - Items are case-sensitive (please use all lowercase)
|
|
||||||
#
|
|
||||||
|
|
||||||
/support.html /
|
|
||||||
/sponsors.html /
|
|
||||||
/about.html /intro/index.html
|
|
||||||
@ -1,200 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
PROJECT="vagrant"
|
|
||||||
PROJECT_URL="www.vagrantup.com"
|
|
||||||
FASTLY_SERVICE_ID="7GrxRJP3PVBuqQbyxYQ0MV"
|
|
||||||
FASTLY_DICTIONARY_ID="5Z2ArNwTMBmJXVh0R5h7wO"
|
|
||||||
|
|
||||||
# Ensure the proper AWS environment variables are set
|
|
||||||
if [ -z "$AWS_ACCESS_KEY_ID" ]; then
|
|
||||||
echo "Missing AWS_ACCESS_KEY_ID!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$AWS_SECRET_ACCESS_KEY" ]; then
|
|
||||||
echo "Missing AWS_SECRET_ACCESS_KEY!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure the proper Fastly keys are set
|
|
||||||
if [ -z "$FASTLY_API_KEY" ]; then
|
|
||||||
echo "Missing FASTLY_API_KEY!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure we have s3cmd installed
|
|
||||||
if ! command -v "s3cmd" >/dev/null 2>&1; then
|
|
||||||
echo "Missing s3cmd!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get the parent directory of where this script is and cd there
|
|
||||||
DIR="$(cd "$(dirname "$(readlink -f "$0")")/.." && pwd)"
|
|
||||||
|
|
||||||
# Delete any .DS_Store files for our OS X friends.
|
|
||||||
find "$DIR" -type f -name '.DS_Store' -delete
|
|
||||||
|
|
||||||
# Upload the files to S3 - we disable mime-type detection by the python library
|
|
||||||
# and just guess from the file extension because it's surprisingly more
|
|
||||||
# accurate, especially for CSS and javascript. We also tag the uploaded files
|
|
||||||
# with the proper Surrogate-Key, which we will later purge in our API call to
|
|
||||||
# Fastly.
|
|
||||||
if [ -z "$NO_UPLOAD" ]; then
|
|
||||||
echo "Uploading to S3..."
|
|
||||||
|
|
||||||
# Check that the site has been built
|
|
||||||
if [ ! -d "$DIR/build" ]; then
|
|
||||||
echo "Missing compiled website! Run 'make build' to compile!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set browser-side cache-control to ~4h, but tell Fastly to cache for much
|
|
||||||
# longer. We manually purge the Fastly cache, so setting it to a year is more
|
|
||||||
# than fine.
|
|
||||||
s3cmd \
|
|
||||||
--quiet \
|
|
||||||
--delete-removed \
|
|
||||||
--guess-mime-type \
|
|
||||||
--no-mime-magic \
|
|
||||||
--acl-public \
|
|
||||||
--recursive \
|
|
||||||
--add-header="Cache-Control: max-age=14400" \
|
|
||||||
--add-header="x-amz-meta-surrogate-control: max-age=31536000, stale-white-revalidate=86400, stale-if-error=604800" \
|
|
||||||
--add-header="x-amz-meta-surrogate-key: site-$PROJECT" \
|
|
||||||
sync "$DIR/build/" "s3://hc-sites/$PROJECT/latest/"
|
|
||||||
|
|
||||||
# The s3cmd guessed mime type for text files is often wrong. This is
|
|
||||||
# problematic for some assets, so force their mime types to be correct.
|
|
||||||
echo "Overriding javascript mime-types..."
|
|
||||||
s3cmd \
|
|
||||||
--mime-type="application/javascript" \
|
|
||||||
--add-header="Cache-Control: max-age=31536000" \
|
|
||||||
--exclude "*" \
|
|
||||||
--include "*.js" \
|
|
||||||
--recursive \
|
|
||||||
modify "s3://hc-sites/$PROJECT/latest/"
|
|
||||||
|
|
||||||
echo "Overriding css mime-types..."
|
|
||||||
s3cmd \
|
|
||||||
--mime-type="text/css" \
|
|
||||||
--add-header="Cache-Control: max-age=31536000" \
|
|
||||||
--exclude "*" \
|
|
||||||
--include "*.css" \
|
|
||||||
--recursive \
|
|
||||||
modify "s3://hc-sites/$PROJECT/latest/"
|
|
||||||
|
|
||||||
echo "Overriding svg mime-types..."
|
|
||||||
s3cmd \
|
|
||||||
--mime-type="image/svg+xml" \
|
|
||||||
--add-header="Cache-Control: max-age=31536000" \
|
|
||||||
--exclude "*" \
|
|
||||||
--include "*.svg" \
|
|
||||||
--recursive \
|
|
||||||
modify "s3://hc-sites/$PROJECT/latest/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add redirects if they exist
|
|
||||||
if [ -z "$NO_REDIRECTS" ] || [ ! test -f "./redirects.txt" ]; then
|
|
||||||
echo "Adding redirects..."
|
|
||||||
fields=()
|
|
||||||
while read -r line; do
|
|
||||||
[[ "$line" =~ ^#.* ]] && continue
|
|
||||||
[[ -z "$line" ]] && continue
|
|
||||||
|
|
||||||
# Read fields
|
|
||||||
IFS=" " read -ra parts <<<"$line"
|
|
||||||
fields+=("${parts[@]}")
|
|
||||||
done < "./redirects.txt"
|
|
||||||
|
|
||||||
# Check we have pairs
|
|
||||||
if [ $((${#fields[@]} % 2)) -ne 0 ]; then
|
|
||||||
echo "Bad redirects (not an even number)!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check we don't have more than 1000 entries (yes, it says 2000 below, but that
|
|
||||||
# is because we've split into multiple lines).
|
|
||||||
if [ "${#fields}" -gt 2000 ]; then
|
|
||||||
echo "More than 1000 entries!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Validations
|
|
||||||
for field in "${fields[@]}"; do
|
|
||||||
if [ "${#field}" -gt 256 ]; then
|
|
||||||
echo "'$field' is > 256 characters!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${field:0:1}" != "/" ]; then
|
|
||||||
echo "'$field' does not start with /!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Build the payload for single-request updates.
|
|
||||||
jq_args=()
|
|
||||||
jq_query="."
|
|
||||||
for (( i=0; i<${#fields[@]}; i+=2 )); do
|
|
||||||
original="${fields[i]}"
|
|
||||||
redirect="${fields[i+1]}"
|
|
||||||
echo "Redirecting ${original} -> ${redirect}"
|
|
||||||
jq_args+=(--arg "key$((i/2))" "${original}")
|
|
||||||
jq_args+=(--arg "value$((i/2))" "${redirect}")
|
|
||||||
jq_query+="| .items |= (. + [{op: \"upsert\", item_key: \$key$((i/2)), item_value: \$value$((i/2))}])"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Do not post empty items (the API gets sad)
|
|
||||||
if [ "${#jq_args[@]}" -ne 0 ]; then
|
|
||||||
json="$(jq "${jq_args[@]}" "${jq_query}" <<<'{"items": []}')"
|
|
||||||
|
|
||||||
# Post the JSON body
|
|
||||||
curl \
|
|
||||||
--fail \
|
|
||||||
--silent \
|
|
||||||
--output /dev/null \
|
|
||||||
--request "PATCH" \
|
|
||||||
--header "Fastly-Key: $FASTLY_API_KEY" \
|
|
||||||
--header "Content-type: application/json" \
|
|
||||||
--header "Accept: application/json" \
|
|
||||||
--data "$json"\
|
|
||||||
"https://api.fastly.com/service/$FASTLY_SERVICE_ID/dictionary/$FASTLY_DICTIONARY_ID/items"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Perform a purge of the surrogate key.
|
|
||||||
if [ -z "$NO_PURGE" ]; then
|
|
||||||
echo "Purging Fastly cache..."
|
|
||||||
curl \
|
|
||||||
--fail \
|
|
||||||
--silent \
|
|
||||||
--output /dev/null \
|
|
||||||
--request "POST" \
|
|
||||||
--header "Accept: application/json" \
|
|
||||||
--header "Fastly-Key: $FASTLY_API_KEY" \
|
|
||||||
--header "Fastly-Soft-Purge: 1" \
|
|
||||||
"https://api.fastly.com/service/$FASTLY_SERVICE_ID/purge/site-$PROJECT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Warm the cache with recursive wget.
|
|
||||||
if [ -z "$NO_WARM" ]; then
|
|
||||||
echo "Warming Fastly cache..."
|
|
||||||
echo ""
|
|
||||||
echo "If this step fails, there are likely missing or broken assets or links"
|
|
||||||
echo "on the website. Run the following command manually on your laptop, and"
|
|
||||||
echo "search for \"ERROR\" in the output:"
|
|
||||||
echo ""
|
|
||||||
echo "wget --recursive --delete-after https://$PROJECT_URL/"
|
|
||||||
echo ""
|
|
||||||
wget \
|
|
||||||
--delete-after \
|
|
||||||
--level inf \
|
|
||||||
--no-directories \
|
|
||||||
--no-host-directories \
|
|
||||||
--no-verbose \
|
|
||||||
--page-requisites \
|
|
||||||
--recursive \
|
|
||||||
--spider \
|
|
||||||
"https://$PROJECT_URL/"
|
|
||||||
fi
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
layout: "inner"
|
|
||||||
page_title: "Not Found"
|
|
||||||
noindex: true
|
|
||||||
description: |-
|
|
||||||
Page not found!
|
|
||||||
---
|
|
||||||
|
|
||||||
# Page Not Found
|
|
||||||
|
|
||||||
Sorry, the page you tried to visit does not exist. This could be our fault,
|
|
||||||
and if so we will fix that up right away.
|
|
||||||
|
|
||||||
Please go back to get back on track.
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Vagrant by HashiCorp",
|
|
||||||
"icons": [
|
|
||||||
{
|
|
||||||
"src": "<%= image_path('favicons/android-chrome-192x192.png') %>",
|
|
||||||
"sizes": "192x192",
|
|
||||||
"type": "image/png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"src": "<%= image_path('favicons/android-chrome-512x512.png') %>",
|
|
||||||
"sizes": "512x512",
|
|
||||||
"type": "image/png"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"theme_color": "#ffffff",
|
|
||||||
"background_color": "#ffffff",
|
|
||||||
"display": "standalone"
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
@ -1,116 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?>
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
|
||||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
||||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="16.000000pt" height="16.000000pt" viewBox="0 0 16.000000 16.000000"
|
|
||||||
preserveAspectRatio="xMidYMid meet">
|
|
||||||
<metadata>
|
|
||||||
Created by potrace 1.11, written by Peter Selinger 2001-2013
|
|
||||||
</metadata>
|
|
||||||
<g transform="translate(0.000000,16.000000) scale(0.001563,-0.001563)"
|
|
||||||
fill="#000000" stroke="none">
|
|
||||||
<path d="M1440 10231 c0 -5 -8 -11 -17 -14 -19 -6 -75 -38 -83 -48 -3 -3 -17
|
|
||||||
-12 -32 -20 -38 -19 -272 -161 -278 -168 -3 -3 -19 -13 -35 -22 -24 -13 -374
|
|
||||||
-223 -500 -300 -16 -11 -37 -22 -45 -26 -8 -3 -17 -9 -20 -13 -3 -3 -39 -26
|
|
||||||
-80 -50 -107 -65 -112 -67 -148 -87 -18 -9 -35 -26 -38 -38 -2 -11 -3 -238 -2
|
|
||||||
-505 l3 -485 23 -50 c13 -27 28 -59 32 -70 4 -11 18 -42 29 -68 12 -27 31 -74
|
|
||||||
43 -105 11 -32 25 -62 29 -68 5 -6 6 -14 2 -17 -3 -4 -1 -7 5 -7 7 0 11 -3 10
|
|
||||||
-7 0 -5 2 -17 7 -28 4 -11 61 -148 127 -305 65 -156 118 -290 118 -297 0 -7 5
|
|
||||||
-13 10 -13 6 0 9 -3 8 -7 -1 -5 4 -21 11 -38 6 -16 22 -55 34 -85 12 -30 25
|
|
||||||
-56 30 -58 4 -2 7 -12 7 -21 0 -10 8 -33 17 -52 10 -19 18 -38 19 -44 3 -10
|
|
||||||
135 -329 154 -370 18 -39 59 -136 61 -143 2 -11 19 -53 35 -89 25 -59 41 -97
|
|
||||||
69 -167 15 -38 31 -77 35 -85 5 -9 36 -88 70 -176 34 -88 69 -175 76 -192 8
|
|
||||||
-18 51 -124 95 -235 45 -112 86 -214 92 -228 5 -14 11 -29 13 -35 2 -9 30 -78
|
|
||||||
67 -165 6 -14 11 -28 12 -32 2 -5 4 -11 5 -15 1 -5 2 -11 1 -15 0 -5 4 -8 9
|
|
||||||
-8 6 0 10 -7 10 -16 0 -9 6 -28 14 -42 8 -15 31 -70 52 -122 20 -52 41 -99 46
|
|
||||||
-105 4 -5 8 -15 8 -22 0 -7 9 -32 20 -56 22 -49 200 -477 204 -492 2 -5 13
|
|
||||||
-32 24 -58 12 -27 22 -51 22 -53 0 -3 9 -24 19 -47 10 -23 35 -82 55 -132 20
|
|
||||||
-49 41 -99 45 -110 80 -186 99 -234 94 -239 -4 -3 -1 -6 5 -6 7 0 12 -8 12
|
|
||||||
-18 0 -10 4 -22 8 -28 5 -5 21 -40 36 -79 16 -38 45 -110 66 -160 21 -49 60
|
|
||||||
-142 85 -205 26 -63 52 -126 58 -140 6 -14 11 -27 12 -30 0 -3 6 -15 13 -27 7
|
|
||||||
-13 10 -23 6 -23 -3 0 -2 -6 4 -12 5 -7 22 -44 37 -83 15 -38 35 -88 46 -110
|
|
||||||
10 -22 55 -130 100 -240 45 -110 87 -213 94 -230 8 -16 28 -66 45 -110 17 -44
|
|
||||||
40 -97 51 -118 10 -22 19 -47 19 -56 0 -9 4 -21 9 -27 5 -5 26 -49 46 -97 20
|
|
||||||
-48 41 -100 47 -115 6 -15 12 -29 13 -32 1 -3 9 -22 18 -44 9 -21 17 -40 17
|
|
||||||
-43 0 -2 12 -30 26 -61 15 -31 27 -61 29 -67 1 -5 10 -28 19 -50 9 -22 21 -49
|
|
||||||
25 -60 5 -11 14 -33 22 -50 7 -16 13 -32 14 -35 1 -3 6 -16 12 -30 6 -14 24
|
|
||||||
-58 41 -98 23 -57 37 -78 63 -94 87 -53 115 -69 132 -75 9 -3 17 -9 17 -14 0
|
|
||||||
-5 5 -9 10 -9 6 0 65 -31 131 -70 66 -38 124 -70 129 -70 6 0 10 -4 10 -8 0
|
|
||||||
-4 15 -15 33 -23 17 -9 73 -39 122 -68 99 -58 152 -89 235 -134 30 -17 57 -34
|
|
||||||
58 -39 2 -4 8 -8 12 -8 5 0 35 -15 67 -34 125 -73 169 -97 186 -103 9 -3 17
|
|
||||||
-9 17 -14 0 -5 4 -9 9 -9 5 0 88 -46 185 -103 97 -56 193 -110 214 -121 20
|
|
||||||
-10 39 -21 42 -25 3 -3 23 -15 45 -26 22 -11 42 -22 45 -25 8 -8 42 -28 80
|
|
||||||
-47 19 -9 52 -28 72 -41 l37 -24 38 23 c50 32 63 39 125 73 29 15 60 34 68 40
|
|
||||||
8 6 35 22 60 35 25 13 52 30 60 37 8 7 22 14 30 16 8 2 17 6 20 9 6 8 222 134
|
|
||||||
288 169 26 13 49 27 52 30 3 4 25 17 50 31 25 13 47 27 48 32 2 4 8 7 13 7 7
|
|
||||||
0 96 51 204 117 11 7 31 17 45 23 14 6 33 19 42 27 10 9 18 12 18 7 0 -5 4 -4
|
|
||||||
8 2 9 13 129 84 143 84 5 0 9 5 9 10 0 6 4 10 10 10 5 0 47 22 92 49 46 27
|
|
||||||
124 73 175 102 50 30 106 63 125 74 18 10 60 34 92 53 89 49 113 69 120 97 4
|
|
||||||
14 6 28 5 31 0 4 3 10 8 13 6 3 27 51 49 106 21 55 42 103 47 106 5 3 8 9 8
|
|
||||||
13 -1 3 -1 7 0 9 0 1 2 11 4 21 2 10 7 22 12 25 4 3 9 13 11 21 1 8 7 24 12
|
|
||||||
35 5 11 19 45 31 75 12 30 27 69 34 85 7 17 23 55 35 85 12 30 26 64 31 75 4
|
|
||||||
11 20 49 34 85 15 36 36 85 47 110 11 25 21 50 23 55 3 15 15 45 36 92 10 24
|
|
||||||
19 45 19 48 0 4 8 25 19 48 17 39 32 75 36 87 1 3 6 14 10 25 58 136 117 282
|
|
||||||
119 290 1 6 6 17 11 25 5 8 10 20 11 25 1 6 25 66 54 135 29 69 53 130 55 135
|
|
||||||
1 6 7 21 13 35 5 14 33 81 61 150 28 69 58 137 67 152 8 15 15 30 15 33 -1 9
|
|
||||||
36 101 74 190 13 30 25 63 24 68 0 1 14 32 30 69 17 37 31 74 31 83 0 8 5 15
|
|
||||||
10 15 6 0 10 7 10 16 0 8 11 39 23 67 13 29 41 95 62 147 34 88 44 110 74 180
|
|
||||||
5 14 27 66 46 115 20 50 44 106 52 125 9 19 16 41 16 48 0 6 4 12 9 12 4 0 8
|
|
||||||
11 8 24 0 13 3 26 8 28 4 2 40 86 81 188 41 102 84 205 95 230 11 25 21 50 22
|
|
||||||
55 1 6 10 30 21 55 34 76 58 134 59 142 1 4 3 10 4 13 1 3 3 10 4 15 0 6 6 14
|
|
||||||
11 18 6 4 11 14 13 22 3 17 37 106 63 165 9 22 29 69 43 105 15 36 31 74 36
|
|
||||||
85 5 11 18 43 29 70 10 28 35 88 54 135 37 88 96 233 170 418 24 59 48 116 52
|
|
||||||
127 5 11 9 22 10 25 1 3 11 27 23 53 12 27 25 60 28 73 3 13 10 27 15 30 5 3
|
|
||||||
7 10 4 15 -4 5 -1 9 5 9 6 0 9 4 5 9 -3 5 -1 12 5 16 6 4 8 11 5 16 -4 5 -1 9
|
|
||||||
5 9 6 0 9 4 6 9 -3 4 1 17 9 27 8 10 15 25 15 32 0 7 9 31 19 55 21 45 87 205
|
|
||||||
201 487 39 96 74 184 79 195 19 44 40 95 91 220 28 72 56 139 60 150 59 138
|
|
||||||
73 170 75 179 2 11 26 69 45 111 24 53 38 95 32 95 -4 0 -2 4 3 8 6 4 35 68
|
|
||||||
65 142 l54 135 1 466 0 465 -22 22 c-13 13 -23 20 -23 17 0 -5 -52 21 -90 45
|
|
||||||
-19 11 -148 84 -297 166 -27 15 -52 30 -57 35 -6 5 -18 9 -27 9 -10 0 -19 4
|
|
||||||
-21 9 -1 4 -30 23 -63 41 -82 45 -133 73 -180 100 -22 13 -74 41 -115 63 -41
|
|
||||||
22 -86 47 -100 56 -14 9 -38 23 -55 31 -16 8 -32 18 -35 21 -3 3 -30 18 -60
|
|
||||||
33 -68 35 -113 59 -120 66 -18 18 -153 81 -159 74 -6 -9 -19 -17 -101 -63 -25
|
|
||||||
-14 -51 -31 -58 -38 -13 -12 -27 -17 -44 -14 -5 0 -8 -4 -8 -10 0 -5 -13 -15
|
|
||||||
-30 -20 -16 -6 -30 -14 -30 -18 0 -5 -18 -16 -40 -26 -22 -10 -40 -21 -40 -25
|
|
||||||
0 -5 -11 -11 -25 -14 -14 -4 -25 -11 -25 -16 0 -6 -4 -10 -10 -10 -5 0 -61
|
|
||||||
-31 -125 -70 -64 -38 -120 -70 -125 -70 -6 0 -10 -4 -10 -8 0 -5 -18 -17 -40
|
|
||||||
-27 -22 -10 -40 -22 -40 -27 0 -4 -4 -8 -9 -8 -8 0 -41 -19 -169 -95 -9 -5
|
|
||||||
-107 -64 -217 -129 -110 -66 -216 -129 -235 -141 -93 -60 -292 -175 -300 -175
|
|
||||||
-6 0 -10 -3 -10 -8 0 -4 -21 -18 -47 -32 -27 -14 -52 -28 -58 -33 -23 -18
|
|
||||||
-158 -97 -166 -97 -5 0 -9 -4 -9 -8 0 -4 -12 -13 -27 -19 -30 -12 -85 -44 -93
|
|
||||||
-54 -3 -3 -23 -16 -45 -28 l-40 -22 0 -457 c1 -413 -1 -460 -16 -489 -10 -17
|
|
||||||
-15 -34 -12 -37 4 -3 1 -6 -5 -6 -7 0 -12 -4 -12 -10 0 -5 -15 -40 -32 -77
|
|
||||||
-18 -38 -33 -70 -33 -73 -1 -3 -16 -36 -34 -75 -18 -38 -57 -122 -86 -185 -29
|
|
||||||
-63 -67 -146 -86 -185 -18 -38 -33 -72 -34 -75 -1 -3 -16 -35 -33 -72 -97
|
|
||||||
-205 -172 -382 -172 -404 0 -8 -4 -14 -10 -14 -5 0 -10 -9 -10 -19 0 -11 -5
|
|
||||||
-23 -10 -26 -6 -4 -8 -10 -5 -15 3 -5 1 -11 -5 -15 -5 -3 -10 -15 -10 -26 0
|
|
||||||
-10 -4 -19 -8 -19 -5 0 -9 -6 -9 -12 0 -7 -7 -29 -16 -48 -8 -19 -48 -114 -87
|
|
||||||
-210 -40 -96 -77 -186 -83 -200 -6 -14 -11 -29 -12 -35 -1 -5 -10 -28 -20 -50
|
|
||||||
-10 -22 -19 -42 -20 -45 -1 -3 -7 -18 -13 -33 -7 -16 -12 -30 -12 -31 0 -2 -8
|
|
||||||
-21 -17 -42 -9 -22 -17 -41 -18 -44 -2 -7 -24 -59 -40 -95 -7 -16 -31 -75 -53
|
|
||||||
-130 -23 -55 -66 -160 -96 -234 -31 -74 -56 -140 -56 -147 0 -8 -4 -14 -8 -14
|
|
||||||
-5 0 -9 -6 -9 -12 -1 -13 -67 -180 -83 -210 -5 -9 -23 -53 -40 -97 -35 -89
|
|
||||||
-45 -102 -55 -69 -4 13 -15 41 -25 63 -9 22 -37 85 -60 140 -23 55 -51 119
|
|
||||||
-61 142 -32 71 -42 98 -41 106 1 4 -3 7 -8 7 -6 0 -10 6 -10 14 0 7 -21 60
|
|
||||||
-46 117 -58 133 -67 153 -69 159 0 3 -7 16 -15 30 -7 14 -13 26 -12 27 1 3
|
|
||||||
-27 71 -59 140 -10 24 -19 45 -19 47 0 2 -10 25 -22 52 -12 27 -23 51 -23 54
|
|
||||||
-3 8 -35 82 -61 138 -13 29 -24 55 -24 57 0 2 -11 28 -24 57 -13 29 -37 85
|
|
||||||
-54 123 -16 39 -38 88 -48 110 -9 22 -18 42 -19 45 -4 12 -26 64 -44 103 -10
|
|
||||||
23 -38 87 -61 142 -23 55 -50 118 -60 140 -9 22 -39 90 -65 150 -26 61 -50
|
|
||||||
117 -54 125 -4 8 -36 83 -71 165 -35 83 -68 153 -74 157 -6 4 -8 8 -4 8 7 0
|
|
||||||
-5 31 -49 130 -88 194 -164 384 -159 396 3 7 1 14 -5 14 -6 0 -6 7 1 19 7 13
|
|
||||||
7 22 0 26 -7 4 -7 13 0 24 6 12 5 22 -1 28 -8 8 -7 17 0 32 8 15 9 21 1 21 -6
|
|
||||||
0 -8 5 -5 11 10 15 12 79 3 79 -3 0 -3 14 2 30 5 17 6 30 2 30 -9 0 -8 53 2
|
|
||||||
68 3 6 2 13 -4 17 -6 4 -8 11 -4 16 9 16 10 79 1 79 -4 0 -3 9 3 19 7 13 7 22
|
|
||||||
0 26 -7 4 -7 13 0 24 6 12 5 22 -1 28 -8 8 -7 17 0 32 8 15 9 21 1 21 -6 0 -8
|
|
||||||
5 -5 11 9 13 12 79 5 79 -7 0 -4 59 3 67 4 3 2 12 -4 19 -7 8 -7 14 1 19 23
|
|
||||||
14 -15 45 -162 130 -84 49 -155 88 -157 86 -2 -1 -7 1 -10 6 -9 12 -42 32 -73
|
|
||||||
44 -16 6 -28 15 -28 19 0 5 -9 11 -19 15 -11 3 -84 44 -164 90 -80 47 -150 85
|
|
||||||
-156 85 -6 0 -11 3 -11 8 0 4 -17 16 -37 27 -42 22 -335 189 -370 211 -13 8
|
|
||||||
-26 15 -30 15 -5 1 -19 10 -32 20 -13 11 -30 19 -37 19 -8 0 -14 4 -14 9 0 5
|
|
||||||
-16 15 -35 22 -19 7 -35 16 -35 20 0 4 -8 9 -17 13 -10 3 -27 11 -38 18 -50
|
|
||||||
33 -126 78 -130 78 -3 0 -76 41 -162 92 -87 50 -176 101 -197 112 -22 12 -45
|
|
||||||
25 -50 29 -26 20 -176 105 -176 100 0 -4 -8 1 -17 9 -20 17 -146 88 -156 88
|
|
||||||
-4 0 -7 -4 -7 -9z"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 8.0 KiB |
@ -1,5 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 222.53 60.01">
|
|
||||||
<path class="text" fill="#000000" d="M82.58 7.86V4.63h-3v3.23h-1.46V.11h1.51v3.25h3V.11h1.51v7.75zm7 0h-1.2l-.11-.38a3.28 3.28 0 0 1-1.7.52c-1.06 0-1.52-.7-1.52-1.66 0-1.14.51-1.57 1.7-1.57h1.4v-.62c0-.62-.18-.84-1.11-.84a8.46 8.46 0 0 0-1.61.17l-.18-1.07a7.89 7.89 0 0 1 2-.26c1.83 0 2.37.62 2.37 2zm-1.43-2.11h-1.08c-.48 0-.61.13-.61.55s.13.56.59.56a2.37 2.37 0 0 0 1.1-.29zM92.66 8a7.12 7.12 0 0 1-2-.32l.2-1.07a6.77 6.77 0 0 0 1.73.24c.65 0 .74-.14.74-.56s-.07-.52-1-.73c-1.42-.33-1.59-.68-1.59-1.76s.51-1.62 2.18-1.62a8 8 0 0 1 1.75.2l-.17 1.08a10.66 10.66 0 0 0-1.6-.16c-.63 0-.74.14-.74.48s0 .48.82.68c1.63.41 1.78.62 1.78 1.77S94.42 8 92.66 8zm6.68-.11V4c0-.3-.13-.45-.47-.45a4.14 4.14 0 0 0-1.52.45v3.86H95.9V0l1.46.22v2.47a5.31 5.31 0 0 1 2.13-.54c1 0 1.32.65 1.32 1.65v4.06zM102 1.48V.11h1.46v1.37zm0 6.38V2.27h1.46v5.59zm2.62-5.54c0-1.4.85-2.22 2.83-2.22a9.37 9.37 0 0 1 2.16.25l-.17 1.25a12.21 12.21 0 0 0-1.95-.2c-1 0-1.37.34-1.37 1.16V5.5c0 .81.33 1.16 1.37 1.16a12.21 12.21 0 0 0 1.95-.2l.17 1.25a9.37 9.37 0 0 1-2.16.25c-2 0-2.83-.81-2.83-2.22zM112.86 8c-2 0-2.53-1.06-2.53-2.2V4.36c0-1.15.54-2.2 2.53-2.2s2.53 1.06 2.53 2.2v1.41c.01 1.15-.53 2.23-2.53 2.23zm0-4.63c-.78 0-1.08.33-1.08 1v1.5c0 .63.3 1 1.08 1s1.08-.33 1.08-1V4.31c0-.63-.3-.96-1.08-.96zm6.64.09a11.57 11.57 0 0 0-1.54.81v3.6h-1.46v-5.6h1.23l.1.62a6.63 6.63 0 0 1 1.53-.73zM125.34 6a1.73 1.73 0 0 1-1.92 2 8.36 8.36 0 0 1-1.55-.16v2.26l-1.46.22v-8h1.16l.14.47a3.15 3.15 0 0 1 1.84-.59c1.17 0 1.79.67 1.79 1.94zm-3.48.63a6.72 6.72 0 0 0 1.29.15c.53 0 .73-.24.73-.75v-2c0-.46-.18-.71-.72-.71a2.11 2.11 0 0 0-1.3.51zM99.88 14.1h6.29l-9.56 32h-8.93l-9.56-32h6.29l7.73 26.66zm23.78 32h-4.8l-.43-1.59a12.8 12.8 0 0 1-7 2.07c-4.28 0-6.1-2.93-6.1-7 0-4.76 2.07-6.58 6.82-6.58h5.62v-2.42c0-2.59-.72-3.51-4.47-3.51a32.69 32.69 0 0 0-6.49.72l-.72-4.47a30.53 30.53 0 0 1 8-1.11c7.35 0 9.51 2.59 9.51 8.46zm-5.86-8.84h-4.32c-1.92 0-2.45.53-2.45 2.31s.53 2.35 2.35 2.35a9.23 9.23 0 0 0 4.42-1.2zm17.05 2.54a2.52 2.52 0 0 0-1.39 1.87c0 .62.38.91 1.3 1 2.59.29 4 .43 6.77.72 3.8.43 5 2.31 5 5.67 0 5-1.83 7-10.57 7a34.06 34.06 0 0 1-9-1.2l.72-4.37a32.49 32.49 0 0 0 7.88 1c4.66 0 5.57-.34 5.57-1.87s-.43-1.68-2.21-1.87c-2.69-.29-3.8-.43-6.77-.77-3.31-.38-4.61-1.49-4.61-4.47a5 5 0 0 1 2.45-4c-2.16-1.3-3.17-3.46-3.17-6.29V30c.1-4.85 2.64-7.78 9.42-7.78a15.9 15.9 0 0 1 4 .48h7.21v2.93c-.82.24-1.78.48-2.59.72a8 8 0 0 1 .82 3.65v2.21c0 4.76-2.88 7.64-9.42 7.64a12.18 12.18 0 0 1-1.41-.05zm1.34-12.88c-2.88 0-3.89 1.06-3.89 3.27V32c0 2.31 1.15 3.17 3.89 3.17s3.94-.91 3.94-3.17v-1.81c.01-2.19-1-3.26-3.93-3.26zm25.9.68a45.87 45.87 0 0 0-6.19 3.4v15.1H150V22.7h5l.38 2.59a26.22 26.22 0 0 1 6.15-3.07zm19.6 18.5h-4.8l-.43-1.59a12.8 12.8 0 0 1-7 2.07c-4.28 0-6.1-2.93-6.1-7 0-4.76 2.07-6.58 6.82-6.58h5.62v-2.42c0-2.59-.72-3.51-4.47-3.51a32.69 32.69 0 0 0-6.49.72l-.72-4.47a30.53 30.53 0 0 1 8-1.11c7.35 0 9.51 2.59 9.51 8.46zm-5.86-8.84h-4.32c-1.92 0-2.45.53-2.45 2.31s.53 2.35 2.35 2.35a9.23 9.23 0 0 0 4.42-1.2zm23.3 8.84V29.76c0-1.25-.53-1.87-1.87-1.87a16.16 16.16 0 0 0-6.1 2V46.1h-5.86V22.7h4.47l.58 2a23.43 23.43 0 0 1 9.37-2.45c3.89 0 5.28 2.74 5.28 6.92v17zm23.11-.44a16.25 16.25 0 0 1-5.14.91c-4.28 0-6.44-2-6.44-6.2v-13h-3.51V22.7h3.51v-5.81l5.86-.82v6.63h6l-.38 4.66h-5.62v12.25a1.85 1.85 0 0 0 2.11 2.07 11.27 11.27 0 0 0 2.93-.48z"/>
|
|
||||||
<path class="front" fill="#1563FF" d="M58.03 10.12V4.63L44.84 12.3v4.64L34.29 39.7l-5.28 3.64v16.67l11.31-6.52 17.71-43.37zM29.01 31.47L21.1 13V7.78l-.05-.02-7.86 4.54v4.64L23.74 40.7l5.27-2.61v-6.62z"/>
|
|
||||||
<path class="shadow" fill="#104EB2" d="M50.12.01L36.94 7.73h-.01V13l-7.92 18.47v6.17l-5.27 3.06-10.55-23.76v-4.65l7.92-4.55L7.91.01 0 4.63v5.66l17.81 43.25 11.2 6.47V43.76l5.28-3.06-.07-.04 10.62-23.72v-4.65l13.19-7.66L50.12.01z"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.7 KiB |
@ -1,5 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 223 60">
|
|
||||||
<path class="text" fill="#000000" d="M99.88 14.1h6.29l-9.56 32h-8.93l-9.56-32h6.29l7.73 26.66 7.74-26.66zm23.78 32h-4.8l-.43-1.59c-2.083 1.355-4.515 2.074-7 2.07-4.28 0-6.1-2.93-6.1-7 0-4.76 2.07-6.58 6.82-6.58h5.62v-2.42c0-2.59-.72-3.51-4.47-3.51-2.182.023-4.356.264-6.49.72l-.72-4.47c2.606-.723 5.296-1.096 8-1.11 7.35 0 9.51 2.59 9.51 8.46l.06 15.43zm-5.86-8.84h-4.32c-1.92 0-2.45.53-2.45 2.31s.53 2.35 2.35 2.35c1.55-.022 3.07-.435 4.42-1.2v-3.46zm17.05 2.54c-.74.36-1.26 1.057-1.39 1.87 0 .62.38.91 1.3 1 2.59.29 4 .43 6.77.72 3.8.43 5 2.31 5 5.67 0 5-1.83 7-10.57 7-3.04.003-6.067-.4-9-1.2l.72-4.37c2.576.654 5.222.99 7.88 1 4.66 0 5.57-.34 5.57-1.87s-.43-1.68-2.21-1.87c-2.69-.29-3.8-.43-6.77-.77-3.31-.38-4.61-1.49-4.61-4.47.102-1.657 1.02-3.156 2.45-4-2.16-1.3-3.17-3.46-3.17-6.29V30c.1-4.85 2.64-7.78 9.42-7.78 1.348-.01 2.692.15 4 .48h7.21v2.93c-.82.24-1.78.48-2.59.72.558 1.135.84 2.386.82 3.65v2.21c0 4.76-2.88 7.64-9.42 7.64-.47.01-.94-.006-1.41-.05zm1.34-12.88c-2.88 0-3.89 1.06-3.89 3.27V32c0 2.31 1.15 3.17 3.89 3.17s3.94-.91 3.94-3.17v-1.81c.01-2.19-1-3.26-3.93-3.26l-.01-.01zm25.9.68c-2.148.973-4.217 2.11-6.19 3.4v15.1H150V22.7h5l.38 2.59c1.906-1.29 3.974-2.32 6.15-3.07l.56 5.38zm19.6 18.5h-4.8l-.43-1.59c-2.083 1.355-4.515 2.074-7 2.07-4.28 0-6.1-2.93-6.1-7 0-4.76 2.07-6.58 6.82-6.58h5.62v-2.42c0-2.59-.72-3.51-4.47-3.51-2.182.023-4.356.264-6.49.72l-.72-4.47c2.606-.723 5.296-1.096 8-1.11 7.35 0 9.51 2.59 9.51 8.46l.06 15.43zm-5.86-8.84h-4.32c-1.92 0-2.45.53-2.45 2.31s.53 2.35 2.35 2.35c1.55-.022 3.07-.435 4.42-1.2v-3.46zm23.3 8.84V29.76c0-1.25-.53-1.87-1.87-1.87-2.147.252-4.22.932-6.1 2V46.1h-5.86V22.7h4.47l.58 2c2.92-1.46 6.11-2.295 9.37-2.45 3.89 0 5.28 2.74 5.28 6.92v17l-5.87-.07zm23.11-.44c-1.653.578-3.39.886-5.14.91-4.28 0-6.44-2-6.44-6.2v-13h-3.51V22.7h3.51v-5.81l5.86-.82v6.63h6l-.38 4.66h-5.62v12.25c-.076.576.124 1.154.54 1.56.414.408.995.597 1.57.51.994-.03 1.98-.19 2.93-.48l.68 4.46z"/>
|
|
||||||
<path class="front" fill="#1563FF" d="M58.03 10.12V4.63L44.84 12.3v4.64L34.29 39.7l-5.28 3.64v16.67l11.31-6.52 17.71-43.37zM29.01 31.47L21.1 13V7.78l-.05-.02-7.86 4.54v4.64L23.74 40.7l5.27-2.61v-6.62z"/>
|
|
||||||
<path class="shadow" fill="#104EB2" d="M50.12.01L36.94 7.73h-.01V13l-7.92 18.47v6.17l-5.27 3.06-10.55-23.76v-4.65l7.92-4.55L7.91.01 0 4.63v5.66l17.81 43.25 11.2 6.47V43.76l5.28-3.06-.07-.04 10.62-23.72v-4.65l13.19-7.66"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@ -1,46 +0,0 @@
|
|||||||
<svg viewBox="0 0 811 452" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
||||||
<defs>
|
|
||||||
<rect id="path-1" x="16.8776371" y="0" width="316.455696" height="210.970464"></rect>
|
|
||||||
<mask id="mask-2" maskContentUnits="userSpaceOnUse" maskUnits="objectBoundingBox" x="0" y="0" width="316.455696" height="210.970464" fill="white">
|
|
||||||
<use xlink:href="#path-1"></use>
|
|
||||||
</mask>
|
|
||||||
<rect id="path-3" x="0" y="0" width="123" height="192"></rect>
|
|
||||||
<mask id="mask-4" maskContentUnits="userSpaceOnUse" maskUnits="objectBoundingBox" x="0" y="0" width="123" height="192" fill="white">
|
|
||||||
<use xlink:href="#path-3"></use>
|
|
||||||
</mask>
|
|
||||||
<rect id="path-5" x="0" y="0" width="123" height="192"></rect>
|
|
||||||
<mask id="mask-6" maskContentUnits="userSpaceOnUse" maskUnits="objectBoundingBox" x="0" y="0" width="123" height="192" fill="white">
|
|
||||||
<use xlink:href="#path-5"></use>
|
|
||||||
</mask>
|
|
||||||
</defs>
|
|
||||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
||||||
<g id="laptop" transform="translate(0.000000, 202.000000)">
|
|
||||||
<polygon id="Polygon" fill="#555555" points="350.670408 226.793249 254.219409 249.771311 95.9915612 249.771311 0 226.793249"></polygon>
|
|
||||||
<use id="Rectangle" stroke="#555555" mask="url(#mask-2)" stroke-width="30" xlink:href="#path-1"></use>
|
|
||||||
</g>
|
|
||||||
<g id="lines" transform="translate(340.000000, 96.000000)" stroke="#555555" stroke-width="15" stroke-linecap="square">
|
|
||||||
<path d="M185.5,1.5 L79.5,1.5" id="Line"></path>
|
|
||||||
<path d="M79.5,209.5 L0.5,209.5" id="Line"></path>
|
|
||||||
<path d="M79.5,209.5 L79.5,2.98255955" id="Line" transform="translate(79.500000, 106.000000) scale(-1, 1) translate(-79.500000, -106.000000) "></path>
|
|
||||||
<path d="M343.5,1.5 L318.5,1.5" id="Line"></path>
|
|
||||||
</g>
|
|
||||||
<g id="server" transform="translate(528.000000, 0.000000)">
|
|
||||||
<g>
|
|
||||||
<use id="Rectangle-2" stroke="#555555" mask="url(#mask-4)" stroke-width="10" xlink:href="#path-3"></use>
|
|
||||||
<path d="M24.5,25.5 L98.5,25.5" id="Line" stroke="#555555" stroke-width="15" stroke-linecap="square"></path>
|
|
||||||
<path d="M24.5,49.5 L98.5,49.5" id="Line" stroke="#555555" stroke-width="15" stroke-linecap="square"></path>
|
|
||||||
<path d="M47.5,74.5 L98.5,74.5" id="Line" stroke="#555555" stroke-width="15" stroke-linecap="square"></path>
|
|
||||||
<circle id="Oval" fill="#555555" cx="24.5" cy="74.5" r="7.5"></circle>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g id="server" transform="translate(688.000000, 0.000000)">
|
|
||||||
<g>
|
|
||||||
<use id="Rectangle-2" stroke="#555555" mask="url(#mask-6)" stroke-width="10" xlink:href="#path-5"></use>
|
|
||||||
<path d="M24.5,25.5 L98.5,25.5" id="Line" stroke="#555555" stroke-width="15" stroke-linecap="square"></path>
|
|
||||||
<path d="M24.5,49.5 L98.5,49.5" id="Line" stroke="#555555" stroke-width="15" stroke-linecap="square"></path>
|
|
||||||
<path d="M47.5,74.5 L98.5,74.5" id="Line" stroke="#555555" stroke-width="15" stroke-linecap="square"></path>
|
|
||||||
<circle id="Oval" fill="#555555" cx="24.5" cy="74.5" r="7.5"></circle>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.0 KiB |
@ -1,3 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 150">
|
|
||||||
<path d="M124.47 116.895c-2.268 5.24-4.954 10.064-8.065 14.5-4.24 6.045-7.712 10.23-10.388 12.554-4.148 3.814-8.593 5.768-13.352 5.88-3.416 0-7.536-.973-12.333-2.946-4.81-1.963-9.234-2.935-13.277-2.935-4.24 0-8.79.97-13.653 2.934-4.872 1.973-8.797 3-11.798 3.102-4.564.195-9.113-1.815-13.653-6.037-2.897-2.528-6.522-6.862-10.865-13-4.66-6.556-8.49-14.157-11.49-22.824C2.38 98.766.77 89.7.77 80.926c0-10.053 2.172-18.723 6.523-25.99 3.42-5.835 7.968-10.438 13.662-13.818 5.693-3.38 11.845-5.102 18.47-5.212 3.624 0 8.378 1.122 14.285 3.325 5.89 2.212 9.673 3.333 11.33 3.333 1.24 0 5.443-1.31 12.566-3.924 6.736-2.425 12.42-3.43 17.078-3.034 12.62 1.02 22.1 5.994 28.406 14.956-11.286 6.84-16.87 16.417-16.758 28.705.1 9.57 3.574 17.536 10.397 23.86 3.092 2.935 6.546 5.203 10.388 6.814-.833 2.418-1.713 4.732-2.648 6.955zM95.526 3c0 7.502-2.74 14.506-8.203 20.99-6.592 7.706-14.566 12.16-23.213 11.457-.11-.9-.174-1.847-.174-2.843 0-7.2 3.135-14.908 8.702-21.21 2.78-3.19 6.315-5.844 10.602-7.96C87.517 1.35 91.564.196 95.37 0c.11 1.002.156 2.005.156 3z"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
@ -1,3 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150">
|
|
||||||
<path d="M0 21.387l61.34-8.39v59.075H0m68.73-60.24L150 0v71.575H68.73M0 78.322h61.34v59.246L0 129.008M68.73 79.11H150V150l-81.27-11.473"/>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 211 B |
@ -1,33 +0,0 @@
|
|||||||
<svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190.25 31">
|
|
||||||
<g transform="matrix(1.25, 0, 0, -1.25, -375.855, 370.03)">
|
|
||||||
<defs>
|
|
||||||
<rect x="-193.841" y="-199.548" width="956.25" height="1237.498"/>
|
|
||||||
</defs>
|
|
||||||
<clipPath>
|
|
||||||
<use xlink:href="#SVGID_1_" overflow="visible"/>
|
|
||||||
</clipPath>
|
|
||||||
<g clip-path="url(#SVGID_2_)">
|
|
||||||
<g transform="translate(388.349, 250.856)">
|
|
||||||
<path fill="#696566" d="M-21.716,23.2l-6.571,18.298c-0.084,0.253-0.209,0.587-0.209,0.88 c0,0.793,0.67,1.546,1.63,1.546c0.838,0,1.384-0.544,1.634-1.337l5.445-15.767l5.484,15.811 c0.25,0.75,0.753,1.294,1.586,1.294h0.17c0.881,0,1.425-0.544,1.675-1.294l5.439-15.811l5.531,15.85 c0.209,0.673,0.666,1.255,1.548,1.255c0.92,0,1.591-0.708,1.591-1.505c0-0.292-0.127-0.625-0.209-0.88L-3.585,23.2 c-0.338-0.958-1.005-1.461-1.76-1.461H-5.47c-0.838,0-1.467,0.503-1.762,1.461l-5.397,15.549L-18.073,23.2 c-0.293-0.958-0.923-1.461-1.758-1.461h-0.088C-20.712,21.739-21.379,22.242-21.716,23.2"/>
|
|
||||||
</g>
|
|
||||||
<g transform="translate(436.249, 269.985)">
|
|
||||||
<path fill="#696566" d="M-21.717,23.2c0,0.883,0.712,1.637,1.591,1.637c0.927,0,1.637-0.713,1.637-1.637v-3.713 c1.592,3.606,5.123,5.308,7.463,5.308c0.969,0,1.598-0.712,1.598-1.634c0-0.882-0.584-1.508-1.43-1.634 c-4.195-0.503-7.63-3.65-7.63-9.9V4.274c0-0.881-0.67-1.634-1.592-1.634c-0.923,0-1.636,0.716-1.636,1.634L-21.717,23.2 L-21.717,23.2z"/>
|
|
||||||
</g>
|
|
||||||
<g transform="translate(458.898, 249.221)">
|
|
||||||
<path fill="#696566" d="M-21.716,23.2c-5.837,0-10.603,4.527-10.603,11.166v0.086 c0,6.183,4.316,11.164,10.192,11.164c6.283,0,9.861-5.184,9.861-10.873c0-0.874-0.705-1.499-1.481-1.499h-15.362 c0.448-4.645,3.692-7.259,7.477-7.259c2.631,0,4.556,1.038,6.12,2.491c0.247,0.205,0.534,0.371,0.906,0.371 c0.778,0,1.397-0.623,1.397-1.373c0-0.372-0.164-0.747-0.497-1.034C-15.717,24.491-18.103,23.2-21.716,23.2 M-15.43,35.611 c-0.33,3.905-2.55,7.305-6.783,7.305c-3.698,0-6.492-3.111-6.898-7.305H-15.43z"/>
|
|
||||||
</g>
|
|
||||||
<g transform="translate(413.36, 255.941)">
|
|
||||||
<path fill="#696566" d="M-21.717,23.2v0.084c0,4.556,3.764,6.984,9.239,6.984c2.761,0,4.725-0.376,6.652-0.923 v0.756c0,3.885-2.39,5.895-6.441,5.895c-2.175,0-3.441-0.277-5.033-0.986c-0.206-0.084-0.417-0.127-0.58-0.127 c-0.753,0-1.425,0.629-1.425,1.38c0,0.667,0.291,1.08,0.88,1.341c2.129,0.924,3.734,1.231,6.492,1.231 c3.05,0,5.392-0.792,6.978-2.382c1.466-1.463,2.219-3.553,2.219-6.314V18.211c0-0.917-0.669-1.588-1.552-1.588 c-0.916,0-1.537,0.67-1.537,1.505v2.062c-1.508-1.969-4.019-3.722-7.816-3.722C-17.657,16.471-21.717,18.768-21.717,23.2 M-5.785,24.873v2.091c-1.592,0.459-3.727,0.92-6.359,0.92c-4.05,0-6.311-1.758-6.311-4.473v-0.083 c0-2.717,2.506-4.306,5.436-4.306C-9.049,19.022-5.785,21.448-5.785,24.873"/>
|
|
||||||
</g>
|
|
||||||
<g transform="translate(329.779, 270.223)">
|
|
||||||
<path fill="#696566" d="M-21.716,23.2c-0.708,1.552-2.458,2.255-4.092,1.529 c-1.636-0.727-2.238-2.541-1.499-4.094l6.861-14.913c1.079-2.337,2.216-3.562,4.35-3.562c2.28,0,3.274,1.334,4.352,3.562 c0,0,5.984,13.03,6.044,13.166c0.061,0.138,0.253,0.559,0.862,0.555c0.515-0.003,0.948-0.414,0.948-0.966V5.735 c0-1.964,1.089-3.575,3.185-3.575c2.094,0,3.226,1.611,3.226,3.575v10.427c0,2.011,1.441,3.316,3.405,3.316 s3.271-1.352,3.271-3.316V5.735c0-1.964,1.093-3.575,3.185-3.575c2.094,0,3.232,1.611,3.232,3.575v10.427 c0,2.011,1.435,3.316,3.4,3.316c1.961,0,3.273-1.352,3.273-3.316V5.735c0-1.964,1.092-3.575,3.186-3.575 c2.093,0,3.229,1.611,3.229,3.575v11.867c0,4.361-3.507,7.416-7.727,7.416c-4.215,0-6.855-2.916-6.855-2.916 c-1.403,1.819-3.337,2.912-6.61,2.912c-3.454,0-6.477-2.912-6.477-2.912c-1.404,1.819-3.794,2.912-5.773,2.912 c-3.061,0-5.492-1.346-6.975-4.737l-4.381-10.327L-21.716,23.2z"/>
|
|
||||||
</g>
|
|
||||||
<g transform="translate(468.609, 268.931)">
|
|
||||||
<path fill="#696566" d="M-21.716,23.2v0.018c0,1.459,1.184,2.688,2.672,2.688c1.509,0,2.677-1.216,2.677-2.677 v-0.011c0-1.464-1.181-2.693-2.677-2.693C-20.553,20.525-21.716,21.737-21.716,23.2 M-16.881,23.218v0.007 c0,1.2-0.927,2.184-2.163,2.184c-1.225,0-2.166-1.001-2.166-2.191v-0.014c0-1.197,0.93-2.181,2.166-2.181 C-17.823,21.023-16.881,22.022-16.881,23.218"/>
|
|
||||||
</g>
|
|
||||||
<g transform="translate(470.257, 270.007)">
|
|
||||||
<path fill="#696566" d="M-21.715,23.2c0,0.159,0.127,0.286,0.288,0.286h0.892c0.336,0,0.595-0.095,0.756-0.265 c0.147-0.143,0.227-0.35,0.227-0.59v-0.008c0-0.408-0.206-0.657-0.517-0.788l0.394-0.48c0.055-0.072,0.092-0.131,0.092-0.219 c0-0.158-0.134-0.262-0.27-0.262c-0.127,0-0.213,0.065-0.28,0.147l-0.555,0.702h-0.455v-0.564 c0-0.159-0.123-0.284-0.283-0.284c-0.161,0-0.288,0.126-0.288,0.284V23.2z M-20.567,22.228c0.278,0,0.431,0.145,0.431,0.366 v0.009c0,0.241-0.164,0.371-0.441,0.371h-0.569v-0.745H-20.567z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 4.8 KiB |
@ -1,45 +0,0 @@
|
|||||||
var HashiVMware = function() {
|
|
||||||
var selectedProduct = "";
|
|
||||||
|
|
||||||
var $buyButton = $('#buy-fusion');
|
|
||||||
var $products = $('#buy-now input[name=product]');
|
|
||||||
|
|
||||||
function setSelectedProduct() {
|
|
||||||
selectedProduct = $("input[name=product]:checked").val();
|
|
||||||
}
|
|
||||||
|
|
||||||
$products.unbind().on('change', function() {
|
|
||||||
setSelectedProduct();
|
|
||||||
|
|
||||||
var text = selectedProduct.charAt(0).toUpperCase() + selectedProduct.slice(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
$buyButton.unbind().on('click', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
var seats = parseInt($("#seats").val(), 10);
|
|
||||||
if (isNaN(seats)) {
|
|
||||||
alert("The number of seats you want to purchase must be a number.");
|
|
||||||
return;
|
|
||||||
} else if (seats <= 0) {
|
|
||||||
alert("The number of seats you want must be greater than zero.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var productId = "";
|
|
||||||
if (selectedProduct == "desktop") {
|
|
||||||
productId = "7255390650419";
|
|
||||||
} else {
|
|
||||||
alert("Unknown product selected. Please refresh and try again.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location = "http://shopify.hashicorp.com/cart/" + productId + ":" + seats;
|
|
||||||
});
|
|
||||||
|
|
||||||
if ($buyButton.length > 0) {
|
|
||||||
setSelectedProduct();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).on('ready turbolinks:load', HashiVMware)
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
document.addEventListener('turbolinks:load', function() {
|
|
||||||
analytics.page()
|
|
||||||
|
|
||||||
track('.downloads .download .details li a', function(el) {
|
|
||||||
var version = el.dataset.version
|
|
||||||
var os = el.dataset.os
|
|
||||||
var arch = el.dataset.arch
|
|
||||||
return {
|
|
||||||
event: 'Download',
|
|
||||||
category: 'Button',
|
|
||||||
label: 'Vagrant | v' + version + ' | ' + os + ' | ' + arch,
|
|
||||||
version: version,
|
|
||||||
os: os,
|
|
||||||
architecture: arch,
|
|
||||||
product: 'vagrant'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
//= require jquery
|
|
||||||
//= require turbolinks
|
|
||||||
|
|
||||||
//= require hashicorp/mega-nav
|
|
||||||
//= require hashicorp/sidebar
|
|
||||||
//= require hashicorp/analytics
|
|
||||||
|
|
||||||
//= require _vmware
|
|
||||||
//= require analytics
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
.button {
|
|
||||||
background: $button-background;
|
|
||||||
border: 1px solid #d6d6d7;
|
|
||||||
border-radius: 1px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: $button-font-color;
|
|
||||||
display: inline-block;
|
|
||||||
font-family: $button-font-family;
|
|
||||||
font-size: $button-font-size;
|
|
||||||
font-weight: $font-weight-medium;
|
|
||||||
line-height: 1.6em;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
padding: 13px 19px;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:active,
|
|
||||||
&:focus {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border: 3px solid $vagrant-l1;
|
|
||||||
color: $button-font-color;
|
|
||||||
outline: none;
|
|
||||||
padding: 11px 17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: #eaeaeb;
|
|
||||||
border: 1px solid #d6d6d7;
|
|
||||||
color: $button-font-color;
|
|
||||||
padding: 13px 19px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
background: #dfdfe0;
|
|
||||||
border: 1px solid #d6d6d7;
|
|
||||||
color: $button-font-color;
|
|
||||||
padding: 13px 19px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.primary {
|
|
||||||
background: $button-primary-background;
|
|
||||||
border: none;
|
|
||||||
color: $white;
|
|
||||||
padding: 14px 20px;
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
border: 3px solid $vagrant-l1;
|
|
||||||
padding: 11px 17px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
|
|
||||||
$button-primary-background;
|
|
||||||
border: none;
|
|
||||||
padding: 14px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
|
|
||||||
$button-primary-background;
|
|
||||||
border: none;
|
|
||||||
padding: 14px 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.inline {
|
|
||||||
padding: 8px 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
#inner {
|
|
||||||
.people {
|
|
||||||
margin-top: 30px;
|
|
||||||
|
|
||||||
.person {
|
|
||||||
&:after {
|
|
||||||
display: block;
|
|
||||||
clear: both;
|
|
||||||
content: ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 125px;
|
|
||||||
margin: auto auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bio {
|
|
||||||
padding-left: 150px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
#docs-sidebar {
|
|
||||||
margin-bottom: 30px;
|
|
||||||
margin-top: 50px;
|
|
||||||
|
|
||||||
ul.nav.docs-sidenav {
|
|
||||||
display: block;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
|
|
||||||
li {
|
|
||||||
a {
|
|
||||||
color: $sidebar-link-color;
|
|
||||||
padding: 10px 0 10px 15px;
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
color: $sidebar-link-color-active;
|
|
||||||
content: '\203A';
|
|
||||||
left: 0;
|
|
||||||
opacity: 0.4;
|
|
||||||
position: absolute;
|
|
||||||
|
|
||||||
height: 100%;
|
|
||||||
width: 8px
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus,
|
|
||||||
&:hover {
|
|
||||||
background-color: transparent;
|
|
||||||
color: $sidebar-link-color-hover;
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// For forcing sub-navs to appear - in the long term, this should not
|
|
||||||
// be a thing anymore...
|
|
||||||
> ul.nav-visible {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
li.active {
|
|
||||||
> a {
|
|
||||||
color: $sidebar-link-color-active;
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Open nested navigations
|
|
||||||
> ul.nav {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// subnav
|
|
||||||
ul.nav {
|
|
||||||
display: none;
|
|
||||||
margin: 10px;
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin-left: 10px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
padding: 6px 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
body.layout-downloads {
|
|
||||||
#inner {
|
|
||||||
.downloads {
|
|
||||||
margin-top: 20px;
|
|
||||||
|
|
||||||
.description {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.download {
|
|
||||||
align-items: center;
|
|
||||||
border-bottom: 1px solid #b2b2b2;
|
|
||||||
display: flex;
|
|
||||||
padding: 15px;
|
|
||||||
|
|
||||||
.details {
|
|
||||||
padding-left: 20px;
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
@extend .g-type-display-4;
|
|
||||||
margin-top: 4px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
padding-left: 0px;
|
|
||||||
margin: -8px 0 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
&:after {
|
|
||||||
content: " | ";
|
|
||||||
}
|
|
||||||
|
|
||||||
&:last-child:after {
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
svg {
|
|
||||||
width: 75px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.os-name {
|
|
||||||
margin-bottom: -3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.poweredby {
|
|
||||||
margin-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,74 +0,0 @@
|
|||||||
/* Display Font (Gilmer) */
|
|
||||||
@font-face {
|
|
||||||
font-family: "gilmer-web";
|
|
||||||
src: url("/assets/fonts/gilmer/gilmer-light.woff2") format("woff2"),
|
|
||||||
url("/assets/fonts/gilmer/gilmer-light.woff") format("woff");
|
|
||||||
font-weight: 300;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "gilmer-web";
|
|
||||||
src: url("/assets/fonts/gilmer/gilmer-regular.woff2") format("woff2"),
|
|
||||||
url("/assets/fonts/gilmer/gilmer-regular.woff") format("woff");
|
|
||||||
font-weight: 400;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "gilmer-web";
|
|
||||||
src: url("/assets/fonts/gilmer/gilmer-medium.woff2") format("woff2"),
|
|
||||||
url("/assets/fonts/gilmer/gilmer-medium.woff") format("woff");
|
|
||||||
font-weight: 500;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "gilmer-web";
|
|
||||||
src: url("/assets/fonts/gilmer/gilmer-bold.woff2") format("woff2"),
|
|
||||||
url("/assets/fonts/gilmer/gilmer-bold.woff") format("woff");
|
|
||||||
font-weight: 700;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Body Font (Metro) */
|
|
||||||
@font-face {
|
|
||||||
font-family: "metro-web";
|
|
||||||
src: url("/assets/fonts/metro/metro-sans-book.woff2") format("woff2"),
|
|
||||||
url("/assets/fonts/metro/metro-sans-book.woff") format("woff");
|
|
||||||
font-weight: 300;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "metro-web";
|
|
||||||
src: url("/assets/fonts/metro/metro-sans-regular.woff2") format("woff2"),
|
|
||||||
url("/assets/fonts/metro/metro-sans-regular.woff") format("woff");
|
|
||||||
font-weight: 400;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "metro-web";
|
|
||||||
src: url("/assets/fonts/metro/metro-sans-semi-bold.woff2") format("woff2"),
|
|
||||||
url("/assets/fonts/metro/metro-sans-semi-bold.woff") format("woff");
|
|
||||||
font-weight: 600;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "metro-web";
|
|
||||||
src: url("/assets/fonts/metro/metro-sans-bold.woff2") format("woff2"),
|
|
||||||
url("/assets/fonts/metro/metro-sans-bold.woff") format("woff");
|
|
||||||
font-weight: 700;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Code Font (Deja Vu) */
|
|
||||||
@font-face {
|
|
||||||
font-family: "dejavu-sans-mono-web";
|
|
||||||
src: url("/assets/fonts/dejavu/DejaVuSansMono.woff2") format("woff2"),
|
|
||||||
url("/assets/fonts/dejavu/DejaVuSansMono.woff") format("woff");
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
#footer {
|
|
||||||
padding-top: 50px;
|
|
||||||
|
|
||||||
ul.footer-links {
|
|
||||||
li {
|
|
||||||
a {
|
|
||||||
color: $footer-link-color;
|
|
||||||
font-size: $footer-font-size;
|
|
||||||
font-family: $font-body;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
&:hover, &:focus, &:active {
|
|
||||||
background-color: transparent;
|
|
||||||
color: $footer-link-color-hover;
|
|
||||||
outline: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 992px) {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
html {
|
|
||||||
font-size: $font-size-default;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 100%;
|
|
||||||
text-rendering: optimizeLegibility;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
color: $body-font-color;
|
|
||||||
background-color: $white;
|
|
||||||
font-size: $font-size-default;
|
|
||||||
font-family: $font-body;
|
|
||||||
font-weight: $font-weight-reg;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 100%;
|
|
||||||
}
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
#header {
|
|
||||||
background: $header-background-color;
|
|
||||||
|
|
||||||
.navbar-toggle {
|
|
||||||
height: $header-height;
|
|
||||||
margin: 0;
|
|
||||||
padding-right: 15px;
|
|
||||||
border-radius: 0;
|
|
||||||
|
|
||||||
.icon-bar {
|
|
||||||
border: 1px solid $white;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-brand {
|
|
||||||
display: block;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
a {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: $header-height;
|
|
||||||
line-height: $header-height;
|
|
||||||
|
|
||||||
svg.logo {
|
|
||||||
transition: opacity 0.15s ease-in-out;
|
|
||||||
@extend svg.logo.white;
|
|
||||||
|
|
||||||
&:hover, &:focus, &:active {
|
|
||||||
opacity: 0.6;
|
|
||||||
outline: 0;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.nav {
|
|
||||||
li {
|
|
||||||
a {
|
|
||||||
color: $header-link-color;
|
|
||||||
font-size: $header-font-size;
|
|
||||||
font-family: $font-body;
|
|
||||||
font-weight: $font-weight-bold;
|
|
||||||
height: $header-height;
|
|
||||||
line-height: $header-height;
|
|
||||||
padding: 0 10px;
|
|
||||||
margin: 0;
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
&:hover, &:focus, &:active {
|
|
||||||
background-color: transparent;
|
|
||||||
color: $header-link-color-hover;
|
|
||||||
outline: 0;
|
|
||||||
|
|
||||||
svg {
|
|
||||||
fill: $header-link-color-hover;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
|
||||||
fill: $header-link-color;
|
|
||||||
position: relative;
|
|
||||||
top: 2px;
|
|
||||||
width: 14px;
|
|
||||||
height: 14px;
|
|
||||||
margin-right: 3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.buttons {
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,214 +0,0 @@
|
|||||||
#page-home {
|
|
||||||
// Override the main header
|
|
||||||
#header {
|
|
||||||
background: $home-header-background-color;
|
|
||||||
|
|
||||||
.navbar-toggle {
|
|
||||||
.icon-bar {
|
|
||||||
border: 1px solid $home-header-link-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-brand {
|
|
||||||
a {
|
|
||||||
svg.logo {
|
|
||||||
@extend svg.logo.color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.nav {
|
|
||||||
li {
|
|
||||||
a {
|
|
||||||
color: $home-header-link-color;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:active {
|
|
||||||
background-color: transparent;
|
|
||||||
color: $home-header-link-color-hover;
|
|
||||||
|
|
||||||
svg {
|
|
||||||
fill: $home-header-link-color-hover;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
|
||||||
fill: $home-header-link-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
.hero {
|
|
||||||
margin: 140px auto 160px auto;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
margin: 24px 0 40px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
|
||||||
margin: 5px;
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
display: block;
|
|
||||||
margin-top: 10px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
|
||||||
max-width: 90%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
section {
|
|
||||||
background: $white;
|
|
||||||
padding: 100px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
section.marketing {
|
|
||||||
h2 {
|
|
||||||
margin: 20px 0 10px 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0 0 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.callout {
|
|
||||||
background: $black;
|
|
||||||
color: $white;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.black {
|
|
||||||
background: $black;
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.callout {
|
|
||||||
background: $white;
|
|
||||||
color: $black;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.blue-dark {
|
|
||||||
background: $vagrant-d1;
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.blue {
|
|
||||||
background: $vagrant;
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
color: $white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&#simple {
|
|
||||||
.terminal {
|
|
||||||
@extend .g-type-code;
|
|
||||||
border: 1px solid $white;
|
|
||||||
background: $black;
|
|
||||||
box-sizing: border-box;
|
|
||||||
color: $white;
|
|
||||||
margin: 20px auto auto auto;
|
|
||||||
padding: 10px 20px 20px 20px;
|
|
||||||
|
|
||||||
.terminal-content {
|
|
||||||
margin-top: 5px;
|
|
||||||
overflow-x: scroll;
|
|
||||||
width: 100%;
|
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
span.circle {
|
|
||||||
&:before {
|
|
||||||
content: "\25CF";
|
|
||||||
color: $white;
|
|
||||||
margin: 0 0 0 -4px;
|
|
||||||
padding: 0;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
span.command {
|
|
||||||
font-weight: $font-weight-bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&#parity {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.parity-image {
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
svg {
|
|
||||||
display: inline-block;
|
|
||||||
max-width: 400px;
|
|
||||||
margin: 40px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&#cross {
|
|
||||||
.systems {
|
|
||||||
margin-top: 70px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
svg {
|
|
||||||
max-width: 130px;
|
|
||||||
min-width: 20px;
|
|
||||||
height: auto;
|
|
||||||
|
|
||||||
fill: $white;
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&#trusted {
|
|
||||||
p.logos {
|
|
||||||
margin-top: 40px;
|
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 941px;
|
|
||||||
height: auto;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||