Skip to content

Commit 701af64

Browse files
authored
[BUGFIX] directory-tree expand/collapse icon switching (#963)
Resolves #842
1 parent 16eabc3 commit 701af64

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

Documentation-rendertest/Directives/directoryTree.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ Directory tree
3030
Directory tree with links
3131
=========================
3232

33+
.. directory-tree::
34+
:level: 2
35+
:show-file-icons: true
36+
37+
* :doc:`Directory tree </Directives/directoryTree#directory-tree>`
38+
39+
* Layouts
40+
41+
* :doc:`Directory tree </Directives/directoryTree#directory-tree>`
42+
* :doc:`Directory tree </Directives/directoryTree#directory-tree>`
43+
44+
* Pages
45+
46+
* :doc:`Directory tree </Directives/directoryTree#directory-tree>`
47+
* :doc:`Directory tree </Directives/directoryTree#directory-tree>`
48+
3349
Directory structure of a typo3 extension
3450
========================================
3551

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
.directory-tree {
22
ul {
33
margin-bottom: 0;
4+
padding-left: 0;
5+
ul {
6+
padding-left: 1.5em;
7+
}
48
list-style: none;
59
li {
610
margin-bottom: 0;
@@ -12,12 +16,12 @@
1216
text-decoration: none;
1317
.icon::before {
1418
font-family: 'Font Awesome 6 Free';
15-
content: "\f0fe";
19+
content: "\f146";
1620
}
1721

1822
&.collapsed {
1923
.icon::before {
20-
content: "\f146";
24+
content: "\f0fe";
2125
}
2226
}
2327
}
@@ -34,6 +38,7 @@
3438
font-family: var(--bs-body-font-family);
3539
line-height: var(--bs-body-line-height);
3640
font-size: 1.1rem;
41+
padding: 0;
3742
&::before {
3843
width: 1.5em;
3944
font-family: 'Font Awesome 6 Free';

packages/typo3-docs-theme/resources/public/css/theme.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23998,8 +23998,12 @@ dl.command .command-arguments section {
2399823998

2399923999
.directory-tree ul {
2400024000
margin-bottom: 0;
24001+
padding-left: 0;
2400124002
list-style: none;
2400224003
}
24004+
.directory-tree ul ul {
24005+
padding-left: 1.5em;
24006+
}
2400324007
.directory-tree ul li {
2400424008
margin-bottom: 0;
2400524009
}
@@ -24011,10 +24015,10 @@ dl.command .command-arguments section {
2401124015
}
2401224016
.directory-tree ul li .content .toggle a[data-bs-toggle=collapse] .icon::before {
2401324017
font-family: "Font Awesome 6 Free";
24014-
content: "\f0fe";
24018+
content: "\f146";
2401524019
}
2401624020
.directory-tree ul li .content .toggle a[data-bs-toggle=collapse].collapsed .icon::before {
24017-
content: "\f146";
24021+
content: "\f0fe";
2401824022
}
2401924023
.directory-tree ul li .content .no-toggle {
2402024024
width: 1.5em;
@@ -24027,6 +24031,7 @@ dl.command .command-arguments section {
2402724031
font-family: var(--bs-body-font-family);
2402824032
line-height: var(--bs-body-line-height);
2402924033
font-size: 1.1rem;
24034+
padding: 0;
2403024035
}
2403124036
.directory-tree ul li .content .label code.file::before, .directory-tree ul li .content .label code.path::before {
2403224037
width: 1.5em;

0 commit comments

Comments
 (0)