diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7250f790..f9348c8ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,6 +62,8 @@ weight: # Determines sort order in both the nav tree and in article lists. draft: # If true, will not render page on build enterprise_all: # If true, specifies the doc as a whole is specific to InfluxDB Enterprise enterprise_some: # If true, specifies the doc includes some content specific to InfluxDB Enterprise +cloud_all: # If true, specifies the doc as a whole is specific to InfluxCloud +cloud_some: # If true, specifies the doc includes some content specific to InfluxCloud v2.x/tags: # Tags specific to each version (replace .x" with the appropriate minor version ) ``` @@ -135,6 +137,55 @@ Insert enterprise-specific markdown content here. {{% /enterprise %}} ``` +#### Enterprise name +The name used to refer to InfluxData's enterprise offering is subject to change. +To facilitate easy updates in the future, use the `enterprise-name` shortcode when referencing the enterprise product. + +``` +This is content that references {{< enterprise-name >}}. +``` + +The product name is stored in `data/products.yml` + +### InfluxCloud Content +Some articles are unique to InfluxCloud or at least contain some information specific to InfluxCloud. +There are frontmatter options and an cloud shortcode that help to properly identify this content. + +#### All content is cloud-specific +If all content in an article is cloud-specific, set the `cloud_all` frontmatter to `true`. + +```yaml +cloud_all: true +``` + +This will display a message at the top of page indicating that the things discussed are unique to InfluxCloud. + +#### Only some content is cloud-specific +If only some content in the article is cloud-specific, set the `cloud_some` frontmatter to `true`. + +```yaml +cloud_some: true +``` + +This will display a message at the top of page indicating some things are unique to InfluxCloud. +To format cloud-specific content, wrap it in the `{{% cloud %}}` shortcode: + +```md +{{% cloud %}} +Insert enterprise-specific markdown content here. +{{% /cloud %}} +``` + +#### InfluxCloud name +The name used to refer to InfluxData's cloud offering is subject to change. +To facilitate easy updates in the future, use the `cloud-name` short-code when referencing the cloud product. + +``` +This is content that references {{< cloud-name >}}. +``` + +The product name is stored in `data/products.yml` + ### Tabbed Content Shortcodes are available for creating "tabbed" content (content that is changed by a users' selection). Ther following three must be used: diff --git a/assets/styles/layouts/_layout-article.scss b/assets/styles/layouts/_layout-article.scss index 0c3e97f77..5c05bb237 100644 --- a/assets/styles/layouts/_layout-article.scss +++ b/assets/styles/layouts/_layout-article.scss @@ -272,7 +272,8 @@ .feedback, .note, .warn, - .enterprise-msg { + .enterprise-msg, + .cloud-msg { padding: 1.65rem 2rem .1rem 2rem; margin: 1rem 0 2rem; border-width: 0 0 0 4px; @@ -391,44 +392,67 @@ ///////////////////////////////// Enterprise ///////////////////////////////// - .enterprise-msg { - border-color: $article-enterprise-base; - background: rgba($article-enterprise-base, .15); - font-style: italic; - display: flex; - p { - color: $article-enterprise-text; - } - a { - color: $article-enterprise-link; - &:hover { - color: $article-enterprise-link-hover; - } - } - div:first-child { margin-right: 1.25rem; } - } + .enterprise, .cloud { + position: relative; + padding: 0 0 .01rem 2rem; + margin-left: -2rem; - .enterprise-flag { - padding: .2rem .4rem; - background: $article-enterprise-base; - font-size: .75rem; - font-style: normal; - font-weight: bold; - color: $g20-white; - border-radius: $border-radius; - vertical-align: text-bottom; - &:before { - content: "E"; + &-msg { + font-style: italic; + display: flex; + div:first-child { margin-right: 1.25rem; } + } + &-flag { + padding: .2rem .4rem; + font-size: .75rem; + font-style: normal; + font-weight: bold; + color: $g20-white; + border-radius: $border-radius; + vertical-align: text-bottom; } } .enterprise { - position: relative; - padding: 0 0 .01rem 2rem; - margin-left: -2rem; border-left: 2px solid $article-enterprise-base; + &-msg { + border-color: $article-enterprise-base; + background: rgba($article-enterprise-base, .15); + p { color: $article-enterprise-text; } + a { + color: $article-enterprise-link; + &:hover { color: $article-enterprise-link-hover; } + } + } + &-flag { + background: $article-enterprise-base; + &:before { + content: "E"; + } + } + } - .enterprise-flag { + .cloud { + border-left: 2px solid $article-cloud-base; + &-msg { + border-color: $article-cloud-base; + background: rgba($article-cloud-base, .15); + p { color: $article-cloud-text; } + a { + color: $article-cloud-link; + &:hover { color: $article-cloud-link-hover; } + } + } + &-flag { + background: $article-cloud-base; + &:before { + content: "C"; + } + } + } + + .enterprise, .cloud { + .enterprise-flag, .cloud-flag { position: absolute; top: -.15rem; left: -.68rem; @@ -695,16 +719,17 @@ blockquote, .note, .warn, - #enterprise-msg { + .enterprise-msg, + .cloud-msg { padding: 1.35rem 1.25rem .1rem 1.25rem; margin: .5rem 0 1rem; } - .enterprise { + .enterprise, .cloud { padding: 0 0 .01rem .85rem; margin-left: -.85rem; - .enterprise-flag { + .enterprise-flag, .cloud-flag { left: -.25rem; } } diff --git a/assets/styles/themes/_theme-dark.scss b/assets/styles/themes/_theme-dark.scss index a178f1da7..85bde7aaf 100644 --- a/assets/styles/themes/_theme-dark.scss +++ b/assets/styles/themes/_theme-dark.scss @@ -105,6 +105,11 @@ $article-enterprise-text: $p-potassium !default; $article-enterprise-link: $p-moonstone !default; $article-enterprise-link-hover: $g20-white !default; +$article-cloud-base: $b-pool !default; +$article-cloud-text: $b-neutrino !default; +$article-cloud-link: $b-snow !default; +$article-cloud-link-hover: $g20-white !default; + // Article Tabs for tabbed content $article-tab-text: $g12-forge !default; $article-tab-bg: $g4-onyx !default; diff --git a/assets/styles/themes/_theme-light.scss b/assets/styles/themes/_theme-light.scss index 700a05b9e..a31a5bc65 100644 --- a/assets/styles/themes/_theme-light.scss +++ b/assets/styles/themes/_theme-light.scss @@ -104,6 +104,11 @@ $article-enterprise-text: $p-star; $article-enterprise-link: $p-star; $article-enterprise-link-hover: $b-ocean; +$article-cloud-base: $b-laser; +$article-cloud-text: $b-ocean; +$article-cloud-link: $b-ocean; +$article-cloud-link-hover: $gr-canopy; + // Article Tabs for tabbed content $article-tab-text: $g8-storm; $article-tab-bg: $g18-cloud; diff --git a/content/v2.0/example.md b/content/v2.0/example.md index ebf232832..041ffde2a 100644 --- a/content/v2.0/example.md +++ b/content/v2.0/example.md @@ -7,6 +7,8 @@ menu: weight: 1 #enterprise_all: true enterprise_some: true +cloud_all: true +#cloud_some: true draft: true "v2.0/tags": [influxdb] --- @@ -77,6 +79,7 @@ There is a horizontal rule above and below this line. --- +{{% cloud %}} #### Inline Styles This is an [inline link](#). This is `inline code`. This is an [`inline code link`](#). @@ -160,7 +163,7 @@ avg_cpu |> yield() // ``` - +{{% /cloud %}} {{% enterprise %}} ###### This is a table diff --git a/data/products.yml b/data/products.yml new file mode 100644 index 000000000..14c393cc8 --- /dev/null +++ b/data/products.yml @@ -0,0 +1,7 @@ +enterprise: + name: "InfluxDB 2.0 Enterprise" + link: "#" + +cloud: + name: "InfluxCloud 2.0 Beta" + link: "https://www.influxdata.com/influxcloud2beta/" diff --git a/layouts/partials/article.html b/layouts/partials/article.html index aee7f74e5..f9c767087 100644 --- a/layouts/partials/article.html +++ b/layouts/partials/article.html @@ -3,6 +3,7 @@
+ The features and functionality discussed on this page are unique to {{ $cloudName }}. +
++ This page includes features and functionality unique to {{ $cloudName }}. +
+- The features and functionality discussed on this page are unique to the Enterprise edition of InfluxDB. - Learn more about InfluxDB Enterprise. + The features and functionality discussed on this page are unique to {{ $enterpriseName }}.
- This page includes features and functionality unique to the Enterprise edition of InfluxDB. - Learn more about InfluxDB Enterprise. + This page includes features and functionality unique to {{ $enterpriseName }}.