Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
6762ec68
Commit
6762ec68
authored
Jul 19, 2012
by
Sindre Sorhus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Site: Rewrite popover and cleanups
parent
b129e3b7
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
136 deletions
+138
-136
index.html
index.html
+72
-93
site/css/main.css
site/css/main.css
+33
-24
site/js/main.js
site/js/main.js
+33
-19
No files found.
index.html
View file @
6762ec68
This diff is collapsed.
Click to expand it.
site/css/main.css
View file @
6762ec68
...
...
@@ -43,11 +43,6 @@ a:hover {
color
:
#787e7e
;
}
.nav-tabs
>
li
>
a
,
.nav-pills
>
li
>
a
{
line-height
:
20px
;
}
p
{
font-size
:
15px
;
line-height
:
1.5
;
...
...
@@ -110,8 +105,11 @@ header nav a:first-child {
margin-bottom
:
20px
;
}
.applist
a
{
.applist
.row
>
div
{
white-space
:
nowrap
;
}
.applist
a
{
position
:
relative
;
/* popover */
}
...
...
@@ -123,24 +121,9 @@ header nav a:first-child {
background-color
:
rgba
(
0
,
0
,
0
,
.2
);
}
.applist
.popover
{
margin
:
0
;
cursor
:
default
;
color
:
#333
;
white-space
:
normal
;
z-index
:
999
;
}
.applist
.popover-title
{
padding
:
9px
70px
9px
15px
;
}
.applist
.popover-title
a
{
font-size
:
13px
;
line-height
:
18px
;
position
:
absolute
;
top
:
16px
;
right
:
20px
;
.applist
a
:hover
.label
{
text-decoration
:
none
!important
;
color
:
red
;
}
.applist.labs
{
...
...
@@ -151,7 +134,13 @@ header nav a:first-child {
columns
:
3
;
}
.applist.labs
{
list-style
:
none
;
margin
:
0
;
}
.applist.labs
li
{
margin-bottom
:
20px
;
-webkit-column-break-inside
:
avoid
;
-moz-column-break-inside
:
avoid
;
-ms-column-break-inside
:
avoid
;
...
...
@@ -169,6 +158,26 @@ header nav a:first-child {
margin-right
:
5px
;
}
.popover
{
margin
:
0
;
cursor
:
default
;
color
:
#333
;
white-space
:
normal
;
z-index
:
999
;
}
.popover-title
{
padding
:
9px
70px
9px
15px
;
}
.popover-title
a
{
font-size
:
13px
;
line-height
:
18px
;
position
:
absolute
;
top
:
16px
;
right
:
20px
;
}
.zocial.red
{
background-color
:
#a82400
;
}
...
...
site/js/main.js
View file @
6762ec68
...
...
@@ -2,26 +2,40 @@
(
function
()
{
'
use strict
'
;
// Apps popover
function
hover
()
{
$
(
this
).
popover
(
'
toggle
'
);
}
$
.
fn
.
persistantPopover
=
function
()
{
var
popoverTimeout
;
$
(
'
.applist a
'
).
each
(
function
()
{
var
$this
=
$
(
this
);
$this
.
popover
({
placement
:
'
in right
'
,
animation
:
false
,
title
:
$this
[
0
].
firstChild
.
textContent
+
'
<a href="
'
+
$this
.
data
(
'
source
'
)
+
'
">Go to site</a>
'
});
})
.
off
()
.
hoverIntent
(
hover
,
hover
)
.
on
(
'
click
'
,
'
.popover
'
,
function
(
e
)
{
// Prevent click on the popover, but allow links inside
if
(
e
.
target
.
nodeName
.
toLowerCase
()
!==
'
a
'
)
{
e
.
preventDefault
();
function
delay
()
{
popoverTimeout
=
setTimeout
(
function
()
{
$
(
'
.popover
'
).
hide
();
},
100
);
}
});
this
.
each
(
function
()
{
var
$this
=
$
(
this
);
$this
.
popover
({
trigger
:
'
manual
'
,
placement
:
'
right
'
,
animation
:
false
,
title
:
this
.
firstChild
.
textContent
+
'
<a href="
'
+
$this
.
data
(
'
source
'
)
+
'
">Website</a>
'
});
})
.
mouseenter
(
function
()
{
clearTimeout
(
popoverTimeout
);
$
(
'
.popover
'
).
remove
();
$
(
this
).
popover
(
'
show
'
);
})
.
mouseleave
(
function
()
{
delay
();
$
(
'
.popover
'
).
mouseenter
(
function
()
{
clearTimeout
(
popoverTimeout
)
;
}).
mouseleave
(
function
()
{
delay
();
});
});
};
// Apps popover
$
(
'
.applist a
'
).
persistantPopover
();
}());
\ No newline at end of file
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