Skip to content

Commit

Permalink
Replace custom search with vertex search widget
Browse files Browse the repository at this point in the history
  • Loading branch information
kevcenteno committed Oct 9, 2024
1 parent afc8ef4 commit f5fd3d5
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 399 deletions.
49 changes: 0 additions & 49 deletions assets/js/GoogleSearch.ts

This file was deleted.

106 changes: 0 additions & 106 deletions assets/js/search-results.ts

This file was deleted.

26 changes: 0 additions & 26 deletions assets/js/search.ts

This file was deleted.

116 changes: 0 additions & 116 deletions assets/scss/_search-results.scss

This file was deleted.

49 changes: 0 additions & 49 deletions assets/scss/_search.scss
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
@use 'mixins';

.searchbar {
display: none;
position: relative;
}

.mag {
svg {
color: var(--mm-color-primary-text);
left: calc(var(--mm-spacing) / 2);
position: absolute;
top: 50%;
transform: translateY(-50%);
}
}

.searchbar__open {
display: inline-block;
left: calc(50% - 20px);
margin: 0 calc(var(--mm-spacing) / 2);
max-width: calc(var(--mm-max-width) - 80px);
position: absolute;
top: calc(50% + 5px);
transform: translate(-50%, -50%);
width: calc(100% - (2 * var(--mm-spacing)));
z-index: 100;
}

.search {
position: relative;
}
Expand All @@ -39,25 +12,3 @@
margin-top: 3px;
}
}

.input {
appearance: none !important;
border: 1px solid var(--mm-color-border);
border-radius: var(--mm-border-radius);
color: var(--mm-color-primary-text);
padding: 12px 10px 12px calc(var(--mm-spacing) + 15px);
width: 100%;

&::placeholder {
opacity: 0.5;
}

&:focus {
box-shadow: 0 0 0 2px var(--mm-color-logo-blue-light);
outline: none;
}
}

.hidden {
display: none;
}
1 change: 0 additions & 1 deletion assets/scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
@import 'pre';
@import 'loading';
@import 'search';
@import 'search-results';
@import 'sidebar';
@import 'table';
@import 'variables';
Expand Down
5 changes: 0 additions & 5 deletions content/search-results.md

This file was deleted.

10 changes: 8 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@
defer
src="//js.hs-scripts.com/21266834.js"
></script>
<script src="https://cloud.google.com/ai/gen-app-builder/client?hl=en_US"></script>

<!-- Search widget element is not visible by default -->
<gen-search-widget
configId="3c7b0bea-0cb1-4fdf-894a-1992d4c916cc"
triggerId="searchWidgetTrigger">
</gen-search-widget>
</body>
{{ $codeset := resources.Get "js/codeset.ts" | js.Build }}
{{ $geoipCrontab := resources.Get "js/geoip-crontab.ts" | js.Build }}
{{ $search := resources.Get "js/search.ts" | js.Build }}
{{ $sidebar := resources.Get "js/sidebar.ts" | js.Build }}
{{ $js := slice $codeset $geoipCrontab $search $sidebar | resources.Concat "js/bundle.js" }}
{{ $js := slice $codeset $geoipCrontab $sidebar | resources.Concat "js/bundle.js" }}
<script type="module" src="{{ $js.RelPermalink }}"></script>
</html>
Loading

0 comments on commit f5fd3d5

Please sign in to comment.