diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..201c9b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +public/ +pagefind \ No newline at end of file diff --git a/themes/osuosl/assets/css/style.css b/themes/osuosl/assets/css/style.css index 18a2283..67e4dfc 100644 --- a/themes/osuosl/assets/css/style.css +++ b/themes/osuosl/assets/css/style.css @@ -121,36 +121,67 @@ textarea { font-weight: bold; } -.search-container { - margin: 1.4em; +.search-modal { + display: none; } -.search-form { +.search-modal.show { display: flex; - margin: 0; + flex-direction: column; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); + z-index: 1000; + align-items: center; + justify-content: center; } -.search { - border-radius: 12px 0 0 12px; - border: medium none; - padding: 6px; - margin: 0; - width: 100px; +.search-modal.hide { + display: none; } -.submit-search { - border-radius: 0 12px 12px 0; - border-style: none; - padding: 5px; - margin: 0; - height: 33px; - width: 40px; - cursor: pointer; - background: black; +.search-headers { + display: flex; + justify-content: space-between; + align-items: center; } -.fa-search { +.close-search { + height: fit-content; + border: none; + background: white; +} + +.close-search i { + font-size: x-large; +} + +.search-modal-container { + background: white; + width: 56rem; + height: 90vh; + overflow: scroll; + margin: 50px; + padding: 20px; +} + +.open-search { + border-radius: 10px; + border-style: none; + padding: 5px; + margin: 1em; + height: 33px; + width: 40px; + cursor: pointer; color: white; + background: none; +} + +.open-search:hover { + background: black; } /* diff --git a/themes/osuosl/layouts/_default/baseof.html b/themes/osuosl/layouts/_default/baseof.html index 5f8e2ec..6316bd8 100644 --- a/themes/osuosl/layouts/_default/baseof.html +++ b/themes/osuosl/layouts/_default/baseof.html @@ -1,5 +1,6 @@ + {{ partial "search.html" . }} {{- partial "head.html" . -}} {{- partial "header.html" . -}} diff --git a/themes/osuosl/layouts/_default/list.html b/themes/osuosl/layouts/_default/list.html index 1345fc5..7e2d549 100644 --- a/themes/osuosl/layouts/_default/list.html +++ b/themes/osuosl/layouts/_default/list.html @@ -1,7 +1,7 @@ {{ define "main" }}
{{- partial "menu.html" . -}} -

{{ .Title }}

+

{{ .Title }}

{{ .Content }}
diff --git a/themes/osuosl/layouts/_default/single.html b/themes/osuosl/layouts/_default/single.html index 1345fc5..7e2d549 100644 --- a/themes/osuosl/layouts/_default/single.html +++ b/themes/osuosl/layouts/_default/single.html @@ -1,7 +1,7 @@ {{ define "main" }}
{{- partial "menu.html" . -}} -

{{ .Title }}

+

{{ .Title }}

{{ .Content }}
diff --git a/themes/osuosl/layouts/_default/summary.html b/themes/osuosl/layouts/_default/summary.html index 3049e79..6bf9d47 100644 --- a/themes/osuosl/layouts/_default/summary.html +++ b/themes/osuosl/layouts/_default/summary.html @@ -1,7 +1,7 @@
{{ partial "post_thumbnail.html" (dict "class" "list" "page" .) }}
-

+

{{ .Title }} diff --git a/themes/osuosl/layouts/partials/head.html b/themes/osuosl/layouts/partials/head.html index c8a606c..a13f7a1 100644 --- a/themes/osuosl/layouts/partials/head.html +++ b/themes/osuosl/layouts/partials/head.html @@ -8,4 +8,5 @@ + \ No newline at end of file diff --git a/themes/osuosl/layouts/partials/header.html b/themes/osuosl/layouts/partials/header.html index 2b8d6bc..8de482f 100644 --- a/themes/osuosl/layouts/partials/header.html +++ b/themes/osuosl/layouts/partials/header.html @@ -6,10 +6,7 @@
-
- - -
+
diff --git a/themes/osuosl/layouts/partials/menu.html b/themes/osuosl/layouts/partials/menu.html index 1f1a04e..ea1ccf2 100644 --- a/themes/osuosl/layouts/partials/menu.html +++ b/themes/osuosl/layouts/partials/menu.html @@ -35,7 +35,6 @@ {{ .Pre }} {{ .Name }} - {{ .Post }} diff --git a/themes/osuosl/layouts/partials/search.html b/themes/osuosl/layouts/partials/search.html new file mode 100644 index 0000000..2ddba3b --- /dev/null +++ b/themes/osuosl/layouts/partials/search.html @@ -0,0 +1,26 @@ + + + +
+
+
+

Search

+ +
+ +
+
+ + \ No newline at end of file diff --git a/themes/osuosl/static/js/search-modal.js b/themes/osuosl/static/js/search-modal.js new file mode 100644 index 0000000..70d8f87 --- /dev/null +++ b/themes/osuosl/static/js/search-modal.js @@ -0,0 +1,14 @@ +document.addEventListener('DOMContentLoaded', function () { + var button = document.getElementById("open-search"); + var menu = document.querySelector(".search-modal"); + var close = document.getElementById("close-search") + button.addEventListener("click", function () { + menu.classList.add("show"); + menu.classList.remove("hide"); + }); + + close.addEventListener("click", function () { + menu.classList.add("hide"); + menu.classList.remove("show"); + }); +}) \ No newline at end of file