Skip to content

Commit 4b2671b

Browse files
authored
feat(search): hide the simple search bar when already on a search results page
1 parent 010537e commit 4b2671b

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

phpmyfaq/assets/scss/layout/_theme-switcher.scss

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@
299299
background-color: var(--bs-dark);
300300
border: 2px solid var(--bs-light);
301301
color: var(--bs-light);
302+
font-weight: 800;
302303

303304
&:focus {
304305
background-color: var(--bs-dark);
@@ -352,8 +353,6 @@
352353
a {
353354
color: var(--bs-primary);
354355
text-decoration: underline;
355-
font-size: 1.3rem;
356-
font-weight: 800;
357356

358357
&:hover {
359358
color: var(--bs-dark);
@@ -362,6 +361,14 @@
362361
border-radius: 4px;
363362
}
364363
}
364+
365+
// Apply larger sizing only to main content links
366+
.pmf-content a,
367+
main a {
368+
font-size: 1.3rem;
369+
font-weight: 800;
370+
}
371+
365372
//Logo link exception - yellow border on hover & scale up for better visibility
366373
#phpmyfaq-logo {
367374
transform: scale(1.3);
@@ -459,8 +466,9 @@
459466

460467
// Improve readability of badges
461468
.badge {
462-
border: 3px solid var(--bs-light);
463-
469+
border: 4px solid var(--bs-dark);
470+
font-weight: 800;
471+
464472
&.bg-info {
465473
background-color: var(--bs-primary) !important;
466474
color: #000000;

phpmyfaq/assets/templates/default/index.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
</nav>
101101

102102
<!-- SEARCH -->
103-
{% if not isMaintenanceMode %}
103+
{% set isSearchPage = (currentPageUrl matches '/\\/search\\.html([?#]|$)/') or (currentPageUrl matches '/[?&]action=search(&|$)/') %}
104+
{% if not isMaintenanceMode and not isSearchPage %}
104105
<div class="container my-5">
105106
<div class="row height d-flex justify-content-center align-items-center">
106107
<div class="col-md-8">

0 commit comments

Comments
 (0)