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
0feb5134
Commit
0feb5134
authored
Apr 20, 2014
by
Robert Lord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust search info appearance, fix Firefox bug
parent
7386fd2e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
35 deletions
+18
-35
search.js
source/javascripts/app/search.js
+0
-7
layout.erb
source/layouts/layout.erb
+1
-1
screen.css.scss
source/stylesheets/screen.css.scss
+16
-26
variables.scss
source/stylesheets/variables.scss
+1
-1
No files found.
source/javascripts/app/search.js
View file @
0feb5134
...
@@ -40,9 +40,6 @@
...
@@ -40,9 +40,6 @@
.
on
(
'keyup'
,
search
)
.
on
(
'keyup'
,
search
)
.
on
(
'focus'
,
active
)
.
on
(
'focus'
,
active
)
.
on
(
'blur'
,
inactive
);
.
on
(
'blur'
,
inactive
);
$global
.
on
(
'resize'
,
resize
);
resize
();
}
}
function
search
(
event
)
{
function
search
(
event
)
{
...
@@ -93,8 +90,4 @@
...
@@ -93,8 +90,4 @@
content
.
unhighlight
(
highlightOpts
);
content
.
unhighlight
(
highlightOpts
);
}
}
function
resize
()
{
searchInfo
.
innerWidth
(
content
.
innerWidth
()
-
darkBox
.
innerWidth
());
}
})(
window
);
})(
window
);
source/layouts/layout.erb
View file @
0feb5134
...
@@ -41,6 +41,7 @@ under the License.
...
@@ -41,6 +41,7 @@ under the License.
<div
class=
"search"
>
<div
class=
"search"
>
<input
type=
"text"
class=
"search"
id=
"input-search"
>
<input
type=
"text"
class=
"search"
id=
"input-search"
>
</div>
</div>
<div
class=
"search-info"
></div>
<div
id=
"toc"
>
<div
id=
"toc"
>
</div>
</div>
<%
if
current_page
.
data
.
toc_footers
%>
<%
if
current_page
.
data
.
toc_footers
%>
...
@@ -52,7 +53,6 @@ under the License.
...
@@ -52,7 +53,6 @@ under the License.
<%
end
%>
<%
end
%>
</div>
</div>
<div
class=
"page-wrapper"
>
<div
class=
"page-wrapper"
>
<div
class=
"search-info"
></div>
<div
class=
"content"
>
<div
class=
"content"
>
<%=
yield
%>
<%=
yield
%>
<%
current_page
.
data
.
includes
&&
current_page
.
data
.
includes
.
each
do
|
include
|
%>
<%
current_page
.
data
.
includes
&&
current_page
.
data
.
includes
.
each
do
|
include
|
%>
...
...
source/stylesheets/screen.css.scss
View file @
0feb5134
...
@@ -65,23 +65,35 @@ html, body {
...
@@ -65,23 +65,35 @@ html, body {
border-width
:
0
0
1px
0
;
border-width
:
0
0
1px
0
;
border-color
:
$search-box-border-color
;
border-color
:
$search-box-border-color
;
padding
:
6px
0
6px
20px
;
padding
:
6px
0
6px
20px
;
box-sizing
:
border-box
;
@include
box-sizing
(
border-box
)
;
margin
:
10px
15px
;
margin
:
10px
15px
;
width
:
$nav-width
-
30
;
width
:
$nav-width
-
30
;
outline
:
none
;
outline
:
none
;
color
:
$nav-text
;
color
:
$nav-text
;
letter-spacing
:
0
.07em
;
}
}
&
:before
{
&
:before
{
@extend
%icon-search
;
position
:
absolute
;
position
:
absolute
;
top
:
1
6
px
;
top
:
1
7
px
;
left
:
15px
;
left
:
15px
;
color
:
$nav-text
;
color
:
$nav-text
;
@extend
%icon-search
;
}
}
}
}
.search-info
{
margin-top
:
0
;
padding
:
1em
$nav-padding
;
font-size
:
0
.9em
;
font-weight
:
bold
;
text-shadow
:
0
1px
0
lighten
(
$search-notice-bg
,
15%
);
background
:
$search-notice-bg
;
display
:
none
;
@include
box-sizing
(
border-box
);
}
.tocify-item
>
a
,
.toc-footer
li
{
.tocify-item
>
a
,
.toc-footer
li
{
padding
:
0
$nav-padding
0
$nav-padding
;
padding
:
0
$nav-padding
0
$nav-padding
;
display
:
block
;
display
:
block
;
...
@@ -422,28 +434,6 @@ html, body {
...
@@ -422,28 +434,6 @@ html, body {
}
}
}
}
.search-info
{
margin-top
:
0
;
min-height
:
52px
;
padding
:
1em
1
.75em
;
font-size
:
1
.2em
;
font-weight
:
bold
;
text-shadow
:
0
1px
0
lighten
(
$search-notice-bg
,
15%
);
background
:
$search-notice-bg
;
position
:
fixed
;
z-index
:
75
;
display
:
none
;
@include
box-sizing
(
border-box
);
&
:before
{
@extend
%icon-search
;
vertical-align
:
middle
;
padding-right
:
0
.5em
;
font-size
:
1
.2em
;
}
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// CODE SAMPLE STYLES
// CODE SAMPLE STYLES
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
...
...
source/stylesheets/variables.scss
View file @
0feb5134
...
@@ -37,7 +37,7 @@ $main-bg: #eaf2f6;
...
@@ -37,7 +37,7 @@ $main-bg: #eaf2f6;
$aside-notice-bg
:
#8fbcd4
;
$aside-notice-bg
:
#8fbcd4
;
$aside-warning-bg
:
#c97a7e
;
$aside-warning-bg
:
#c97a7e
;
$aside-success-bg
:
#6ac174
;
$aside-success-bg
:
#6ac174
;
$search-notice-bg
:
#
8fbcd4
;
$search-notice-bg
:
#
c97a7e
;
// TEXT COLORS
// TEXT COLORS
...
...
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