Skip to content

Commit

Permalink
Closes #203 add DDG searcj
Browse files Browse the repository at this point in the history
  • Loading branch information
kinow committed Apr 9, 2024
1 parent aeabc85 commit c48d789
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
2 changes: 2 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@ programming and, or, arts.

- [Curriculum Vitae](cv.pdf) (PDF)

{{< search >}}

</main>
2 changes: 2 additions & 0 deletions content/posts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ I also keep some [technical notes][notes] and [gists] on GitHub.
Main topics: [Open Source][opensource], [Workflows][workflows], [Arts][arts]
<!-- [UIUX][uiux], [Accessibility][accessibility] -->

{{< search >}}

[notes]: https://github.com/kinow/kinoshita.eti.br/tree/master/notes
[gists]: https://gist.github.com/kinow/
[opensource]: /tags/opensource.html
Expand Down
37 changes: 37 additions & 0 deletions themes/kinoshita.eti.br/assets/sass/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,40 @@ article.content, main.content {
}
}
}

/*
* Search
*/

search {
margin: 0 0 1rem 0;
form {
display: flex;
flex-wrap: wrap;
flex-direction: row;
gap: 0;
input {
flex-grow: 1;
border-radius: 10px 0 0 10px;
height: 2rem;
padding: 0 0.5rem;
border: 1px solid #AAAAAA;
border-right: 0 none;

&:focus-visible {
border: 1px solid #000000;
border-right: 0 none;
outline: none;
}
}
button {
flex-grow: 0.25;
border-radius: 0 10px 10px 0;
height: 2rem;
padding: 0;
cursor: pointer;
border: 1px solid #AAAAAA;
border-left: 0 none;
}
}
}
7 changes: 7 additions & 0 deletions themes/kinoshita.eti.br/layouts/shortcodes/search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<search>
<form action="https://duckduckgo.com/" method="GET" target="_blank" rel="noopener">
<input type="hidden" name="sites" value="kinoshita.eti.br" />
<input type="search" id="query" name="q" maxlength="255" aria-label="Search" placeholder="Search" />
<button type="submit">Search</button>
</form>
</search>

0 comments on commit c48d789

Please sign in to comment.