Skip to content

Commit 426e640

Browse files
authored
[TASK] Button styles for card footers (#671)
1 parent a133430 commit 426e640

File tree

6 files changed

+226
-61
lines changed

6 files changed

+226
-61
lines changed

Documentation-rendertest/Cards/Index.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,55 @@ Cards with complex content, very responsive
157157

158158
.. card-footer:: :ref:`Read more <cards>`
159159

160+
Cards with complex footer
161+
=========================
162+
163+
.. card-grid::
164+
:columns: 1
165+
:columns-md: 3
166+
:gap: 4
167+
:card-height: 100
168+
169+
.. card:: `Minor upgrades <https://docs.typo3.org/m/typo3/guide-installation/12.4/en-us/Minor/Index.html>`__
170+
171+
172+
Minor updates (for example 12.4.1 to 12.4.2)
173+
contain bugfixes and/or security updates.
174+
This chapter details how updates are installed and highlights what tasks need to
175+
be carried out before and after the core is updated.
176+
177+
.. card-footer:: `13-dev <https://docs.typo3.org/m/typo3/guide-installation/main/en-us/Minor/Index.html>`__ `12.4 <https://docs.typo3.org/m/typo3/guide-installation/12.4/en-us/Minor/Index.html>`__ `11.5 <https://docs.typo3.org/m/typo3/guide-installation/11.5/en-us/Minor/Index.html>`__
178+
:button-style: btn btn-secondary
179+
180+
.. card:: `Minor upgrades <https://docs.typo3.org/m/typo3/guide-installation/12.4/en-us/Minor/Index.html>`__
181+
182+
Minor updates (for example 12.4.1 to 12.4.2)
183+
contain bugfixes and/or security updates.
184+
This chapter details how updates are installed and highlights what tasks need to
185+
be carried out before and after the core is updated.
186+
187+
.. card-footer::
188+
:button-styles: default
189+
190+
:ref:`13-dev <t3upgrade/dev:minor>`
191+
:ref:`12.4 <t3upgrade/stable:minor>`
192+
:ref:`11.5 <t3upgrade/oldstable:minor>`
193+
194+
.. card:: `Minor upgrades <https://docs.typo3.org/m/typo3/guide-installation/12.4/en-us/Minor/Index.html>`__
195+
196+
Minor updates (for example 12.4.1 to 12.4.2)
197+
contain bugfixes and/or security updates.
198+
This chapter details how updates are installed and highlights what tasks need to
199+
be carried out before and after the core is updated.
200+
201+
.. card-footer::
202+
:button-styles: secondary
203+
204+
`13-dev <https://docs.typo3.org/m/typo3/guide-installation/main/en-us/Minor/Index.html>`__
205+
`12.4 <https://docs.typo3.org/m/typo3/guide-installation/12.4/en-us/Minor/Index.html>`__
206+
`11.5 <https://docs.typo3.org/m/typo3/guide-installation/11.5/en-us/Minor/Index.html>`__
207+
208+
160209
Card group
161210
==========
162211

packages/typo3-docs-theme/assets/sass/_text.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ body {
55
--bs-emphasis-color: #{$gray-900};
66
}
77

8+
root {
9+
--frame-link-color: #{$gray-800};
10+
--frame-link-hover-color: #{$black};
11+
}
12+
813
a {
914
color:inherit;
1015
text-underline-offset: 25%;
@@ -28,9 +33,9 @@ article {
2833
a:not([class*="btn"]) {
2934
@extend .text-break;
3035
text-decoration: underline;
31-
color: $gray-800;
36+
color: var(--frame-link-color);
3237
&:hover {
33-
color: $black;
38+
color: var(--frame-link-hover-color);
3439
text-decoration-thickness: 2px;
3540
}
3641
}

packages/typo3-docs-theme/assets/sass/components/_button.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,22 @@
3030
@include button-variant($white, $white, $secondary, $white, $secondary, $secondary);
3131
}
3232
}
33+
34+
.button-style a {
35+
@extend .btn;
36+
text-decoration: none!important;
37+
}
38+
39+
.button-style-primary, .button-style-secondary {
40+
--frame-link-color:#{$white};
41+
a {
42+
@extend .btn-secondary;
43+
}
44+
}
45+
46+
.button-style-default, .button-style-light {
47+
--frame-link-color: #{$secondary};
48+
a {
49+
@extend .btn-default;
50+
}
51+
}

packages/typo3-docs-theme/assets/sass/components/_card.scss

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,30 @@
44
.card-group {
55
--bs-gutter-x: 1.5rem;
66
--bs-gutter-y: 1.5rem;
7+
78
.card {
8-
box-shadow: 2px 1px 6px rgba(32,33,36,.28);
9-
.card-img, .card-img-top {
10-
border-top-left-radius: 0;
11-
border-top-right-radius: 0;
12-
}
13-
.card-img:first-child, .card-img-top:first-child {
14-
border-top-left-radius: var(--bs-card-inner-border-radius);
15-
border-top-right-radius: var(--bs-card-inner-border-radius);
16-
}
17-
.card-body {
18-
*:last-child {
19-
margin-bottom: 0;
20-
}
9+
box-shadow: 2px 1px 6px rgba(32, 33, 36, .28);
10+
11+
.card-img, .card-img-top {
12+
border-top-left-radius: 0;
13+
border-top-right-radius: 0;
14+
}
15+
16+
.card-img:first-child, .card-img-top:first-child {
17+
border-top-left-radius: var(--bs-card-inner-border-radius);
18+
border-top-right-radius: var(--bs-card-inner-border-radius);
19+
}
20+
21+
.card-body {
22+
*:last-child {
23+
margin-bottom: 0;
24+
}
25+
}
26+
}
27+
28+
.card-footer {
29+
*:last-child {
30+
margin-bottom: 0;
2131
}
2232
}
2333
}

0 commit comments

Comments
 (0)