dante-editor-seo 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +40 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/Gemfile +23 -0
- data/Gemfile.lock +140 -0
- data/Procfile +1 -0
- data/README.md +187 -0
- data/ROADMAP.md +10 -0
- data/TODO.md +30 -0
- data/app/assets/fonts/dante/dante.eot +0 -0
- data/app/assets/fonts/dante/dante.svg +14 -0
- data/app/assets/fonts/dante/dante.ttf +0 -0
- data/app/assets/fonts/dante/dante.woff +0 -0
- data/app/assets/fonts/dante/fontello.eot +0 -0
- data/app/assets/fonts/dante/fontello.svg +36 -0
- data/app/assets/fonts/dante/fontello.ttf +0 -0
- data/app/assets/fonts/dante/fontello.woff +0 -0
- data/app/assets/images/dante/media-loading-placeholder.png +0 -0
- data/app/assets/javascripts/dante/dante.js.coffee.erb +10 -0
- data/app/assets/javascripts/dante/editor.js.coffee +1250 -0
- data/app/assets/javascripts/dante/menu.js.coffee +216 -0
- data/app/assets/javascripts/dante/popover.js.coffee +75 -0
- data/app/assets/javascripts/dante/tooltip.js.coffee +82 -0
- data/app/assets/javascripts/dante/tooltip_widget.js.coffee +10 -0
- data/app/assets/javascripts/dante/tooltip_widgets/embed.js.coffee +60 -0
- data/app/assets/javascripts/dante/tooltip_widgets/extract.js.coffee +64 -0
- data/app/assets/javascripts/dante/tooltip_widgets/uploader.js.coffee +248 -0
- data/app/assets/javascripts/dante/utils.js.coffee +235 -0
- data/app/assets/javascripts/dante/view.js.coffee +101 -0
- data/app/assets/javascripts/dante.js +12 -0
- data/app/assets/stylesheets/dante/_animations.scss +54 -0
- data/app/assets/stylesheets/dante/_caption.scss +52 -0
- data/app/assets/stylesheets/dante/_debug.scss +11 -0
- data/app/assets/stylesheets/dante/_fonts.scss +17 -0
- data/app/assets/stylesheets/dante/_graf.scss +238 -0
- data/app/assets/stylesheets/dante/_icons.scss +57 -0
- data/app/assets/stylesheets/dante/_media.scss +39 -0
- data/app/assets/stylesheets/dante/_menu.scss +153 -0
- data/app/assets/stylesheets/dante/_needsorder.scss +209 -0
- data/app/assets/stylesheets/dante/_popover.scss +134 -0
- data/app/assets/stylesheets/dante/_post.scss +69 -0
- data/app/assets/stylesheets/dante/_scaffold.scss +20 -0
- data/app/assets/stylesheets/dante/_tooltip.scss +131 -0
- data/app/assets/stylesheets/dante/_utilities.scss +55 -0
- data/app/assets/stylesheets/dante/_variables.scss +46 -0
- data/app/assets/stylesheets/dante.scss +18 -0
- data/bower.json +44 -0
- data/config.rb +86 -0
- data/config.ru +42 -0
- data/dante-editor.gemspec +19 -0
- data/dist/css/dante-editor.css +1116 -0
- data/dist/fonts/dante/dante.eot +0 -0
- data/dist/fonts/dante/dante.svg +14 -0
- data/dist/fonts/dante/dante.ttf +0 -0
- data/dist/fonts/dante/dante.woff +0 -0
- data/dist/fonts/dante/fontello.eot +0 -0
- data/dist/fonts/dante/fontello.svg +36 -0
- data/dist/fonts/dante/fontello.ttf +0 -0
- data/dist/fonts/dante/fontello.woff +0 -0
- data/dist/images/dante/media-loading-placeholder.png +0 -0
- data/dist/js/dante-editor.js +2878 -0
- data/lib/dante-editor/rails.rb +4 -0
- data/lib/dante-editor/version.rb +5 -0
- data/lib/dante-editor.rb +5 -0
- data/license.md +22 -0
- data/rakefile +2 -0
- data/source/assets/images/dante-editor-logo.png +0 -0
- data/source/assets/images/github-logo.png +0 -0
- data/source/assets/javascripts/all.js +3 -0
- data/source/assets/javascripts/dante-editor.js +1 -0
- data/source/assets/javascripts/deps.js +4 -0
- data/source/assets/javascripts/examples/custom_toolbar.js.coffee +30 -0
- data/source/assets/javascripts/spec.js +2 -0
- data/source/assets/javascripts/specs/cleaner.js.coffee +8 -0
- data/source/assets/javascripts/specs/dante_view.js.coffee +74 -0
- data/source/assets/javascripts/specs/editor.js.coffee +78 -0
- data/source/assets/stylesheets/_layout.scss +51 -0
- data/source/assets/stylesheets/_scaffold.scss +8 -0
- data/source/assets/stylesheets/_tooltips.scss +216 -0
- data/source/assets/stylesheets/all.css.scss +5 -0
- data/source/assets/stylesheets/dante-editor.css.scss +1 -0
- data/source/assets/stylesheets/normalize.css +375 -0
- data/source/custom_toolbar.erb +29 -0
- data/source/embeds.html.erb +27 -0
- data/source/icons/dante.json +143 -0
- data/source/icons/embed.svg +13 -0
- data/source/icons/image.svg +13 -0
- data/source/icons/plus.svg +13 -0
- data/source/icons/video.svg +13 -0
- data/source/index.html.erb +18 -0
- data/source/layouts/layout.erb +26 -0
- data/source/layouts/spec.html.erb +22 -0
- data/source/lists.html.erb +18 -0
- data/source/partials/_content.erb +6 -0
- data/source/partials/_example_1.erb +45 -0
- data/source/partials/_example_2.erb +32 -0
- data/source/partials/_example_3.erb +4 -0
- data/source/partials/_lists.erb +13 -0
- data/source/partials/_readme.markdown +24 -0
- data/source/partials/test/_example_1.erb +39 -0
- data/source/tests/dante_view.html.erb +11 -0
- data/source/tests/index.html.erb +39 -0
- data/tmp/.gitkeep +0 -0
- metadata +151 -0
data/lib/dante-editor.rb
ADDED
data/license.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Miguel Michelson
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/rakefile
ADDED
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require dante
|
@@ -0,0 +1,30 @@
|
|
1
|
+
##COFFEE LIKE CLASS
|
2
|
+
|
3
|
+
class window.MyCustomCoffeeTooltip extends Dante.View.TooltipWidget
|
4
|
+
|
5
|
+
initialize: (opts={})->
|
6
|
+
#super
|
7
|
+
@icon = opts.icon || "icon-video"
|
8
|
+
@title = opts.title || "Add a Custom Thing!"
|
9
|
+
@action = opts.action || "custom-embed"
|
10
|
+
@current_editor = opts.current_editor
|
11
|
+
|
12
|
+
handleClick: (ev)->
|
13
|
+
alert("This is custom button with coffeescript extend style")
|
14
|
+
|
15
|
+
|
16
|
+
#BACKBONE STYLE EXTEND
|
17
|
+
window.MyCustomTooltip = Dante.View.TooltipWidget.extend(
|
18
|
+
initialize: (opts={})->
|
19
|
+
@icon = opts.icon || "icon-video"
|
20
|
+
@title = opts.title || "Add a Custom Thing!"
|
21
|
+
@action = opts.action || "custom-embed-simple"
|
22
|
+
@current_editor = opts.current_editor
|
23
|
+
|
24
|
+
handleClick: (ev)->
|
25
|
+
alert("This is custom button with backbone extend style")
|
26
|
+
|
27
|
+
)
|
28
|
+
|
29
|
+
|
30
|
+
|
@@ -0,0 +1,74 @@
|
|
1
|
+
|
2
|
+
class TestView extends Dante.View
|
3
|
+
|
4
|
+
class TestViewWithEl extends Dante.View
|
5
|
+
el: "#view"
|
6
|
+
initialize: ()->
|
7
|
+
@model = {foo: "bar"}
|
8
|
+
super
|
9
|
+
|
10
|
+
class TestViewWithEvents extends Dante.View
|
11
|
+
el: "#view"
|
12
|
+
initialize: ->
|
13
|
+
@one = false
|
14
|
+
@two = false
|
15
|
+
@some_var = 1
|
16
|
+
|
17
|
+
events:
|
18
|
+
"click" : (ev)->
|
19
|
+
console.log("CLICKED ANYWHERE")
|
20
|
+
@anywhere = true
|
21
|
+
return false
|
22
|
+
|
23
|
+
"click .one" : (ev)->
|
24
|
+
@one = true
|
25
|
+
console.log("CLICKED .one YEAH, #{@one}")
|
26
|
+
return false
|
27
|
+
|
28
|
+
"click .two" : "handleClickTwo"
|
29
|
+
|
30
|
+
handleClickTwo: (ev)->
|
31
|
+
@two = true
|
32
|
+
console.log("CLICKED .two YEAH, #{@two}")
|
33
|
+
console.log(ev.currentTarget)
|
34
|
+
|
35
|
+
return false
|
36
|
+
|
37
|
+
class TestViewOpts extends Dante.View
|
38
|
+
el: "#view"
|
39
|
+
initialize: (opts={})->
|
40
|
+
|
41
|
+
@model = opts.model
|
42
|
+
|
43
|
+
window.view = new TestView
|
44
|
+
|
45
|
+
window.view2 = new TestView(el: "#view")
|
46
|
+
window.view3 = new TestViewWithEl
|
47
|
+
|
48
|
+
window.event_view = new TestViewWithEvents
|
49
|
+
window.opts_view = new TestViewOpts(model: 1234)
|
50
|
+
|
51
|
+
QUnit.test "should initialize view without el", ( assert )->
|
52
|
+
assert.ok( _.isObject(view), "Passed!" )
|
53
|
+
assert.ok( _.isUndefined(view.el), "Passed!" )
|
54
|
+
|
55
|
+
QUnit.test "should initialize view with el", ( assert )->
|
56
|
+
assert.ok( _.isElement(view2.el), "Passed!" )
|
57
|
+
assert.ok( _.isElement(view3.el), "Passed!" )
|
58
|
+
|
59
|
+
QUnit.test "should initialize view with @model", ( assert )->
|
60
|
+
assert.ok( !_.isEmpty(view3.model), "Passed!" )
|
61
|
+
|
62
|
+
QUnit.test "should set variable on click", ( assert )->
|
63
|
+
event_view.$el.find("a.one").trigger("click")
|
64
|
+
event_view.$el.find("a.two").trigger("click")
|
65
|
+
assert.ok( event_view.one, "Passed!" )
|
66
|
+
assert.ok( event_view.two, "Passed!" )
|
67
|
+
|
68
|
+
QUnit.test "should set vars on initialize", ( assert )->
|
69
|
+
assert.ok( event_view.some_var is 1, "Passed!" )
|
70
|
+
|
71
|
+
QUnit.test "should set windows.vars on initialize", ( assert )->
|
72
|
+
assert.ok( opts_view.model is 1234 , "Passed!" )
|
73
|
+
|
74
|
+
|
@@ -0,0 +1,78 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
window.editor = new Dante.Editor
|
4
|
+
upload_url: "/upload_url"
|
5
|
+
upload_params: { article_id: 678 }
|
6
|
+
el: "#editor1"
|
7
|
+
|
8
|
+
window.editor.start()
|
9
|
+
|
10
|
+
window.editor2 = new Dante.Editor
|
11
|
+
el: "#editor2"
|
12
|
+
|
13
|
+
window.editor2.start()
|
14
|
+
|
15
|
+
window.editor3 = new Dante.Editor
|
16
|
+
el: "#editor3"
|
17
|
+
body: "<strong>Pre-existing body should be displayed.</strong><i>really.</i>"
|
18
|
+
store_url: "/store_url"
|
19
|
+
store_interval: 15000
|
20
|
+
store_params: { article_id: 678, state: "published" }
|
21
|
+
upload_url: "/upload_url"
|
22
|
+
upload_params: { article_id: 678 }
|
23
|
+
|
24
|
+
|
25
|
+
window.editor3.start()
|
26
|
+
|
27
|
+
|
28
|
+
QUnit.test "should initialize editor", ( assert )->
|
29
|
+
assert.ok( _.isObject(window.editor), "Passed!" )
|
30
|
+
|
31
|
+
QUnit.test "should init editor defaults", ( assert )->
|
32
|
+
assert.ok( !_.isEmpty(window.editor.title_placeholder), "Passed!" )
|
33
|
+
assert.ok( !_.isEmpty(window.editor.body_placeholder), "Passed!" )
|
34
|
+
assert.ok( !_.isEmpty(window.editor.embed_placeholder), "Passed!" )
|
35
|
+
assert.ok( !_.isEmpty(window.editor.extract_placeholder), "Passed!" )
|
36
|
+
|
37
|
+
assert.ok( !_.isEmpty(window.editor.upload_url), "Passed!" )
|
38
|
+
assert.ok( !_.isEmpty(window.editor.oembed_url), "Passed!" )
|
39
|
+
assert.ok( !_.isEmpty(window.editor.extract_url), "Passed!" )
|
40
|
+
|
41
|
+
QUnit.test "should init editor", ( assert )->
|
42
|
+
assert.ok( !_.isEmpty(window.editor), "Passed!" )
|
43
|
+
assert.ok( _.isObject(window.editor.tooltip_view), "Passed!" )
|
44
|
+
assert.ok( _.isObject(window.editor.editor_menu), "Passed!" )
|
45
|
+
|
46
|
+
QUnit.test "should build tooltip & menu", ( assert )->
|
47
|
+
assert.ok( !_.isEmpty( $(".inlineTooltip") ), "Passed!" )
|
48
|
+
assert.ok( !_.isEmpty( $("#editor-menu") ), "Passed!" )
|
49
|
+
|
50
|
+
QUnit.test "should display placeholders when empty content", (assert)->
|
51
|
+
assert.ok $(editor.el).find("span.defaultValue").length is 2 , "Passed!"
|
52
|
+
|
53
|
+
##CLEANER
|
54
|
+
|
55
|
+
QUnit.test "should clean spans", (assert)->
|
56
|
+
assert.ok !$(editor2.el).find("a:first span").exists(), "Passed!"
|
57
|
+
assert.ok !$(editor2.el).find(".section-inner div.class").exists(), "Passed!"
|
58
|
+
assert.ok !$(editor2.el).find(".section-inner span:not(.defaultValue)").exists(), "Passed!"
|
59
|
+
assert.ok !$(editor2.el).find(".section-inner p span").exists() , "Passed!"
|
60
|
+
|
61
|
+
QUnit.test "should detect existing images", (assert)->
|
62
|
+
fig = $(editor2.el).find(".section-inner figure")
|
63
|
+
|
64
|
+
assert.ok $(fig).exists() , "generate figure.graf--figure"
|
65
|
+
assert.ok $(fig).find("img").exists() , "figure have image"
|
66
|
+
assert.ok !_.isEmpty($(fig).find("img").attr('src')) , "and image src"
|
67
|
+
|
68
|
+
assert.ok $(fig).find("figcaption").exists() , "and caption"
|
69
|
+
assert.ok $(fig).find("figcaption span.defaultValue").exists() , "and caption span"
|
70
|
+
|
71
|
+
QUnit.test "should render pre-existing body", (assert)->
|
72
|
+
assert.ok $(editor3.el).find(".section-inner .graf--p.body"), "pre-existing body rendered !"
|
73
|
+
|
74
|
+
#QUnit.test "should send store_params for sending user's desired params", (assert)->
|
75
|
+
# assert.ok( !_.isEmpty(editor3.store_params), "store_params were sent!" )
|
76
|
+
|
77
|
+
QUnit.test "should send upload_params for sending user's desired params", (assert)->
|
78
|
+
assert.ok( !_.isEmpty(editor3.upload_params), "upload_params were sent!" )
|
@@ -0,0 +1,51 @@
|
|
1
|
+
$color-brand: #1abf89;
|
2
|
+
$gutter: 30px;
|
3
|
+
|
4
|
+
#header {
|
5
|
+
display: block;
|
6
|
+
z-index: 500;
|
7
|
+
width: 100%;
|
8
|
+
font-size: 14px;
|
9
|
+
color: rgba(0,0,0,0.3);
|
10
|
+
font-family: "jaf-bernino-sans","Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;
|
11
|
+
letter-spacing: -0.02em;
|
12
|
+
font-weight: 400;
|
13
|
+
font-style: normal;
|
14
|
+
box-sizing: border-box;
|
15
|
+
-webkit-transition: 200ms background-color,200ms color;
|
16
|
+
transition: 200ms background-color,200ms color;
|
17
|
+
position: fixed;
|
18
|
+
top: 0;
|
19
|
+
height: 65px;
|
20
|
+
background: rgba(255,255,255,0.97);
|
21
|
+
box-shadow: 0 0 1px rgba(0,0,0,0.15);
|
22
|
+
}
|
23
|
+
|
24
|
+
article {
|
25
|
+
margin-top: 140px;
|
26
|
+
}
|
27
|
+
|
28
|
+
.logo {
|
29
|
+
& {
|
30
|
+
display: inline-block;
|
31
|
+
}
|
32
|
+
img {
|
33
|
+
margin: 22px 14px 22px 20px;
|
34
|
+
}
|
35
|
+
span {
|
36
|
+
vertical-align: top;
|
37
|
+
border-left: 1px solid rgba(0,0,0,0.15);
|
38
|
+
padding: 5px 14px;
|
39
|
+
margin: 20px 0;
|
40
|
+
display: inline-block;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
.github {
|
45
|
+
& {
|
46
|
+
float: right;
|
47
|
+
line-height: 0;
|
48
|
+
margin-top: 19px;
|
49
|
+
margin-right: 20px;
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,216 @@
|
|
1
|
+
/**
|
2
|
+
* Tooltips!
|
3
|
+
*/
|
4
|
+
|
5
|
+
$tooltip-arrow-size: 6px;
|
6
|
+
$tooltip-arrow-height: $tooltip-arrow-size * 2;
|
7
|
+
|
8
|
+
/* Base styles for the element that has a tooltip */
|
9
|
+
[data-tooltip],
|
10
|
+
.tooltip {
|
11
|
+
position: relative;
|
12
|
+
cursor: pointer;
|
13
|
+
}
|
14
|
+
|
15
|
+
/* Base styles for the entire tooltip */
|
16
|
+
[data-tooltip]:before,
|
17
|
+
[data-tooltip]:after,
|
18
|
+
.tooltip:before,
|
19
|
+
.tooltip:after {
|
20
|
+
position: absolute;
|
21
|
+
visibility: hidden;
|
22
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
|
23
|
+
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
24
|
+
opacity: 0;
|
25
|
+
-webkit-transition:
|
26
|
+
opacity 0.2s ease-in-out,
|
27
|
+
visibility 0.2s ease-in-out,
|
28
|
+
-webkit-transform 0.2s cubic-bezier(0.71, 1.7, 0.77, 1.24);
|
29
|
+
-moz-transition:
|
30
|
+
opacity 0.2s ease-in-out,
|
31
|
+
visibility 0.2s ease-in-out,
|
32
|
+
-moz-transform 0.2s cubic-bezier(0.71, 1.7, 0.77, 1.24);
|
33
|
+
transition:
|
34
|
+
opacity 0.2s ease-in-out,
|
35
|
+
visibility 0.2s ease-in-out,
|
36
|
+
transform 0.2s cubic-bezier(0.71, 1.7, 0.77, 1.24);
|
37
|
+
-webkit-transform: translate3d(0, 0, 0);
|
38
|
+
-moz-transform: translate3d(0, 0, 0);
|
39
|
+
transform: translate3d(0, 0, 0);
|
40
|
+
pointer-events: none;
|
41
|
+
}
|
42
|
+
|
43
|
+
/* Show the entire tooltip on hover and focus */
|
44
|
+
[data-tooltip]:hover:before,
|
45
|
+
[data-tooltip]:hover:after,
|
46
|
+
[data-tooltip]:focus:before,
|
47
|
+
[data-tooltip]:focus:after,
|
48
|
+
.tooltip:hover:before,
|
49
|
+
.tooltip:hover:after,
|
50
|
+
.tooltip:focus:before,
|
51
|
+
.tooltip:focus:after {
|
52
|
+
visibility: visible;
|
53
|
+
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
54
|
+
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
55
|
+
opacity: 1;
|
56
|
+
}
|
57
|
+
|
58
|
+
/* Base styles for the tooltip's directional arrow */
|
59
|
+
.tooltip:before,
|
60
|
+
[data-tooltip]:before {
|
61
|
+
z-index: 1001;
|
62
|
+
border: $tooltip-arrow-size solid transparent;
|
63
|
+
background: transparent;
|
64
|
+
content: "";
|
65
|
+
}
|
66
|
+
|
67
|
+
/* Base styles for the tooltip's content area */
|
68
|
+
.tooltip:after,
|
69
|
+
[data-tooltip]:after {
|
70
|
+
white-space: nowrap;
|
71
|
+
z-index: 1000;
|
72
|
+
padding: 7px 8px;
|
73
|
+
background-color: #000;
|
74
|
+
background-color: hsla(0, 0%, 20%, 0.9);
|
75
|
+
color: #fff;
|
76
|
+
content: attr(data-tooltip);
|
77
|
+
font-size: 12px;
|
78
|
+
line-height: 1.2;
|
79
|
+
border-radius: 3px;
|
80
|
+
}
|
81
|
+
|
82
|
+
/* Directions */
|
83
|
+
|
84
|
+
/* Top (default) */
|
85
|
+
[data-tooltip]:before,
|
86
|
+
[data-tooltip]:after,
|
87
|
+
.tooltip:before,
|
88
|
+
.tooltip:after,
|
89
|
+
.tooltip-top:before,
|
90
|
+
.tooltip-top:after {
|
91
|
+
bottom: 100%;
|
92
|
+
left: 50%;
|
93
|
+
}
|
94
|
+
|
95
|
+
[data-tooltip]:before,
|
96
|
+
.tooltip:before,
|
97
|
+
.tooltip-top:before {
|
98
|
+
margin-left: -$tooltip-arrow-size;
|
99
|
+
margin-bottom: -$tooltip-arrow-height;
|
100
|
+
border-top-color: #000;
|
101
|
+
border-top-color: hsla(0, 0%, 20%, 0.9);
|
102
|
+
}
|
103
|
+
|
104
|
+
/* Horizontally align top/bottom tooltips */
|
105
|
+
[data-tooltip]:after,
|
106
|
+
.tooltip:after,
|
107
|
+
.tooltip-top:after {
|
108
|
+
margin-left: -80px;
|
109
|
+
}
|
110
|
+
|
111
|
+
[data-tooltip]:hover:before,
|
112
|
+
[data-tooltip]:hover:after,
|
113
|
+
[data-tooltip]:focus:before,
|
114
|
+
[data-tooltip]:focus:after,
|
115
|
+
.tooltip:hover:before,
|
116
|
+
.tooltip:hover:after,
|
117
|
+
.tooltip:focus:before,
|
118
|
+
.tooltip:focus:after,
|
119
|
+
.tooltip-top:hover:before,
|
120
|
+
.tooltip-top:hover:after,
|
121
|
+
.tooltip-top:focus:before,
|
122
|
+
.tooltip-top:focus:after {
|
123
|
+
-webkit-transform: translateY(-$tooltip-arrow-height);
|
124
|
+
-moz-transform: translateY(-$tooltip-arrow-height);
|
125
|
+
transform: translateY(-$tooltip-arrow-height);
|
126
|
+
}
|
127
|
+
|
128
|
+
/* Left */
|
129
|
+
.tooltip-left:before,
|
130
|
+
.tooltip-left:after {
|
131
|
+
right: 100%;
|
132
|
+
bottom: 50%;
|
133
|
+
left: auto;
|
134
|
+
}
|
135
|
+
|
136
|
+
.tooltip-left:before {
|
137
|
+
margin-left: 0;
|
138
|
+
margin-right: -$tooltip-arrow-height;
|
139
|
+
margin-bottom: 0;
|
140
|
+
border-top-color: transparent;
|
141
|
+
border-left-color: #000;
|
142
|
+
border-left-color: hsla(0, 0%, 20%, 0.9);
|
143
|
+
}
|
144
|
+
|
145
|
+
.tooltip-left:hover:before,
|
146
|
+
.tooltip-left:hover:after,
|
147
|
+
.tooltip-left:focus:before,
|
148
|
+
.tooltip-left:focus:after {
|
149
|
+
-webkit-transform: translateX(-$tooltip-arrow-height);
|
150
|
+
-moz-transform: translateX(-$tooltip-arrow-height);
|
151
|
+
transform: translateX(-$tooltip-arrow-height);
|
152
|
+
}
|
153
|
+
|
154
|
+
/* Bottom */
|
155
|
+
.tooltip-bottom:before,
|
156
|
+
.tooltip-bottom:after {
|
157
|
+
top: 100%;
|
158
|
+
bottom: auto;
|
159
|
+
left: 50%;
|
160
|
+
}
|
161
|
+
|
162
|
+
.tooltip-bottom:before {
|
163
|
+
margin-top: -12px;
|
164
|
+
margin-bottom: 0;
|
165
|
+
border-top-color: transparent;
|
166
|
+
border-bottom-color: #000;
|
167
|
+
border-bottom-color: hsla(0, 0%, 20%, 0.9);
|
168
|
+
}
|
169
|
+
|
170
|
+
.tooltip-bottom:hover:before,
|
171
|
+
.tooltip-bottom:hover:after,
|
172
|
+
.tooltip-bottom:focus:before,
|
173
|
+
.tooltip-bottom:focus:after {
|
174
|
+
-webkit-transform: translateY($tooltip-arrow-height);
|
175
|
+
-moz-transform: translateY($tooltip-arrow-height);
|
176
|
+
transform: translateY($tooltip-arrow-height);
|
177
|
+
}
|
178
|
+
|
179
|
+
/* Right */
|
180
|
+
.tooltip-right:before,
|
181
|
+
.tooltip-right:after {
|
182
|
+
bottom: 50%;
|
183
|
+
left: 100%;
|
184
|
+
}
|
185
|
+
|
186
|
+
.tooltip-right:before {
|
187
|
+
margin-bottom: 0;
|
188
|
+
margin-left: -$tooltip-arrow-height;
|
189
|
+
border-top-color: transparent;
|
190
|
+
border-right-color: #000;
|
191
|
+
border-right-color: hsla(0, 0%, 20%, 0.9);
|
192
|
+
}
|
193
|
+
|
194
|
+
.tooltip-right:hover:before,
|
195
|
+
.tooltip-right:hover:after,
|
196
|
+
.tooltip-right:focus:before,
|
197
|
+
.tooltip-right:focus:after {
|
198
|
+
-webkit-transform: translateX($tooltip-arrow-height);
|
199
|
+
-moz-transform: translateX($tooltip-arrow-height);
|
200
|
+
transform: translateX($tooltip-arrow-height);
|
201
|
+
}
|
202
|
+
|
203
|
+
/* Move directional arrows down a bit for left/right tooltips */
|
204
|
+
.tooltip-left:before,
|
205
|
+
.tooltip-right:before {
|
206
|
+
top: 50%;
|
207
|
+
margin-top: -$tooltip-arrow-size;
|
208
|
+
bottom: auto;
|
209
|
+
}
|
210
|
+
|
211
|
+
/* Vertically center tooltip content for left/right tooltips */
|
212
|
+
.tooltip-left:after,
|
213
|
+
.tooltip-right:after {
|
214
|
+
margin-left: 0;
|
215
|
+
margin-bottom: -16px;
|
216
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "dante";
|