diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d086957b8..9b4cf9b9f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -352,6 +352,29 @@ The following case insensitive values are supported: - organizations, orgs - configuration, config +### InfluxDB UI notification messages +In some cases, documentation references a notification message that appears in +the top-right corner of the InfluxDB UI. +Rather than taking a screenshot of the message (that can be hard to maintain over time), +use the `{{< ui-message >}}` shortcode. + +It expects two parameters: + +**`text`** (Required) +The message displayed. + +**`color`** (Optional) +Sets the background color and icons used in the message. +The following options are available: + +- green _(default)_ +- blue +- red + +``` +{{< ui-message color="green" text="The message displayed in the notification.">}} +``` + ### Reference content The InfluxDB documentation is "task-based," meaning content primarily focuses on what a user is **doing**, not what they are **using**. diff --git a/assets/styles/layouts/_ui-messages.scss b/assets/styles/layouts/_ui-messages.scss new file mode 100644 index 000000000..bc5af7c20 --- /dev/null +++ b/assets/styles/layouts/_ui-messages.scss @@ -0,0 +1,48 @@ +.article--content { + .ui-message { + max-width: 350px; + margin: 1rem 0 2rem; + padding: .85rem 2.75rem; + font-size: .85rem; + border-radius: 5px; + position: relative; + color: $g20-white; + + &:before { + font-family: 'icomoon'; + display: block; + position: absolute; + left: 14px; + top: 17px; + font-size: 1.1rem; + } + + &:after { + content: "\e932"; + font-family: 'icomoon'; + display: block; + position: absolute; + right: 14px; + top: 18px; + font-size: 1.1rem; + opacity: .25; + } + + &.green { + background: linear-gradient(to right, #4dd7a1, #21adf5); + &:before { content: "\e922"; } + } + + &.blue { + background: linear-gradient(to right, #22adf6, #4591ed); + &:before { content: "\e935"; } + } + + &.red { + background: linear-gradient(to right, #e8695c, #7669e8); + &:before { content: "\e920"; } + } + + + } +} diff --git a/assets/styles/styles-default.scss b/assets/styles/styles-default.scss index c4acfdce2..3fb1e07fe 100644 --- a/assets/styles/styles-default.scss +++ b/assets/styles/styles-default.scss @@ -17,6 +17,7 @@ "layouts/layout-content-wrapper", "layouts/layout-article", "layouts/inline-icons", + "layouts/ui-messages", "layouts/syntax-highlighting", "layouts/algolia-search-overrides", "layouts/layout-landing", diff --git a/content/v2.0/collect-data/quick-start.md b/content/v2.0/collect-data/quick-start.md index 2bfe1585e..e02d9b946 100644 --- a/content/v2.0/collect-data/quick-start.md +++ b/content/v2.0/collect-data/quick-start.md @@ -29,7 +29,7 @@ It stores the scraped metrics in the bucket created during the [initial setup pr The following message briefly appears in the UI: -{{< img-hd src="/img/2-0-quickstart-confirmation.png" />}} +{{< ui-message text="The InfluxDB scraper has been configured for http://localhost:9999/metrics" >}} {{% note %}} Quick Start is available only in the last step of the setup process. diff --git a/layouts/shortcodes/ui-message.html b/layouts/shortcodes/ui-message.html new file mode 100644 index 000000000..8096b6e22 --- /dev/null +++ b/layouts/shortcodes/ui-message.html @@ -0,0 +1,6 @@ +{{ $text := .Get "text" }} +{{ $color := .Get "color" | default "green" }} + +
diff --git a/static/img/2-0-quickstart-confirmation.png b/static/img/2-0-quickstart-confirmation.png deleted file mode 100644 index 58bc0ff05..000000000 Binary files a/static/img/2-0-quickstart-confirmation.png and /dev/null differ