Skip to content

Commit

Permalink
feat: search styling
Browse files Browse the repository at this point in the history
  • Loading branch information
therobrob committed Jan 26, 2025
1 parent 8071ec3 commit a34f670
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 16 deletions.
38 changes: 24 additions & 14 deletions themes/fiptheme/assets/sass/stage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,41 @@

.o-stage__search {
position: absolute;
width: 60%;
width: 80%;
height: 6rem;
left: 50%;
transform: translate(-50%);
display: flex;
background-color: white;
z-index: 3;

@include media-breakpoint-up(md) {
width: 60%;
}

.pagefind-ui__suppressed {
display: none;
}

.pagefind-ui__drawer {
background-color: white;
padding: 0 1rem;
overscroll-behavior: contain;
height: 26rem;
height: 35rem;
overflow-y: scroll;
position: relative;
top: -.7rem;
border-left: var(--pagefind-ui-border-width) solid var(--pagefind-ui-border);
border-right: var(--pagefind-ui-border-width) solid var(--pagefind-ui-border);
border-bottom: var(--pagefind-ui-border-width) solid var(--pagefind-ui-border);
border-bottom-left-radius: var(--pagefind-ui-border-radius);
border-bottom-right-radius: var(--pagefind-ui-border-radius);
}
}

.o-stage__search-field {
width: 100%;

padding-left: 1rem;
padding-right: 1rem;
background-color: white;
border-radius: 1rem 0 0 1rem;
}

.o-stage__button {
border-radius: 0 1rem 1rem 0;
.curtain:has(~ .o-stage .o-stage__search:focus-within) {
background-color: rgba(0, 0, 0, .8);
inset: 0;
position: fixed;
z-index: 2;
transition: .3s ease;
}
9 changes: 8 additions & 1 deletion themes/fiptheme/assets/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ html {
}

body {
background-color: $gray-300;
background-color: $gray-200;
font-size: 1.8rem;
overflow-x: hidden;
font-family: Arial,Helvetica,sans-serif;
}

header {
z-index: 3;
position: relative;
}

a {
Expand Down
2 changes: 1 addition & 1 deletion themes/fiptheme/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
{{ partial "head.html" . }}
</head>
<body class="bg-light">
<body>
<header>{{ partial "header.html" . }}</header>
<main id="content" data-pagefind-body>{{ block "main" . }}{{ end }}</main>
<footer>{{ partial "footer.html" . }}</footer>
Expand Down
1 change: 1 addition & 0 deletions themes/fiptheme/layouts/_default/home.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ define "main" }}
<div class="curtain"></div>
{{ partial "stage.html" }}
<section class="container">
{{ .Content }}
Expand Down

0 comments on commit a34f670

Please sign in to comment.