Revert "experiment search box"
This reverts commit 0e9507228c
.
experiment search box
This commit is contained in:
parent
5267b4e64b
commit
ae1931e477
7 changed files with 41 additions and 200 deletions
|
@ -1,16 +1,37 @@
|
|||
<!-- Sidebar -->
|
||||
<div class="sidebar">
|
||||
<div class="container {{ with .Site.Params.sidebarSticky }}sidebar-sticky{{ end }}">
|
||||
<div class="sidebar-about">
|
||||
<span class="site__title">
|
||||
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
|
||||
</span>
|
||||
{{ with .Site.Params.authorimage }}
|
||||
{{ $strippedSlash := ($.Site.Params.authorimage | replaceRE "^(/)+(.*)" "$2") }}
|
||||
{{ $authorImage := (printf "%s/%s" $.Site.BaseURL $strippedSlash) }}
|
||||
<div class="author-image">
|
||||
<img src="{{$authorImage}}" alt="Author Image" class="img--circle img--headshot element--center">
|
||||
</div>
|
||||
{{ end }}
|
||||
<p class="site__description">
|
||||
{{ with .Site.Params.description }} {{.}} {{end}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="collapsible-menu">
|
||||
<input type="checkbox" id="menuToggle">
|
||||
<label for="menuToggle">{{ .Site.Title }}</label>
|
||||
<div class="menu-content">
|
||||
{{ partial "sidebar/about.html" . }}
|
||||
{{ partial "sidebar/menu.html" . }}
|
||||
{{ partial "sidebar/social.html" . }}
|
||||
{{ partial "sidebar/copyright.html" . }}
|
||||
{{ partial "sidebar/search.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
<p class="copyright">
|
||||
{{ with .Site.Params.copyright }}{{.|safeHTML}}{{ else }}© {{ now.Format "2006"}} {{.Site.Params.author}}.
|
||||
<a href="https://creativecommons.org/licenses/by-sa/4.0">Some Rights Reserved</a>.
|
||||
<br/>Built with
|
||||
<a href="https://gohugo.io">Hugo</a> ❤️ <a href="https://github.com/htr3n/hyde-hyde">hyde-hyde</a>.
|
||||
{{end}}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
|
||||
<symbol xmlns="http://www.w3.org/2000/svg" id="icon-search" viewBox="0 0 40 40">
|
||||
<path d="M16 32c8.835 0 16-7.165 16-16 0-8.837-7.165-16-16-16C7.162 0 0 7.163 0 16c0 8.835 7.163 16 16 16zm0-5.76c5.654 0 10.24-4.586 10.24-10.24 0-5.656-4.586-10.24-10.24-10.24-5.656 0-10.24 4.584-10.24 10.24 0 5.654 4.584 10.24 10.24 10.24zM28.156 32.8c-1.282-1.282-1.278-3.363.002-4.643 1.282-1.284 3.365-1.28 4.642-.003l6.238 6.238c1.282 1.282 1.278 3.363-.002 4.643-1.283 1.283-3.366 1.28-4.643.002l-6.238-6.238z"
|
||||
fill-rule="evenodd" />
|
||||
</symbol>
|
||||
<symbol xmlns="http://www.w3.org/2000/svg" id="icon-clear" viewBox="0 0 20 20">
|
||||
<path d="M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"
|
||||
fill-rule="evenodd" />
|
||||
</symbol>
|
||||
</svg>
|
||||
<div class="searchbox">
|
||||
<form novalidate="novalidate" onsubmit="return false;">
|
||||
<div role="search" class="searchbox__wrapper">
|
||||
<input type="search" name="search" placeholder="Search ..." autocomplete="off" required="required" class="searchbox__input">
|
||||
<button type="submit" title="Start searching" class="searchbox__submit">
|
||||
<svg role="img" aria-label="Search">
|
||||
<use xlink:href="#icon-search"></use>
|
||||
</svg>
|
||||
</button>
|
||||
<button type="reset" title="Clear" class="searchbox__reset">
|
||||
<svg role="img" aria-label="Reset">
|
||||
<use xlink:href="#icon-clear"></use>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
Before Width: | Height: | Size: 1.6 KiB |
|
@ -15,9 +15,5 @@
|
|||
@import 'hyde-hyde/taxonomies';
|
||||
@import 'hyde-hyde/project';
|
||||
@import 'hyde-hyde/responsive';
|
||||
@import 'hyde-hyde/search';
|
||||
@import 'hyde-hyde/misc';
|
||||
@import 'hyde-hyde/theme';
|
||||
|
||||
// font-awesome
|
||||
@import 'font-awesome/assets/stylesheets/font-awesome';
|
||||
|
|
|
@ -8,15 +8,16 @@
|
|||
}
|
||||
.sidebar {
|
||||
li {
|
||||
padding: 0.1rem 0;
|
||||
padding: .1rem 0;
|
||||
}
|
||||
}
|
||||
.hidden-tablet {
|
||||
display: none;
|
||||
}
|
||||
.sidebar-about,
|
||||
.copyright {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.sidebar {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
@ -25,54 +26,39 @@
|
|||
padding: 0 0 0 0px;
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
margin-top: 0;
|
||||
}
|
||||
margin-top: 0; }
|
||||
.collapsible-menu {
|
||||
padding: 0px 0px;
|
||||
padding: 0px 0px;
|
||||
}
|
||||
.collapsible-menu ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.collapsible-menu li {
|
||||
display: block;
|
||||
}
|
||||
.collapsible-menu a {
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
cursor: pointer; }
|
||||
.collapsible-menu label {
|
||||
//background: url(/img/menu-open.svg) no-repeat left center;
|
||||
background-repeat: no-repeat;
|
||||
background: url(/img/menu-open.svg) no-repeat left center;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
padding: 10px 0 10px 0px;
|
||||
&:before {
|
||||
content: "\f054";
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
left: 1.667em;
|
||||
position: absolute;
|
||||
top: .667em;
|
||||
}
|
||||
}
|
||||
color: #fff;
|
||||
padding: 10px 0 10px 0px; }
|
||||
|
||||
input#menuToggle {
|
||||
display: none;
|
||||
display: none;
|
||||
}
|
||||
input#menuToggle + label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input#menuToggle:checked + label {
|
||||
//background-image: url(/img/menu-close.svg);
|
||||
&:before {
|
||||
content: "\f078";
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
left: 20px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
}
|
||||
background-image: url(/img/menu-close.svg);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
input#menuToggle:checked ~ .menu-content {
|
||||
max-height: 100% !important;
|
||||
}
|
||||
|
@ -139,7 +125,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Large devices (laptops/desktops, 992px and up)
|
||||
// Large devices (laptops/desktops, 992px and up)
|
||||
// ~ 62rem/16px ~ 58.3529rem/17px ~ 55.1111rem/18px
|
||||
@media (min-width: 992px) {
|
||||
html,
|
||||
|
|
|
@ -1,130 +0,0 @@
|
|||
// search box styles
|
||||
// generated and adapted from https://shipow.github.io/searchbox
|
||||
.searchbox {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
text-align: center;
|
||||
form {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 12rem;
|
||||
height: 1.65rem;
|
||||
white-space: nowrap;
|
||||
font-size: $searchbox-font-size;
|
||||
}
|
||||
}
|
||||
|
||||
.searchbox__wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.searchbox__input {
|
||||
display: inline-block;
|
||||
transition: box-shadow 0.4s ease, background 0.4s ease;
|
||||
border: 0;
|
||||
border-radius: 17px;
|
||||
box-shadow: inset 0 0 0 1px #e1e8ed;
|
||||
background: #f5f8fa;
|
||||
padding: 0;
|
||||
padding-right: 52px;
|
||||
padding-left: 16px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
white-space: normal;
|
||||
font-size: inherit;
|
||||
appearance: none;
|
||||
&:hover {
|
||||
box-shadow: inset 0 0 0 1px #c1d0da;
|
||||
}
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
&:active {
|
||||
outline: 0;
|
||||
}
|
||||
&:valid ~ .searchbox__reset {
|
||||
display: block;
|
||||
animation-name: sbx-reset-in;
|
||||
animation-duration: 0.15s;
|
||||
}
|
||||
}
|
||||
.searchbox__input::-webkit-search-decoration {
|
||||
display: none;
|
||||
}
|
||||
.searchbox__input::-webkit-search-cancel-button {
|
||||
display: none;
|
||||
}
|
||||
.searchbox__input::-webkit-search-results-button {
|
||||
display: none;
|
||||
}
|
||||
.searchbox__input::-webkit-search-results-decoration {
|
||||
display: none;
|
||||
}
|
||||
.searchbox__input::placeholder {
|
||||
color: #9aaeb5;
|
||||
}
|
||||
|
||||
.searchbox__submit {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: inherit;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
border-radius: 0 16px 16px 0;
|
||||
background-color: rgba(62, 130, 247, 0);
|
||||
padding: 0;
|
||||
width: 33px;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
font-size: inherit;
|
||||
user-select: none;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
&:active {
|
||||
cursor: pointer;
|
||||
}
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
svg {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
vertical-align: middle;
|
||||
fill: #657580;
|
||||
}
|
||||
}
|
||||
.searchbox__submit::before {
|
||||
display: inline-block;
|
||||
margin-right: -4px;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
content: "";
|
||||
}
|
||||
.searchbox__reset {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
right: 33px;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
font-size: inherit;
|
||||
user-select: none;
|
||||
fill: rgba(0, 0, 0, 0.5);
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
svg {
|
||||
display: block;
|
||||
margin: 4px;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
}
|
||||
}
|
|
@ -72,8 +72,6 @@
|
|||
}
|
||||
|
||||
.copyright {
|
||||
margin-top: 1.5em;
|
||||
text-align: center;
|
||||
font-size: $copyright-font-size;
|
||||
line-height: 1.5;
|
||||
font-size: $copyright-font-size;
|
||||
}
|
||||
|
|
|
@ -102,6 +102,3 @@ $project__subtitle-font-style: italic;
|
|||
$project__subtitle-color: #778492;
|
||||
$ribbon-color: #276582;
|
||||
$ribbon-background-color: #479fc8;
|
||||
|
||||
// search box
|
||||
$searchbox-font-size: .7rem;
|
||||
|
|
Loading…
Reference in a new issue