partystreusel 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +1 -0
  3. data/.ruby-version +1 -1
  4. data/.travis.yml +5 -2
  5. data/CHANGELOG.md +4 -0
  6. data/Gruntfile.coffee +86 -0
  7. data/README.md +10 -1
  8. data/app/assets/images/icons/icon-sprite.svg +1 -0
  9. data/app/assets/images/icons/png/arrow-left.png +0 -0
  10. data/app/assets/images/icons/png/arrow-right.png +0 -0
  11. data/app/assets/images/icons/png/close.png +0 -0
  12. data/app/assets/images/icons/png/download.png +0 -0
  13. data/app/assets/images/icons/png/folder.png +0 -0
  14. data/app/assets/images/icons/png/menu.png +0 -0
  15. data/app/assets/images/icons/png/search.png +0 -0
  16. data/app/assets/images/icons/source/arrow-left.svg +1 -0
  17. data/app/assets/images/icons/source/arrow-right.svg +1 -0
  18. data/app/assets/images/icons/source/close.svg +1 -0
  19. data/app/assets/images/icons/source/download.svg +1 -0
  20. data/app/assets/images/icons/source/folder.svg +1 -0
  21. data/app/assets/images/icons/source/menu.svg +1 -0
  22. data/app/assets/images/icons/source/search.svg +1 -0
  23. data/app/assets/javascripts/partystreusel/tab.js.coffee +1 -0
  24. data/app/assets/stylesheets/partystreusel.css.sass +1 -0
  25. data/app/controllers/partystreusel/styleguide_controller.rb +14 -0
  26. data/config/routes.rb +6 -0
  27. data/{Gemfile → jasmine/Gemfile} +2 -2
  28. data/{Guardfile → jasmine/Guardfile} +0 -0
  29. data/{config.ru → jasmine/config.ru} +0 -0
  30. data/lib/generators/partystreusel/styleguide_generator.rb +30 -0
  31. data/lib/partystreusel/engine.rb +18 -0
  32. data/lib/partystreusel/helpers/icon_helper.rb +9 -0
  33. data/lib/partystreusel/helpers.rb +1 -0
  34. data/lib/partystreusel/version.rb +1 -1
  35. data/lib/partystreusel.rb +4 -16
  36. data/package.json +22 -0
  37. data/partystreusel.gemspec +0 -1
  38. data/spec/javascripts/partystreusel/readmore_spec.js.coffee +1 -1
  39. data/styleguide/Gemfile +24 -0
  40. data/styleguide/config.rb +110 -0
  41. data/styleguide/source/index.html.haml +8 -0
  42. data/styleguide/source/javascripts/application.js.coffee +30 -0
  43. data/styleguide/source/javascripts/modernizr.js +306 -0
  44. data/styleguide/source/javascripts/views/_initializer.js.coffee +15 -0
  45. data/styleguide/source/layouts/_favicons.html.haml +3 -0
  46. data/styleguide/source/layouts/_icons.html.erb +31 -0
  47. data/styleguide/source/layouts/_typekit.html.haml +4 -0
  48. data/styleguide/source/layouts/application.html.haml +58 -0
  49. data/styleguide/source/partials/_footer.html.haml +0 -0
  50. data/styleguide/source/partials/_google_analytics.html.erb +9 -0
  51. data/styleguide/source/partials/_header.html.haml +3 -0
  52. data/styleguide/source/partials/_offcanvas.html.haml +6 -0
  53. data/styleguide/source/partials/_offcanvas_nav.html.haml +22 -0
  54. data/styleguide/source/styleguide/_styleguide_nav.html.haml +80 -0
  55. data/styleguide/source/styleguide/accordion.html.haml +27 -0
  56. data/styleguide/source/styleguide/breadcrumb.html.haml +18 -0
  57. data/styleguide/source/styleguide/buttons.html.haml +70 -0
  58. data/styleguide/source/styleguide/content.html.haml +20 -0
  59. data/styleguide/source/styleguide/dropdowns.html.haml +30 -0
  60. data/styleguide/source/styleguide/embeds.html.haml +12 -0
  61. data/styleguide/source/styleguide/form.html.haml +71 -0
  62. data/styleguide/source/styleguide/iconbar.html.haml +34 -0
  63. data/styleguide/source/styleguide/icons.html.haml +67 -0
  64. data/styleguide/source/styleguide/image.html.haml +17 -0
  65. data/styleguide/source/styleguide/index.html.haml +6 -0
  66. data/styleguide/source/styleguide/linklist.html.haml +47 -0
  67. data/styleguide/source/styleguide/options.html.haml +28 -0
  68. data/styleguide/source/styleguide/readmore.html.haml +21 -0
  69. data/styleguide/source/styleguide/slider.html.haml +21 -0
  70. data/styleguide/source/styleguide/switches.html.haml +10 -0
  71. data/styleguide/source/styleguide/tab.html.haml +34 -0
  72. data/styleguide/source/styleguide/table.html.haml +51 -0
  73. data/styleguide/source/styleguide/teaser.html.haml +55 -0
  74. data/styleguide/source/styleguide/teaser_assets.html.haml +55 -0
  75. data/styleguide/source/styleguide/teaser_card.html.haml +79 -0
  76. data/styleguide/source/styleguide/teaser_list.html.haml +55 -0
  77. data/styleguide/source/styleguide/topbar.html.haml +72 -0
  78. data/styleguide/source/styleguide/two_column.html.haml +18 -0
  79. data/styleguide/source/styleguide/typo.html.haml +71 -0
  80. data/styleguide/source/stylesheets/fallbacks/grunticon.loader.js +3 -0
  81. data/styleguide/source/stylesheets/partystreusel/_helpers.sass +10 -0
  82. data/styleguide/source/stylesheets/partystreusel/_mixins.sass +14 -0
  83. data/styleguide/source/stylesheets/partystreusel/_settings.sass +129 -0
  84. data/styleguide/source/stylesheets/partystreusel/_styleguide.sass +32 -0
  85. data/styleguide/source/stylesheets/partystreusel/all.css +55 -0
  86. data/styleguide/source/stylesheets/partystreusel/application.css.sass +94 -0
  87. data/styleguide/source/stylesheets/partystreusel/fallbacks/_icons_preview_template.hbs +25 -0
  88. data/styleguide/source/stylesheets/partystreusel/fallbacks/_icons_stylesheet_template.hbs +1 -0
  89. data/styleguide/source/stylesheets/partystreusel/fallbacks/icons.data.png.css +21 -0
  90. data/styleguide/source/stylesheets/partystreusel/fallbacks/icons.data.svg.css +21 -0
  91. data/styleguide/source/stylesheets/partystreusel/fallbacks/icons.fallback.css.scss +21 -0
  92. data/styleguide/source/stylesheets/partystreusel/ie8.css.sass +18 -0
  93. data/styleguide/source/stylesheets/partystreusel/large/_layout.sass +3 -0
  94. data/styleguide/source/stylesheets/partystreusel/large/_states.sass +0 -0
  95. data/styleguide/source/stylesheets/partystreusel/large/_typo.sass +21 -0
  96. data/styleguide/source/stylesheets/partystreusel/large/modules/_accordion.sass +19 -0
  97. data/styleguide/source/stylesheets/partystreusel/large/modules/_breadcrumb.sass +2 -0
  98. data/styleguide/source/stylesheets/partystreusel/large/modules/_content.sass +5 -0
  99. data/styleguide/source/stylesheets/partystreusel/large/modules/_form.sass +2 -0
  100. data/styleguide/source/stylesheets/partystreusel/large/modules/_image.sass +3 -0
  101. data/styleguide/source/stylesheets/partystreusel/large/modules/_links.sass +6 -0
  102. data/styleguide/source/stylesheets/partystreusel/large/modules/_readmore.sass +2 -0
  103. data/styleguide/source/stylesheets/partystreusel/large/modules/_slider.sass +47 -0
  104. data/styleguide/source/stylesheets/partystreusel/large/modules/_tab.sass +8 -0
  105. data/styleguide/source/stylesheets/partystreusel/large/modules/_teaser--assets.sass +12 -0
  106. data/styleguide/source/stylesheets/partystreusel/large/modules/_teaser--card.sass +8 -0
  107. data/styleguide/source/stylesheets/partystreusel/large/modules/_teaser--list.sass +11 -0
  108. data/styleguide/source/stylesheets/partystreusel/large/modules/_teaser.sass +10 -0
  109. data/styleguide/source/stylesheets/partystreusel/large/modules/_topbar.sass +65 -0
  110. data/styleguide/source/stylesheets/partystreusel/large/modules/_two_column.sass +3 -0
  111. data/styleguide/source/stylesheets/partystreusel/medium/_typo.sass +24 -0
  112. data/styleguide/source/stylesheets/partystreusel/medium/modules/_content.sass +2 -0
  113. data/styleguide/source/stylesheets/partystreusel/medium/modules/_form.sass +16 -0
  114. data/styleguide/source/stylesheets/partystreusel/medium/modules/_iconbar.sass +7 -0
  115. data/styleguide/source/stylesheets/partystreusel/medium/modules/_links.sass +5 -0
  116. data/styleguide/source/stylesheets/partystreusel/medium/modules/_teaser--assets.sass +15 -0
  117. data/styleguide/source/stylesheets/partystreusel/medium/modules/_teaser--card.sass +7 -0
  118. data/styleguide/source/stylesheets/partystreusel/medium/modules/_teaser--list.sass +9 -0
  119. data/styleguide/source/stylesheets/partystreusel/medium/modules/_teaser.sass +13 -0
  120. data/styleguide/source/stylesheets/partystreusel/normalize.css +375 -0
  121. data/styleguide/source/stylesheets/partystreusel/partystreusel.css.sass +2 -0
  122. data/styleguide/source/stylesheets/partystreusel/small/_layout.sass +18 -0
  123. data/styleguide/source/stylesheets/partystreusel/small/_states.sass +0 -0
  124. data/styleguide/source/stylesheets/partystreusel/small/_typo.sass +81 -0
  125. data/styleguide/source/stylesheets/partystreusel/small/modules/_accordion.sass +68 -0
  126. data/styleguide/source/stylesheets/partystreusel/small/modules/_breadcrumb.sass +36 -0
  127. data/styleguide/source/stylesheets/partystreusel/small/modules/_button.sass +145 -0
  128. data/styleguide/source/stylesheets/partystreusel/small/modules/_content.sass +5 -0
  129. data/styleguide/source/stylesheets/partystreusel/small/modules/_dropdown.sass +33 -0
  130. data/styleguide/source/stylesheets/partystreusel/small/modules/_embeds.sass +24 -0
  131. data/styleguide/source/stylesheets/partystreusel/small/modules/_form.sass +115 -0
  132. data/styleguide/source/stylesheets/partystreusel/small/modules/_grid.sass +5 -0
  133. data/styleguide/source/stylesheets/partystreusel/small/modules/_iconbar.sass +41 -0
  134. data/styleguide/source/stylesheets/partystreusel/small/modules/_icons.sass +23 -0
  135. data/styleguide/source/stylesheets/partystreusel/small/modules/_image.sass +18 -0
  136. data/styleguide/source/stylesheets/partystreusel/small/modules/_links.sass +49 -0
  137. data/styleguide/source/stylesheets/partystreusel/small/modules/_offcanvas.sass +109 -0
  138. data/styleguide/source/stylesheets/partystreusel/small/modules/_offcanvas_nav.sass +35 -0
  139. data/styleguide/source/stylesheets/partystreusel/small/modules/_options.sass +117 -0
  140. data/styleguide/source/stylesheets/partystreusel/small/modules/_readmore.sass +36 -0
  141. data/styleguide/source/stylesheets/partystreusel/small/modules/_slider.sass +49 -0
  142. data/styleguide/source/stylesheets/partystreusel/small/modules/_switch.sass +70 -0
  143. data/styleguide/source/stylesheets/partystreusel/small/modules/_tab.sass +39 -0
  144. data/styleguide/source/stylesheets/partystreusel/small/modules/_table.sass +43 -0
  145. data/styleguide/source/stylesheets/partystreusel/small/modules/_teaser--assets.sass +57 -0
  146. data/styleguide/source/stylesheets/partystreusel/small/modules/_teaser--card.sass +18 -0
  147. data/styleguide/source/stylesheets/partystreusel/small/modules/_teaser--list.sass +20 -0
  148. data/styleguide/source/stylesheets/partystreusel/small/modules/_teaser.sass +50 -0
  149. data/styleguide/source/stylesheets/partystreusel/small/modules/_topbar.sass +80 -0
  150. data/styleguide/source/stylesheets/partystreusel/small/modules/_two_column.sass +2 -0
  151. data/styleguide/source/stylesheets/partystreusel/xlarge/modules/_teaser_assets.sass +9 -0
  152. data/styleguide/source/stylesheets/partystreusel/xlarge/modules/_teaser_card.sass +8 -0
  153. metadata +148 -38
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e01a9a332c7d65b358a9ef07be2804cc0e5273a0
4
+ data.tar.gz: 5a48a0c7b3f5acb0192feab95aca5553b09fc241
5
+ SHA512:
6
+ metadata.gz: 692c22b648cdfe3c015c6b75981222ee54711d8e15f27e03d86565a9e09708550a3646ab565329dbdaccb198632d83ecdfb04d04c55e177a390535b23ac91d67
7
+ data.tar.gz: 57661a8c8c982b95253f99be5bf562ee8bed6cd8cad9252801a2414afc173d657958e53af44d756d1b628be4f2e63f1ba16168f214e4a3e3cf1e44b7a20193c6
data/.gitignore CHANGED
@@ -7,3 +7,4 @@ tmp/
7
7
  log/
8
8
  .sass-cache
9
9
  node_modules
10
+ styleguide/build/
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 1.9.3-p448
1
+ 2.0.0-p598
data/.travis.yml CHANGED
@@ -1,3 +1,6 @@
1
+ before_install:
2
+ - wget 'https://phantomjs.googlecode.com/files/phantomjs-1.8.2-linux-x86_64.tar.bz2' --output-document=phantomjs.tar.bz2
3
+ - mkdir phantomjs && tar --strip-components=1 -xvf phantomjs.tar.bz2 -C phantomjs
1
4
  rvm:
2
- - "1.9.3-p448"
3
- script: 'bundle exec guard-jasmine --server-timeout=120'
5
+ - "2.2.2"
6
+ script: 'cd jasmine ; bundle ; bundle exec guard-jasmine --server-timeout=120 -b ../phantomjs/bin/phantomjs'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.2.0
4
+
5
+ * Various modules added/moved over from rails_template
6
+
3
7
  ## 1.1.1
4
8
  * Mark offcanvas active link
5
9
 
data/Gruntfile.coffee ADDED
@@ -0,0 +1,86 @@
1
+ module.exports = (grunt) ->
2
+
3
+ # Project configuration.
4
+ grunt.initConfig
5
+ pkg: grunt.file.readJSON("package.json")
6
+ config: {
7
+ icons_styleheets: 'styleguide/source/stylesheets/fallbacks'
8
+ icons_images: 'app/assets/images/icons'
9
+ },
10
+
11
+ # optimize Images
12
+ imagemin:
13
+ svg:
14
+ files: [
15
+ expand: true,
16
+ cwd: '<%= config.icons_images %>/source',
17
+ src: ['*.svg'],
18
+ dest: '<%= config.icons_images %>/source',
19
+ ext: '.svg'
20
+ ]
21
+ png:
22
+ options:
23
+ optimizationLevel: 7
24
+ files: [
25
+ expand: true,
26
+ cwd: '<%= config.icons_images %>/png',
27
+ src: ['**/*.png'],
28
+ dest: '<%= config.icons_images %>/png',
29
+ ext: '.png'
30
+ ]
31
+
32
+ # Create SVG Sprite
33
+ svgstore:
34
+ options:
35
+ prefix: 'icon--'
36
+ svg:
37
+ xmlns: 'http://www.w3.org/2000/svg'
38
+ display: 'none'
39
+ width: '0'
40
+ height: '0'
41
+ default:
42
+ files:
43
+ '<%= config.icons_images %>/icon-sprite.svg': ['<%= config.icons_images %>/source/*.svg']
44
+
45
+ # Create SVG Sprite Fallback
46
+ grunticon:
47
+ active:
48
+ files: [
49
+ expand: true
50
+ cwd: "<%= config.icons_images %>/source"
51
+ dest: "<%= config.icons_styleheets %>"
52
+ src: ["*.svg"]
53
+ ]
54
+ options:
55
+ cssprefix: ".icon--"
56
+ pngpath: "icons/png"
57
+ pngfolder: "../../../../app/assets/images/icons/png"
58
+ urlpngcss: "icons.fallback.css.scss"
59
+ template: "<%= config.icons_styleheets %>/_icons_stylesheet_template.hbs"
60
+ previewTemplate: "<%= config.icons_styleheets %>/_icons_preview_template.hbs"
61
+
62
+ # Change background-image for asset pipeline
63
+ replace:
64
+ iconfallback:
65
+ src: '<%= config.icons_styleheets %>/icons.fallback.css.scss'
66
+ dest: '<%= config.icons_styleheets %>/icons.fallback.css.scss'
67
+ replacements: [
68
+ from: ' url('
69
+ to: ' image-url('
70
+ ]
71
+
72
+ shell:
73
+ moveIconsStyleguide:
74
+ command: "mv <%= config.icons_styleheets %>/preview.html app/views/styleguide/icons.html.haml"
75
+
76
+
77
+ require("load-grunt-tasks") grunt
78
+ grunt.registerTask "icons", [
79
+ "imagemin:svg"
80
+ "svgstore"
81
+ "grunticon:active"
82
+ "replace:iconfallback"
83
+ "shell:moveIconsStyleguide"
84
+ "imagemin:png"
85
+ ]
86
+ return
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/screenconcept/partystreusel.svg?branch=development)](https://travis-ci.org/screenconcept/partystreusel)
1
+ [![Build Status](https://travis-ci.org/screenconcept/partystreusel.svg?branch=master)](https://travis-ci.org/screenconcept/partystreusel)
2
2
  # Partystreusel
3
3
 
4
4
  ## Installation Rails
@@ -13,6 +13,9 @@ Include in your application.js.coffee:
13
13
  #= require partystreusel/<<modulename>>
14
14
 
15
15
  $ ->
16
+ Streusel.selectorType = 'css_class'
17
+ Streusel.selectorPrefix = 'js'
18
+
16
19
  Streusel.<<Modulename>>.init()
17
20
 
18
21
  For example for readmore:
@@ -22,6 +25,9 @@ For example for readmore:
22
25
  #= require partystreusel/readmore
23
26
 
24
27
  $ ->
28
+ Streusel.selectorType = 'css_class'
29
+ Streusel.selectorPrefix = 'js'
30
+
25
31
  Streusel.Readmore.init()
26
32
 
27
33
  If you only want to initialize readmore for a part of the document:
@@ -139,6 +145,9 @@ Available Functions:
139
145
 
140
146
  ## Development
141
147
 
148
+ In order to run the test suite, phantomjs 1.8.2 must be installed. With
149
+ homebrew, use `brew install phantomjs182`.
150
+
142
151
  Test with
143
152
 
144
153
  bundle exec guard
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" display="none" width="0" height="0"><symbol viewBox="0 0 24 24" id="icon--arrow-left"><title>arrow-left</title><path d="M20 11H7.8l5.6-5.6h-2.8L4 12l6.6 6.6h2.8L7.8 13H20v-2z"/></symbol><symbol viewBox="0 0 24 24" id="icon--arrow-right"><title>arrow-right</title><path d="M4 13h12.2l-5.6 5.6h2.8L20 12l-6.6-6.6h-2.8l5.6 5.6H4v2z"/></symbol><symbol viewBox="0 0 24 24" id="icon--close"><title>close</title><path d="M19 6.4L17.6 5 12 10.6 6.4 5 5 6.4l5.6 5.6L5 17.6 6.4 19l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6z"/></symbol><symbol viewBox="0 0 24 24" id="icon--download"><title>download</title><path d="M21 5h-9.6L9.7 3.3C9.5 3.1 9.3 3 9 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 13l-5-5h3V9h4v4h3l-5 5z"/></symbol><symbol viewBox="0 0 24 24" id="icon--folder"><title>folder</title><path d="M10.4 4.1h-6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-10c0-1.1-.9-2-2-2h-8l-2-2z"/></symbol><symbol viewBox="0 0 30 30" id="icon--menu"><title>menu</title><path d="M6 8h18v2H6zm0 6h18v2H6zm0 6h18v2H6z"/></symbol><symbol viewBox="0 0 24 24" id="icon--search"><title>search</title><path d="M15.5 14h-.8l-.3-.3c1-1.1 1.6-2.6 1.6-4.2C16 5.9 13.1 3 9.5 3S3 5.9 3 9.5 5.9 16 9.5 16c1.6 0 3.1-.6 4.2-1.6l.3.3v.8l5 5 1.5-1.5-5-5zm-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14z"/></symbol></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 11H7.8l5.6-5.6h-2.8L4 12l6.6 6.6h2.8L7.8 13H20v-2z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4 13h12.2l-5.6 5.6h2.8L20 12l-6.6-6.6h-2.8l5.6 5.6H4v2z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.4L17.6 5 12 10.6 6.4 5 5 6.4l5.6 5.6L5 17.6 6.4 19l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M21 5h-9.6L9.7 3.3C9.5 3.1 9.3 3 9 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 13l-5-5h3V9h4v4h3l-5 5z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10.4 4.1h-6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-10c0-1.1-.9-2-2-2h-8l-2-2z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"><path d="M6 8h18v2H6zm0 6h18v2H6zm0 6h18v2H6z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15.5 14h-.8l-.3-.3c1-1.1 1.6-2.6 1.6-4.2C16 5.9 13.1 3 9.5 3S3 5.9 3 9.5 5.9 16 9.5 16c1.6 0 3.1-.6 4.2-1.6l.3.3v.8l5 5 1.5-1.5-5-5zm-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14z"/></svg>
@@ -48,6 +48,7 @@ class Tab extends Partystreusel.Base
48
48
 
49
49
  findItemAndPanel: (name) ->
50
50
  return unless name?
51
+ return unless name.length > 0
51
52
 
52
53
  if name.indexOf('#') == 0
53
54
  name = name.slice(1)
@@ -1,2 +1,3 @@
1
+ .hide,
1
2
  .readmore--closed
2
3
  display: none
@@ -0,0 +1,14 @@
1
+ module Partystreusel
2
+ class StyleguideController < ApplicationController
3
+ def show
4
+ template = File.join(params[:controller].gsub('partystreusel/',''), params[:page])
5
+ render template
6
+ rescue ActionView::MissingTemplate => e
7
+ if e.message.include? "Missing template #{template}"
8
+ raise ActionController::RoutingError, 'Not Found'
9
+ else
10
+ raise e
11
+ end
12
+ end
13
+ end
14
+ end
data/config/routes.rb ADDED
@@ -0,0 +1,6 @@
1
+ Partystreusel::Engine.routes.draw do
2
+ unless Rails.env.production?
3
+ get '/styleguide/:page', to: 'styleguide#show', as: :styleguide, constraints: { page: /[a-zA-Z\-_\/]+/ }
4
+ get '/styleguide', to: 'styleguide#show', page: 'index'
5
+ end
6
+ end
@@ -1,7 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in partystreusel.gemspec
4
- gemspec
4
+ gemspec path: '..'
5
5
 
6
6
  group :assets do
7
7
  gem 'coffee-script'
@@ -18,5 +18,5 @@ group :development, :test do
18
18
  gem 'jasminerice'
19
19
  gem 'jquery-rails'
20
20
  gem 'i18n-js'
21
- gem 'guard-jasmine'
21
+ gem 'guard-jasmine', '1.19.2'
22
22
  end
File without changes
File without changes
@@ -0,0 +1,30 @@
1
+ require 'rails/generators'
2
+ module Partystreusel
3
+ class StyleguideGenerator < ::Rails::Generators::Base
4
+ source_root File.expand_path('../../../../', __FILE__)
5
+
6
+ TARGET_DIR_FOR_STYLESHEETS = 'app/assets/stylesheets/'
7
+ TARGET_DIR_FOR_STYLEGUIDE = 'app/views/styleguide'
8
+ TARGET_DIR_FOR_PARTIALS = 'app/views/partials'
9
+
10
+
11
+ def copy_stylesheets
12
+ directory 'styleguide/source/stylesheets', TARGET_DIR_FOR_STYLESHEETS
13
+ end
14
+
15
+ def copy_views
16
+ directory 'styleguide/source/styleguide', TARGET_DIR_FOR_STYLEGUIDE
17
+ directory 'styleguide/source/partials', TARGET_DIR_FOR_PARTIALS
18
+ end
19
+
20
+ def add_route
21
+ inject_into_file 'config/routes.rb', " mount Partystreusel::Engine => '/'\n", before: /^end/
22
+ end
23
+
24
+ def copy_grunticon_files
25
+ directory 'app/assets/images', 'app/assets/images'
26
+ copy_file 'package.json', 'package.json'
27
+ copy_file 'Gruntfile.coffee', 'Gruntfile.coffee'
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,18 @@
1
+ if defined?(Rails)
2
+ module Partystreusel
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace Partystreusel
5
+
6
+ initializer :assets do |config|
7
+ Rails.application.config.assets.paths << root.join("styleguide", "source", "stylesheets")
8
+ end
9
+
10
+ if defined?(ActiveSupport) && ActiveSupport.respond_to?(:on_load)
11
+ ActiveSupport.on_load(:action_view) do
12
+ include Partystreusel::Helpers::ReadmoreHelper
13
+ include Partystreusel::Helpers::IconHelper
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,9 @@
1
+ module Partystreusel::Helpers::IconHelper
2
+
3
+ def streusel_icon(name, classes = '')
4
+ haml_tag :svg, xmlns: 'http://www.w3.org/2000/svg', title: "#{name}", class: "icon icon--#{name} #{classes}" do
5
+ haml_tag :use, 'xlink:href' => "#icon--#{name}"
6
+ end
7
+ end
8
+
9
+ end
@@ -2,3 +2,4 @@ module Partystreusel::Helpers
2
2
  end
3
3
 
4
4
  require 'partystreusel/helpers/readmore_helper'
5
+ require 'partystreusel/helpers/icon_helper'
@@ -1,3 +1,3 @@
1
1
  module Partystreusel
2
- VERSION = "1.1.1"
2
+ VERSION = "1.2.0"
3
3
  end
data/lib/partystreusel.rb CHANGED
@@ -1,17 +1,5 @@
1
- if defined?(Rails)
2
- module Partystreusel
3
- module Rails
4
- class Engine < ::Rails::Engine
5
- end
6
- end
7
- end
8
- end
9
-
10
- require "partystreusel/version"
11
- require "partystreusel/helpers"
12
-
13
- if defined?(ActiveSupport)
14
- ActiveSupport.on_load(:action_view) do
15
- include Partystreusel::Helpers::ReadmoreHelper
16
- end
1
+ module Partystreusel
2
+ require "partystreusel/version"
3
+ require "partystreusel/helpers"
4
+ require "partystreusel/engine"
17
5
  end
data/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "partystreusel",
3
+ "description": "",
4
+ "version": "1.0.0",
5
+ "author": "Screen Concept",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/screenconcept/partystreusel.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/screenconcept/partystreusel/issues"
12
+ },
13
+ "devDependencies": {
14
+ "grunt": "~0.4.5",
15
+ "grunt-contrib-imagemin": "^0.9.2",
16
+ "grunt-grunticon": "~2.1.6",
17
+ "grunt-shell": "^1.1.1",
18
+ "grunt-svgstore": "^0.5.0",
19
+ "grunt-text-replace": "^0.4.0",
20
+ "load-grunt-tasks": "^3.1.0"
21
+ }
22
+ }
@@ -17,6 +17,5 @@ Gem::Specification.new do |s|
17
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ["lib"]
20
- s.add_runtime_dependency 'railties'
21
20
  s.add_runtime_dependency 'i18n-js'
22
21
  end
@@ -71,7 +71,7 @@ describe 'Readmore', ->
71
71
  Partystreusel.Readmore.init()
72
72
 
73
73
  it 'removes element when no content available', ->
74
- expect(@subject).not.toContain('a.button')
74
+ expect(@subject).not.toContain('a.btn')
75
75
 
76
76
  describe 'with custom button', ->
77
77
 
@@ -0,0 +1,24 @@
1
+ # If you do not have OpenSSL installed, update
2
+ # the following line to use "http://" instead
3
+ source 'https://rubygems.org'
4
+
5
+ gem "middleman", "~>3.3.10"
6
+
7
+ # Live-reloading plugin
8
+ gem "middleman-livereload", "~> 3.1.0"
9
+
10
+ # For faster file watcher updates on Windows:
11
+ gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
12
+
13
+ # Windows does not come with time zone data
14
+ gem "tzinfo-data", platforms: [:mswin, :mingw]
15
+
16
+ gem 'middleman-pry'
17
+ gem 'activesupport'
18
+ gem 'partystreusel', path: '../'
19
+ gem 'normalize-rails', require: false
20
+ gem 'middleman-bourbon'
21
+ gem 'middleman-neat'
22
+ gem 'middleman-jquery'
23
+ # gem 'jquery-rails', require: false
24
+ # gem 'jquery-ui-rails', require: false
@@ -0,0 +1,110 @@
1
+ require 'pry'
2
+ ###
3
+ # Compass
4
+ ###
5
+
6
+ # Change Compass configuration
7
+ # compass_config do |config|
8
+ # config.output_style = :compact
9
+ # end
10
+
11
+ ###
12
+ # Page options, layouts, aliases and proxies
13
+ ###
14
+
15
+ # Per-page layout changes:
16
+ #
17
+ # With no layout
18
+ # page "/path/to/file.html", :layout => false
19
+ #
20
+ # With alternative layout
21
+ # page "/path/to/file.html", :layout => :otherlayout
22
+ #
23
+ # A path which all have the same layout
24
+ # with_layout :admin do
25
+ # page "/admin/*"
26
+ # end
27
+
28
+ # Proxy pages (https://middlemanapp.com/advanced/dynamic_pages/)
29
+ # proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
30
+ # :which_fake_page => "Rendering a fake page with a local variable" }
31
+
32
+ ###
33
+ # Helpers
34
+ ###
35
+
36
+ # Automatic image dimensions on image_tag helper
37
+ # activate :automatic_image_sizes
38
+
39
+ # Reload the browser automatically whenever files change
40
+ configure :development do
41
+ activate :livereload
42
+ end
43
+
44
+ # Methods defined in the helpers block are available in templates
45
+ helpers do
46
+ include Partystreusel::Helpers::IconHelper
47
+
48
+ def google_analytics_code
49
+ ''
50
+ end
51
+ def body_class
52
+ ''
53
+ end
54
+
55
+ # Make render partial behave like in rails to have common templates
56
+ def render(partial)
57
+ names = partial.split('/')
58
+ names[-1] = "_#{names[-1]}"
59
+ partial = names.join('/')
60
+ super nil, partial, locals: {}
61
+ end
62
+
63
+
64
+ # Make asset_path partial behave like in rails to have common templates
65
+ def asset_path(*args)
66
+ return super(*args) unless args.length == 1
67
+
68
+ type = case args.first.split('.').last
69
+ when 'css'
70
+ :css
71
+ when 'jpg', 'jpeg', 'png', 'svg'
72
+ :images
73
+ when 'coffee', 'js'
74
+ :js
75
+ else
76
+ raise "Unknown file type #{args.first.inspect}"
77
+ end
78
+ super(type, args.first)
79
+ end
80
+ end
81
+
82
+ #set :source, 'app/views'
83
+
84
+ set :css_dir, 'stylesheets'
85
+ #set :js_dir, '../assets/javascripts'
86
+ #set :images_dir, '../assets/images'
87
+ #set :layouts_dir, 'layouts'
88
+ set :layout, 'application'
89
+
90
+
91
+
92
+ # Build-specific configuration
93
+ configure :build do
94
+ # For example, change the Compass output style for deployment
95
+ # activate :minify_css
96
+
97
+ # Minify Javascript on build
98
+ # activate :minify_javascript
99
+
100
+ # Enable cache buster
101
+ # activate :asset_hash
102
+
103
+ # Use relative URLs
104
+ # activate :relative_assets
105
+
106
+ # Or use a different image path
107
+ # set :http_prefix, "/Content/images/"
108
+ end
109
+
110
+ sprockets.append_path 'app/assets'
@@ -0,0 +1,8 @@
1
+ %article
2
+ %header
3
+ %h1 Partystreusel
4
+ %hr
5
+ %section
6
+ %ul
7
+ %li Version #{Partystreusel::VERSION}
8
+ %li= link_to 'Styleguide', '/styleguide/'
@@ -0,0 +1,30 @@
1
+ ###
2
+ # -- ATTENTION: for IE8 Support, require "jquery" instead of "jquery2"
3
+ #
4
+
5
+ #= require jquery
6
+
7
+ #= require modernizr
8
+
9
+ ###
10
+ # -- ATTENTION: activate picturefill JS if you use responive images
11
+ #
12
+ # require picturefill
13
+
14
+ ###
15
+ # ---ATTENTION: MOVE THEM UP FOR USE---
16
+ #
17
+ #= require i18n
18
+ #= require partystreusel/translations
19
+ #= require partystreusel/readmore
20
+ #= require partystreusel/offcanvas
21
+ #= require partystreusel/topbar
22
+ #= require partystreusel/accordion
23
+ #= require partystreusel/tab
24
+ #= require partystreusel/slider
25
+ # require partystreusel/scroll_to
26
+ ###
27
+
28
+ #= require_self
29
+
30
+ #= require views/_initializer