Skip to content

Commit b4d814b

Browse files
committed
Responsive: Fix callout handling and default side
1 parent 7965cf0 commit b4d814b

File tree

5 files changed

+116
-22
lines changed

5 files changed

+116
-22
lines changed

assets/css/v2/style.css

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
--table-min-column-spacing-wide: 0.75rem;
4343
--table-header-bottom-spacing: 1rem;
4444
--table-line-height: 1px;
45-
--text-content-width-iphone-13: 30rem;
46-
--text-content-width-mbp-14: 40rem;
47-
--text-content-width-mbp-16: 50rem;
48-
--text-content-width-4k-display: 60rem;
45+
--text-content-width-iphone-13: 30em;
46+
--text-content-width-mbp-14: 40em;
47+
--text-content-width-mbp-16: 50em;
48+
--text-content-width-4k-display: 50em;
4949
--codeblock-comment-diff: 2rem;
5050
--codeblock-comment-space-between: 10px;
5151
--codeblock-horizontal-line-length: 2rem;
@@ -334,6 +334,7 @@ nav {
334334
grid-column: 1 / -1;
335335
}
336336

337+
/* The default main-layout */
337338
.main-layout {
338339
display: grid;
339340
grid-template-columns: 1fr;
@@ -365,20 +366,21 @@ nav {
365366
width: 100%;
366367
}
367368

368-
@media (min-width: 1185px) {
369-
.main-layout {
369+
/* TODO: Maybe too soon to get rid of sidebar? */
370+
@media (max-width: 95em) {
371+
.base-layout {
370372
display: grid;
371-
grid-template-columns: var(--sidebar-width) 1fr;
373+
grid-template-rows: repeat(2, auto);
372374
column-gap: var(--component-gap);
373375
}
374-
}
375-
@media (max-width: 1184px) {
376+
376377
.sidebar-layout {
377378
display: none;
378379
}
379380
}
380381

381-
@media (min-width: 1512px) {
382+
/* Will not drop to single column until as late as possible */
383+
@media (min-width: 64em) {
382384
/* Macbook Pro 14 */
383385
.base-layout {
384386
display: grid;
@@ -417,7 +419,7 @@ nav {
417419
}
418420
}
419421

420-
@media (min-width: 1728px) {
422+
@media (min-width: 103em) {
421423
/* Macbook Pro 16 */
422424
.content-layout {
423425
display: grid;
@@ -436,7 +438,7 @@ nav {
436438
}
437439
}
438440

439-
@media (min-width: 2560px) {
441+
@media (min-width: 113em) {
440442
/* 4k Desktop */
441443
.content-layout {
442444
display: grid;
@@ -1081,9 +1083,12 @@ blockquote p:last-child {
10811083
margin: 0 auto;
10821084
}
10831085

1084-
blockquote.side-callout {
1085-
grid-column: 2 !important;
1086-
grid-row: span 2;
1086+
/* Maintain the split column for as long as possible */
1087+
@media (min-width: 64em) {
1088+
blockquote.side-callout {
1089+
grid-column: 2 !important;
1090+
align-self: start;
1091+
}
10871092
}
10881093

10891094
blockquote > div > * {
@@ -1095,6 +1100,10 @@ blockquote ul {
10951100
margin: 0 0 1rem 1rem;
10961101
}
10971102

1103+
li > blockquote {
1104+
margin: var(--flow-gap) 0 0 0;
1105+
}
1106+
10981107
/* Tabs */
10991108
.tabs-container {
11001109
/* 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)