dante-editor 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/Gemfile.lock +1 -1
- data/Procfile +1 -1
- data/TODO.md +3 -0
- data/app/assets/javascripts/dante/editor.js.coffee +16 -16
- data/app/assets/javascripts/dante/menu.js.coffee +15 -15
- data/app/assets/javascripts/dante/tooltip.js.coffee +8 -8
- data/app/assets/stylesheets/dante/_animations.scss +54 -0
- data/app/assets/stylesheets/dante/_debug.scss +11 -0
- data/app/assets/stylesheets/dante/_fonts.scss +12 -0
- data/app/assets/stylesheets/dante/_graf.scss +79 -0
- data/app/assets/stylesheets/dante/_icons.scss +38 -0
- data/app/assets/stylesheets/dante/_menu.scss +149 -0
- data/app/assets/stylesheets/dante/_needsorder.scss +201 -0
- data/app/assets/stylesheets/dante/_post.scss +30 -0
- data/app/assets/stylesheets/dante/_scaffold.scss +24 -0
- data/app/assets/stylesheets/dante/_tooltip.scss +126 -0
- data/app/assets/stylesheets/dante/_utilities.scss +21 -0
- data/app/assets/stylesheets/dante/_variables.scss +28 -0
- data/app/assets/stylesheets/dante.css.scss +15 -2
- data/app/assets/stylesheets/{dante → old}/base.css.scss +0 -0
- data/app/assets/stylesheets/{dante → old}/editor.css.scss +0 -0
- data/app/assets/stylesheets/{dante → old}/fonts.css.scss +0 -0
- data/dante-editor.gemspec +2 -2
- data/lib/dante-editor/version.rb +1 -1
- data/source/assets/javascripts/specs/editor.js.coffee +1 -1
- data/source/assets/stylesheets/all.css.scss +32 -2
- data/source/index.html.erb +12 -4
- data/source/layouts/layout.erb +1 -2
- data/source/layouts/spec.html.erb +4 -5
- data/source/partials/_content.erb +3 -0
- metadata +21 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d4df3156378b59b7396a2b87162436cb60557e3
|
4
|
+
data.tar.gz: 517e2d07d9f36c86a648e07123e534a97c57e025
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67f9b45f3efd4dd05d92c9adf4eb0cf97d36996be5eb623cc47981d495be4b1546ea080aa948d366d0eaf356f574cc112ccc949b686e65afe7f117b8dc125f7e
|
7
|
+
data.tar.gz: da1cd87246a7167a9fa0c493ac4da218800b1bd89d58c54c74f4a0749d97bb55ed6ecc216ddd16209d676687b0e085e3af4cb1f1e0cff4621516cd6ec45d5d3e
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.0
|
data/Gemfile.lock
CHANGED
data/Procfile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
app: bundle exec rackup config.ru
|
1
|
+
app: bundle exec rackup config.ru -p 4567
|
data/TODO.md
CHANGED
@@ -9,6 +9,8 @@
|
|
9
9
|
|
10
10
|
+ MENU
|
11
11
|
+ Filter inner tags (except a, b, i ... ) when convert to blockquote
|
12
|
+
+ Reposicionar menu cuando se cambia el tamaño del elemento
|
13
|
+
+ Quitar las opciones B/i cuando el elemento seleccionado es un header
|
12
14
|
|
13
15
|
+ DELETE
|
14
16
|
+ handle remove from PRE tag, it set rare span, just remove it
|
@@ -16,6 +18,7 @@
|
|
16
18
|
|
17
19
|
+ IMAGES:
|
18
20
|
+ upload, show progress, complete
|
21
|
+
+ mantain image ratio
|
19
22
|
+ handle enter (linebreak) when selected in caption (build new P)
|
20
23
|
+ Fix problem in FF when linebreak or arrow down to new P , is typing backwards!! (could be a range 1 char problem ?)
|
21
24
|
|
@@ -32,7 +32,7 @@ class Dante.Editor extends Dante.View
|
|
32
32
|
|
33
33
|
@store()
|
34
34
|
|
35
|
-
@title_placeholder = "<span class='defaultValue defaultValue--root'>Title
|
35
|
+
@title_placeholder = "<span class='defaultValue defaultValue--root'>Title</span><br>"
|
36
36
|
@body_placeholder = "<span class='defaultValue defaultValue--root'>Tell your story…</span><br>"
|
37
37
|
@embed_placeholder = "<span class='defaultValue defaultValue--prompt'>Paste a YouTube, Vine, Vimeo, or other video link, and press Enter</span><br>"
|
38
38
|
@extract_placeholder = "<span class='defaultValue defaultValue--prompt'>Paste a link to embed content from another site (e.g. Twitter) and press Enter</span><br>"
|
@@ -73,7 +73,7 @@ class Dante.Editor extends Dante.View
|
|
73
73
|
|
74
74
|
<div class='section-content'>
|
75
75
|
<div class='section-inner'>
|
76
|
-
<
|
76
|
+
<h3 class='graf graf--h3'>#{@title_placeholder}</h3>
|
77
77
|
<p class='graf graf--p'>#{@body_placeholder}<p>
|
78
78
|
</div>
|
79
79
|
</div>
|
@@ -84,11 +84,11 @@ class Dante.Editor extends Dante.View
|
|
84
84
|
"<p class='graf--p' name='#{utils.generateUniqueName()}'><br></p>"
|
85
85
|
|
86
86
|
appendMenus: ()=>
|
87
|
-
$("<div id='dante-menu' class='dante-menu'
|
88
|
-
$("<div class='
|
87
|
+
$("<div id='dante-menu' class='dante-menu'></div>").insertAfter(@el)
|
88
|
+
$("<div class='inlineTooltip'></div>").insertAfter(@el)
|
89
89
|
@editor_menu = new Dante.Editor.Menu(editor: @)
|
90
90
|
@tooltip_view = new Dante.Editor.Tooltip(editor: @)
|
91
|
-
@tooltip_view.render()
|
91
|
+
@tooltip_view.render().hide()
|
92
92
|
|
93
93
|
appendInitialContent: ()=>
|
94
94
|
$(@el).find(".section-inner").html(@initial_html)
|
@@ -243,10 +243,11 @@ class Dante.Editor extends Dante.View
|
|
243
243
|
@.displayMenu()
|
244
244
|
|
245
245
|
relocateMenu: (position)->
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
246
|
+
height = @editor_menu.$el.outerHeight()
|
247
|
+
padd = @editor_menu.$el.width() / 2
|
248
|
+
top = position.top + $(window).scrollTop() - height
|
249
|
+
left = position.left + (position.width / 2) - padd
|
250
|
+
@editor_menu.$el.offset({ left: left , top: top })
|
250
251
|
|
251
252
|
hidePlaceholder: (element)->
|
252
253
|
$(element).find("span.defaultValue").remove().html("<br>")
|
@@ -598,7 +599,6 @@ class Dante.Editor extends Dante.View
|
|
598
599
|
@displayTooltipAt($(@el).find(".is-selected"))
|
599
600
|
, 2
|
600
601
|
|
601
|
-
|
602
602
|
#delete key
|
603
603
|
if (e.which == 8)
|
604
604
|
@tooltip_view.hide()
|
@@ -608,11 +608,7 @@ class Dante.Editor extends Dante.View
|
|
608
608
|
#return false if !anchor_node or anchor_node.nodeType is 3
|
609
609
|
utils.log("pass initial validations")
|
610
610
|
anchor_node = @getNode()
|
611
|
-
utils.log "anchor_node"
|
612
|
-
utils.log anchor_node
|
613
|
-
utils.log "UTILS anchor_node"
|
614
611
|
utils_anchor_node = utils.getNode()
|
615
|
-
utils.log utils_anchor_node
|
616
612
|
|
617
613
|
if $(utils_anchor_node).hasClass("section-content") || $(utils_anchor_node).hasClass("graf--first")
|
618
614
|
utils.log "SECTION DETECTED FROM KEYDOWN #{_.isEmpty($(utils_anchor_node).text())}"
|
@@ -646,6 +642,10 @@ class Dante.Editor extends Dante.View
|
|
646
642
|
@handleArrowForKeyDown(e)
|
647
643
|
#return false
|
648
644
|
|
645
|
+
#hides tooltip if anchor_node text is empty
|
646
|
+
if anchor_node
|
647
|
+
@tooltip_view.hide() unless _.isEmpty($(anchor_node).text())
|
648
|
+
|
649
649
|
handleKeyUp: (e , node)->
|
650
650
|
utils.log "KEYUP"
|
651
651
|
|
@@ -710,7 +710,7 @@ class Dante.Editor extends Dante.View
|
|
710
710
|
return unless _.isEmpty( $(element).text() )
|
711
711
|
@position = $(element).offset()
|
712
712
|
@tooltip_view.render()
|
713
|
-
@tooltip_view.move(left: @position.left - 60
|
713
|
+
@tooltip_view.move(left: @position.left - 60, top: @position.top - 1 )
|
714
714
|
|
715
715
|
#mark the current row as selected
|
716
716
|
markAsSelected: (element)->
|
@@ -733,7 +733,7 @@ class Dante.Editor extends Dante.View
|
|
733
733
|
n = element
|
734
734
|
name = n.nodeName.toLowerCase()
|
735
735
|
switch name
|
736
|
-
when "p", "h2", "h3", "pre", "div"
|
736
|
+
when "p", "h1", "h2", "h3", "h4", "h5", "h6", "pre", "div"
|
737
737
|
#utils.log n
|
738
738
|
unless $(n).hasClass("graf--mixtapeEmbed")
|
739
739
|
$(n).removeClass().addClass("graf graf--#{name}")
|
@@ -4,7 +4,7 @@ class Dante.Editor.Menu extends Dante.View
|
|
4
4
|
el: "#dante-menu"
|
5
5
|
|
6
6
|
events:
|
7
|
-
"mousedown
|
7
|
+
"mousedown li" : "handleClick"
|
8
8
|
#"click .dante-icon" : "handleClick"
|
9
9
|
"mouseenter" : "handleOver"
|
10
10
|
"mouseleave" : "handleOut"
|
@@ -39,12 +39,14 @@ class Dante.Editor.Menu extends Dante.View
|
|
39
39
|
]
|
40
40
|
###
|
41
41
|
|
42
|
-
buttons: ['
|
42
|
+
buttons: ['bold', 'italic', 'h2', 'h3', 'h4', 'blockquote', 'createlink']
|
43
43
|
|
44
44
|
template: ()=>
|
45
|
-
html = "<input class='dante-input' placeholder='http://'
|
45
|
+
html = "<div class='dante-menu-linkinput'><input class='dante-menu-input' placeholder='http://'><div class='dante-menu-button'>x</div></div>"
|
46
|
+
html += "<ul class='dante-menu-buttons'>"
|
46
47
|
_.each @config.buttons, (item)->
|
47
|
-
html += "<i class=\"dante-icon icon-#{item}\" data-action=\"#{item}\"></i>"
|
48
|
+
html += "<li class='dante-menu-button'><i class=\"dante-icon icon-#{item}\" data-action=\"#{item}\"></i></li>"
|
49
|
+
html += "</ul>"
|
48
50
|
html
|
49
51
|
|
50
52
|
render: ()=>
|
@@ -53,14 +55,14 @@ class Dante.Editor.Menu extends Dante.View
|
|
53
55
|
#@delegateEvents()
|
54
56
|
|
55
57
|
handleClick: (ev)->
|
56
|
-
element
|
57
|
-
action
|
58
|
-
input
|
58
|
+
element = $(ev.currentTarget).find('.dante-icon')
|
59
|
+
action = element.data("action")
|
60
|
+
input = $(@el).find("input.dante-menu-input")
|
59
61
|
utils.log("menu #{action} item clicked!")
|
60
62
|
@savedSel = utils.saveSelection()
|
61
63
|
|
62
64
|
if /(?:createlink)/.test(action)
|
63
|
-
|
65
|
+
$(@el).addClass("dante-menu--linkmode")
|
64
66
|
input.focus()
|
65
67
|
else
|
66
68
|
@menuApply action
|
@@ -73,7 +75,7 @@ class Dante.Editor.Menu extends Dante.View
|
|
73
75
|
return @createlink( $(e.target) )
|
74
76
|
|
75
77
|
createlink: (input) =>
|
76
|
-
|
78
|
+
$(@el).removeClass("dante-menu--linkmode")
|
77
79
|
if input.val()
|
78
80
|
inputValue = input.val()
|
79
81
|
.replace(@strReg.whiteSpace, "")
|
@@ -149,7 +151,7 @@ class Dante.Editor.Menu extends Dante.View
|
|
149
151
|
el = el or @current_editor.$el[0]
|
150
152
|
while el isnt @current_editor.$el[0]
|
151
153
|
if el.nodeName.match(@effectNodeReg)
|
152
|
-
nodes.push (if returnAsNodeName then el.nodeName.
|
154
|
+
nodes.push (if returnAsNodeName then el.nodeName.toUpperCase() else el)
|
153
155
|
el = el.parentNode
|
154
156
|
nodes
|
155
157
|
|
@@ -190,13 +192,11 @@ class Dante.Editor.Menu extends Dante.View
|
|
190
192
|
@highlight(tag)
|
191
193
|
|
192
194
|
highlight: (tag)->
|
193
|
-
$(".icon-#{tag}").addClass("active")
|
195
|
+
$(".icon-#{tag}").parent("li").addClass("active")
|
194
196
|
|
195
197
|
show: ()->
|
196
|
-
$(@el).
|
197
|
-
$(@el).css('visibility', 'visible')
|
198
|
+
$(@el).addClass("dante-menu--active")
|
198
199
|
@displayHighlights()
|
199
200
|
|
200
201
|
hide: ()->
|
201
|
-
$(@el).
|
202
|
-
$(@el).css('visibility', 'hidden')
|
202
|
+
$(@el).removeClass("dante-menu--active")
|
@@ -1,18 +1,18 @@
|
|
1
1
|
utils = Dante.utils
|
2
2
|
|
3
3
|
class Dante.Editor.Tooltip extends Dante.View
|
4
|
-
el: ".
|
4
|
+
el: ".inlineTooltip"
|
5
5
|
|
6
6
|
events:
|
7
|
-
"click .button
|
8
|
-
"click .
|
7
|
+
"click .inlineTooltip-button.control" : "toggleOptions"
|
8
|
+
"click .inlineTooltip-menu button" : "handleClick"
|
9
9
|
|
10
10
|
initialize: (opts = {})=>
|
11
11
|
@current_editor = opts.editor
|
12
12
|
@buttons = [
|
13
13
|
{icon: "fa-camera", title: "Add an image", action: "image"},
|
14
|
-
{icon: "fa-play",
|
15
|
-
{icon: "fa-code",
|
14
|
+
{icon: "fa-play", title: "Add a video", action: "embed"},
|
15
|
+
{icon: "fa-code", title: "Add an embed", action: "embed-extract"}
|
16
16
|
]
|
17
17
|
#TODO: include section splitter
|
18
18
|
#icon: "fa-minus", title: "Add a new part", action: "hr"
|
@@ -21,14 +21,14 @@ class Dante.Editor.Tooltip extends Dante.View
|
|
21
21
|
menu = ""
|
22
22
|
_.each @buttons, (b)->
|
23
23
|
data_action_value = if b.action_value then "data-action-value='#{b.action_value}'" else ""
|
24
|
-
menu += "<button class='button
|
24
|
+
menu += "<button class='inlineTooltip-button scale' title='#{b.title}' data-action='inline-menu-#{b.action}' #{data_action_value}>
|
25
25
|
<span class='fa #{b.icon}'></span>
|
26
26
|
</button>"
|
27
27
|
|
28
|
-
"<button class='button
|
28
|
+
"<button class='inlineTooltip-button control' title='Close Menu' data-action='inline-menu'>
|
29
29
|
<span class='fa fa-plus'></span>
|
30
30
|
</button>
|
31
|
-
<div class='
|
31
|
+
<div class='inlineTooltip-menu'>
|
32
32
|
#{menu}
|
33
33
|
</div>"
|
34
34
|
|
@@ -0,0 +1,54 @@
|
|
1
|
+
@-webkit-keyframes pop-upwards {
|
2
|
+
0% {
|
3
|
+
-webkit-transform: matrix(.97, 0, 0, 1, 0, 12);
|
4
|
+
transform: matrix(.97, 0, 0, 1, 0, 12);
|
5
|
+
opacity: 0;
|
6
|
+
}
|
7
|
+
20% {
|
8
|
+
-webkit-transform: matrix(.99, 0, 0, 1, 0, 2);
|
9
|
+
transform: matrix(.99, 0, 0, 1, 0, 2);
|
10
|
+
opacity: .7;
|
11
|
+
}
|
12
|
+
40% {
|
13
|
+
-webkit-transform: matrix(1, 0, 0, 1, 0, -1);
|
14
|
+
transform: matrix(1, 0, 0, 1, 0, -1);
|
15
|
+
opacity: 1;
|
16
|
+
}
|
17
|
+
70% {
|
18
|
+
-webkit-transform: matrix(1, 0, 0, 1, 0, 0);
|
19
|
+
transform: matrix(1, 0, 0, 1, 0, 0);
|
20
|
+
opacity: 1;
|
21
|
+
}
|
22
|
+
100% {
|
23
|
+
-webkit-transform: matrix(1, 0, 0, 1, 0, 0);
|
24
|
+
transform: matrix(1, 0, 0, 1, 0, 0);
|
25
|
+
opacity: 1;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
@keyframes pop-upward {
|
29
|
+
0% {
|
30
|
+
-webkit-transform: matrix(.97, 0, 0, 1, 0, 12);
|
31
|
+
transform: matrix(.97, 0, 0, 1, 0, 12);
|
32
|
+
opacity: 0;
|
33
|
+
}
|
34
|
+
20% {
|
35
|
+
-webkit-transform: matrix(.99, 0, 0, 1, 0, 2);
|
36
|
+
transform: matrix(.99, 0, 0, 1, 0, 2);
|
37
|
+
opacity: .7;
|
38
|
+
}
|
39
|
+
40% {
|
40
|
+
-webkit-transform: matrix(1, 0, 0, 1, 0, -1);
|
41
|
+
transform: matrix(1, 0, 0, 1, 0, -1);
|
42
|
+
opacity: 1;
|
43
|
+
}
|
44
|
+
70% {
|
45
|
+
-webkit-transform: matrix(1, 0, 0, 1, 0, 0);
|
46
|
+
transform: matrix(1, 0, 0, 1, 0, 0);
|
47
|
+
opacity: 1;
|
48
|
+
}
|
49
|
+
100% {
|
50
|
+
-webkit-transform: matrix(1, 0, 0, 1, 0, 0);
|
51
|
+
transform: matrix(1, 0, 0, 1, 0, 0);
|
52
|
+
opacity: 1;
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
@font-face {
|
2
|
+
font-family: 'dante';
|
3
|
+
src: font-url('fontello.eot?370dad08');
|
4
|
+
src: font-url('fontello.eot?370dad08#iefix') format('embedded-opentype'),
|
5
|
+
font-url('fontello.woff?370dad08') format('woff'),
|
6
|
+
font-url('fontello.ttf?370dad08') format('truetype'),
|
7
|
+
font-url('fontello.svg?370dad08#fontello') format('svg');
|
8
|
+
font-weight: normal;
|
9
|
+
font-style: normal;
|
10
|
+
}
|
11
|
+
|
12
|
+
@import url(http://fonts.googleapis.com/css?family=Merriweather:400,700,400italic,700italic|Open+Sans:400,300,800);
|
@@ -0,0 +1,79 @@
|
|
1
|
+
.graf {
|
2
|
+
|
3
|
+
&--p,
|
4
|
+
&--blockquote,
|
5
|
+
&--pullquote {
|
6
|
+
margin-bottom: 30px;
|
7
|
+
}
|
8
|
+
|
9
|
+
&--h2 {
|
10
|
+
font-family: $sans;
|
11
|
+
font-size: 60px;
|
12
|
+
font-style: normal;
|
13
|
+
font-weight: 700;
|
14
|
+
letter-spacing: -0.04em;
|
15
|
+
line-height: 1;
|
16
|
+
margin-bottom: 8px;
|
17
|
+
margin-left: -3px;
|
18
|
+
margin-top: 40px;
|
19
|
+
padding-top: 0;
|
20
|
+
}
|
21
|
+
&--h3 {
|
22
|
+
letter-spacing: -0.02em;
|
23
|
+
font-weight: 700;
|
24
|
+
font-style: normal;
|
25
|
+
font-size: 36px;
|
26
|
+
margin-left: -1.8px;
|
27
|
+
line-height: 1.2;
|
28
|
+
margin-top: 40px;
|
29
|
+
margin-bottom: 4px;
|
30
|
+
}
|
31
|
+
&--h4 {
|
32
|
+
color: rgba(0, 0, 0, 0.44);
|
33
|
+
font-family: $sans;
|
34
|
+
font-size: 30px;
|
35
|
+
font-style: normal;
|
36
|
+
font-weight: 300;
|
37
|
+
letter-spacing: -0.02em;
|
38
|
+
line-height: 1.2;
|
39
|
+
margin-bottom: 2px;
|
40
|
+
margin-left: -1.5px;
|
41
|
+
margin-top: 40px;
|
42
|
+
}
|
43
|
+
|
44
|
+
&--pre {
|
45
|
+
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.05);
|
46
|
+
font-family: Monaco,"Courier New","Courier",monospace;
|
47
|
+
font-size: 16px;
|
48
|
+
margin-bottom: 20px;
|
49
|
+
padding: 20px;
|
50
|
+
white-space: pre-wrap;
|
51
|
+
}
|
52
|
+
&--pre + &--pre {
|
53
|
+
margin-top: -20px;
|
54
|
+
}
|
55
|
+
|
56
|
+
&--blockquote {
|
57
|
+
border-left: 3px solid rgba(0, 0, 0, 0.8);
|
58
|
+
font-family: $serif;
|
59
|
+
font-style: italic;
|
60
|
+
font-weight: 400;
|
61
|
+
letter-spacing: 0.01rem;
|
62
|
+
margin-left: -23px;
|
63
|
+
padding-bottom: 3px;
|
64
|
+
padding-left: 20px;
|
65
|
+
}
|
66
|
+
&--blockquote + &--blockquote {
|
67
|
+
margin-top: -30px;
|
68
|
+
padding-top: 30px;
|
69
|
+
}
|
70
|
+
|
71
|
+
&--figure {
|
72
|
+
box-sizing: border-box;
|
73
|
+
clear: both;
|
74
|
+
margin-bottom: 30px;
|
75
|
+
outline: medium none;
|
76
|
+
position: relative;
|
77
|
+
}
|
78
|
+
|
79
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
.dante-icon {
|
2
|
+
&:before {
|
3
|
+
display: inline-block;
|
4
|
+
font-family: "dante";
|
5
|
+
font-style: normal;
|
6
|
+
font-variant: normal;
|
7
|
+
font-weight: normal;
|
8
|
+
line-height: 1em;
|
9
|
+
text-align: center;
|
10
|
+
text-decoration: inherit;
|
11
|
+
text-transform: none;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
.icon {
|
16
|
+
&-h2:before { content: "H1"; }
|
17
|
+
&-h3:before { content: "H2"; }
|
18
|
+
&-h4:before { content: "H3"; }
|
19
|
+
&-p:before { content: "P"; }
|
20
|
+
&-code:before { content: ""; }
|
21
|
+
&-insertorderedlist:before { content: ""; }
|
22
|
+
&-insertunorderedlist:before { content: ""; }
|
23
|
+
&-inserthorizontalrule:before { content: ""; }
|
24
|
+
&-indent:before { content: ""; }
|
25
|
+
&-outdent:before { content: ""; }
|
26
|
+
&-bold:before { content: ""; }
|
27
|
+
&-italic:before { content: ""; }
|
28
|
+
&-underline:before { content: ""; }
|
29
|
+
&-createlink:before { content: ""; }
|
30
|
+
&-blockquote:before { content: ""; }
|
31
|
+
}
|
32
|
+
.icon {
|
33
|
+
&-h2:before,
|
34
|
+
&-h3:before,
|
35
|
+
&-h4:before {
|
36
|
+
font-weight: bold;
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,149 @@
|
|
1
|
+
.dante-menu {
|
2
|
+
|
3
|
+
// MENU
|
4
|
+
& {
|
5
|
+
position: absolute;
|
6
|
+
visibility: hidden;
|
7
|
+
z-index: 1000;
|
8
|
+
-webkit-transition: none;
|
9
|
+
transition: none;
|
10
|
+
display: none;
|
11
|
+
top: 0;
|
12
|
+
left: 0;
|
13
|
+
display:block;
|
14
|
+
white-space: nowrap;
|
15
|
+
|
16
|
+
height: $menu-height;
|
17
|
+
background: $menu-background;
|
18
|
+
border: $menu-border;
|
19
|
+
border-radius: $menu-border-radius;
|
20
|
+
box-shadow: $menu-shadow;
|
21
|
+
}
|
22
|
+
&--active {
|
23
|
+
display: inline-block;
|
24
|
+
visibility: visible;
|
25
|
+
-webkit-animation: pop-upwards 180ms forwards linear;
|
26
|
+
animation: pop-upwards 180ms forwards linear;
|
27
|
+
}
|
28
|
+
|
29
|
+
&--linkmode {
|
30
|
+
.dante-menu-buttons {
|
31
|
+
visibility: hidden;
|
32
|
+
}
|
33
|
+
.dante-menu-linkinput {
|
34
|
+
display: block;
|
35
|
+
}
|
36
|
+
.dante-menu-input {
|
37
|
+
-webkit-animation: pop-upwards 180ms forwards linear;
|
38
|
+
animation: pop-upwards 180ms forwards linear;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
// CARET
|
43
|
+
&:after,
|
44
|
+
&:before {
|
45
|
+
content: "";
|
46
|
+
height: 0;
|
47
|
+
width: 0;
|
48
|
+
position: absolute;
|
49
|
+
left: 50%;
|
50
|
+
pointer-events: none;
|
51
|
+
border: $menu-caret-size solid transparent;
|
52
|
+
margin-left: -($menu-caret-size/2);
|
53
|
+
}
|
54
|
+
&:after {
|
55
|
+
border-top-color: $menu-tone;
|
56
|
+
bottom: -(($menu-caret-size*2)-1);
|
57
|
+
}
|
58
|
+
&:before {
|
59
|
+
border-top-color: $menu-border-color;
|
60
|
+
bottom: -($menu-caret-size*2);
|
61
|
+
}
|
62
|
+
|
63
|
+
// BUTONS
|
64
|
+
&-buttons {
|
65
|
+
list-style: none;
|
66
|
+
margin: 0;
|
67
|
+
padding: 0;
|
68
|
+
line-height: 0;
|
69
|
+
}
|
70
|
+
&-button {
|
71
|
+
& {
|
72
|
+
min-width: 20px;
|
73
|
+
display: inline-block;
|
74
|
+
padding: 0 10px;
|
75
|
+
overflow: hidden;
|
76
|
+
text-align: center;
|
77
|
+
color: $menu-color;
|
78
|
+
cursor: pointer;
|
79
|
+
font-size: 16px;
|
80
|
+
line-height: $menu-height - 2;
|
81
|
+
-webkit-user-select: none;
|
82
|
+
-moz-user-select: none;
|
83
|
+
-ms-user-select: none;
|
84
|
+
user-select: none;
|
85
|
+
}
|
86
|
+
&:hover{
|
87
|
+
// nada
|
88
|
+
}
|
89
|
+
&.active{
|
90
|
+
color: $menu-color-active;
|
91
|
+
}
|
92
|
+
|
93
|
+
&:first-of-type{
|
94
|
+
border-top-left-radius: $menu-border-radius;
|
95
|
+
border-bottom-left-radius: $menu-border-radius;
|
96
|
+
padding-left: 18px;
|
97
|
+
}
|
98
|
+
&:last-of-type{
|
99
|
+
border-top-right-radius: $menu-border-radius;
|
100
|
+
border-bottom-right-radius: $menu-border-radius;
|
101
|
+
padding-right: 18px;
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
// LINK
|
106
|
+
&-linkinput {
|
107
|
+
& {
|
108
|
+
display: none;
|
109
|
+
position: absolute;
|
110
|
+
top: 0;
|
111
|
+
left: 0;
|
112
|
+
right: 0;
|
113
|
+
bottom: 0;
|
114
|
+
}
|
115
|
+
.dante-menu-button {
|
116
|
+
position: absolute;
|
117
|
+
top: 0;
|
118
|
+
right: 0;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
|
122
|
+
&-input {
|
123
|
+
//height: $menu-height - 2;
|
124
|
+
//line-height: 20px;
|
125
|
+
position: absolute;
|
126
|
+
top: 0;
|
127
|
+
left: 0;
|
128
|
+
background: rgba(0,0,0,0);
|
129
|
+
width: 100%;
|
130
|
+
padding: 13px 40px 13px 10px;
|
131
|
+
color: $menu-color;
|
132
|
+
border: none;
|
133
|
+
outline: none;
|
134
|
+
font-size: 16px;
|
135
|
+
box-sizing: border-box;
|
136
|
+
border-radius: $menu-border-radius;
|
137
|
+
appearance: none;
|
138
|
+
text-align: left;
|
139
|
+
font-family: $font-family-serif;
|
140
|
+
letter-spacing: 0.01rem;
|
141
|
+
font-weight: 400;
|
142
|
+
font-style: normal;
|
143
|
+
text-rendering: optimizeLegibility;
|
144
|
+
-webkit-font-smoothing: antialiased;
|
145
|
+
-moz-osx-font-smoothing: grayscale;
|
146
|
+
-moz-font-feature-settings: "liga" on;
|
147
|
+
}
|
148
|
+
|
149
|
+
}
|
@@ -0,0 +1,201 @@
|
|
1
|
+
|
2
|
+
.markup--anchor,
|
3
|
+
.graf--sectionCaption {
|
4
|
+
cursor: text;
|
5
|
+
}
|
6
|
+
|
7
|
+
.markup--anchor {
|
8
|
+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.6) 50%);
|
9
|
+
background-position: 0 24px;
|
10
|
+
background-repeat: repeat-x;
|
11
|
+
background-size: 2px 2px;
|
12
|
+
text-decoration: none;
|
13
|
+
color: rgba(0, 0, 0, 1);
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
.aspectRatioPlaceholder {
|
19
|
+
margin: 0 auto;
|
20
|
+
position: relative;
|
21
|
+
width: 100%;
|
22
|
+
}
|
23
|
+
|
24
|
+
.is-postEditMode .graf-image:before,
|
25
|
+
.is-postEditMode .iframeContainer:before {
|
26
|
+
bottom: 0;
|
27
|
+
content: "";
|
28
|
+
left: 0;
|
29
|
+
position: absolute;
|
30
|
+
right: 0;
|
31
|
+
top: 0;
|
32
|
+
z-index: 500;
|
33
|
+
}
|
34
|
+
|
35
|
+
.graf--figure.is-mediaFocused .graf-image,
|
36
|
+
.graf--figure.is-mediaFocused iframe {
|
37
|
+
box-shadow: 0 0 0 3px #57ad68;
|
38
|
+
}
|
39
|
+
|
40
|
+
.aspectRatioPlaceholder.is-locked .graf-image,
|
41
|
+
.aspectRatioPlaceholder.is-locked .graf-imageAnchor {
|
42
|
+
height: 100%;
|
43
|
+
left: 0;
|
44
|
+
position: absolute;
|
45
|
+
top: 0;
|
46
|
+
width: 100%;
|
47
|
+
}
|
48
|
+
|
49
|
+
.graf-image,
|
50
|
+
.graf-imageAnchor,
|
51
|
+
.iframeContainer > iframe,
|
52
|
+
.iframeContainer {
|
53
|
+
box-sizing: border-box;
|
54
|
+
display: block;
|
55
|
+
margin: auto;
|
56
|
+
max-width: 100%;
|
57
|
+
}
|
58
|
+
|
59
|
+
.is-postEditMode iframe {
|
60
|
+
border: 3px solid rgba(255, 255, 255, 0);
|
61
|
+
}
|
62
|
+
|
63
|
+
.graf--mixtapeEmbed {
|
64
|
+
border-color: rgba(0, 0, 0, 0.15);
|
65
|
+
border-radius: 5px;
|
66
|
+
border-style: solid;
|
67
|
+
border-width: 1px;
|
68
|
+
box-sizing: border-box;
|
69
|
+
color: rgba(0, 0, 0, 0.6);
|
70
|
+
font-family: $sans;
|
71
|
+
font-size: 12px;
|
72
|
+
font-style: normal;
|
73
|
+
font-weight: 300;
|
74
|
+
letter-spacing: -0.02em;
|
75
|
+
margin-bottom: 40px;
|
76
|
+
margin-top: 40px;
|
77
|
+
max-height: 310px;
|
78
|
+
max-width: 700px;
|
79
|
+
overflow: hidden;
|
80
|
+
padding: 30px;
|
81
|
+
position: relative;
|
82
|
+
}
|
83
|
+
|
84
|
+
.mixtapeImage {
|
85
|
+
background-position: center center;
|
86
|
+
background-repeat: no-repeat;
|
87
|
+
background-size: cover;
|
88
|
+
float: right;
|
89
|
+
height: 310px;
|
90
|
+
margin: -30px -30px 0 25px;
|
91
|
+
width: 310px;
|
92
|
+
}
|
93
|
+
|
94
|
+
.mixtapeImage--empty {
|
95
|
+
height: 0;
|
96
|
+
width: 0;
|
97
|
+
}
|
98
|
+
|
99
|
+
.graf--mixtapeEmbed {
|
100
|
+
color: rgba(0, 0, 0, 0.6);
|
101
|
+
font-family: $sans;
|
102
|
+
font-size: 12px;
|
103
|
+
font-style: normal;
|
104
|
+
font-weight: 300;
|
105
|
+
letter-spacing: -0.02em;
|
106
|
+
}
|
107
|
+
|
108
|
+
.markup--mixtapeEmbed-strong {
|
109
|
+
color: #000;
|
110
|
+
display: block;
|
111
|
+
font-family: $sans;
|
112
|
+
font-size: 30px;
|
113
|
+
font-style: normal;
|
114
|
+
font-weight: 300;
|
115
|
+
letter-spacing: -0.02em;
|
116
|
+
line-height: 1.2;
|
117
|
+
margin-bottom: 0px;
|
118
|
+
}
|
119
|
+
|
120
|
+
.markup--mixtapeEmbed-em {
|
121
|
+
display: block;
|
122
|
+
font-size: 16px;
|
123
|
+
font-style: normal;
|
124
|
+
margin-bottom: 10px;
|
125
|
+
max-height: 120px;
|
126
|
+
overflow: hidden;
|
127
|
+
}
|
128
|
+
|
129
|
+
/*CAPTION*/
|
130
|
+
|
131
|
+
.imageCaption:before {
|
132
|
+
border-top: 1px solid rgba(0, 0, 0, 0.15);
|
133
|
+
content: "";
|
134
|
+
display: block;
|
135
|
+
margin-bottom: 10px;
|
136
|
+
margin-left: 75%;
|
137
|
+
width: 25%;
|
138
|
+
}
|
139
|
+
|
140
|
+
.imageCaption {
|
141
|
+
color: rgba(0, 0, 0, 0.6);
|
142
|
+
font-family: $serif;
|
143
|
+
font-size: 14px;
|
144
|
+
font-style: italic;
|
145
|
+
font-weight: 400;
|
146
|
+
left: -172px;
|
147
|
+
letter-spacing: 0.01rem;
|
148
|
+
line-height: 1.4;
|
149
|
+
margin-top: 0;
|
150
|
+
outline: 0 none;
|
151
|
+
position: absolute;
|
152
|
+
text-align: right;
|
153
|
+
top: 0;
|
154
|
+
width: 150px;
|
155
|
+
z-index: 300;
|
156
|
+
}
|
157
|
+
|
158
|
+
.graf--figure.is-mediaFocused .imageCaption,
|
159
|
+
.graf--figure.is-defaultValue.is-selected .imageCaption,
|
160
|
+
section.is-mediaFocused .graf--sectionCaption,
|
161
|
+
.graf--sectionCaption.is-defaultValue.is-selected {
|
162
|
+
display: block;
|
163
|
+
}
|
164
|
+
|
165
|
+
figure.is-defaultValue .imageCaption,
|
166
|
+
.graf--sectionCaption.is-defaultValue {
|
167
|
+
display: none;
|
168
|
+
}
|
169
|
+
|
170
|
+
.editor a {
|
171
|
+
a {
|
172
|
+
color: inherit;
|
173
|
+
text-decoration: none;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
.defaultValue {
|
178
|
+
color: rgba(0,0,0,0.3);
|
179
|
+
}
|
180
|
+
|
181
|
+
section:first-child > .section-divider,
|
182
|
+
section.is-backgrounded + section > .section-divider {
|
183
|
+
display: none;
|
184
|
+
}
|
185
|
+
.postArticle .layoutSingleColumn,
|
186
|
+
.postFooter--loggedOut .layoutSingleColumn {
|
187
|
+
width: 700px;
|
188
|
+
}
|
189
|
+
|
190
|
+
.layoutSingleColumn {
|
191
|
+
margin: 0 auto;
|
192
|
+
width: 640px;
|
193
|
+
}
|
194
|
+
|
195
|
+
.defaultValue--prompt {
|
196
|
+
font-family: $sans;
|
197
|
+
font-size: 18px;
|
198
|
+
font-style: normal;
|
199
|
+
font-weight: 400;
|
200
|
+
letter-spacing: -0.02em;
|
201
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
.postContent {
|
2
|
+
font-family: $font-family-serif;
|
3
|
+
letter-spacing: 0.01rem;
|
4
|
+
font-weight: 400;
|
5
|
+
font-style: normal;
|
6
|
+
//font-size: 22px;
|
7
|
+
font-size: 19px;
|
8
|
+
line-height: 1.4;
|
9
|
+
}
|
10
|
+
|
11
|
+
.notesSource {
|
12
|
+
position: relative;
|
13
|
+
}
|
14
|
+
|
15
|
+
.postField {
|
16
|
+
&, &:focus {
|
17
|
+
outline: 0;
|
18
|
+
word-break: break-word;
|
19
|
+
word-wrap: break-word;
|
20
|
+
}
|
21
|
+
|
22
|
+
&--body {
|
23
|
+
@include clearfix;
|
24
|
+
margin-bottom: 30px;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
.section-content {
|
29
|
+
@include clearfix;
|
30
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
// Set box-sizing globally to handle padding and border widths
|
2
|
+
*,
|
3
|
+
*:before,
|
4
|
+
*:after {
|
5
|
+
box-sizing: border-box;
|
6
|
+
}
|
7
|
+
|
8
|
+
html,
|
9
|
+
body {
|
10
|
+
font-size: 100%;
|
11
|
+
height: 100%; // Must be 100% for off canvas to work
|
12
|
+
}
|
13
|
+
|
14
|
+
// Default body styles
|
15
|
+
body {
|
16
|
+
padding: 0;
|
17
|
+
margin: 0;
|
18
|
+
position: relative;
|
19
|
+
font-family: $font-family-sans;
|
20
|
+
color: rgba(0,0,0,0.8);
|
21
|
+
text-rendering: optimizeLegibility;
|
22
|
+
-webkit-font-smoothing: antialiased;
|
23
|
+
-moz-osx-font-smoothing: grayscale;
|
24
|
+
}
|
@@ -0,0 +1,126 @@
|
|
1
|
+
.inlineTooltip {
|
2
|
+
|
3
|
+
// BASE
|
4
|
+
& {
|
5
|
+
position: absolute;
|
6
|
+
z-index: 900;
|
7
|
+
overflow: hidden;
|
8
|
+
display: none;
|
9
|
+
width: 33px;
|
10
|
+
height: 33px;
|
11
|
+
-webkit-transition: opacity 100ms, width 0 linear 250ms;
|
12
|
+
transition: opacity 100ms, width 0 linear 250ms;
|
13
|
+
padding: 0;
|
14
|
+
}
|
15
|
+
&.is-active {
|
16
|
+
display: block;
|
17
|
+
width: 220px;
|
18
|
+
-webkit-transition-delay: 0;
|
19
|
+
transition-delay: 0;
|
20
|
+
}
|
21
|
+
|
22
|
+
// MENU
|
23
|
+
&-menu {
|
24
|
+
& {
|
25
|
+
display: inline-block;
|
26
|
+
padding-left: 22px;
|
27
|
+
}
|
28
|
+
button {
|
29
|
+
margin-right: 9px;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
// BUTTON
|
34
|
+
&-button {
|
35
|
+
|
36
|
+
// BASE
|
37
|
+
& {
|
38
|
+
display: inline-block;
|
39
|
+
position: relative;
|
40
|
+
outline: 0;
|
41
|
+
padding: 0;
|
42
|
+
vertical-align: bottom;
|
43
|
+
box-sizing: border-box;
|
44
|
+
border-radius: 999em;
|
45
|
+
cursor: pointer;
|
46
|
+
font-size: 14px;
|
47
|
+
text-decoration: none;
|
48
|
+
font-family: $font-family-sans;
|
49
|
+
letter-spacing: -0.02em;
|
50
|
+
font-weight: 400;
|
51
|
+
font-style: normal;
|
52
|
+
white-space: nowrap;
|
53
|
+
text-rendering: auto;
|
54
|
+
text-align: center;
|
55
|
+
text-rendering: optimizeLegibility;
|
56
|
+
-webkit-font-smoothing: antialiased;
|
57
|
+
-moz-osx-font-smoothing: grayscale;
|
58
|
+
-moz-font-feature-settings: "liga" on;
|
59
|
+
width: $tooltip-size;
|
60
|
+
height: $tooltip-size;
|
61
|
+
line-height: $tooltip-size - 2;
|
62
|
+
-webkit-transition: 100ms border-color, 100ms color;
|
63
|
+
transition: 100ms border-color, 100ms color;
|
64
|
+
background: rgba(0,0,0,0);
|
65
|
+
border: 1px solid rgba(0,0,0,0.15);
|
66
|
+
color: rgba(0,0,0,0.44);
|
67
|
+
}
|
68
|
+
|
69
|
+
&:hover {
|
70
|
+
border-color: rgba(0,0,0,0.9);
|
71
|
+
color: rgba(0,0,0,0.9);
|
72
|
+
}
|
73
|
+
|
74
|
+
// SCALE
|
75
|
+
&.scale {
|
76
|
+
& {
|
77
|
+
-webkit-transform: scale(0);
|
78
|
+
-ms-transform: scale(0);
|
79
|
+
transform: scale(0);
|
80
|
+
-webkit-transition-property: -webkit-transform;
|
81
|
+
transition-property: transform;
|
82
|
+
-webkit-transition-duration: 100ms;
|
83
|
+
transition-duration: 100ms;
|
84
|
+
}
|
85
|
+
.is-scaled & {
|
86
|
+
-webkit-transform: scale(1);
|
87
|
+
-ms-transform: scale(1);
|
88
|
+
transform: scale(1);
|
89
|
+
-webkit-transition-duration: 200ms;
|
90
|
+
transition-duration: 200ms;
|
91
|
+
}
|
92
|
+
&:nth-child(2) {
|
93
|
+
-webkit-transition-delay: 30ms;
|
94
|
+
transition-delay: 30ms;
|
95
|
+
}
|
96
|
+
&:nth-child(3) {
|
97
|
+
-webkit-transition-delay: 60ms;
|
98
|
+
transition-delay: 60ms;
|
99
|
+
}
|
100
|
+
&:nth-child(4) {
|
101
|
+
-webkit-transition-delay: 90ms;
|
102
|
+
transition-delay: 90ms;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
// CONTROL
|
107
|
+
&.control {
|
108
|
+
& {
|
109
|
+
-webkit-transition: -webkit-transform 100ms;
|
110
|
+
transition: transform 100ms;
|
111
|
+
-webkit-transform: rotate(0);
|
112
|
+
-ms-transform: rotate(0);
|
113
|
+
transform: rotate(0);
|
114
|
+
}
|
115
|
+
.is-active & {
|
116
|
+
-webkit-transition: -webkit-transform 250ms;
|
117
|
+
transition: transform 250ms;
|
118
|
+
-webkit-transform: rotate(45deg);
|
119
|
+
-ms-transform: rotate(45deg);
|
120
|
+
transform: rotate(45deg);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
}
|
125
|
+
|
126
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
$font-family-sans: 'jaf-bernino-sans', 'Open Sans', "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
|
2
|
+
$font-family-serif: 'freight-text-pro', 'Merriweather', Georgia,Cambria, "Times New Roman", Times,serif;
|
3
|
+
$font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace;
|
4
|
+
|
5
|
+
$font-family-base: $font-family-sans;
|
6
|
+
$font-size-base: 14px;
|
7
|
+
$line-height-base: 1.428571429; // 20/14
|
8
|
+
//$line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px
|
9
|
+
|
10
|
+
$debugger: false;
|
11
|
+
|
12
|
+
$menu-height: 45px;
|
13
|
+
$menu-tone: #333;
|
14
|
+
$menu-factor: 5%;
|
15
|
+
$menu-background: linear-gradient(to bottom, darken($menu-tone,$menu-factor), $menu-tone) repeat scroll 0 0 $menu-tone;
|
16
|
+
$menu-shadow: 1px 2px 3px -2px #222;
|
17
|
+
$menu-border-color: darken($menu-tone,$menu-factor);
|
18
|
+
$menu-border: 1px solid $menu-border-color;
|
19
|
+
$menu-border-radius: 5px;
|
20
|
+
$menu-color: #FFFFFF;
|
21
|
+
$menu-color-active: #1ABF89;
|
22
|
+
$menu-caret-size: 8px;
|
23
|
+
|
24
|
+
$tooltip-size: 32px;
|
25
|
+
|
26
|
+
// Legacy
|
27
|
+
$serif: $font-family-serif;
|
28
|
+
$sans: $font-family-sans;
|
@@ -1,3 +1,16 @@
|
|
1
|
+
@charset "utf-8";
|
2
|
+
|
3
|
+
@import "dante/variables";
|
4
|
+
@import "dante/utilities";
|
1
5
|
@import "dante/fonts";
|
2
|
-
@import "dante/
|
3
|
-
@import "dante/
|
6
|
+
@import "dante/scaffold";
|
7
|
+
@import "dante/animations";
|
8
|
+
|
9
|
+
@import "dante/post";
|
10
|
+
@import "dante/icons";
|
11
|
+
@import "dante/menu";
|
12
|
+
@import "dante/tooltip";
|
13
|
+
@import "dante/graf";
|
14
|
+
@import "dante/needsorder";
|
15
|
+
|
16
|
+
@import "dante/debug";
|
File without changes
|
File without changes
|
File without changes
|
data/dante-editor.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'dante-editor/version'
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.name = "dante-editor"
|
8
8
|
gem.version = DanteEditor::VERSION
|
9
|
-
gem.authors = ["Miguel Michelson"]
|
10
|
-
gem.email = ["miguelmichelson@gmail.com"]
|
9
|
+
gem.authors = ["Miguel Michelson", "Cristian Ferrari"]
|
10
|
+
gem.email = ["miguelmichelson@gmail.com", "cristianferrarig@gmail.com"]
|
11
11
|
gem.description = %q{dante-editor yet another Medium editor clone.}
|
12
12
|
gem.summary = %q{dante-editor yet another Medium editor clone.}
|
13
13
|
gem.homepage = "http://michelson.github.io/Dante/"
|
data/lib/dante-editor/version.rb
CHANGED
@@ -32,7 +32,7 @@ QUnit.test "should init editor", ( assert )->
|
|
32
32
|
assert.ok( _.isObject(window.editor.editor_menu), "Passed!" )
|
33
33
|
|
34
34
|
QUnit.test "should build tooltip & menu", ( assert )->
|
35
|
-
assert.ok( !_.isEmpty( $(".
|
35
|
+
assert.ok( !_.isEmpty( $(".inlineTooltip") ), "Passed!" )
|
36
36
|
assert.ok( !_.isEmpty( $("#editor-menu") ), "Passed!" )
|
37
37
|
|
38
38
|
QUnit.test "should display placeholders when empty content", (assert)->
|
@@ -1,4 +1,34 @@
|
|
1
1
|
@charset "utf-8";
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
header{
|
4
|
+
width: 100%;
|
5
|
+
border-top: 3px solid #1abf89;
|
6
|
+
margin-bottom: 40px;
|
7
|
+
|
8
|
+
img{
|
9
|
+
display: block;
|
10
|
+
float: left;
|
11
|
+
margin: -34px 7px 11px 25px;
|
12
|
+
position: absolute;
|
13
|
+
left: 0;
|
14
|
+
top: 28px;
|
15
|
+
}
|
16
|
+
h1 {
|
17
|
+
font-size: 30px;
|
18
|
+
font-style: normal;
|
19
|
+
font-weight: 300;
|
20
|
+
letter-spacing: -0.04em;
|
21
|
+
line-height: 1;
|
22
|
+
margin-bottom: 8px;
|
23
|
+
margin-right: 91px;
|
24
|
+
margin-top: 25px;
|
25
|
+
padding-top: 0;
|
26
|
+
text-align: right;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
#editor{
|
31
|
+
margin: 0 auto;
|
32
|
+
//width: 70%;
|
33
|
+
width: 700px;
|
34
|
+
}
|
data/source/index.html.erb
CHANGED
@@ -8,11 +8,19 @@ title: Dante Editor example
|
|
8
8
|
<h1 class="main-title">Dante Wysiwyg</h1>
|
9
9
|
</header>
|
10
10
|
|
11
|
+
<article>
|
12
|
+
<div class="postContent">
|
13
|
+
<div class="notesSource">
|
11
14
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
15
|
+
<div id="editor" class="postField postField--body editable smart-media-plugin">
|
16
|
+
<% partial "partials/content" %>
|
17
|
+
<% partial "partials/example_1" %>
|
18
|
+
<% partial "partials/example_2" %>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
</div>
|
22
|
+
</div>
|
23
|
+
</article>
|
16
24
|
|
17
25
|
</div>
|
18
26
|
|
data/source/layouts/layout.erb
CHANGED
@@ -2,11 +2,10 @@
|
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8">
|
5
|
-
|
6
5
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
7
6
|
<title><%= current_page.data.title || "The Middleman" %></title>
|
8
7
|
<%= stylesheet_link_tag "http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css" %>
|
9
|
-
<%= stylesheet_link_tag "normalize", "editor" %>
|
8
|
+
<%= stylesheet_link_tag "normalize", "all", "editor" %>
|
10
9
|
<%= javascript_include_tag "deps", "editor" %>
|
11
10
|
</head>
|
12
11
|
|
@@ -4,11 +4,10 @@
|
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
6
6
|
<title>Dante Wysiwyg Specs</title>
|
7
|
-
|
8
|
-
|
9
|
-
<%= stylesheet_link_tag "normalize", "all" %>
|
10
|
-
|
11
|
-
|
7
|
+
<link rel="stylesheet" href="//code.jquery.com/qunit/qunit-1.15.0.css">
|
8
|
+
<%= stylesheet_link_tag "http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css" %>
|
9
|
+
<%= stylesheet_link_tag "normalize", "all", "editor" %>
|
10
|
+
<%= javascript_include_tag "deps", "editor" %>
|
12
11
|
</head>
|
13
12
|
|
14
13
|
<body class="<%= page_classes %>">
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<p>Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Maecenas sed diam eget risus varius blandit sit amet non magna. Curabitur blandit tempus porttitor. Curabitur blandit tempus porttitor. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Curabitur blandit tempus porttitor. Cras justo odio, dapibus ac facilisis in, egestas eget quam.</p>
|
2
|
+
<p>Sed posuere consectetur est at lobortis. Maecenas sed diam eget risus varius blandit sit amet non magna. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Donec id elit non mi porta gravida at eget metus. Sed posuere consectetur est at lobortis. Sed posuere consectetur est at lobortis.</p>
|
3
|
+
<p>Maecenas faucibus mollis interdum. Curabitur blandit tempus porttitor. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Maecenas faucibus mollis interdum. Vestibulum id ligula porta felis euismod semper. Nulla vitae elit libero, a pharetra augue. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p>
|
metadata
CHANGED
@@ -1,23 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dante-editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Michelson
|
8
|
+
- Cristian Ferrari
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
12
13
|
dependencies: []
|
13
14
|
description: dante-editor yet another Medium editor clone.
|
14
15
|
email:
|
15
16
|
- miguelmichelson@gmail.com
|
17
|
+
- cristianferrarig@gmail.com
|
16
18
|
executables: []
|
17
19
|
extensions: []
|
18
20
|
extra_rdoc_files: []
|
19
21
|
files:
|
20
22
|
- ".gitignore"
|
23
|
+
- ".ruby-version"
|
21
24
|
- ".travis.yml"
|
22
25
|
- Gemfile
|
23
26
|
- Gemfile.lock
|
@@ -37,9 +40,21 @@ files:
|
|
37
40
|
- app/assets/javascripts/dante/utils.js.coffee
|
38
41
|
- app/assets/javascripts/dante/view.js.coffee
|
39
42
|
- app/assets/stylesheets/dante.css.scss
|
40
|
-
- app/assets/stylesheets/dante/
|
41
|
-
- app/assets/stylesheets/dante/
|
42
|
-
- app/assets/stylesheets/dante/
|
43
|
+
- app/assets/stylesheets/dante/_animations.scss
|
44
|
+
- app/assets/stylesheets/dante/_debug.scss
|
45
|
+
- app/assets/stylesheets/dante/_fonts.scss
|
46
|
+
- app/assets/stylesheets/dante/_graf.scss
|
47
|
+
- app/assets/stylesheets/dante/_icons.scss
|
48
|
+
- app/assets/stylesheets/dante/_menu.scss
|
49
|
+
- app/assets/stylesheets/dante/_needsorder.scss
|
50
|
+
- app/assets/stylesheets/dante/_post.scss
|
51
|
+
- app/assets/stylesheets/dante/_scaffold.scss
|
52
|
+
- app/assets/stylesheets/dante/_tooltip.scss
|
53
|
+
- app/assets/stylesheets/dante/_utilities.scss
|
54
|
+
- app/assets/stylesheets/dante/_variables.scss
|
55
|
+
- app/assets/stylesheets/old/base.css.scss
|
56
|
+
- app/assets/stylesheets/old/editor.css.scss
|
57
|
+
- app/assets/stylesheets/old/fonts.css.scss
|
43
58
|
- bower.json
|
44
59
|
- config.rb
|
45
60
|
- config.ru
|
@@ -64,6 +79,7 @@ files:
|
|
64
79
|
- source/index.html.erb
|
65
80
|
- source/layouts/layout.erb
|
66
81
|
- source/layouts/spec.html.erb
|
82
|
+
- source/partials/_content.erb
|
67
83
|
- source/partials/_example_1.erb
|
68
84
|
- source/partials/_example_2.erb
|
69
85
|
- source/partials/_example_3.erb
|