Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Daron
panikweb
Commits
08b77374
Commit
08b77374
authored
Sep 28, 2013
by
fred
Browse files
add a search input in top bar
parent
d67b8b83
Changes
3
Hide whitespace changes
Inline
Side-by-side
panikweb_templates/static/css/specifics.css
View file @
08b77374
...
...
@@ -228,9 +228,24 @@ body{
#metaNav
ul
li
.active
span
.iconLabel
{
}
#metaNav
li
#nav-search
a
{
display
:
inline
;
}
#metaNav
form
{
display
:
inline
;
}
#metaNav
input
{
border
:
1px
solid
#ececec
;
}
@media
screen
and
(
max-width
:
600px
){
#metaNav
.iconLabel
{
display
:
none
;}
#metaNav
ul
li
a
span
.nav-icon
{
display
:
inline-block
;
}
#metaNav
form
{
display
:
none
;
}
}
/****************************************************/
...
...
@@ -300,6 +315,13 @@ body{
padding-top
:
40px
;
}
#metaNav
{
padding-top
:
2px
;
}
#metaNav
.nav-icon
{
display
:
none
!important
;
}
#Player
#CurrentlyPlaying
{
margin-top
:
50px
;
}
...
...
panikweb_templates/static/js/specifics.js
View file @
08b77374
...
...
@@ -391,6 +391,27 @@ $(function() {
});
ticker_interval
=
setInterval
(
function
(){
tick
();
},
20000
);
/**/
function
navsearch_click
(
event
)
{
event
.
preventDefault
();
var
query
=
$
(
'
#nav-search input
'
).
val
();
var
form
=
$
(
'
#nav-search form
'
);
var
href
=
''
;
if
(
query
==
''
)
{
href
=
$
(
form
).
attr
(
'
action
'
);
}
else
{
href
=
$
(
form
).
attr
(
'
action
'
)
+
'
?
'
+
$
(
form
).
serialize
();
}
if
(
event
.
which
==
2
)
{
window
.
open
(
href
,
'
_blank
'
);
}
else
{
$
(
this
).
addClass
(
'
loading
'
);
loadPage
(
href
);
}
return
false
;
}
$
(
'
#nav-search a
'
).
unbind
(
'
click
'
).
on
(
'
click
'
,
navsearch_click
);
$
(
'
#nav-search a
'
).
unbind
(
'
submit
'
).
on
(
'
submit
'
,
navsearch_click
);
}
init
();
});
panikweb_templates/templates/includes/metaNav.html
View file @
08b77374
...
...
@@ -24,7 +24,9 @@
<li
id=
"nav-search"
class=
"{% if sectionName = "
Search
"
%}
active
{%
endif
%}"
><a
href=
"{% url 'search' %}"
>
<span
class=
"nav-icon icon-search resymbol"
></span>
<span
class=
"iconLabel"
>
{% trans 'Search' %}
</span>
</a></li>
</a>
<form
action=
"{% url 'search' %}"
><input
name=
"q"
type=
"search"
></input></form>
</li>
</ul>
</nav>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment