Skip to content

Commit

Permalink
New class .bottom-cards
Browse files Browse the repository at this point in the history
  • Loading branch information
lidiazuin committed Oct 24, 2024
1 parent 004206f commit 1a219ab
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 7 deletions.
2 changes: 1 addition & 1 deletion preview-src/docs-ndl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ xref:tutorials:index.adoc[All tutorials]
--


[.cards.icon-s.align-center]
[.bottom-cards]
== Other resources

=== Join forums and discussions
Expand Down
52 changes: 46 additions & 6 deletions src/css/docs-ndl.css
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ body.docs-ndl .next-steps .sectionbody ul li div.paragraph {

/* explainer */

body.docs-ndl .cards .sectionbody > div.paragraph {
body.docs-ndl .bottom-cards .sectionbody > div.paragraph body.docs-ndl .cards .sectionbody > div.paragraph {
display: flex;
flex: 0 1 100%;
}
Expand Down Expand Up @@ -415,20 +415,24 @@ body.docs-ndl .banner .paragraph.description {

/* selectable cards */

body.docs-ndl .bottom-cards .sect2.selectable,
body.docs-ndl .cards .sect2.selectable {
cursor: pointer;
}

body.docs-ndl .bottom-cards .sect2.selectable a,
body.docs-ndl .cards .sect2.selectable a {
text-decoration: none;
}

body.docs-ndl .bottom-cards .sect2.selectable a:hover,
body.docs-ndl .cards .sect2.selectable a:hover {
transform: scale(1.02);
transition: 0.1s linear;
box-shadow: 0 4px 8px 0 rgba(12, 26, 37, 0.08);
}

body.docs-ndl .bottom-cards .sect2.selectable:hover div.description,
body.docs-ndl .cards .sect2.selectable:hover div.description {
text-decoration: underline;
}
Expand Down Expand Up @@ -583,6 +587,11 @@ body.docs-ndl .sect2 {
flex-direction: column;
}

body.docs-ndl .bottom-cards .sectionbody > div.sect2 {
flex: 0 1 49%;
/* margin-right: 1rem; */
}

body.docs-ndl .cards .sectionbody > div.sect2 {
flex: 0 1 32%;
/* margin-right: 1rem; */
Expand All @@ -592,6 +601,9 @@ body.docs-ndl.explainer .sectionbody > div.sect2 {
flex: 0 1 49%;
}

body.docs-ndl .bottom-cards .sect2 > a,
body.docs-ndl .bottom-cards .sect2.not-selectable,
body.docs-ndl .bottom-cards:not(.selectable) .sect2,
body.docs-ndl .cards .sect2 > a,
body.docs-ndl .cards .sect2.not-selectable,
body.docs-ndl .cards:not(.selectable) .sect2,
Expand Down Expand Up @@ -642,6 +654,9 @@ body.docs-ndl .header-label-container > div.labels {
margin-left: auto;
}

body.docs-ndl .bottom-cards .sect2 > a,
body.docs-ndl .bottom-cards .sect2.not-selectable,
body.docs-ndl .bottom-cards:not(.selectable) .sect2,
body.docs-ndl .cards .sect2 > a,
body.docs-ndl .cards .sect2.not-selectable,
body.docs-ndl .cards:not(.selectable) .sect2,
Expand All @@ -651,6 +666,7 @@ body.docs-ndl .widget:not(.video) {
border-radius: 1rem;
}

body.docs-ndl .bottom-cards .sect2 > a,
body.docs-ndl .cards .sect2 > a {
color: var(--neutral-color);
font-weight: var(--font-weight-normal);
Expand All @@ -662,11 +678,14 @@ body.docs-ndl.color-docs .sect2 {
background: var(--color-docs);
}

body.docs-ndl.color-docs .bottom-cards .sect2 h3,
body.docs-ndl.color-docs .bottom-cards .sect2 .description,
body.docs-ndl.color-docs .cards .sect2 h3,
body.docs-ndl.color-docs .cards .sect2 .description {
color: rgba(var(--colors-neutral-10));
}

body.docs-ndl .bottom-cards .sect2 .paragraph,
body.docs-ndl .cards .sect2 .paragraph {
margin: 0;
}
Expand All @@ -675,6 +694,8 @@ body.docs-ndl .cards .sect2 .paragraph {
min-height: 200px;
} */

body.docs-ndl .bottom-cards .sect2 a > h3,
body.docs-ndl .bottom-cards .sect2 a > div,
body.docs-ndl .cards .sect2 a > h3,
body.docs-ndl .cards .sect2 a > div {
margin: 0;
Expand All @@ -687,13 +708,15 @@ body.docs-ndl .sect2 a > h3 {
display: flex;
}

body.docs-ndl .bottom-cards .sect2 .icon,
body.docs-ndl .cards .sect2 .icon,
body.docs-ndl .widget .icon {
padding: 0;
margin: 0;
width: 100%;
}

body.docs-ndl .bottom-cards .sect2 .icon,
body.docs-ndl .cards .sect2 .icon,
body.docs-ndl .widget.banner .icon {
order: 1;
Expand All @@ -702,19 +725,22 @@ body.docs-ndl .widget.banner .icon {
width: 100%;
}

body.docs-ndl .bottom-cards .sect2 .icon p,
body.docs-ndl .cards .sect2 .icon p {
display: flex;
width: -webkit-fill-available;
justify-content: space-between;
}

body.docs-ndl .bottom-cards .sect2 .icon p div.labels,
body.docs-ndl .cards .sect2 .icon p div.labels {
display: flex;
flex-direction: row;
gap: 0.25rem;
height: min-content;
}

body.docs-ndl .bottom-cards .icon span,
body.docs-ndl .cards .icon span {
display: flex;
}
Expand All @@ -733,17 +759,14 @@ body.docs-ndl .widget.highlights:nth-of-type(even) .openblock {
/* margin-right:40px; */
}

/* For the bottom cards */
body.docs-ndl .cards:nth-last-child(-n+2) .sectionbody>div.sect2 {
flex: 0 0 49%;
}

body.docs-ndl body.docs-ndl .bottom-cards .sect2 .icon img,
body.docs-ndl body.docs-ndl .cards .sect2 .icon img {
width: 4rem;
height: 4rem;
padding: 0;
}

body.docs-ndl .bottom-cards.icon-l .sect2 .icon img,
body.docs-ndl .cards.icon-l .sect2 .icon img {
width: 6rem;
height: 6rem;
Expand All @@ -761,6 +784,7 @@ body.docs-ndl .lists .sect2 .icon img path {
fill: rgba(var(--colors-baltic-30));
}

body.docs-ndl .bottom-cards .sect2 h3,
body.docs-ndl .cards .sect2 h3,
body.docs-ndl .lists .sect2 h3 {
/* flex-grow: 1; */
Expand All @@ -770,10 +794,12 @@ body.docs-ndl .lists .sect2 h3 {
width: -webkit-fill-available;
}

body.docs-ndl .bottom-cards .sect2 h3 .anchor::before,
body.docs-ndl .cards .sect2 h3 .anchor::before {
display: none;
}

body.docs-ndl .bottom-cards .sect2 .paragraph:not(.icon),
body.docs-ndl .cards .sect2 .paragraph:not(.icon) {
font-size: var(--font-size-body-medium);
line-height: 1.5;
Expand All @@ -791,20 +817,24 @@ body.docs-ndl .cards .sect2 .paragraph:not(.icon) {
/* flex-grow: 1; */
}

body.docs-ndl .bottom-cards .sect2.selectable .paragraph.link,
body.docs-ndl .cards .sect2.selectable .paragraph.link {
display: none;
}

body.docs-ndl .bottom-cards:not(.selectable) .sect2 .paragraph.link,
body.docs-ndl .cards:not(.selectable) .sect2 .paragraph.link {
margin-top: auto;
}

body.docs-ndl .bottom-cards:not(.selectable) .sect2 .paragraph.link a,
body.docs-ndl .cards:not(.selectable) .sect2 .paragraph.link a {
font-weight: 500;
margin-right: 1rem;
/* text-decoration: none; */
}

body.docs-ndl .bottom-cards .sect2 .paragraph.category,
body.docs-ndl .cards .sect2 .paragraph.category {
display: none;
}
Expand All @@ -822,6 +852,7 @@ body.docs-ndl .highlights a {
}

body.docs-ndl .highlights a::after,
body.docs-ndl .bottom-cards .link a::after,
body.docs-ndl .cards .link a::after {
margin-left: 0.5rem;
content: "→";
Expand All @@ -837,6 +868,7 @@ body.docs-ndl .highlights a::after {
float: right;
}

body.docs-ndl .bottom-cards .sect2 .ulist,
body.docs-ndl .cards .sect2 .ulist {
display: inline-flex;
order: 4;
Expand All @@ -846,10 +878,12 @@ body.docs-ndl .cards .sect2 .ulist {
text-align: left;
}

body.docs-ndl .bottom-cards .sect2 .ulist ul,
body.docs-ndl .cards .sect2 .ulist ul {
padding: 0;
}

body.docs-ndl .bottom-cards .sect2 .ulist ul li,
body.docs-ndl .cards .sect2 .ulist ul li {
list-style-type: none;
margin: 0.5rem 0 0;
Expand All @@ -876,10 +910,12 @@ body.docs-ndl .cards .sect2 .ulist ul li {
z-index: 30;
}

body.docs-ndl .bottom-cards .sectionbody > div.sect2,
body.docs-ndl .cards .sectionbody > div.sect2 {
flex: 0 1 49%;
}

body.docs-ndl.explainer .bottom-cards .sect2 h3,
body.docs-ndl.explainer .cards .sect2 h3 {
text-align: left;
}
Expand Down Expand Up @@ -940,19 +976,23 @@ body.docs-ndl .cards .sect2 .ulist ul li {
margin: 1rem auto;
}

body.docs-ndl .bottom-cards .sect2 > a,
body.docs-ndl .cards .sect2 > a {
align-items: center;
}

body.docs-ndl.explainer .bottom-cards .sect2 > a,
body.docs-ndl.explainer .cards .sect2 > a {
align-items: flex-start;
padding: 1rem;
}

body.docs-ndl.explainer .bottom-cards .sect2 .paragraph:not(.icon),
body.docs-ndl.explainer .cards .sect2 .paragraph:not(.icon) {
text-align: left;
}

body.docs-ndl .bottom-cards .sectionbody > div.sect2,
body.docs-ndl .cards .sectionbody > div.sect2 {
/* min-width: 90%; */
flex: 1 1 100%;
Expand Down

0 comments on commit 1a219ab

Please sign in to comment.