Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions themes/jquery/css/docsearch.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* Custom DocSeach CSS to adapt the generic one * See https://community.algolia.com/docsearch/styling.html for more info */
nav#main .searchform {
text-shadow: none;
}

.searchform label {
width: 100%;
display: block;
}

.algolia-autocomplete {
width: 99%;
}

@media only screen and (max-width: 480px) {
.ds-dropdown-menu {
min-width: 100% !important;
}
}
7 changes: 6 additions & 1 deletion themes/jquery/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
</footer>

<?php wp_footer(); ?>

<!-- at the end of the BODY -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js" onload="docsearch({apiKey: '3cfde9aca378c8aab554d5bf1b23489b',
indexName: 'jquery',
inputSelector: 'input[name=\'s\']',
debug: true // Set debug to true if you want to inspect the dropdown
})" async></script>
</body>
</html>
3 changes: 3 additions & 0 deletions themes/jquery/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

<script src="https://use.typekit.net/wde1aof.js"></script>
<script>try{Typekit.load();}catch(e){}</script>
<!-- at the end of the HEAD -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/docsearch.css">

<?php
if ( is_singular() && get_option( 'thread_comments' ) )
Expand Down