Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
anchor-theme
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tetras-libre
anchor-theme
Commits
b89bdf29
Verified
Commit
b89bdf29
authored
6 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Cleaner dropdown menu
parent
172ceb69
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
css/reset.css
+1
-1
1 addition, 1 deletion
css/reset.css
css/style.css
+2
-2
2 additions, 2 deletions
css/style.css
functions.php
+4
-12
4 additions, 12 deletions
functions.php
with
7 additions
and
15 deletions
css/reset.css
+
1
−
1
View file @
b89bdf29
...
@@ -83,7 +83,7 @@ a {
...
@@ -83,7 +83,7 @@ a {
*/
*/
.wrap
{
.wrap
{
min-width
:
280px
;
min-width
:
280px
;
max-width
:
90
0px
;
max-width
:
85
0px
;
width
:
60%
;
width
:
60%
;
margin
:
0
auto
;
margin
:
0
auto
;
...
...
This diff is collapsed.
Click to expand it.
css/style.css
+
2
−
2
View file @
b89bdf29
...
@@ -148,10 +148,10 @@ h2{
...
@@ -148,10 +148,10 @@ h2{
/**
/**
* Give some extra space to single-page wrappers
* Give some extra space to single-page wrappers
*/
.content
{
.content
{
padding:
5
0px 0px;
padding
:
1
0px
0px
;
}
}
*/
.content
ul
,
.content
ol
,
.items
li
ul
{
.content
ul
,
.content
ol
,
.items
li
ul
{
padding
:
20px
30px
;
padding
:
20px
30px
;
}
}
...
...
This diff is collapsed.
Click to expand it.
functions.php
+
4
−
12
View file @
b89bdf29
...
@@ -122,25 +122,17 @@ function article_img($slug){
...
@@ -122,25 +122,17 @@ function article_img($slug){
}
}
function
print_item
(
$item
,
$class
){
function
print_item
(
$item
,
$class
){
echo
'<li '
.
$class
.
'>'
;
echo
'<li
class="
'
.
$class
.
'
"
>'
;
echo
'<a href="'
.
menu_url
(
$item
)
.
'" title="'
.
menu_title
(
$item
)
.
'">'
;
echo
'<a href="'
.
menu_url
(
$item
)
.
'" title="'
.
menu_title
(
$item
)
.
'">'
;
echo
menu_name
(
$item
)
.
' </a></li>'
;
echo
menu_name
(
$item
)
.
' </a></li>'
;
}
}
function
build_menu
(
$parent
,
$tree
){
function
build_menu
(
$parent
,
$tree
){
foreach
(
$tree
[
$parent
]
as
$i
=>
$item
){
foreach
(
$tree
[
$parent
]
as
$i
=>
$item
){
if
(
menu_active
(
$item
)){
$class
=
menu_active
(
$item
)
?
'active'
:
''
;
$class
=
'class="active"'
;
$expand
=
"true"
;
$collapse
=
"collapse in"
;
}
else
{
$class
=
''
;
$expand
=
'false'
;
$collapse
=
"collapse"
;
}
if
(
array_key_exists
(
$item
->
id
,
$tree
)){
if
(
array_key_exists
(
$item
->
id
,
$tree
)){
echo
'<li
'
.
$
class
.
' id="btn'
.
$item
->
id
.
'" data-toggle="collapse" data-target="#submenu'
.
$item
->
id
.
'" aria-expanded="'
.
$expand
.
'"><a
href="#"
>'
.
menu_name
(
$item
)
.
'</a>'
;
echo
'<li class
="dropdown '
.
$class
.
'"><a class="dropdown-toggle" data-toggle="dropdown"
href="#">'
.
menu_name
(
$item
)
.
'<
span class="caret"></span><
/a>'
;
echo
'<ul class="
nav navbar-nav '
.
$collapse
.
'" id="submenu'
.
$item
->
id
.
'" role="menu" aria-labelledby="btn'
.
$item
->
id
.
'"
>'
;
echo
'<ul class="
dropdown-menu"
>'
;
build_menu
(
$item
->
id
,
$tree
);
build_menu
(
$item
->
id
,
$tree
);
echo
'</ul>'
;
echo
'</ul>'
;
echo
'</li>'
;
echo
'</li>'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment