diff --git a/README.md b/README.md index 11a46778bb..0466fbd353 100644 --- a/README.md +++ b/README.md @@ -353,13 +353,13 @@ paragraphs will not be part of the blockquote. Admonitions inside of other shortcodes need to use the special syntax, too: ```markdown -{{< expand title="Outer shortcode" >}} +{{< details summary="Outer shortcode" >}} {{}} Inner shortcode {{}} -{{< /expand >}} +{{< /details >}} ``` #### Tags @@ -472,9 +472,9 @@ Content or reminder that should not be rendered. The following shortcodes also exist but are rarely used: - ```markdown - {{< expand title="A short description" >}} + {{< details summary="A short description" >}} Content that is collapsed by default but can be expanded. - {{< /expand >}} + {{< /details >}} ``` - `{{< youtube id="dQw4w9WgXcQ" >}}` can be used to embed a single YouTube video, diff --git a/site/content/3.10/arangograph/security-and-access-control/_index.md b/site/content/3.10/arangograph/security-and-access-control/_index.md index 7c19ec9356..27742b57b3 100644 --- a/site/content/3.10/arangograph/security-and-access-control/_index.md +++ b/site/content/3.10/arangograph/security-and-access-control/_index.md @@ -122,7 +122,7 @@ export OASIS_TOKEN='' ./oasisctl list roles --organization-id --format json | jq -r '.[] | select(.predefined == true) | "**\(.description)** (`\(.id)`):\n\(.permissions | split(", ") | map("- `\(.)`\n") | join(""))"' {{% /comment %}} -{{< expand title="List of predefined roles and their permissions" >}} +{{< details summary="List of predefined roles and their permissions" >}} {{}} The roles below are described following this pattern: @@ -475,7 +475,7 @@ The roles below are described following this pattern: - `iam.user.get-personal-data` - `iam.user.update` -{{< /expand >}} +{{< /details >}} ### How to create a custom role diff --git a/site/content/3.10/develop/http-api/administration.md b/site/content/3.10/develop/http-api/administration.md index 662395e9f2..a3fbb53e41 100644 --- a/site/content/3.10/develop/http-api/administration.md +++ b/site/content/3.10/develop/http-api/administration.md @@ -966,7 +966,7 @@ Example not generated because it would require a valid license to demonstrate th curl --header 'accept: application/json' --dump - --data '"eyJncmFudCI6...(Base64-encoded license string)..."' -X PUT http://localhost:8529/_admin/license ``` -{{< expand title="Show output" >}} +{{< details summary="Show output" >}} ```bash HTTP/1.1 201 Created content-type: application/json @@ -988,7 +988,7 @@ x-content-type-options: nosniff } } ``` -{{< /expand >}} +{{< /details >}} ## Shutdown diff --git a/site/content/3.11/arangograph/security-and-access-control/_index.md b/site/content/3.11/arangograph/security-and-access-control/_index.md index 1e24ee8ccd..fa37f9af13 100644 --- a/site/content/3.11/arangograph/security-and-access-control/_index.md +++ b/site/content/3.11/arangograph/security-and-access-control/_index.md @@ -122,7 +122,7 @@ export OASIS_TOKEN='' ./oasisctl list roles --organization-id --format json | jq -r '.[] | select(.predefined == true) | "**\(.description)** (`\(.id)`):\n\(.permissions | split(", ") | map("- `\(.)`\n") | join(""))"' {{% /comment %}} -{{< expand title="List of predefined roles and their permissions" >}} +{{< details summary="List of predefined roles and their permissions" >}} {{}} The roles below are described following this pattern: @@ -475,7 +475,7 @@ The roles below are described following this pattern: - `iam.user.get-personal-data` - `iam.user.update` -{{< /expand >}} +{{< /details >}} ### How to create a custom role diff --git a/site/content/3.11/develop/http-api/administration.md b/site/content/3.11/develop/http-api/administration.md index 606130c10b..359c0a2e17 100644 --- a/site/content/3.11/develop/http-api/administration.md +++ b/site/content/3.11/develop/http-api/administration.md @@ -1075,7 +1075,7 @@ Example not generated because it would require a valid license to demonstrate th curl --header 'accept: application/json' --dump - --data '"eyJncmFudCI6...(Base64-encoded license string)..."' -X PUT http://localhost:8529/_admin/license ``` -{{< expand title="Show output" >}} +{{< details summary="Show output" >}} ```bash HTTP/1.1 201 Created content-type: application/json @@ -1097,7 +1097,7 @@ x-content-type-options: nosniff } } ``` -{{< /expand >}} +{{< /details >}} ## Shutdown diff --git a/site/content/3.12/arangograph/security-and-access-control/_index.md b/site/content/3.12/arangograph/security-and-access-control/_index.md index 1e24ee8ccd..fa37f9af13 100644 --- a/site/content/3.12/arangograph/security-and-access-control/_index.md +++ b/site/content/3.12/arangograph/security-and-access-control/_index.md @@ -122,7 +122,7 @@ export OASIS_TOKEN='' ./oasisctl list roles --organization-id --format json | jq -r '.[] | select(.predefined == true) | "**\(.description)** (`\(.id)`):\n\(.permissions | split(", ") | map("- `\(.)`\n") | join(""))"' {{% /comment %}} -{{< expand title="List of predefined roles and their permissions" >}} +{{< details summary="List of predefined roles and their permissions" >}} {{}} The roles below are described following this pattern: @@ -475,7 +475,7 @@ The roles below are described following this pattern: - `iam.user.get-personal-data` - `iam.user.update` -{{< /expand >}} +{{< /details >}} ### How to create a custom role diff --git a/site/content/3.12/develop/http-api/administration.md b/site/content/3.12/develop/http-api/administration.md index 620a0bce19..d062379748 100644 --- a/site/content/3.12/develop/http-api/administration.md +++ b/site/content/3.12/develop/http-api/administration.md @@ -1231,7 +1231,7 @@ Example not generated because it would require a valid license to demonstrate th curl --header 'accept: application/json' --dump - --data '"eyJncmFudCI6...(Base64-encoded license string)..."' -X PUT http://localhost:8529/_admin/license ``` -{{< expand title="Show output" >}} +{{< details summary="Show output" >}} ```bash HTTP/1.1 201 Created content-type: application/json @@ -1253,7 +1253,7 @@ x-content-type-options: nosniff } } ``` -{{< /expand >}} +{{< /details >}} ## Shutdown diff --git a/site/content/3.12/develop/http-api/batch-requests.md b/site/content/3.12/develop/http-api/batch-requests.md index 7a7b303bee..8ae58c8d10 100644 --- a/site/content/3.12/develop/http-api/batch-requests.md +++ b/site/content/3.12/develop/http-api/batch-requests.md @@ -359,7 +359,7 @@ DELETE /_api/collection/products HTTP/1.1 EOF ``` -{{< expand title="Show output" >}} +{{< details summary="Show output" >}} ```bash HTTP/1.1 200 OK content-type: multipart/form-data @@ -512,7 +512,7 @@ Content-Length: 39 --SomeBoundaryValue-- ``` -{{< /expand >}} +{{< /details >}} Sending a batch request, setting the boundary implicitly. The server tries to find the boundary at the beginning of the request body in this case. @@ -536,7 +536,7 @@ DELETE _api/collection/nonexistent2 HTTP/1.1 EOF ``` -{{< expand title="Show output" >}} +{{< details summary="Show output" >}} ```bash HTTP/1.1 200 OK content-type: unset @@ -586,4 +586,4 @@ Content-Length: 101 --SomeBoundaryValue-- ``` -{{< /expand >}} +{{< /details >}} diff --git a/site/content/3.12/develop/http-api/monitoring/logs.md b/site/content/3.12/develop/http-api/monitoring/logs.md index 159c507966..6e3d30c006 100644 --- a/site/content/3.12/develop/http-api/monitoring/logs.md +++ b/site/content/3.12/develop/http-api/monitoring/logs.md @@ -1038,7 +1038,7 @@ Example not generated because it changes on every run and returns up to 25MB of curl --header 'accept: application/json' --dump - http://localhost:8529/_admin/server/api-calls ``` -{{< expand title="Show output" >}} +{{< details summary="Show output" >}} ```bash HTTP/1.1 200 OK X-Arango-Queue-Time-Seconds: 0.000000 @@ -1074,4 +1074,4 @@ Content-Length: 257 } } ``` -{{< /expand >}} +{{< /details >}} diff --git a/site/content/3.13/arangograph/security-and-access-control/_index.md b/site/content/3.13/arangograph/security-and-access-control/_index.md index 1e24ee8ccd..fa37f9af13 100644 --- a/site/content/3.13/arangograph/security-and-access-control/_index.md +++ b/site/content/3.13/arangograph/security-and-access-control/_index.md @@ -122,7 +122,7 @@ export OASIS_TOKEN='' ./oasisctl list roles --organization-id --format json | jq -r '.[] | select(.predefined == true) | "**\(.description)** (`\(.id)`):\n\(.permissions | split(", ") | map("- `\(.)`\n") | join(""))"' {{% /comment %}} -{{< expand title="List of predefined roles and their permissions" >}} +{{< details summary="List of predefined roles and their permissions" >}} {{}} The roles below are described following this pattern: @@ -475,7 +475,7 @@ The roles below are described following this pattern: - `iam.user.get-personal-data` - `iam.user.update` -{{< /expand >}} +{{< /details >}} ### How to create a custom role diff --git a/site/content/3.13/develop/http-api/administration.md b/site/content/3.13/develop/http-api/administration.md index 620a0bce19..d062379748 100644 --- a/site/content/3.13/develop/http-api/administration.md +++ b/site/content/3.13/develop/http-api/administration.md @@ -1231,7 +1231,7 @@ Example not generated because it would require a valid license to demonstrate th curl --header 'accept: application/json' --dump - --data '"eyJncmFudCI6...(Base64-encoded license string)..."' -X PUT http://localhost:8529/_admin/license ``` -{{< expand title="Show output" >}} +{{< details summary="Show output" >}} ```bash HTTP/1.1 201 Created content-type: application/json @@ -1253,7 +1253,7 @@ x-content-type-options: nosniff } } ``` -{{< /expand >}} +{{< /details >}} ## Shutdown diff --git a/site/content/3.13/develop/http-api/monitoring/logs.md b/site/content/3.13/develop/http-api/monitoring/logs.md index 159c507966..6e3d30c006 100644 --- a/site/content/3.13/develop/http-api/monitoring/logs.md +++ b/site/content/3.13/develop/http-api/monitoring/logs.md @@ -1038,7 +1038,7 @@ Example not generated because it changes on every run and returns up to 25MB of curl --header 'accept: application/json' --dump - http://localhost:8529/_admin/server/api-calls ``` -{{< expand title="Show output" >}} +{{< details summary="Show output" >}} ```bash HTTP/1.1 200 OK X-Arango-Queue-Time-Seconds: 0.000000 @@ -1074,4 +1074,4 @@ Content-Length: 257 } } ``` -{{< /expand >}} +{{< /details >}} diff --git a/site/themes/arangodb-docs-theme/layouts/partials/shortcodes/examples/render.html b/site/themes/arangodb-docs-theme/layouts/partials/shortcodes/examples/render.html index 14869c58bd..0d1d3df391 100644 --- a/site/themes/arangodb-docs-theme/layouts/partials/shortcodes/examples/render.html +++ b/site/themes/arangodb-docs-theme/layouts/partials/shortcodes/examples/render.html @@ -21,11 +21,5 @@ {{- end }} {{- $output := transform.Highlight $content.output $language }} -{{- $block := printf "%s" $output }} -{{- partial "shortcodes/expand.html" (dict - "context" $context - "content" $block - "open" "open" - "title" "Show output" -) }} +
Show output{{ $context.Page.RenderString $output }}

diff --git a/site/themes/arangodb-docs-theme/layouts/partials/shortcodes/expand.html b/site/themes/arangodb-docs-theme/layouts/partials/shortcodes/expand.html deleted file mode 100644 index 74e5a96bd4..0000000000 --- a/site/themes/arangodb-docs-theme/layouts/partials/shortcodes/expand.html +++ /dev/null @@ -1,16 +0,0 @@ -{{- $context := .context }} -{{- $content := .content | $context.Page.RenderString }} -{{- $title := .title | default (T "Expand-title") }} -{{- $expanded := .open | default false }} -{{- if eq (printf "%T" $expanded) "string" }} - {{- $expanded = (eq $expanded "true") }} -{{- end }} -{{- with $content }} -
-{{/* things are getting complicated when search tries to open the expand box while jquery sets the display CSS on the element */ -}} -{{ $title | markdownify }} -
-{{ $content | safeHTML }} -
-
-{{- end }} diff --git a/site/themes/arangodb-docs-theme/layouts/shortcodes/details.html b/site/themes/arangodb-docs-theme/layouts/shortcodes/details.html new file mode 100644 index 0000000000..83b5587c10 --- /dev/null +++ b/site/themes/arangodb-docs-theme/layouts/shortcodes/details.html @@ -0,0 +1,3 @@ +{{ $summary := .Get "summary" -}} +{{ if not $summary }}{{ errorf "Missing summary for %q shortcode at %s" .Name .Position }}{{ end -}} +
{{ $summary | markdownify }}{{ .Inner | .Page.RenderString (dict "display" "block") }}
\ No newline at end of file diff --git a/site/themes/arangodb-docs-theme/layouts/shortcodes/expand.html b/site/themes/arangodb-docs-theme/layouts/shortcodes/expand.html deleted file mode 100644 index 1648b56de2..0000000000 --- a/site/themes/arangodb-docs-theme/layouts/shortcodes/expand.html +++ /dev/null @@ -1,7 +0,0 @@ -{{- $_hugo_config := `{ "version": 1 }` }}{{/* TODO: What does this do? */}} -{{- partial "shortcodes/expand.html" (dict - "context" . - "content" .Inner - "open" (.Get "open" | default (.Get 1)) - "title" (.Get "title" | default (.Get 0)) -) }} \ No newline at end of file diff --git a/site/themes/arangodb-docs-theme/layouts/shortcodes/program-options.md b/site/themes/arangodb-docs-theme/layouts/shortcodes/program-options.md index b9196fa003..b47b578aac 100644 --- a/site/themes/arangodb-docs-theme/layouts/shortcodes/program-options.md +++ b/site/themes/arangodb-docs-theme/layouts/shortcodes/program-options.md @@ -113,12 +113,7 @@ Effective on {{ delimit . ", " " and " }} only. {{ end }} {{ with $option.longDescription }} - {{- partial "shortcodes/expand.html" (dict - "context" $context - "content" . - "open" "open" - "title" "Show details" - ) }} +
Show details{{ . | $context.Page.RenderString (dict "display" "block") }}
{{ end }} --- diff --git a/site/themes/arangodb-docs-theme/static/css/theme.css b/site/themes/arangodb-docs-theme/static/css/theme.css index c603eb06e3..09be3245c1 100644 --- a/site/themes/arangodb-docs-theme/static/css/theme.css +++ b/site/themes/arangodb-docs-theme/static/css/theme.css @@ -1715,48 +1715,45 @@ blockquote p { } -/* Expand shortcode */ -.expand { +/* Details shortcode and OpenAPI properties */ + +summary { + list-style: none; + cursor: pointer; + user-select: none; + font-size: 1.1rem; + font-weight: 500; margin-top: 1rem; +} +summary:hover, summary:focus-visible { + color: #005580; } -.expand-label { - font-size: 1.1rem; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; +summary::-webkit-details-marker { + display: none; } -.expand-label::before { - font-family: "Font Awesome 5 Free"; - content: "\f054"; - display: inline-block; - padding-right: 3px; - vertical-align: middle; - font-weight: 900; - font-size: 10px; - color: grey; - margin-bottom: 5px; +summary::marker { + display: none; } -.expand-expanded > .expand-label::before { +details > summary::before { font-family: "Font Awesome 5 Free"; - content: "\f078"; + content: "\f054"; display: inline-block; - padding-right: 3px; + padding-right: 0.5rem; vertical-align: middle; font-weight: 900; + font-size: 10px; + color: grey; } -.expand-content { - margin-top: 12px; +details[open] > summary::before { + content: "\f078"; } -/* */ - +/* */ @@ -1839,24 +1836,6 @@ blockquote p { margin-left: 0; } -.show-children { - border: 1px solid #d0dadc; - padding: 5px; - border-radius: 6px; - font-size: 13px; -} - -.show-children.collapsed::before { - font-family: "Font Awesome 5 Free"; - content: "\f078"; - display: inline-block; - padding-right: 3px; - vertical-align: middle; - font-weight: 900; - font-size: 10px; - color: grey; -} - .openapi-property-name { color: #3c4257; font-size: 14px; @@ -1882,16 +1861,6 @@ blockquote p { font-weight: 400; } -.show-children::before { - font-family: "Font Awesome 5 Free"; - content: "\f054"; - display: inline-block; - padding-right: 3px; - vertical-align: middle; - font-weight: 900; - font-size: 10px; -} - .openapi-table-title { font-family: var(--font-regular); font-size: calc(var(--font-size-small) + 4px); @@ -1901,27 +1870,6 @@ blockquote p { color: var(--H2-COLOR); } -.openapi-prop::before { - font-family: "Font Awesome 5 Free"; - content: "\f054"; - display: inline-block; - padding-right: 3px; - vertical-align: middle; - font-weight: 900; - font-size: 10px; - color: grey; -} - -details[open] > .openapi-prop::before { - font-family: "Font Awesome 5 Free"; - content: "\f078"; - display: inline-block; - padding-right: 3px; - vertical-align: middle; - font-weight: 900; - font-size: 10px; -} - .openapi-prop > a > .fa-link { opacity: 0; } diff --git a/site/themes/arangodb-docs-theme/static/js/theme.js b/site/themes/arangodb-docs-theme/static/js/theme.js index 108dab6d29..88348e293b 100644 --- a/site/themes/arangodb-docs-theme/static/js/theme.js +++ b/site/themes/arangodb-docs-theme/static/js/theme.js @@ -497,11 +497,6 @@ function initClickHandlers() { } }); - $(".openapi-table.show-children").on("click", function(event) { - $(event.target).toggleClass("collapsed"); - $(event.target).next(".openapi-table").toggleClass("hidden"); - }); - } @@ -542,18 +537,6 @@ function copyURI(evt) { }); } -function toggleExpandShortcode(event) { - var t = $(event.target.closest("a")); - if (t.parent('.expand-expanded.expand-marked').length) { - t.next().css('display','none'); - } else if (t.parent('.expand-marked').length) { - t.next().css('display','block') - } else { - t.next('.expand-content').slideToggle(100); - } - t.parent().toggleClass('expand-expanded'); -} - window.onload = () => { window.history.pushState("popstate", "ArangoDB Documentation", window.location.href); diff --git a/toolchain/arangoproxy/internal/service/service.go b/toolchain/arangoproxy/internal/service/service.go index bcc1112283..4b9ef9f481 100644 --- a/toolchain/arangoproxy/internal/service/service.go +++ b/toolchain/arangoproxy/internal/service/service.go @@ -10,7 +10,6 @@ import ( "reflect" "strings" "sync" - "time" "github.com/arangodb/docs/migration-tools/arangoproxy/internal/format" "github.com/arangodb/docs/migration-tools/arangoproxy/internal/models" @@ -220,7 +219,7 @@ func (service OpenapiService) AddSpecToGlobalSpec(chnl chan map[string]interface } func (service OpenapiService) ValidateOpenapiGlobalSpec() { - time.Sleep(time.Second * 4) + //time.Sleep(time.Second * 4) var wg sync.WaitGroup models.Logger.Summary("

OPENAPI

")