-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
106 lines (103 loc) · 7.42 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* stylelint-disable declaration-no-important */
/* stylelint-disable max-line-length */
/* Collapse nodes feature.
This feature is currently only possible for the mycourses, the coursesections and the activities node which are directly
supported by this plugin as well as the custom nodes which can be added with this plugin.
In a future version of this plugin, this might be done in a more general and lighter way. */
/* Show all second-level nav drawer items which have the attribute not hidden. */
.list-group-item[data-key="mycourses"][data-isexpandable="1"] ~ .list-group-item[data-parent-key="mycourses"][data-hidden="0"],
.list-group-item[data-key="localboostnavigationcoursesections"][data-isexpandable="1"] ~ .list-group-item[data-parent-key="localboostnavigationcoursesections"][data-hidden="0"],
.list-group-item[data-key="localboostnavigationactivities"][data-isexpandable="1"] ~ .list-group-item[data-parent-key="localboostnavigationactivities"][data-hidden="0"],
.list-group-item[data-key^="localboostnavigationcustom"][data-isexpandable="1"] ~ .list-group-item[data-parent-key^="localboostnavigationcustom"][data-hidden="0"] {
display: block;
}
/* Hide all second-level nav drawer items which have the attribute hidden. */
.list-group-item[data-key="mycourses"][data-isexpandable="1"] ~ .list-group-item[data-parent-key="mycourses"][data-hidden="1"],
.list-group-item[data-key="localboostnavigationcoursesections"][data-isexpandable="1"] ~ .list-group-item[data-parent-key="localboostnavigationcoursesections"][data-hidden="1"],
.list-group-item[data-key="localboostnavigationactivities"][data-isexpandable="1"] ~ .list-group-item[data-parent-key="localboostnavigationactivities"][data-hidden="1"],
.list-group-item[data-key^="localboostnavigationcustom"][data-isexpandable="1"] ~ .list-group-item[data-parent-key^="localboostnavigationcustom"][data-hidden="1"] {
display: none;
}
/* Add the icon for the expanded node state. */
.jsenabled .list-group-item[data-key="mycourses"][data-isexpandable="1"][data-collapse="0"] > div::after,
.jsenabled .list-group-item[data-key="localboostnavigationcoursesections"][data-isexpandable="1"][data-collapse="0"] > div::after,
.jsenabled .list-group-item[data-key="localboostnavigationactivities"][data-isexpandable="1"][data-collapse="0"] > div::after,
.jsenabled .list-group-item[data-key^="localboostnavigationcustom"][data-isexpandable="1"][data-collapse="0"] > div::after {
content: "\f0d7";
font-family: FontAwesome;
font-size: 1.2rem;
position: absolute;
right: 0.75rem;
top: 0.55rem;
}
/* Add the icon for the collapsed node state. */
.jsenabled .list-group-item[data-key="mycourses"][data-isexpandable="1"][data-collapse="1"] > div::after,
.jsenabled .list-group-item[data-key="localboostnavigationcoursesections"][data-isexpandable="1"][data-collapse="1"] > div::after,
.jsenabled .list-group-item[data-key="localboostnavigationactivities"][data-isexpandable="1"][data-collapse="1"] > div::after,
.jsenabled .list-group-item[data-key^="localboostnavigationcustom"][data-isexpandable="1"][data-collapse="1"] > div::after {
content: "\f0da";
font-family: FontAwesome;
font-size: 1.2rem;
position: absolute;
right: 0.75rem;
top: 0.55rem;
}
/* Make sure that the icon does not overlap with the node text. */
.jsenabled .list-group-item[data-key="mycourses"][data-isexpandable="1"] > div,
.jsenabled .list-group-item[data-key="localboostnavigationcoursesections"][data-isexpandable="1"] > div,
.jsenabled .list-group-item[data-key="localboostnavigationactivities"][data-isexpandable="1"] > div,
.jsenabled .list-group-item[data-key^="localboostnavigationcustom"][data-isexpandable="1"] > div {
padding-right: 1rem;
}
/* Set the cursor for the collapsible nodes. */
.jsenabled .list-group-item[data-key="mycourses"][data-isexpandable="1"],
.jsenabled .list-group-item[data-key="localboostnavigationcoursesections"][data-isexpandable="1"],
.jsenabled .list-group-item[data-key="localboostnavigationactivities"][data-isexpandable="1"],
.jsenabled .list-group-item[data-key^="localboostnavigationcustom"][data-isexpandable="1"] {
cursor: pointer;
}
/* Custom nodes feature. */
/* Add an indent to the custom child nodes because this isn't possible with Navigation node API.
Setting !important is necessary because otherwise the child nodes' m-l-0 class would overrule our margin. */
.list-group-item[data-parent-key^="localboostnavigationcustom"] > div {
margin-left: 1rem !important;
}
/* Add a margin-top to the custom bottom nodes section because this isn't possible with Navigation node API. */
.list-group-item[data-key="localboostnavigationcustombottomusers1"],
.list-group-item[data-key="localboostnavigationcustombottomadmins1"] {
margin-top: 1rem;
}
/* Add a plugin-specific class to shrink fa-icons. This is needed for the custom nodes' icons.
Font-Awesome 5 will contain a similar class officially, but currently Moodle still uses Font-Awesome 4.. */
.local-boostnavigation-fa-sm {
font-size: 0.5em !important;
margin-top: 1em !important;
}
/* Improve node icons. */
/* Hide the (empty) node icon for heading nodes. */
.list-group-item[data-key="localboostnavigationcoursesections"] .icon.fa-fw,
.list-group-item[data-key="localboostnavigationactivities"] .icon.fa-fw {
display: none;
}
/* Hide the icon for the mycourses node ... */
.list-group-item[data-key="mycourses"] .icon {
display: none;
}
/* ... and remove the indent of the mycourses child nodes. */
.list-group-item[data-parent-key="mycourses"] > div {
margin-left: 0 !important;
}
/* Hide the icon for collapsible custom parent nodes ... */
.jsenabled .list-group-item[data-key^="localboostnavigationcustom"][data-isexpandable="1"] .icon {
display: none;
}
/* ... and remove the indent to the collapsed custom child nodes. Unfortunately, this has to be done for each custom node block
individually because the child node does not know (with a CSS-selectable attribute) if its parent node is collapsed or node. */
.jsenabled .list-group-item[data-key^="localboostnavigationcustomcourseusers"][data-isexpandable="1"]:not([data-parent-key^="localboostnavigationcustomcourseusers"]) ~ .list-group-item[data-parent-key^="localboostnavigationcustomcourseusers"] > div,
.jsenabled .list-group-item[data-key^="localboostnavigationcustomcourseadmins"][data-isexpandable="1"]:not([data-parent-key^="localboostnavigationcustomcourseadmins"]) ~ .list-group-item[data-parent-key^="localboostnavigationcustomcourseadmins"] > div,
.jsenabled .list-group-item[data-key^="localboostnavigationcustomrootusers"][data-isexpandable="1"]:not([data-parent-key^="localboostnavigationcustomrootusers"]) ~ .list-group-item[data-parent-key^="localboostnavigationcustomrootusers"] > div,
.jsenabled .list-group-item[data-key^="localboostnavigationcustomcrootadmins"][data-isexpandable="1"]:not([data-parent-key^="localboostnavigationcustomrootadmins"]) ~ .list-group-item[data-parent-key^="localboostnavigationcustomrooradmins"] > div,
.jsenabled .list-group-item[data-key^="localboostnavigationcustombottomusers"][data-isexpandable="1"]:not([data-parent-key^="localboostnavigationcustombottomusers"]) ~ .list-group-item[data-parent-key^="localboostnavigationcustombottomusers"] > div,
.jsenabled .list-group-item[data-key^="localboostnavigationcustombottomadmins"][data-isexpandable="1"]:not([data-parent-key^="localboostnavigationcustombottomadmins"]) ~ .list-group-item[data-parent-key^="localboostnavigationcustombottomadmins"] > div {
margin-left: inherit !important;
}