groundworkcss-rails 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/app/helpers/breadcrumbs_helper.rb~ +5 -0
  2. data/app/helpers/flash_block_helper.rb~ +18 -0
  3. data/app/helpers/flash_helper.rb~ +21 -0
  4. data/app/helpers/groundwork_flash_helper.rb~ +21 -0
  5. data/app/helpers/modal_helper.rb~ +42 -0
  6. data/app/helpers/social_glyph_helper.rb~ +12 -0
  7. data/lib/generators/groundworkcss/install/install_generator.rb~ +44 -0
  8. data/lib/generators/groundworkcss/install/templates/application.css.scss~ +8 -0
  9. data/lib/generators/groundworkcss/install/templates/application.css~ +7 -0
  10. data/lib/generators/groundworkcss/install/templates/application.js~ +10 -0
  11. data/lib/generators/groundworkcss/install/templates/groundwork-and-overrides.scss~ +12 -0
  12. data/lib/generators/groundworkcss/install/templates/groundwork-overrides.scss~ +7 -0
  13. data/lib/generators/groundworkcss/install/templates/groundwork.coffee~ +0 -0
  14. data/lib/generators/groundworkcss/install/templates/groundwork.js~ +1 -0
  15. data/lib/generators/groundworkcss/layout/layout_generator.rb~ +1 -1
  16. data/lib/generators/groundworkcss/layout/templates/_header.html.erb~ +24 -0
  17. data/lib/generators/groundworkcss/layout/templates/_sidebar.html.erb~ +18 -0
  18. data/lib/generators/groundworkcss/layout/templates/layout.html.erb~ +44 -0
  19. data/lib/groundworkcss/rails/bootstrap.rb~ +2 -0
  20. data/lib/groundworkcss/rails/engine.rb~ +30 -0
  21. data/lib/groundworkcss/rails/version.rb +1 -1
  22. data/lib/groundworkcss/rails/version.rb~ +1 -1
  23. data/lib/twitter-bootstrap-rails.rb~ +10 -0
  24. data/vendor/assets/javascripts/groundwork.js~ +8 -0
  25. data/vendor/assets/javascripts/groundworkcss/groundwork.js +24 -217
  26. data/vendor/assets/javascripts/groundworkcss/groundwork.js~ +7 -0
  27. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.modals.js +1 -1
  28. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.popover.js +1 -1
  29. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.responsiveTables.js +1 -1
  30. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.responsiveText.js +1 -1
  31. data/vendor/assets/javascripts/groundworkcss/plugins/jquery.tooltip.js +24 -10
  32. data/vendor/assets/stylesheets/groundworkcss-scss/_buttons.scss +3 -0
  33. data/vendor/assets/stylesheets/groundworkcss-scss/_classes.scss +149 -0
  34. data/vendor/assets/stylesheets/groundworkcss-scss/_font-awesome.scss~ +534 -0
  35. data/vendor/assets/stylesheets/groundworkcss-scss/_grid.scss +46 -366
  36. data/vendor/assets/stylesheets/groundworkcss-scss/_layout.scss +11 -11
  37. data/vendor/assets/stylesheets/groundworkcss-scss/_mixins.scss +9 -0
  38. data/vendor/assets/stylesheets/groundworkcss-scss/_responsive.scss +4 -106
  39. data/vendor/assets/stylesheets/groundworkcss-scss/_social-icons.scss~ +92 -0
  40. data/vendor/assets/stylesheets/groundworkcss-scss/_tooltips.scss +5 -5
  41. data/vendor/assets/stylesheets/groundworkcss-scss/_typography.scss +48 -43
  42. data/vendor/assets/stylesheets/groundworkcss-scss/_variables.scss +47 -46
  43. data/vendor/assets/stylesheets/groundworkcss-scss/groundwork.scss +3 -0
  44. metadata +318 -299
  45. data/vendor/assets/javascripts/groundworkcss/coffee/groundwork.coffee +0 -207
  46. data/vendor/assets/javascripts/groundworkcss/coffee/plugins/jquery.modals.coffee +0 -162
  47. data/vendor/assets/javascripts/groundworkcss/coffee/plugins/jquery.popover.coffee +0 -198
  48. data/vendor/assets/javascripts/groundworkcss/coffee/plugins/jquery.responsiveTables.coffee +0 -56
  49. data/vendor/assets/javascripts/groundworkcss/coffee/plugins/jquery.responsiveText.coffee +0 -32
  50. data/vendor/assets/javascripts/groundworkcss/coffee/plugins/jquery.tooltip.coffee +0 -121
@@ -1,56 +0,0 @@
1
- ###
2
- *
3
- * jQuery ResponsiveTables by Gary Hepting - https://github.com/ghepting/responsiveTables
4
- *
5
- * Open source under the BSD License.
6
- *
7
- * Copyright © 2013 Gary Hepting. All rights reserved.
8
- *
9
- ###
10
-
11
- (($) ->
12
- elems = []
13
- $.fn.responsiveTable = (options) ->
14
- settings =
15
- compressor: options.compressor or 10
16
- minSize: options.minSize or Number.NEGATIVE_INFINITY
17
- maxSize: options.maxSize or Number.POSITIVE_INFINITY
18
- padding: 2
19
- height: "auto" # '100%' will fit tables (and containers) to viewport height as well
20
- adjust_parents: true # if height specified, force parent elements to be height 100%
21
-
22
- @each ->
23
- elem = $(this)
24
- elem.attr('data-compression',settings.compressor)
25
- elem.attr('data-min',settings.minSize)
26
- elem.attr('data-max',settings.maxSize)
27
- elem.attr('data-padding',settings.padding)
28
- # count columns
29
- columns = $("tr", elem).first().children("th, td").length
30
- # count rows
31
- rows = $("tr", elem).length
32
- unless settings.height is "auto"
33
- # set height of table
34
- $this.css "height", settings.height
35
- # set height of each parent of table
36
- if settings.adjust_parents
37
- $this.parents().each ->
38
- $(this).css "height", "100%"
39
- # set column widths
40
- $("tr th, tr td", elem).css "width", Math.floor(100 / columns) + "%"
41
- # set row heights
42
- $("tr th, tr td", elem).css "height", Math.floor(100 / rows) + "%"
43
- # set cell font sizes
44
- fontSize = Math.floor(Math.max(Math.min((elem.width() / (settings.compressor)), parseFloat(settings.maxSize)), parseFloat(settings.minSize)))
45
- $("tr th, tr td", elem).css "font-size", fontSize + "px"
46
- #
47
- elems.push elem
48
-
49
- $(window).on "resize", ->
50
- $(elems).each ->
51
- elem = $(this)
52
- # set cell font sizes
53
- fontSize = Math.floor(Math.max(Math.min((elem.width() / (elem.attr('data-compression'))), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min'))))
54
- $("tr th, tr td", elem).css "font-size", fontSize + "px"
55
-
56
- ) jQuery
@@ -1,32 +0,0 @@
1
- ###
2
- *
3
- * jQuery ResponsiveText by Gary Hepting - https://github.com/ghepting/responsiveText
4
- *
5
- * Open source under the BSD License.
6
- *
7
- * Copyright © 2013 Gary Hepting. All rights reserved.
8
- *
9
- ###
10
-
11
- (($) ->
12
- elems = []
13
- $.fn.responsiveText = (options) ->
14
- settings =
15
- compressor: options.compressor or 10
16
- minSize: options.minSize or Number.NEGATIVE_INFINITY
17
- maxSize: options.maxSize or Number.POSITIVE_INFINITY
18
-
19
- @each ->
20
- elem = $(this)
21
- elem.attr('data-compression',settings.compressor)
22
- elem.attr('data-min',settings.minSize)
23
- elem.attr('data-max',settings.maxSize)
24
- elem.css "font-size", Math.floor(Math.max(Math.min(elem.width() / (settings.compressor), parseFloat(settings.maxSize)), parseFloat(settings.minSize)))
25
- elems.push elem
26
-
27
- $(window).on "resize", ->
28
- $(elems).each ->
29
- elem = $(this)
30
- elem.css "font-size", Math.floor(Math.max(Math.min(elem.width() / (elem.attr('data-compression')), parseFloat(elem.attr('data-max'))), parseFloat(elem.attr('data-min'))))
31
-
32
- ) jQuery
@@ -1,121 +0,0 @@
1
- ###
2
- *
3
- * jQuery Tooltips by Gary Hepting - https://github.com/ghepting/jquery-tooltips
4
- *
5
- * Open source under the BSD License.
6
- *
7
- * Copyright © 2013 Gary Hepting. All rights reserved.
8
- *
9
- ###
10
-
11
- (($) ->
12
- $.fn.tooltip = (options) ->
13
- defaults =
14
- topOffset: 0
15
- delay: 100 # delay before showing (ms)
16
- speed: 100 # animation speed (ms)
17
-
18
- options = $.extend(defaults, options)
19
-
20
- tooltip = $('#tooltip') # tooltip element
21
- delayShow = '' # delayed open
22
- trigger = '' # store trigger
23
-
24
- getElementPosition = (el) -> # get element position
25
- offset = el.offset()
26
- win = $(window)
27
- top: top = offset.top - win.scrollTop()
28
- left: left = offset.left - win.scrollLeft()
29
- bottom: bottom = win.height() - top - el.outerHeight()
30
- right: right = win.width() - left - el.outerWidth()
31
-
32
- setPosition = (trigger) ->
33
- # get trigger element coordinates
34
- coords = getElementPosition(trigger)
35
- # tooltip dimensions
36
- if tooltip.outerWidth() > ($(window).width() - 20)
37
- tooltip.css('width',$(window).width() - 20)
38
- attrs = {}
39
- # adjust max width of tooltip
40
- tooltip.css('max-width',
41
- Math.min(
42
- ($(window).width()-parseInt($('body').css('padding-left'))-parseInt($('body').css('padding-right'))),
43
- parseInt(tooltip.css('max-width'))
44
- )
45
- )
46
- width = tooltip.outerWidth()
47
- height = tooltip.outerHeight()
48
- # horizontal positioning
49
- if coords.left <= coords.right # default position
50
- tooltip.addClass('left')
51
- attrs.left = coords.left
52
- else # pin from right side
53
- tooltip.addClass('right')
54
- attrs.right = coords.right
55
- # veritcal positioning
56
- if (coords.top-options.topOffset) > (height+20) # top positioned tooltip
57
- tooltip.addClass('top')
58
- attrs.top = (trigger.offset().top - height) - 20
59
- else # bottom positioned tooltip
60
- tooltip.addClass('bottom')
61
- attrs.top = trigger.offset().top + trigger.outerHeight() - 4
62
- tooltip.css attrs
63
-
64
- closetooltip = ->
65
- tooltip.stop().remove() # remove tooltip
66
- $('[role=tooltip]').removeClass('on')
67
-
68
- showtooltip = (trigger) ->
69
- closetooltip() # close tooltip
70
- clearTimeout(delayShow) # cancel previous timeout
71
- delayShow = setTimeout ->
72
- if $('#tooltip').length != 1
73
- # destroy any lingering tooltips
74
- $('#tooltip').remove()
75
- # create tooltip DOM element
76
- tooltip = $("<div id=\"tooltip\"></div>")
77
- # add tooltip element to DOM
78
- tooltip.appendTo("body")
79
- # set tooltip text
80
- tooltip.css("opacity", 0).text(trigger.attr('data-title'))
81
- # initialize tooltip
82
- setPosition(trigger)
83
- trigger.addClass('on')
84
- tooltip.animate
85
- top: "+=10"
86
- opacity: 1
87
- , options.speed
88
- , options.delay
89
-
90
- @each ->
91
- $this = $(this)
92
- $this.attr('role','tooltip').attr('data-title',$this.attr('title'))
93
- $this.removeAttr "title" # remove title attribute (disable browser tooltips)
94
-
95
-
96
- # focus behavior
97
- $('body').on(
98
- 'focus', '[role=tooltip]', ->
99
- showtooltip($(this))
100
- ).on(
101
- 'blur', '[role=tooltip]', ->
102
- clearTimeout(delayShow)
103
- closetooltip()
104
- ).on(
105
- 'mouseenter', '[role=tooltip]:not(input,select,textarea)', ->
106
- showtooltip($(this))
107
- ).on(
108
- 'mouseleave', '[role=tooltip]:not(input,select,textarea)', ->
109
- clearTimeout(delayShow)
110
- closetooltip()
111
- )
112
-
113
- $(window).on
114
- scroll: ->
115
- trigger = $('[role=tooltip].on')
116
- if trigger.length
117
- setPosition(trigger)
118
- $('#tooltip').css
119
- top: "+=10"
120
-
121
- ) jQuery