Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
node-slate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Hải Sơn
node-slate
Commits
59ee05c6
Commit
59ee05c6
authored
Apr 11, 2014
by
Christopher Rogers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates search field markup and style
Signed-off-by:
Christopher Rogers
<
chrissrogers@gmail.com
>
parent
f2d13879
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
+31
-5
search.js
source/javascripts/app/search.js
+1
-1
layout.erb
source/layouts/layout.erb
+3
-1
screen.css.scss
source/stylesheets/screen.css.scss
+27
-3
No files found.
source/javascripts/app/search.js
View file @
59ee05c6
...
...
@@ -29,7 +29,7 @@
}
function
bind
()
{
$
(
'#search'
).
on
(
'keyup'
,
function
()
{
$
(
'#
input-
search'
).
on
(
'keyup'
,
function
()
{
if
(
this
.
value
)
{
var
items
=
index
.
search
(
this
.
value
);
$
(
'section, #toc .tocify-item'
).
hide
();
...
...
source/layouts/layout.erb
View file @
59ee05c6
...
...
@@ -38,7 +38,9 @@ under the License.
<body
class=
"
<%=
page_classes
%>
"
>
<div
class=
"tocify-wrapper"
>
<%=
image_tag
"logo.png"
%>
<input
type=
"text"
id=
"search"
placeholder=
"search"
>
<div
class=
"search"
>
<input
type=
"text"
class=
"search"
id=
"input-search"
>
</div>
<div
id=
"toc"
>
</div>
<%
if
current_page
.
data
.
toc_footers
%>
...
...
source/stylesheets/screen.css.scss
View file @
59ee05c6
...
...
@@ -54,13 +54,37 @@ html, body {
// This is the logo at the top of the ToC
&
>
img
{
display
:
block
;
margin-bottom
:
$logo-margin
;
}
&
>
.search
{
position
:
relative
;
input
{
background
:
$nav-bg
;
border-width
:
0
0
1px
0
;
border-color
:
$nav-footer-border-color
;
padding
:
6px
0
6px
20px
;
box-sizing
:
border-box
;
margin
:
10px
15px
;
width
:
$nav-width
-
30
;
outline
:
none
;
color
:
$nav-text
;
letter-spacing
:
0
.07em
;
}
&
:before
{
@extend
%icon-search
;
position
:
absolute
;
top
:
16px
;
left
:
15px
;
color
:
$nav-text
;
}
}
.tocify-item
>
a
,
.toc-footer
li
{
padding
:
0
$nav-padding
0
$nav-padding
;
display
:block
;
overflow-x
:hidden
;
display
:
block
;
overflow-x
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
...
...
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