Skip to content

Commit b91cfba

Browse files
authored
Import Styles from Atmos (#622)
* customize css to match atmos.tools * style landing page
1 parent 9e7e9d3 commit b91cfba

File tree

14 files changed

+273
-154
lines changed

14 files changed

+273
-154
lines changed

docusaurus.config.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
// @ts-check
22
const lightCodeTheme = require('prism-react-renderer').themes.vsDark;
33
const darkCodeTheme = require('prism-react-renderer').themes.nightOwl;
4+
const fs = require('fs');
5+
const path = require('path');
6+
7+
// Define the directory containing your CSS files
8+
const cssDirectory = path.resolve(__dirname, './src/css');
9+
10+
// Read all CSS files from the directory
11+
const customCssFiles = fs.readdirSync(cssDirectory)
12+
.filter(file => file.endsWith('.css'))
13+
.map(file => require.resolve(path.join(cssDirectory, file)));
14+
415

516
/** @type {import('@docusaurus/types').Config} */
617
const config = {
718
title: 'The Cloud Posse Developer Hub',
8-
tagline: 'Welcome to the Cloud Posse developer hub. You\'ll find comprehensive guides and documentation to help you start working with the Cloud Posse technology stack as quickly as possible, as well as support if you get stuck. Let\'s jump right in!',
19+
tagline: 'Welcome to the Cloud Posse Reference Architecture documentation portal. You\'ll find comprehensive guides and documentation to help you start working with the Cloud Posse technology stack as quickly as possible, as well as support if you get stuck. Let\'s jump right in!',
920
url: 'https://docs.cloudposse.com',
1021
baseUrl: '/',
1122
trailingSlash: true,
@@ -48,7 +59,7 @@ const config = {
4859
exclude: ['README.md'],
4960
},
5061
theme: {
51-
customCss: require.resolve('./src/css/custom.css'),
62+
customCss: customCssFiles,
5263
},
5364

5465
}),

src/components/SecondaryCTA/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.ml20 {
2+
margin-left: 20px;
3+
}

src/css/admonitions.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
article .theme-admonition-danger ul li strong, article .theme-admonition-danger ol li strong {
3+
color: #ff8a8a
4+
}
5+
6+
.theme-admonition {
7+
max-width: 1200px;
8+
border-left: none;
9+
padding: 2em;
10+
border-radius: 1.3em;
11+
margin-top: 2.5em;
12+
margin-bottom: 2.5em;
13+
}
14+
15+
.theme-admonition.alert{
16+
margin-top: 3em;
17+
margin-bottom: 4em;
18+
}
19+
20+
html[data-theme='dark'] .theme-admonition details {
21+
background: #00000054;
22+
border: 1px solid #ffffff52;
23+
}
24+
25+
html[data-theme='dark'] .theme-admonition > .admonitionHeading_node_modules-\@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module:not(:last-child) {
26+
margin-bottom: 1em;
27+
font-size: 1.2em;
28+
}
29+
30+
html[data-theme='dark'] .admonitionContent_node_modules-\@docusaurus-theme-classic-lib-theme-Admonition-Layout-styles-module > ul:last-child {
31+
margin-bottom: 0;
32+
padding-left: 1.6em;
33+
}
34+
35+
.alert--secondary {
36+
margin-top: 2em;
37+
}

src/css/custom.css

Lines changed: 15 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
* work well for content-centric websites.
55
*/
66

7-
.navbar__title {
8-
font-size: 2em;
9-
}
10-
117
.menu__list-item-collapsible {
128
font-weight: bold;
139
}
@@ -17,68 +13,22 @@
1713
}
1814

1915
body {
16+
background-color: var(--ifm-background-color);
2017
background-position: 98% 98%;
2118
background-repeat: no-repeat;
2219
background-size: 15em;
2320
background-attachment: fixed;
24-
font-family: "Lato", sans-serif;
25-
}
26-
27-
/*
28-
nav.navbar {
29-
-webkit-box-shadow: 0 4px 16px rgb(0 0 0 / 24%);
30-
box-shadow: 0 4px 16px rgb(0 0 0 / 24%);
31-
}
32-
*/
33-
34-
/* .menu__link {
35-
order: 1;
36-
} */
37-
38-
.navbar-cta-button {
39-
color: var(--ifm-button-color);
40-
font-weight: bolder;
41-
order: 2;
42-
margin-left: 2em;
43-
}
44-
45-
.navbar-cta-button:hover {
46-
color: var(--ifm-button-color);
47-
}
48-
49-
.navbar-sidebar__item .navbar-cta-button {
50-
margin-left: inherit;
51-
}
52-
53-
54-
.header-accelerate-button {
55-
color: #ebedf0;
56-
}
57-
58-
.header-accelerate-button:hover {
59-
color: #ebedf0;
60-
}
61-
62-
.menu__caret:before {
63-
background: var(--ifm-menu-link-sublist-icon) 50% / 2rem 1.5rem;
64-
}
65-
66-
li > ul.menu__list {
67-
margin-left: 1em;
68-
}
69-
70-
.theme-admonition {
71-
max-width: 1200px;
21+
font-family: 'Optimistic Text', -apple-system, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
22+
font-size: 17px;
23+
line-height: 30px;
7224
}
7325

7426
.pagination-nav__link {
7527
max-width: 700px;
7628
}
7729

78-
7930
/* You can override the default Infima variables here. */
8031
:root {
81-
--ifm-container-width-xl: 90%;
8232
--ifm-code-font-size: 95%;
8333
--ifm-menu-color: var(--c-gray-100);
8434
--ifm-menu-link-padding-horizontal: 0.25rem;
@@ -97,7 +47,7 @@ li > ul.menu__list {
9747
--aa-input-border-color-alpha: var(--ifm-toc-border-color);
9848
--aa-primary-color-rgb: var(--ifm-toc-border-color) !important;
9949

100-
--ifm-button-color: white;
50+
--mg-bg: rgb(16 36 69 / 27%);
10151
}
10252

10353
/* For readability concerns, you should choose a lighter palette in dark mode. */
@@ -110,8 +60,13 @@ li > ul.menu__list {
11060
--ifm-color-primary-lighter: #72a1ed;
11161
--ifm-color-primary-lightest: #9abcf2;
11262
--ifm-card-background-color: #eeeeee14;
63+
--ifm-button-color: #ccc;
11364
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
114-
--ifm-button-color: white;
65+
}
66+
67+
[data-theme='dark'] ::selection {
68+
color: #67ffded2;
69+
background-color: #00fff61d;
11570
}
11671

11772
.button--lg {
@@ -139,14 +94,11 @@ li > ul.menu__list {
13994
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;
14095
}
14196

142-
[data-theme='dark'] ::selection {
143-
color: #000;
144-
background-color: yellow;
145-
}
146-
14797
html[data-theme='dark'] {
148-
--ifm-background-color: #1e2125;
149-
--ifm-background-surface-color: #1b1e22;
98+
--ifm-background-surface-color: #030711;
99+
--ifm-navbar-background-color: #030711;
100+
--ifm-background-color: #030711;
101+
background: transparent;
150102
}
151103

152104
table tr td {
@@ -224,16 +176,6 @@ html[data-theme='dark'] {
224176
background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;
225177
}
226178

227-
.footer {
228-
padding-left: 0;
229-
padding-right: 0;
230-
}
231-
232-
.footer__copyright {
233-
text-align: center;
234-
margin: 0 var(--ifm-spacing-horizontal);
235-
font-size: 11px;
236-
}
237179

238180
svg.landingLogo path {
239181
fill: #ebedf0
@@ -283,31 +225,6 @@ svg.landingLogo path {
283225
text-decoration: line-through;
284226
}
285227

286-
.footer__logo {
287-
max-width: 80%;
288-
}
289-
.footer__links {
290-
width: 75%;
291-
float: right;
292-
}
293-
.footer__bottom {
294-
width: 25%;
295-
}
296-
.footer__bottom > div {
297-
text-align: left;
298-
}
299-
.footer--dark {
300-
--ifm-footer-background-color: #0a1922;
301-
--ifm-footer-padding-vertical: 85px;
302-
}
303-
.footer__copyright {
304-
margin-left: 0;
305-
}
306-
307-
.footer__bottom > div > a {
308-
opacity: 0.9;
309-
}
310-
311228
.github_buttons > ul {
312229
list-style-type: none;
313230
padding-left: 0px;
@@ -342,41 +259,3 @@ svg.landingLogo path {
342259
aside.col.col--3 {
343260
--ifm-col-width: calc(2.5 / 12 * 100%);
344261
}
345-
346-
347-
/**
348-
* Imported from atmos.tool
349-
*/
350-
351-
li.menu__list-item.hidden {
352-
display: none;
353-
}
354-
355-
li.sidebar-title > div > a.menu__link {
356-
text-transform: uppercase;
357-
color: #b1b1b1;
358-
}
359-
360-
li.sidebar-title {
361-
border-top: 1px solid #6666663b;
362-
padding-top: 1.2em;
363-
margin-top: 1.2em;
364-
}
365-
366-
li.sidebar-title:first-child {
367-
border-top: none;
368-
margin-top: inherit;
369-
}
370-
371-
li.sidebar-title.menu__list-item:not(:first-child) {
372-
margin-top: 1.2em !important;
373-
}
374-
375-
li.sidebar-title > ul:first .menu__list .menu__list {
376-
padding-left: 0;
377-
}
378-
379-
.sidebar-title > ul.menu__list {
380-
margin-left: 0;
381-
padding-left: 0;
382-
}

src/css/definitions.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
dl dt {
2+
font-weight: bold;
3+
}
4+
5+
dt > em {
6+
font-weight: 500;
7+
}
8+
9+
dl dd {
10+
font-style: italic;
11+
color: #929292;
12+
}
13+
14+
dd p {
15+
margin: 0;
16+
}
17+
18+
dd {
19+
20+
margin-bottom: 1em;
21+
}
22+
23+
dd.disambiguation label {
24+
font-weight: bold;
25+
}
26+
27+
dd.disambiguation {
28+
font-style: normal;
29+
display: inline-block;
30+
float: right;
31+
}
32+
dd.disambiguation > a:not(:last-child)::after {
33+
content: ",";
34+
}
35+
36+
dd.disambiguation a {
37+
margin-left: 0.5em;
38+
}

src/css/footer.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.footer {
2+
padding-left: 0;
3+
padding-right: 0;
4+
}
5+
6+
.footer__copyright {
7+
text-align: center;
8+
margin: 0 var(--ifm-spacing-horizontal);
9+
font-size: 11px;
10+
}
11+
12+
.footer__logo {
13+
max-width: 80%;
14+
}
15+
.footer__links {
16+
width: 75%;
17+
float: right;
18+
}
19+
.footer__bottom {
20+
width: 25%;
21+
}
22+
.footer__bottom > div {
23+
text-align: left;
24+
}
25+
.footer--dark {
26+
--ifm-footer-background-color: #0a1922;
27+
--ifm-footer-padding-vertical: 85px;
28+
background: linear-gradient(to top, #00163b75, transparent) !important;
29+
}
30+
31+
.footer__copyright {
32+
margin-left: 0;
33+
}
34+
35+
.footer__bottom > div > a {
36+
opacity: 0.9;
37+
}

0 commit comments

Comments
 (0)