Added search

This commit is contained in:
Eduard Urbach 2017-09-22 23:36:43 +02:00
parent 43f350f5d7
commit e99f8e36e5
5 changed files with 45 additions and 35 deletions

View File

@ -15,16 +15,21 @@ component Sidebar(user *arn.User)
SidebarButton("Artworks", "/artworks", "paint-brush") SidebarButton("Artworks", "/artworks", "paint-brush")
SidebarButton("Soundtracks", "/soundtracks", "headphones") SidebarButton("Soundtracks", "/soundtracks", "headphones")
SidebarButton("AMVs", "/amvs", "video-camera") SidebarButton("AMVs", "/amvs", "video-camera")
//- SidebarButton("Games", "/games", "gamepad")
SidebarButton("Users", "/users", "globe") SidebarButton("Users", "/users", "globe")
//- SidebarButton("Search", "/search", "search")
if user != nil if user != nil
if user.Role != "" SidebarButton("Statistics", "/statistics", "pie-chart")
SidebarButton("Statistics", "/statistics", "pie-chart")
SidebarButton("Settings", "/settings", "cog") SidebarButton("Settings", "/settings", "cog")
.spacer .spacer
.sidebar-link(aria-label="Search")
.sidebar-button
Icon("search")
FuzzySearch
SidebarButton("Help", "/thread/I3MMiOtzR", "question-circle") SidebarButton("Help", "/thread/I3MMiOtzR", "question-circle")
if user != nil if user != nil

View File

@ -98,11 +98,6 @@ export class AnimeNotifier {
} }
run() { run() {
// Add "osx" class on macs so we can set a proper font-size
if(navigator.platform.includes("Mac")) {
document.documentElement.classList.add("osx")
}
// Check for WebP support // Check for WebP support
this.webpEnabled = canUseWebP() this.webpEnabled = canUseWebP()
@ -127,6 +122,9 @@ export class AnimeNotifier {
this.sideBar = this.app.find("sidebar") this.sideBar = this.app.find("sidebar")
document.body.addEventListener("click", e => { document.body.addEventListener("click", e => {
if(document.activeElement.id === "search")
return;
this.sideBar.classList.remove("sidebar-visible") this.sideBar.classList.remove("sidebar-visible")
}) })

View File

@ -4,8 +4,8 @@ remove-margin = 1.1rem
// Put navigation to the bottom of the screen // Put navigation to the bottom of the screen
flex-direction column-reverse !important flex-direction column-reverse !important
.extension-navigation // .extension-navigation
display inline-block // display inline-block
.anime-list .anime-list
// max-width 500px // max-width 500px

View File

@ -19,7 +19,6 @@ input, textarea, select
ui-disabled ui-disabled
input, select input, select
width 100%
padding 0.5rem 1rem padding 0.5rem 1rem
input input

View File

@ -42,45 +42,53 @@
display none display none
#search #search
flex 1
border-radius 0
background transparent background transparent
border none border none
color nav-link-hover-color
font-size 1em font-size 1em
min-width 0 padding 0
width 0
flex-grow 1
::placeholder // #search
color nav-link-color // flex 1
// border-radius 0
// background transparent
// border none
// color nav-link-hover-color
// font-size 1em
// min-width 0
:focus // ::placeholder
border none // color nav-link-color
box-shadow none
.extra-navigation // :focus
display none // border none
// box-shadow none
.extension-navigation // .extra-navigation
display none // display none
> 330px // .extension-navigation
.navigation-button, #search // display none
font-size 1.3em
// > 330px
// .navigation-button, #search
// font-size 1.3em
// > 550px // > 550px
// #navigation // #navigation
// padding 0 content-padding // padding 0 content-padding
> 930px // > 930px
.navigation-button, #search // .navigation-button, #search
font-size 1.2em // font-size 1.2em
#navigation // #navigation
justify-content flex-start // justify-content flex-start
.extra-navigation // .extra-navigation
display block // display block
// @media screen and (max-device-height: 500px) // @media screen and (max-device-height: 500px)
// #navigation // #navigation