Skip to content

Commit cfb0c74

Browse files
authored
Add community links to docs (#6664)
1 parent 8b5119b commit cfb0c74

File tree

6 files changed

+173
-0
lines changed

6 files changed

+173
-0
lines changed

docs/css/extra.css

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,71 @@ body .card-grid-item:focus {
4747
.card-grid-item[href]:focus {
4848
background: #F2F4FE;
4949
color: var(--md-primary-fg-color);
50+
}
51+
52+
.community-callout-wrapper {
53+
padding: 30px 10px 0 10px;
54+
}
55+
56+
.community-callout {
57+
color: #F2F4FE;
58+
background: linear-gradient(10.88deg, rgba(102, 56, 242, 0.4) 9.56%, #6638F2 100%), #291A3F;
59+
box-shadow: 0px 20px 45px rgba(#9991B5, 0.75);
60+
border-radius: 10px;
61+
padding: 20px;
62+
}
63+
64+
.community-callout h2 {
65+
font-size: 1.15em;
66+
margin: 0 0 20px 0;
67+
color: #F2F4FE;
68+
text-align: center;
69+
}
70+
71+
.community-callout ul {
72+
list-style: none;
73+
padding: 0;
74+
display: flex;
75+
justify-content: space-between;
76+
gap: 10px;
77+
margin-top: 20px;
78+
margin-bottom: 0;
79+
}
80+
81+
.community-callout a {
82+
transition: opacity 0.2s ease;
83+
}
84+
85+
.community-callout a:hover {
86+
opacity: 0.5;
87+
}
88+
89+
.community-callout a img {
90+
height: 1.75em;
91+
width: auto;
92+
aspect-ratio: 1;
93+
}
94+
95+
@media (min-width: 1220px) {
96+
.community-callout-wrapper {
97+
padding: 40px 0 0;
98+
}
99+
100+
.community-callout h2 {
101+
font-size: 1.25em;
102+
}
103+
104+
.community-callout a img {
105+
height: 2em;
106+
}
107+
}
108+
109+
@media (min-width: 1600px) {
110+
.community-callout h2 {
111+
font-size: 1.15em;
112+
}
113+
114+
.community-callout a img {
115+
height: 1.75em;
116+
}
50117
}

docs/icons/github.svg

Lines changed: 4 additions & 0 deletions
Loading

docs/icons/slack.svg

Lines changed: 10 additions & 0 deletions
Loading

docs/icons/stackoverflow.svg

Lines changed: 5 additions & 0 deletions
Loading

docs/icons/twitter.svg

Lines changed: 4 additions & 0 deletions
Loading

docs/theme/partials/nav.html

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<!--
2+
Copyright (c) 2016-2023 Martin Donath <[email protected]>
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to
5+
deal in the Software without restriction, including without limitation the
6+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7+
sell copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
The above copyright notice and this permission notice shall be included in
10+
all copies or substantial portions of the Software.
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
14+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
16+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
17+
IN THE SOFTWARE.
18+
-->
19+
20+
<!-- Determine class according to configuration -->
21+
{% set class = "md-nav md-nav--primary" %}
22+
{% if "navigation.tabs" in features %}
23+
{% set class = class ~ " md-nav--lifted" %}
24+
{% endif %}
25+
{% if "toc.integrate" in features %}
26+
{% set class = class ~ " md-nav--integrated" %}
27+
{% endif %}
28+
29+
<!-- Main navigation -->
30+
<nav class="{{ class }}" aria-label="{{ lang.t('nav') }}" data-md-level="0">
31+
32+
<!-- Site title -->
33+
<label class="md-nav__title" for="__drawer">
34+
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}"
35+
class="md-nav__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
36+
{% include "partials/logo.html" %}
37+
</a>
38+
{{ config.site_name }}
39+
</label>
40+
41+
<!-- Repository information -->
42+
{% if config.repo_url %}
43+
<div class="md-nav__source">
44+
{% include "partials/source.html" %}
45+
</div>
46+
{% endif %}
47+
48+
<!-- Render item list -->
49+
<ul class="md-nav__list" data-md-scrollfix>
50+
{% for nav_item in nav %}
51+
{% set path = "__nav_" ~ loop.index %}
52+
{% set level = 1 %}
53+
{% include "partials/nav-item.html" %}
54+
{% endfor %}
55+
<li class="community-callout-wrapper">
56+
<div class="community-callout">
57+
<h2>Join the community</h2>
58+
<ul>
59+
<li>
60+
<a href="https://slack.testcontainers.org/" target="_blank">
61+
<img src="/icons/slack.svg" alt="Slack" width="30" height="31">
62+
</a>
63+
</li>
64+
<li>
65+
<a href="https://github.com/testcontainers" target="_blank">
66+
<img src="/icons/github.svg" alt="GitHub" width="30" height="31">
67+
</a>
68+
</li>
69+
<li>
70+
<a href="https://stackoverflow.com/questions/tagged/testcontainers" target="_blank">
71+
<img src="/icons/stackoverflow.svg" alt="StackOverflow" width="26" height="31">
72+
</a>
73+
</li>
74+
<li>
75+
<a href="https://twitter.com/testcontainers" target="_blank">
76+
<img src="/icons/twitter.svg" alt="Twitter" width="37" height="31">
77+
</a>
78+
</li>
79+
</ul>
80+
</div>
81+
</li>
82+
</ul>
83+
</nav>

0 commit comments

Comments
 (0)