-
Notifications
You must be signed in to change notification settings - Fork 72
fix: prevent search bar from growing on scroll #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| {{ define "main" }} | ||
|
|
||
| <section class="section"> | ||
| <div class="container"> | ||
| <div class="row"> | ||
| <div class="col-lg-8 mx-auto block shadow mb-5"> | ||
| <h2>{{ .Title | markdownify }}</h2> | ||
| <div class="mb-3 post-meta"> | ||
| <a href="{{ `author/` | relLangURL }}{{ .Params.Author | urlize | lower }}/">{{ .Params.Author | title }}</a>, | ||
| {{ .PublishDate.Format "Jan 2, 2006" }}, {{ range .Params.Categories }} | ||
| <a href="{{ `categories/` | relLangURL }}{{ . | urlize | lower }}/">{{ . | title }}</a> | ||
| {{ end }} | ||
| </div> | ||
| {{ if .Params.Image }} | ||
| <img src="{{ .Params.Image | relURL }}" class="img-fluid w-100 mb-4" alt="{{ .Title | markdownify }}"> | ||
| {{ end }} | ||
| <div class="content mb-5"> | ||
| {{ .Content }} | ||
| </div> | ||
| <div class="mb-3 post-meta"> | ||
| {{range .Params.Tags }} <a href="{{ `tags/` | relLangURL}}{{ . | urlize | lower }}/">#{{ . | title }}</a>, {{ end }} | ||
| </div> | ||
| </div> | ||
| <div class="col-lg-8 mx-auto block shadow"> | ||
| {{ $related := .Site.RegularPages.Related . | first 5 }} | ||
| {{ with $related }} | ||
| <h3>See Also</h3> | ||
| <ul> | ||
| {{ range . }} | ||
| <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> | ||
| {{ end }} | ||
| </ul> | ||
| {{ end }} | ||
| </div> | ||
| {{ if site.Config.Services.Disqus.Shortname}} | ||
| <div class="col-lg-8 mx-auto block shadow"> | ||
| <!-- comments --> | ||
| {{ template "_internal/disqus.html" . }} | ||
| </div> | ||
| {{ end }} | ||
| </div> | ||
| </div> | ||
| </section> | ||
|
|
||
| {{ end }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| <header class="fixed-top navigation"> | ||
| <div class="container"> | ||
| <nav class="navbar px-0 navbar-expand-lg navbar-light bg-transparent"> | ||
| <a class="navbar-brand" href="{{ .Site.BaseURL }}"> | ||
| <img | ||
| class="img-fluid" | ||
| src="{{ .Site.Params.logo | relURL }}" | ||
| alt="{{ .Site.Title }}" | ||
| /> | ||
| </a> | ||
| <button | ||
| class="navbar-toggler border-0 px-0" | ||
| type="button" | ||
| data-toggle="collapse" | ||
| data-target="#navigation" | ||
| aria-label="Toggle navigation" | ||
| > | ||
| <i class="ti-menu text-dark h3"></i> | ||
| </button> | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| <div class="collapse navbar-collapse text-center" id="navigation"> | ||
| <ul class="navbar-nav ml-auto"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WCAG 1.3.1:
DetailsScreen readers announce list structure ('list with 5 items') based on proper markup. Placing non-
SouparnaChatterjee marked this conversation as resolved.
|
||
| <li class="nav-item"> | ||
| <a class="nav-link" href="{{ .Site.BaseURL }}" | ||
| >{{ with .Site.Params.Home }} {{ . }} {{ end }}</a | ||
| > | ||
| </li> | ||
| {{ range .Site.Menus.main }} {{ if .HasChildren }} | ||
| <li class="nav-item dropdown"> | ||
|
|
||
| <a | ||
|
|
||
| class="nav-link dropdown-toggle" | ||
| href="#" | ||
| role="button" | ||
| data-toggle="dropdown" | ||
| aria-haspopup="true" | ||
| aria-expanded="false" | ||
| > | ||
| {{ .Name }} | ||
| </a> | ||
| <div class="dropdown-menu"> | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| {{ range .Children }} | ||
| <a class="dropdown-item" href="{{ .URL | absURL }}" | ||
| >{{ .Name }}</a | ||
| > | ||
| {{ end }} | ||
| </div> | ||
| </li> | ||
| {{ else }} | ||
| <li class="nav-item"> | ||
| <a class="nav-link" href="{{ .URL | absURL }}">{{ .Name }}</a> | ||
| </li> | ||
| {{ end }} {{ end }} | ||
| </ul> | ||
| {{ if .Site.Params.search.enable }} {{ "<!-- search -->" | safeHTML }} | ||
| <div class="search"> | ||
| <button id="searchOpen" class="search-btn" aria-label="Open search"> | ||
| <i class="ti-search"></i> | ||
| </button> | ||
| <div class="search-wrapper"> | ||
| <form action="{{ `search` | absURL }}"> | ||
| <input | ||
| class="search-box" | ||
| id="search-query" | ||
| name="s" | ||
| type="search" | ||
| placeholder="Search posts..." | ||
| /> | ||
| </form> | ||
| <button id="searchClose" class="search-close" aria-label="Close search"> | ||
| <i class="ti-close text-dark"></i> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| {{ end }} | ||
| </div> | ||
| </nav> | ||
| </div> | ||
| </header> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WCAG 1.3.1:
<ul>contains direct text content. Wrap in<li>.<ul>and<ol>must only contain<li>,<script>, or<template>as direct children.Details
Screen readers announce list structure ('list with 5 items') based on proper markup. Placing non-
<li>elements directly inside<ul>or<ol>breaks this structure. Wrap content in<li>elements, or if you need wrapper divs for styling, restructure your CSS to style the<li>elements directly.