anecdote 0.0.10 → 0.0.11
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 +4 -4
- data/app/assets/stylesheets/anecdote/_helpers.css.scss +12 -5
- data/app/assets/stylesheets/anecdote/_wysicontent.css.scss +33 -26
- data/lib/anecdote/version.rb +1 -1
- data/lib/anecdote.rb +48 -4
- data/test/dummy/app/views/pages/article.markdown +3 -1
- data/test/dummy/log/development.log +1262 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/-e9scu-68U2p6kLKREWrs3crhHOLRBTg6o-jBM8HSdY.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/0KH81v-SZStX62buDM5vfqSEbt8NFgCaxyyFKxhRdrY.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/0pClM4ktWKVtNWpgonuiPppPrDDhQw5u_VjNrLFjXlY.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/2KPMLvBdqGpAvvHEv9k-IkxikOPfPT20FvJrgHuyD-s.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/2elBOQrc6tft5VQOobCs0g2VvCZiLN-X81k6cb7G9jo.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/3vwPc3Maxjj-2rhKTiDNYqv4TvPrXhCacaHifk8G3Uc.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/4Md9vXbgq-EEQTBfyjDj-CzNKn7cV1EqjkbO4zr8PXw.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/5hHwlR3sVPpUZFnrgCD9eU_riRB6FlPmdajo3F3Y3A0.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/6JGzFmdF51FF7E80EW7xx6YP-0brqt6jsVvrFMB_eT0.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/6t7z3FsmWcKGFszG4PMCr_5i5oPV1qfqlQ8LEwITlb0.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/75FbWZBnBwS_27lzsnuRtVhkgZ82n-pC7Ej6NCmpYzQ.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/7AM6N2agbx2b_y4ahordzgVTcTDuZqql2UOFFU5LkWU.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/8zC-GMDTdO_vrYSOFiDudbFRspJyQGVpkjI8yyGjGkc.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/B1HOr4cTQFf48rWt5sdvntZ5GVN-Uty1p9QcL7wM5JQ.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/C9myNAZnWKUwsY12cataDiKDzO7KvlMDlJ-fA12h4NQ.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/Cy-_QsfV2w2ZpjT7tHP66-J0tCEjbdqn5Myl3IEcdss.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/DnbPXbnrLphxr6lEyMl_2_cl4P11HS4LgUxUUut-9vk.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/G5oE1unc95Lofv0PJgCB2wBC-N6_t5WgzWkrDzUvjGY.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/HDBO0HCfOz_KM_f-d-lj7KgreqfXhMZwHOyZ2qTqI4c.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/I7U6VS8-jgAH1d8rYKA6guhRDHZdY3zIMqbLmbvTM0w.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/IF3RbZ8QLRLbAiFKJySugh9CouSnqXSqF9eRZYoWVXg.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/MGCtFesvQGc4bSVgwydFKxhKG7hIGfyjgQHEk__EtEg.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/MvE1R-N3zbMnSmW7ZEC976nfc-i315SaL84Z_bU4I6E.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/N-bdGBRwCgYWHQk_s3zdORqqB4_u9EaYngtmLZKUoLU.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/OIiR1SEC8jI4sEe-6IFHVABh9UJLqEcn_BZH6zQUdgo.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/RNZpVRqd6sYKaLbCfVcPoxPXRhWQtdRatYhvKe_H9Hs.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/RxbOb9wNUzA_wZq2V_y19tWa-DI5cG8ZAwQ6UNENJa4.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/U1EbxcbU1bKS0NbS5tp2kczbMT3AvDlbzt0jtnkQfLk.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/Z9XTqhsR82aRt9ljeOg2HdROsbP6IrAa0v1rBr3Cxw8.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/dqBDD5Hpw0BA79OU1Mi1pFMfjuoYfCXNLnzuXd8GLy0.cache +2 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/fndy6PSKwiKxeQw4R9JzUmL05hVUSYNVkOoFsjrsCw4.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/hEF9ExosLSBGWDTJ223-V2SFQjcgoKJjH8Wv4xguo1U.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/hhDPRo9RultgCyRxKZi-lfiRJY0yxKf-BUJeFSUKWHg.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/kRIaSI3CV4_popRI5r2fDHLOwIzqs7TTYMDyFVbMZPI.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/lwPd0OsQX9xniUMPdJ5dcyVA2HaYW0yodVzlHt1M-s0.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/mw06dFX61vyhK1gkTNHoaHtgchLFvG66dxLoZk3c7AI.cache +2 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/myq0n7HhTQrAG2zjFqXLUXwIrnGNHHa2Q0gve9maOcE.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/slvxrhaKS7c-7a-erMNMGamIOlwl4RO6XZuKB_nt5Jk.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/t2pzla0GFKQYbYoxGO__vIdZn0tQAjjibLWdfM_yiZo.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/u0ONNwsgSjNRYDbOptVAkMyun0V4uZ9sNiWo4rb0vFI.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/u2ri2LTrlaNX_MSf_l4XNGG9RwMJp7sZYTFCbUTSrM0.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/ufza2XXZK28bjvLWA3U9XT4ZtxJHTcn-SYMxhCU3WSI.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/vD1jtvyicEcxoKtxjPav7KKsR1uy4B4DIsvI3-c22WM.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/vEpmZyXKRfYGQd1TdU615J75yBsWSjy1Q59kc4PPjls.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/wsL8yJcE0XwoizIF2S4h3qVQffQYJ7dQhLwrq-T7re0.cache +0 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/xMaOlwSb2PZwwTURK0IR405p5e4wm9EnGo6z6jY_NJM.cache +1 -0
- data/test/dummy/tmp/cache/sprockets/v3.0/yJQzRUENd9XnD2jK051Ry_tFzaMg1IKawpl3woSjR6A.cache +1 -0
- metadata +86 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 731d413c12e7e2df573ec129199e90c23f2b1762
|
|
4
|
+
data.tar.gz: 8744182c040cca592769fdfab20aeb4b2e2a383e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a4857bc8480b415482180e80221f391acd24971e8834785e501c75238a6a361fd72d53b478887064a6ec765be1149418c38226b10a4c78f8ce92427636614abe
|
|
7
|
+
data.tar.gz: 5a6ced3382c1972bc3c90787186246ca79dea3bfe93a939a78703dd4e492d323eeac448b2eb71b9cd3fc1ddb648dd7f110bc30a09fb3258638739449e1460a24
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
$remify-baseline: 16 !default;
|
|
3
|
-
$respond-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
$respond-devices: (
|
|
4
|
+
medium-handheld: 350px,
|
|
5
|
+
large-handheld: 450px,
|
|
6
|
+
tablet: 650px,
|
|
7
|
+
laptop: 960px,
|
|
8
|
+
large-monitor: 1300px
|
|
9
|
+
);
|
|
10
|
+
$respond-device-medium-handheld: map-get($respond-devices, medium-handheld);
|
|
11
|
+
$respond-device-large-handheld: map-get($respond-devices, large-handheld);
|
|
12
|
+
$respond-device-tablet: map-get($respond-devices, tablet);
|
|
13
|
+
$respond-device-laptop: map-get($respond-devices, laptop);
|
|
14
|
+
$respond-device-large-monitor: map-get($respond-devices, large-monitor);
|
|
8
15
|
$fix-mqs: false !default;
|
|
9
16
|
|
|
10
17
|
|
|
@@ -105,36 +105,31 @@
|
|
|
105
105
|
@include margin-horizontal( auto );
|
|
106
106
|
width: 100%;
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
108
|
+
|
|
109
|
+
@mixin float-module-3ba83n {
|
|
110
|
+
&.v-float-right, &.v-float-left {
|
|
111
|
+
@include remify( margin, 0.35, 2, 1 );
|
|
112
|
+
}
|
|
113
|
+
&.v-float-right {
|
|
114
|
+
float: right;
|
|
115
|
+
margin-right: 0;
|
|
116
|
+
}
|
|
117
|
+
&.v-float-left {
|
|
118
|
+
float: left;
|
|
119
|
+
margin-left: 0;
|
|
121
120
|
}
|
|
122
121
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
float
|
|
130
|
-
margin-right: 0;
|
|
131
|
-
}
|
|
132
|
-
&.v-float-left {
|
|
133
|
-
float: left;
|
|
134
|
-
margin-left: 0;
|
|
122
|
+
&.v-float-from-always {
|
|
123
|
+
@include float-module-3ba83n;
|
|
124
|
+
}
|
|
125
|
+
@each $breakpoint-name, $breakpoint-px in $respond-devices {
|
|
126
|
+
&.v-float-from-#{$breakpoint-name} {
|
|
127
|
+
@include respond(min, $breakpoint-name) {
|
|
128
|
+
@include float-module-3ba83n;
|
|
135
129
|
}
|
|
136
130
|
}
|
|
137
131
|
}
|
|
132
|
+
|
|
138
133
|
}
|
|
139
134
|
|
|
140
135
|
|
|
@@ -172,7 +167,8 @@
|
|
|
172
167
|
display: none;
|
|
173
168
|
}
|
|
174
169
|
|
|
175
|
-
|
|
170
|
+
|
|
171
|
+
@mixin flow-gallery-dn2bak {
|
|
176
172
|
.flexbox & {
|
|
177
173
|
.anecdote-gallery-offset-dn2bak {
|
|
178
174
|
display: block;
|
|
@@ -198,6 +194,17 @@
|
|
|
198
194
|
}
|
|
199
195
|
}
|
|
200
196
|
}
|
|
197
|
+
&.v-flow-from-always {
|
|
198
|
+
@include flow-gallery-dn2bak;
|
|
199
|
+
}
|
|
200
|
+
@each $breakpoint-name, $breakpoint-px in $respond-devices {
|
|
201
|
+
&.v-flow-from-#{$breakpoint-name} {
|
|
202
|
+
@include respond(min, $breakpoint-name) {
|
|
203
|
+
@include flow-gallery-dn2bak;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
201
208
|
}
|
|
202
209
|
|
|
203
210
|
/*---------------------------------------------------
|
data/lib/anecdote/version.rb
CHANGED
data/lib/anecdote.rb
CHANGED
|
@@ -25,19 +25,23 @@ module Anecdote
|
|
|
25
25
|
contents = []
|
|
26
26
|
contents << view_context.content_tag((settings[:href].present? ? :a : :div), (settings[:href].present? ? { href: settings[:href], title: settings[:href_title] } : {}).merge({ class: 'anecdote-intrinsic-embed-n42ha1' })) do
|
|
27
27
|
if settings[:assets_path]
|
|
28
|
-
|
|
28
|
+
content = view_context.image_tag(settings[:assets_path], alt: '')
|
|
29
29
|
paperclip_geo = Paperclip::Geometry.from_file(Rails.root.join('app', 'assets', 'images', settings[:assets_path]))
|
|
30
30
|
geo = { width: paperclip_geo.width, height: paperclip_geo.height }
|
|
31
31
|
elsif settings[:image_url]
|
|
32
|
-
|
|
33
|
-
dimensions = settings[:image_dimensions].split('x').map(&:to_f)
|
|
32
|
+
content = view_context.image_tag(settings[:image_url], alt: '')
|
|
33
|
+
dimensions = (settings[:dimensions] || settings[:image_dimensions]).split('x').map(&:to_f)
|
|
34
|
+
geo = { width: dimensions.first, height: dimensions.last }
|
|
35
|
+
elsif settings[:embed_code]
|
|
36
|
+
content = settings[:embed_code].html_safe
|
|
37
|
+
dimensions = settings[:dimensions].split('x').map(&:to_f)
|
|
34
38
|
geo = { width: dimensions.first, height: dimensions.last }
|
|
35
39
|
end
|
|
36
40
|
if settings[:_scope_].present? && settings[:_scope_][:processor].tag == 'gallery'
|
|
37
41
|
settings[:_scope_][:settings][:_graphics_] ||= []
|
|
38
42
|
settings[:_scope_][:settings][:_graphics_] << geo
|
|
39
43
|
end
|
|
40
|
-
view_context.content_tag(:div,
|
|
44
|
+
view_context.content_tag(:div, content, class: 'inner', style: "padding-bottom: #{geo[:height] / geo[:width] * 100}%;")
|
|
41
45
|
end
|
|
42
46
|
if settings[:caption].present?
|
|
43
47
|
contents << view_context.content_tag(:div, view_context.content_tag(:div, markdown_and_parse(settings[:caption]), class: 'inner anecdote-wysicontent-ndj4ab'), class: 'anecdote-caption-ajkd3b')
|
|
@@ -109,6 +113,28 @@ module Anecdote
|
|
|
109
113
|
"style=\"#{styles.join(';')}\" #{match}".html_safe
|
|
110
114
|
end
|
|
111
115
|
|
|
116
|
+
# flow-points
|
|
117
|
+
flow_from_klass = case settings[:flow_from]
|
|
118
|
+
when 'always' then 'v-flow-from-always'
|
|
119
|
+
when 'medium-handheld' then 'v-flow-from-medium-handheld'
|
|
120
|
+
when 'large-handheld' then 'v-flow-from-large-handheld'
|
|
121
|
+
when 'tablet' then 'v-flow-from-tablet'
|
|
122
|
+
when 'laptop' then 'v-flow-from-laptop'
|
|
123
|
+
when 'large-monitor' then 'v-flow-from-large-monitor'
|
|
124
|
+
else
|
|
125
|
+
if settings[:size].present?
|
|
126
|
+
case settings[:size]
|
|
127
|
+
when 'small' then 'v-flow-from-medium-handheld'
|
|
128
|
+
when 'medium' then 'v-flow-from-large-handheld'
|
|
129
|
+
when 'big' then 'v-flow-from-tablet'
|
|
130
|
+
when 'full-width' then 'v-flow-from-tablet'
|
|
131
|
+
end
|
|
132
|
+
else
|
|
133
|
+
'v-flow-from-tablet' # default
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
klass += " #{flow_from_klass}"
|
|
137
|
+
|
|
112
138
|
# build HTML output
|
|
113
139
|
contents = []
|
|
114
140
|
contents << view_context.content_tag(:div, graphics.html_safe, class: 'content')
|
|
@@ -142,6 +168,24 @@ module Anecdote
|
|
|
142
168
|
when 'right' then 'v-float-right'
|
|
143
169
|
when 'left' then 'v-float-left'
|
|
144
170
|
end
|
|
171
|
+
klasses << case settings[:float_from]
|
|
172
|
+
when 'always' then 'v-float-from-always'
|
|
173
|
+
when 'medium-handheld' then 'v-float-from-medium-handheld'
|
|
174
|
+
when 'large-handheld' then 'v-float-from-large-handheld'
|
|
175
|
+
when 'tablet' then 'v-float-from-tablet'
|
|
176
|
+
when 'laptop' then 'v-float-from-laptop'
|
|
177
|
+
when 'large-monitor' then 'v-float-from-large-monitor'
|
|
178
|
+
else
|
|
179
|
+
if settings[:size].present?
|
|
180
|
+
case settings[:size]
|
|
181
|
+
when 'small' then 'v-float-from-large-handheld'
|
|
182
|
+
when 'medium' then 'v-float-from-laptop'
|
|
183
|
+
when 'big' then 'v-flow-from-large-monitor'
|
|
184
|
+
end
|
|
185
|
+
else
|
|
186
|
+
'v-float-from-laptop' # default
|
|
187
|
+
end
|
|
188
|
+
end
|
|
145
189
|
end
|
|
146
190
|
if settings[:mood].present?
|
|
147
191
|
klasses << case settings[:mood]
|
|
@@ -8,7 +8,9 @@ We considered naming this article "the sort type all users want but zero sites o
|
|
|
8
8
|
|
|
9
9
|
During our research study on product list usability the test subjects repeatedly sought out these kinds of category-specific sort types – however, to no avail since seemingly **zero sites** offer them. Even after [benchmarking](http://baymard.com/ecommerce-product-lists/benchmark/site-reviews) the product lists of 50 major e-commerce sites we have yet to find a site that truly offer category-specific sorting.
|
|
10
10
|
|
|
11
|
-
{{
|
|
11
|
+
{{ graphic: dimensions=1280x720 + embed-code=$<iframe src="https://www.youtube.com/embed/ZCBE8ocOkAQ" frameborder="0" allowfullscreen></iframe>$ + mood=positive + caption=$A mockup we've created of what category-specific sort types could look like at BestBuy. Here the three last sorting options – for TV screen size, refresh rate, and display depth – are available exclusively within the TV category while the other sort types are available site-wide.$ }}
|
|
12
|
+
|
|
13
|
+
{{% gallery: size=big + flow-from=always + scale-by=relative-width-bottom-alignment %}}
|
|
12
14
|
{{ graphic: assets-path=category-specific-sorting-02-bestbuy.jpg + mood=positive + caption=$A mockup we've created of what category-specific sort types could look like at BestBuy. Here the three last sorting options – for TV screen size, refresh rate, and display depth – are available exclusively within the TV category while the other sort types are available site-wide.$ }}
|
|
13
15
|
{{ graphic: assets-path=category-specific-sorting-08-faceted-sorting.jpg + mood=negative + caption=$An example of how things can go really wrong.$ }}
|
|
14
16
|
{{% end %}}
|