Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions assets/scss/_examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,35 @@
}
}

/* Collapsible <details> styling */
details {
margin: 1.2rem 0;
padding: 0.6rem 1rem;
border: 1px solid #ccc;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
border: 1px solid #ccc;

border-radius: 6px;
background-color: #f9f9f9;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
background-color: #f9f9f9;

}

details[open] {
background-color: #fefefe;
border-color: #999;
}

details summary {
font-weight: 600;
cursor: pointer;
margin: -0.4rem -1rem 0.6rem -1rem;
padding: 0.6rem 1rem;
background-color: #ececec;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
background-color: #ececec;

border-radius: 6px 6px 0 0;
transition: background-color 0.2s ease;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
transition: background-color 0.2s ease;

}

details summary:hover {
background-color: #e2e2e2;
}


@media (min-width: 768px) {
.td-404 main,
.td-main main .examples-index-page {
Expand Down
11 changes: 11 additions & 0 deletions content/en/examples/score/resources/community-provisioners/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@ flavor: "Resources"

---

{{% details "score.yaml" %}}
{{% example-file filename="score.yaml" dir="score/resources/community-provisioners/dns" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% /details %}}

{{< tabs >}}
{{% tab name="score-compose" %}}

{{% details "10-dns-in-codespace.provisioners.yaml" %}}
{{% example-file filename="10-dns-in-codespace.provisioners.yaml" dir="score/resources/community-provisioners/dns/score-compose" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% /details %}}

{{% details "10-dns-with-url.provisioners.yaml" %}}
{{% example-file filename="10-dns-with-url.provisioners.yaml" dir="score/resources/community-provisioners/dns/score-compose" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% example-file filename="README.md" dir="score/resources/community-provisioners/dns/score-compose" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% /details %}}

---

Expand Down Expand Up @@ -66,9 +74,12 @@ docker ps

{{%/ tab %}}
{{% tab name="score-k8s" %}}

{{% details "10-dns-in-codespace.provisioners.yaml" %}}
{{% example-file filename="10-dns-in-codespace.provisioners.yaml" dir="score/resources/community-provisioners/dns/score-k8s" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% example-file filename="10-dns-with-url.provisioners.yaml" dir="score/resources/community-provisioners/dns/score-k8s" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% example-file filename="README.md" dir="score/resources/community-provisioners/dns/score-k8s" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% /details %}}

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,25 @@ excerpt: ''
hasMore: false
parent: "Community Provisioners"
flavor: "Resources"

---

{{% details "score-backend.yaml" %}}
{{% example-file filename="score-backend.yaml" dir="score/resources/community-provisioners/service" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% /details %}}

{{% details "score-frontend.yaml" %}}
{{% example-file filename="score-frontend.yaml" dir="score/resources/community-provisioners/service" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% /details %}}

{{< tabs >}}

{{% tab name="score-compose" %}}

{{% details "10-service.provisioners.yaml (score-compose)" %}}
{{% example-file filename="10-service.provisioners.yaml" dir="score/resources/community-provisioners/service/score-compose" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% /details %}}

---
...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
...


Initialize your local workspace, by importing a specific community provisioner:

Expand Down Expand Up @@ -63,12 +71,19 @@ See the running containers:
docker ps
```

{{%/ tab %}}
{{% /tab %}}

{{% tab name="score-k8s" %}}

{{% details "10-service-with-netpol.provisioners.yaml (score-k8s)" %}}
{{% example-file filename="10-service-with-netpol.provisioners.yaml" dir="score/resources/community-provisioners/service/score-k8s" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% /details %}}

{{% details "10-service.provisioners.yaml (score-k8s)" %}}
{{% example-file filename="10-service.provisioners.yaml" dir="score/resources/community-provisioners/service/score-k8s" githubUrl="https://github.com/score-spec/community-provisioners/blob/main" %}}
{{% /details %}}

---
...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
...


Initialize your local workspace, by importing a specific community provisioner:

Expand Down Expand Up @@ -114,5 +129,6 @@ See the running containers:
kubectl get all
```

{{%/ tab %}}
{{% /tab %}}

{{< /tabs >}}
4 changes: 4 additions & 0 deletions layouts/shortcodes/details.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<details{{ with .Get 1 }} {{ . | safeHTML }}{{ end -}}>
<summary>{{ with .Get 0 -}}{{ . | safeHTML }}{{ else -}}{{ errorf "No summary provided"}}{{ end -}}</summary>
{{ with .Inner -}}{{ . | markdownify}}{{ else -}}{{ errorf "No details provided"}}{{ end -}}
</details>