diff --git a/modules/extra-sidebar.php b/modules/extra-sidebar.php index 2621878..d1060cf 100644 --- a/modules/extra-sidebar.php +++ b/modules/extra-sidebar.php @@ -100,7 +100,10 @@ function render_sidebar($pageindex, $root_pagename = "") // The current page is the same as the root page, skip it if($pagename == $root_pagename) continue; - + + // If the page already appears on the sidebar, skip it + if(preg_match("/>$pagename<\a>/m", $result) === 1) + continue; // If the part of the current pagename that comes after the root // pagename has a slash in it, skip it as it is a sub-sub page. diff --git a/theme_default.css b/theme_default.css index 1f616eb..8758fde 100644 --- a/theme_default.css +++ b/theme_default.css @@ -21,6 +21,7 @@ input[type=search] { width: 14rem; padding: 0.3rem 0.4rem; font-size: 1rem; colo input[type=search]::-webkit-input-placeholder { color : rgba(255, 255, 255, 0.75); } input[type=button], input[type=submit] { cursor: pointer; } +.sidebar + .main-container nav.bottom { position: relative; } .sidebar { position: relative; z-index: 100; margin-top: 0.6rem; padding: 1rem 3rem 2rem 0.4rem; background: #9e7eb4; box-shadow: inset -0.6rem 0 0.8rem -0.5rem rgba(50, 50, 50, 0.5); } .sidebar a { color: #ffa74d; }