Skip to content

Commit 899cb76

Browse files
committed
Responsive: Fix callout handling and default side
1 parent ae84628 commit 899cb76

File tree

5 files changed

+101
-10
lines changed

5 files changed

+101
-10
lines changed

assets/css/v2/style.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,9 +1067,11 @@ blockquote p:last-child {
10671067
margin: 0 auto;
10681068
}
10691069

1070-
blockquote.side-callout {
1071-
grid-column: 2 !important;
1072-
grid-row: span 2;
1070+
@media (min-width: 1512px) {
1071+
blockquote.side-callout {
1072+
grid-column: 2 !important;
1073+
align-self: start;
1074+
}
10731075
}
10741076

10751077
blockquote > div > * {
@@ -1081,6 +1083,10 @@ blockquote ul {
10811083
margin: 0 0 1rem 1rem;
10821084
}
10831085

1086+
li > blockquote {
1087+
margin: var(--flow-gap) 0 0 0;
1088+
}
1089+
10841090
/* Tabs */
10851091
.tabs-container {
10861092
/* border-bottom: 1px solid black; */

exampleSite/content/test-product/call-out/call-out-code-blocks.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,28 @@ weight: 200
66
---
77

88

9-
## Code Block Multi line
9+
## Code Block Multi line with callout
10+
11+
12+
Start the Docker container to connect it to NGINX One. Replace `YOUR_NGINX_ONE_DATA_PLANE_KEY_HERE` with your data plane key and `VERSION_TAG` with the version tag you pulled.
13+
14+
**For NGINX Plus R33 or later**:
15+
16+
- Use the `NGINX_LICENSE_JWT` variable to pass your JWT license. Replace `YOUR_JWT_HERE` with your JWT.
17+
18+
For more details, see About subscription licenses
19+
20+
```sh
21+
sudo docker run \
22+
--env=NGINX_LICENSE_JWT="YOUR_JWT_HERE" \
23+
--env=NGINX_AGENT_SERVER_GRPCPORT=443 \
24+
--env=NGINX_AGENT_SERVER_HOST=agent.connect.nginx.com \
25+
--env=NGINX_AGENT_SERVER_TOKEN="YOUR_NGINX_ONE_DATA_PLANE_KEY_HERE" \
26+
--env=NGINX_AGENT_TLS_ENABLE=true \
27+
--restart=always \
28+
--runtime=runc \
29+
-d private-registry.nginx.com/nginx-plus/agent:<VERSION_TAG>
30+
```
1031

1132
{{<call-out "" "Example:" "" >}}
1233
To start the container with the `debian` image:
@@ -27,12 +48,11 @@ sudo docker run \
2748

2849
## Code Block Single line
2950

30-
{{<call-out "" "Example:" "" >}}
51+
3152
How to read load nginx config
3253

3354
```sh
3455
nginx -s reload
3556
```
3657

37-
{{</call-out>}}
3858

exampleSite/content/test-product/call-out/call-out-code-lists.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,18 @@ weight: 200
2929
- Add a configuration to the config sync group, so all instances inherit it.
3030
- Add the instances in a separate operation.
3131

32-
Your instances should synchronize with your desired configuration within 30 seconds. {{< /note >}}
32+
Your instances should synchronize with your desired configuration within 30 seconds. {{< /note >}}
33+
34+
35+
## Callout within list
36+
37+
1. Open the JSON Web Token file you downloaded from [MyF5](https://my.f5.com/manage/s/subscriptions) and copy its contents.
38+
39+
{{<call-out "tip" "Copying the JWT token" "" >}} Make sure there are **no extra characters or spaces** when copying the contents of the JWT token: they can invalidate the token and cause 401 errors during authentication.{{</call-out>}}
40+
41+
2. Log in to the Docker registry using the contents of the JSON Web Token file:
42+
43+
```bash
44+
docker login private-registry.nginx.com --username=<JWT_CONTENTS> --password=none
45+
```
46+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
description: Callout - Side
3+
title: Callout - Side
4+
weight: 200
5+
---
6+
7+
## Text is longer than callout
8+
This is some text that should be along the left of the call out.
9+
This assumes the callout text is shorter than the text in the callout.
10+
If the text in the paragraph is shorter than the callout, it's likely
11+
the content needs to be re-written.
12+
13+
{{<call-out "tip side-callout" "Tip for Automated Reporting" >}}
14+
I am some call out text. Look at me go!
15+
{{</call-out>}}
16+
17+
## Text is shorter than callout
18+
19+
This is some text that should be along the left of the call out.
20+
This assumes the callout text is shorter than the text in the callout.
21+
If the text in the paragraph is shorter than the callout, it's likely
22+
the content needs to be re-written.
23+
24+
{{<call-out "tip side-callout" "Tip for Automated Reporting" >}}
25+
I am some call out text. Look at me go!
26+
{{</call-out>}}
27+
28+
## Very long callout with short text
29+
30+
Short Text
31+
32+
{{<call-out "tip side-callout" "Tip for Automated Reporting" >}}
33+
If you add multiple instances to a single config sync group, simultaneously (with automation), follow these steps. Your instances will inherit your desired configuration:
34+
35+
Create a config sync group.
36+
Add a configuration to the config sync group, so all instances inherit it.
37+
Add the instances in a separate operation.
38+
Your instances should synchronize with your desired configuration within 30 seconds.
39+
{{</call-out>}}
40+
41+
42+
## Non-side call out
43+
44+
This is some text that should be along the left of the call out.
45+
This assumes the callout text is shorter than the text in the callout.
46+
If the text in the paragraph is shorter than the callout, it's likely
47+
the content needs to be re-written.
48+
49+
{{<call-out "tip inline-callout" "Tip for Automated Reporting" >}}
50+
I am some call out text. Look at me go!
51+
{{</call-out>}}

layouts/shortcodes/call-out.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
{{ $sideOption := "side-callout" }}
33
{{ $inlineOption := "inline-callout" }}
44

5-
<!-- Add default option for callouts that are "inline" if one is not provided -->
6-
{{ if and (not (strings.Contains $class $inlineOption)) (not (strings.Contains $class $sideOption)) }}
7-
{{ $class = printf "%s %s" $class $inlineOption }}
5+
<!-- Add default option for callouts that are "sideline" if one is not provided -->
6+
{{ if and (not (strings.Contains $class $sideOption)) (not (strings.Contains $class $inlineOption)) }}
7+
{{ $class = printf "%s %s" $class $sideOption }}
88
{{ end }}
99

1010
<!-- Blockquote element with a class that is the first parameter passed to the shortcode -->

0 commit comments

Comments
 (0)