Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
bootstrap
Commits
7d1365ce
Commit
7d1365ce
authored
Feb 11, 2014
by
Mark Otto
Committed by
XhmikosR
Jun 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor and restyle.
parent
250e021f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
1066 deletions
+68
-1066
Gruntfile.js
Gruntfile.js
+1
-1
docs/assets/css/_src/docs.css
docs/assets/css/_src/docs.css
+18
-20
docs/assets/js/_src/application.js
docs/assets/js/_src/application.js
+40
-35
docs/assets/js/_vendor/zero-clipboard.js
docs/assets/js/_vendor/zero-clipboard.js
+0
-1010
docs/assets/js/_vendor/zero-clipboard.min.js
docs/assets/js/_vendor/zero-clipboard.min.js
+9
-0
No files found.
Gruntfile.js
View file @
7d1365ce
...
@@ -137,7 +137,7 @@ module.exports = function (grunt) {
...
@@ -137,7 +137,7 @@ module.exports = function (grunt) {
},
},
src
:
[
src
:
[
'
docs/assets/js/_vendor/holder.js
'
,
'
docs/assets/js/_vendor/holder.js
'
,
'
docs/assets/js/_vendor/zero-clipboard.js
'
,
'
docs/assets/js/_vendor/zero-clipboard.
min.
js
'
,
'
docs/assets/js/_src/application.js
'
'
docs/assets/js/_src/application.js
'
],
],
dest
:
'
docs/assets/js/docs.min.js
'
dest
:
'
docs/assets/js/docs.min.js
'
...
...
docs/assets/css/_src/docs.css
View file @
7d1365ce
...
@@ -1133,13 +1133,9 @@ h1[id] {
...
@@ -1133,13 +1133,9 @@ h1[id] {
font-size
:
inherit
;
font-size
:
inherit
;
color
:
#333
;
/* Effectively the base text color */
color
:
#333
;
/* Effectively the base text color */
}
}
.highlight
pre
.lineno
{
.highlight
pre
code
:first-child
{
display
:
inline-block
;
display
:
inline-block
;
width
:
22px
;
padding-right
:
45px
;
padding-right
:
5px
;
margin-right
:
10px
;
color
:
#bebec5
;
text-align
:
right
;
}
}
...
@@ -1467,35 +1463,37 @@ h1[id] {
...
@@ -1467,35 +1463,37 @@ h1[id] {
box-shadow
:
0
0
8px
rgba
(
82
,
168
,
236
,
.6
);
box-shadow
:
0
0
8px
rgba
(
82
,
168
,
236
,
.6
);
}
}
/*
/*
* ZeroClipboard styles
* ZeroClipboard styles
*/
*/
.zero-clipboard
{
.zero-clipboard
{
position
:
relative
;
position
:
relative
;
display
:
none
;
}
}
.btn-clipboard
{
.btn-clipboard
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
right
:
0
;
right
:
0
;
z-index
:
10
;
z-index
:
10
;
padding
:
5px
10px
;
display
:
block
;
padding
:
5px
8px
;
font-size
:
12px
;
color
:
#777
;
cursor
:
pointer
;
cursor
:
pointer
;
border-color
:
#e1e1e8
;
background-color
:
#fff
;
border-bottom
:
1px
solid
transparent
;
border
:
1px
solid
#e1e1e8
;
border-left
:
1px
solid
transparent
;
border-radius
:
0
4px
0
4px
;
border-radius
:
0
4px
0
0
;
}
}
.btn-clipboard-hover
{
.btn-clipboard-hover
{
background-color
:
#e1e1e8
;
color
:
#fff
;
background-color
:
#563d7c
;
border-color
:
#563d7c
;
}
}
@media
(
max-width
:
768px
)
{
@media
(
min-width
:
768px
)
{
.btn-clipboard.with-example
{
.zero-clipboard
{
top
:
10px
;
display
:
block
;
border
:
1px
solid
#e1e1e8
;
border-radius
:
0
;
}
}
}
}
docs/assets/js/_src/application.js
View file @
7d1365ce
...
@@ -15,35 +15,25 @@
...
@@ -15,35 +15,25 @@
$
(
function
()
{
$
(
function
()
{
// Insert copy to clipboard button before .highlight or .bs-example
// Scrollspy
$
(
'
.highlight
'
).
each
(
function
()
{
var
highlight
=
$
(
this
)
var
previous
=
highlight
.
prev
()
var
btnHtml
=
'
<div class="zero-clipboard"><span class="glyphicon glyphicon-list-alt btn-clipboard"></span></div>
'
if
(
previous
.
hasClass
(
'
bs-example
'
))
{
previous
.
before
(
btnHtml
.
replace
(
/btn-clipboard/
,
'
btn-clipboard with-example
'
))
}
else
{
highlight
.
before
(
btnHtml
)
}
})
var
$window
=
$
(
window
)
var
$window
=
$
(
window
)
var
$body
=
$
(
document
.
body
)
var
$body
=
$
(
document
.
body
)
$body
.
scrollspy
({
$body
.
scrollspy
({
target
:
'
.bs-docs-sidebar
'
target
:
'
.bs-docs-sidebar
'
})
})
$window
.
on
(
'
load
'
,
function
()
{
$window
.
on
(
'
load
'
,
function
()
{
$body
.
scrollspy
(
'
refresh
'
)
$body
.
scrollspy
(
'
refresh
'
)
})
})
// Kill links
$
(
'
.bs-docs-container [href=#]
'
).
click
(
function
(
e
)
{
$
(
'
.bs-docs-container [href=#]
'
).
click
(
function
(
e
)
{
e
.
preventDefault
()
e
.
preventDefault
()
})
})
// back to top
// Sidenav affixing
setTimeout
(
function
()
{
setTimeout
(
function
()
{
var
$sideBar
=
$
(
'
.bs-docs-sidebar
'
)
var
$sideBar
=
$
(
'
.bs-docs-sidebar
'
)
...
@@ -84,7 +74,7 @@
...
@@ -84,7 +74,7 @@
})
})
})();
})();
//
tooltip demo
//
Tooltip and popover demos
$
(
'
.tooltip-demo
'
).
tooltip
({
$
(
'
.tooltip-demo
'
).
tooltip
({
selector
:
'
[data-toggle="tooltip"]
'
,
selector
:
'
[data-toggle="tooltip"]
'
,
container
:
'
body
'
container
:
'
body
'
...
@@ -98,53 +88,68 @@
...
@@ -98,53 +88,68 @@
container
:
'
.bs-docs-navbar .nav
'
container
:
'
.bs-docs-navbar .nav
'
})
})
// popover demo
//
Default
popover demo
$
(
'
.bs-docs-popover
'
).
popover
()
$
(
'
.bs-docs-popover
'
).
popover
()
// Popover dismiss on next click
// Button state demo
$
(
'
.bs-docs-popover-dismiss
'
).
popover
({
$
(
'
#loading-example-btn
'
).
click
(
function
()
{
trigger
:
'
focus
'
var
btn
=
$
(
this
)
btn
.
button
(
'
loading
'
)
setTimeout
(
function
()
{
btn
.
button
(
'
reset
'
)
},
3000
)
})
})
// button state demo
$
(
'
#loading-example-btn
'
)
// Config ZeroClipboard
.
click
(
function
()
{
ZeroClipboard
.
config
({
var
btn
=
$
(
this
)
moviePath
:
'
/assets/flash/zero-clipboard.swf
'
,
btn
.
button
(
'
loading
'
)
hoverClass
:
'
btn-clipboard-hover
'
setTimeout
(
function
()
{
})
btn
.
button
(
'
reset
'
)
},
3000
)
// Insert copy to clipboard button before .highlight or .bs-example
})
$
(
'
.highlight
'
).
each
(
function
()
{
var
highlight
=
$
(
this
)
var
previous
=
highlight
.
prev
()
var
btnHtml
=
'
<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>
'
if
(
previous
.
hasClass
(
'
bs-example
'
))
{
previous
.
before
(
btnHtml
.
replace
(
/btn-clipboard/
,
'
btn-clipboard with-example
'
))
}
else
{
highlight
.
before
(
btnHtml
)
}
})
var
zeroClipboard
=
new
ZeroClipboard
(
$
(
'
.btn-clipboard
'
))
var
htmlBridge
=
$
(
'
#global-zeroclipboard-html-bridge
'
)
// Handlers for ZeroClipboard
// Handlers for ZeroClipboard
zeroClipboard
.
on
(
'
load
'
,
function
(
client
)
{
zeroClipboard
.
on
(
'
load
'
,
function
(
client
)
{
htmlBridge
htmlBridge
.
data
(
'
placement
'
,
'
left
'
)
.
data
(
'
placement
'
,
'
top
'
)
.
attr
(
'
title
'
,
'
c
opy to clipboard
'
)
.
attr
(
'
title
'
,
'
C
opy to clipboard
'
)
.
tooltip
()
.
tooltip
()
})
})
// Copy to clipboard
// Copy to clipboard
zeroClipboard
.
on
(
'
dataRequested
'
,
function
(
client
)
{
zeroClipboard
.
on
(
'
dataRequested
'
,
function
(
client
)
{
var
highlight
=
$
(
this
).
parent
().
nextAll
(
'
.highlight
'
).
first
()
var
highlight
=
$
(
this
).
parent
().
nextAll
(
'
.highlight
'
).
first
()
client
.
setText
(
highlight
.
text
())
client
.
setText
(
highlight
.
text
())
})
})
// Notify copy success and reset tooltip title
// Notify copy success and reset tooltip title
zeroClipboard
.
on
(
'
complete
'
,
function
(
client
)
{
zeroClipboard
.
on
(
'
complete
'
,
function
(
client
)
{
htmlBridge
htmlBridge
.
attr
(
'
title
'
,
'
c
opied!
'
)
.
attr
(
'
title
'
,
'
C
opied!
'
)
.
tooltip
(
'
fixTitle
'
)
.
tooltip
(
'
fixTitle
'
)
.
tooltip
(
'
show
'
)
.
tooltip
(
'
show
'
)
.
attr
(
'
title
'
,
'
copy to clipboard
'
)
.
attr
(
'
title
'
,
'
Copy
'
)
.
tooltip
(
'
fixTitle
'
)
.
tooltip
(
'
fixTitle
'
)
})
})
// Notify copy failure
// Notify copy failure
zeroClipboard
.
on
(
'
noflash wrongflash
'
,
function
(
client
)
{
zeroClipboard
.
on
(
'
noflash wrongflash
'
,
function
(
client
)
{
htmlBridge
htmlBridge
.
attr
(
'
title
'
,
'
flash not supported!
'
)
.
attr
(
'
title
'
,
'
Flash required
'
)
.
tooltip
(
'
fixTitle
'
)
.
tooltip
(
'
fixTitle
'
)
.
tooltip
(
'
show
'
)
.
tooltip
(
'
show
'
)
})
})
...
...
docs/assets/js/_vendor/zero-clipboard.js
deleted
100644 → 0
View file @
250e021f
This diff is collapsed.
Click to expand it.
docs/assets/js/_vendor/zero-clipboard.min.js
0 → 100644
View file @
7d1365ce
This diff is collapsed.
Click to expand it.
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