euphoria 0.1.4.72 → 0.1.41
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -11
- data/app/assets/javascripts/UI_Modules.coffee +1 -1
- data/app/assets/stylesheets/euphoria/components/_buttons.sass +94 -57
- data/app/assets/stylesheets/euphoria/components/_forms.sass +10 -10
- data/app/assets/stylesheets/euphoria/components/_menus.sass +10 -3
- data/app/assets/stylesheets/euphoria/components/_tables.sass +50 -55
- data/app/assets/stylesheets/euphoria/core/_containers.sass +34 -17
- data/app/assets/stylesheets/euphoria/core/_grids.sass +12 -2
- data/app/assets/stylesheets/euphoria/core/_type.sass +25 -7
- data/app/assets/stylesheets/euphoria/helpers/_reset.sass +1 -0
- data/app/assets/stylesheets/euphoria/interface/parallax.sass +32 -61
- data/euphoria.gemspec +7 -7
- data/lib/euphoria.rb +1 -1
- data/lib/euphoria/version.rb +1 -1
- data/lib/generators/euphoria/install_generator.rb +51 -0
- data/lib/generators/euphoria/templates/javascripts/UI_Modules.coffee +44 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/components/_buttons.sass +78 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/components/_forms.sass +111 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/components/_menus.sass +172 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/components/_tables.sass +89 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/core/_containers.sass +42 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/core/_grids.sass +75 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/core/_responsive.sass +20 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/core/_type.sass +21 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/helpers/_mixins.sass +97 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/helpers/_reset.sass +104 -0
- data/lib/generators/euphoria/templates/stylesheets/euphoria/interface/parallax.sass +66 -0
- data/lib/generators/euphoria/templates/stylesheets/load.sass +14 -0
- metadata +33 -20
- data/lib/generators/install_generator.rb +0 -6
@@ -1,10 +1,19 @@
|
|
1
|
+
/*=============================================================================
|
2
|
+
** Variables
|
3
|
+
**============================================================================
|
4
|
+
|
5
|
+
//column values
|
6
|
+
$col_float: left
|
7
|
+
$col_position: relative
|
8
|
+
|
9
|
+
|
1
10
|
/*=============================================================================
|
2
11
|
** Grids (keep columns seperated to add width at will)
|
3
12
|
**============================================================================
|
4
13
|
|
5
14
|
.col
|
6
|
-
float:
|
7
|
-
position:
|
15
|
+
float: $col_float
|
16
|
+
position: $col_position
|
8
17
|
.center
|
9
18
|
margin: 0 auto
|
10
19
|
|
@@ -26,6 +35,7 @@
|
|
26
35
|
/*=============================================================================
|
27
36
|
** Responsive Grids
|
28
37
|
**============================================================================
|
38
|
+
|
29
39
|
+tablet
|
30
40
|
@for $i from 1 through 11
|
31
41
|
.w-#{$i}
|
@@ -1,21 +1,39 @@
|
|
1
|
+
/*=============================================================================
|
2
|
+
** Variables
|
3
|
+
**============================================================================
|
4
|
+
|
5
|
+
//font sizes
|
6
|
+
$html_font_size: 16px
|
7
|
+
$large_desktop_font_size: 17px
|
8
|
+
$h1_font_size: 3rem
|
9
|
+
$h2_font_size: 2.5rem
|
10
|
+
$h3_font_size: 2rem
|
11
|
+
$h4_font_size: 1.5rem
|
12
|
+
$paragraph_font_size: 1rem
|
13
|
+
|
14
|
+
|
15
|
+
/*=============================================================================
|
16
|
+
** font-sizes
|
17
|
+
**============================================================================
|
18
|
+
|
1
19
|
html
|
2
|
-
font-size:
|
20
|
+
font-size: $html_font_size
|
3
21
|
|
4
22
|
h1
|
5
|
-
font-size:
|
23
|
+
font-size: $h1_font_size
|
6
24
|
|
7
25
|
h2
|
8
|
-
font-size:
|
26
|
+
font-size: $h2_font_size
|
9
27
|
|
10
28
|
h3
|
11
|
-
font-size:
|
29
|
+
font-size: $h2_font_size
|
12
30
|
|
13
31
|
h4
|
14
|
-
font-size:
|
32
|
+
font-size: $h4_font_size
|
15
33
|
|
16
34
|
p
|
17
|
-
font-size:
|
35
|
+
font-size: $paragraph_font_size
|
18
36
|
|
19
37
|
+lg-desktop
|
20
38
|
html
|
21
|
-
font-size:
|
39
|
+
font-size: $large_desktop_font_size
|
@@ -1,66 +1,37 @@
|
|
1
|
-
.parallax
|
2
|
-
-webkit-perspective: 300px
|
3
|
-
perspective: 300px
|
4
|
-
height: 100vh
|
5
|
-
overflow-x: hidden
|
6
|
-
overflow-y: auto
|
7
|
-
font-size: 200%
|
8
|
-
.parallax-group--header
|
9
|
-
height: 100vh
|
10
|
-
-webkit-transform: translateZ(-300px) scale(2)
|
11
|
-
transform: translateZ(-300px) scale(2)
|
12
|
-
background-size: 100% 100% / cover
|
13
|
-
|
14
|
-
.parallax-group
|
15
|
-
min-height: 90vh
|
16
|
-
position: relative
|
17
|
-
-webkit-transform-style: preserve-3d
|
18
|
-
transform-style: preserve-3d
|
19
|
-
-webkit-transition: -webkit-transform 0.5s ease 0s
|
20
|
-
transition: transform 0.5s ease 0s
|
21
|
-
&:nth-child(odd)
|
22
|
-
z-index: 2
|
23
|
-
&:nth-child(even)
|
24
|
-
z-index: 0
|
25
|
-
|
26
|
-
|
27
|
-
.parallax-layer
|
28
|
-
position: absolute
|
29
|
-
top: 0
|
30
|
-
left: 0
|
31
|
-
right: 0
|
32
|
-
bottom: 0
|
33
|
-
text-align: center
|
34
|
-
|
35
|
-
&.parallax-back
|
36
|
-
-webkit-transform: translateZ(-300px) scale(2)
|
37
|
-
transform: translateZ(-300px) scale(2)
|
38
|
-
background-size: 100% 100% / cover
|
1
|
+
.parallax-ui
|
39
2
|
height: 100vh
|
3
|
+
overflow-x: hidden
|
4
|
+
overflow-y: auto
|
5
|
+
-webkit-perspective: 1px
|
6
|
+
perspective: 1px
|
7
|
+
.content
|
8
|
+
margin-top: 350px
|
9
|
+
padding: 2%
|
10
|
+
background-color: white
|
11
|
+
min-height: 100vh
|
12
|
+
.layer
|
13
|
+
position: absolute
|
14
|
+
top: 0
|
15
|
+
left: 0
|
16
|
+
right: 0
|
17
|
+
bottom: 0
|
18
|
+
|
40
19
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
-ms-transform: translateX(-50%) translateY(-50%)
|
57
|
-
transform: translateX(-50%) translateY(-50%)
|
58
|
-
&.light
|
59
|
-
line-height: 100vh
|
60
|
-
background-color: rgba(255, 255, 255, 0.5)
|
61
|
-
width: 100%
|
62
|
-
&.dark
|
63
|
-
opacity: 0.5
|
20
|
+
.front
|
21
|
+
-webkit-transform: translateZ(0)
|
22
|
+
transform: translateZ(0)
|
23
|
+
|
24
|
+
|
25
|
+
.back
|
26
|
+
position: absolute
|
27
|
+
left: 32.5%
|
28
|
+
margin-top: 100px
|
29
|
+
width: 50%
|
30
|
+
margin-top: 95px
|
31
|
+
width: 56.35%
|
32
|
+
height: 33vh
|
33
|
+
-webkit-transform: translateZ(-1px) scale(3.95,5)
|
34
|
+
transform: translateZ(-1px) scale(3.95,5)
|
64
35
|
|
65
36
|
/*=============================================================================
|
66
37
|
** Template must proceed as face and back
|
data/euphoria.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.authors = ["paul brunache"]
|
12
12
|
spec.email = ["paulbrunache@gmail.com"]
|
13
13
|
|
14
|
-
spec.summary = %q{
|
14
|
+
spec.summary = %q{Custom sass templating framework for rails}
|
15
15
|
|
16
16
|
spec.homepage = "https://github.com/PaulBrunache/Euphoria"
|
17
17
|
spec.license = "MIT"
|
@@ -21,11 +21,11 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
spec.
|
24
|
+
spec.add_runtime_dependency "font-awesome-rails", "~> 4.3.0.0"
|
25
|
+
spec.add_runtime_dependency "coffee-rails", "~> 4.1.0"
|
26
|
+
spec.add_runtime_dependency "sass-rails", "~> 5.0.1"
|
27
|
+
|
28
|
+
|
29
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
27
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
-
spec.add_development_dependency "sass-rails", "~> 5.0.1"
|
29
|
-
spec.add_development_dependency "coffee-rails", "~> 4.1.0"
|
30
|
-
spec.add_development_dependency "font-awesome-rails", "~> 4.3.0.0"
|
31
31
|
end
|
data/lib/euphoria.rb
CHANGED
data/lib/euphoria/version.rb
CHANGED
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Euphoria
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('..', __FILE__)
|
6
|
+
|
7
|
+
class_option :stylesheet, :type => :boolean, default: false, desc: "generates all stylesheets "
|
8
|
+
class_option :js, :type => :boolean, default: false, desc: "generates all Javascript source files"
|
9
|
+
class_option :all, :type => :boolean, default: false, desc: "generates both js and css files "
|
10
|
+
|
11
|
+
desc "by default running rails g euphoria:install with no arguments will simply inject the css and JS files required"
|
12
|
+
def install
|
13
|
+
if(options[:stylesheet])
|
14
|
+
copy_styles
|
15
|
+
elsif (options[:js])
|
16
|
+
copy_js
|
17
|
+
elsif (options[:all])
|
18
|
+
install_all
|
19
|
+
else
|
20
|
+
inject_css_and_js
|
21
|
+
end
|
22
|
+
end #end install method
|
23
|
+
private
|
24
|
+
def copy_js
|
25
|
+
directory 'templates/javascripts/', 'app/assets/javascripts/'
|
26
|
+
end #end copy JS
|
27
|
+
def copy_styles
|
28
|
+
directory 'templates/stylesheets/', 'app/assets/stylesheets/'
|
29
|
+
end #end copy styles
|
30
|
+
|
31
|
+
def inject_css_and_js
|
32
|
+
application_js_path = 'app/assets/javascripts/application.js'
|
33
|
+
application_css_path ='app/assets/stylesheets/application.css'
|
34
|
+
if ::File.exists?(::File.join(destination_root, application_js_path))
|
35
|
+
inject_into_file application_js_path, before: '//= require_tree' do
|
36
|
+
"//= require UI_Modules\n"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
if ::File.exists?(::File.join(destination_root, application_css_path))
|
40
|
+
inject_into_file application_css_path, before: '//= require_tree' do
|
41
|
+
"*= require load\n"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end #end inject Css
|
45
|
+
def install_all
|
46
|
+
copy_styles
|
47
|
+
copy_js
|
48
|
+
inject_css_and_js
|
49
|
+
end
|
50
|
+
end #end Class Install Generator
|
51
|
+
end #end Module
|
@@ -0,0 +1,44 @@
|
|
1
|
+
$(document).on 'page:change', ->
|
2
|
+
#######################################################################################
|
3
|
+
#set icons for buttons
|
4
|
+
#######################################################################################
|
5
|
+
$("[type='submit']").addClass 'btn green round'
|
6
|
+
|
7
|
+
$('a').each ->
|
8
|
+
|
9
|
+
if $(this).text().toLowerCase().indexOf('back') > -1
|
10
|
+
$(this).addClass 'fa fa-arrow-left btn blue round'
|
11
|
+
if $(this).text().toLowerCase().indexOf('edit') > -1
|
12
|
+
$(this).addClass 'fa fa-pencil btn default round'
|
13
|
+
if $(this).text().toLowerCase().indexOf('delete') > -1
|
14
|
+
$(this).addClass 'fa fa-trash-o btn red round'
|
15
|
+
if $(this).text().toLowerCase().indexOf('submit') > -1
|
16
|
+
$(this).addClass 'fa fa-paper-plane-o btn green round'
|
17
|
+
if $(this).text().toLowerCase().indexOf('show') > -1
|
18
|
+
$(this).addClass 'fa fa-eye btn blue round'
|
19
|
+
#######################################################################################
|
20
|
+
#set marging for fixed nav so content is visible
|
21
|
+
#######################################################################################
|
22
|
+
$(".menu-toggle").on "click", ->
|
23
|
+
|
24
|
+
if $(".menu-toggle").hasClass("fa-bars")
|
25
|
+
$(".menu-toggle").removeClass("fa-bars").addClass("fa-times")
|
26
|
+
else
|
27
|
+
$(".menu-toggle").addClass("fa-bars").fadeIn().removeClass("fa-times")
|
28
|
+
|
29
|
+
$(".menu").slideToggle()
|
30
|
+
|
31
|
+
#on resize
|
32
|
+
#account for margin with fixed nav class
|
33
|
+
$(window).resize ->
|
34
|
+
if $('nav').hasClass('fixed')
|
35
|
+
$('.start-content').css 'margin-top', $('nav').height() + 10
|
36
|
+
if $(window).width() > 1023
|
37
|
+
$('.menu').removeAttr('style');
|
38
|
+
|
39
|
+
$(window).trigger 'resize'
|
40
|
+
|
41
|
+
|
42
|
+
#set marging for fixed nav so content is visible
|
43
|
+
$('[data-img-src]').css 'background-image', ->
|
44
|
+
bg = 'url(' + $(this).data('img-src')+')'
|
@@ -0,0 +1,78 @@
|
|
1
|
+
/*=============================================================================
|
2
|
+
** Variables
|
3
|
+
**==============================================================================
|
4
|
+
//Button Colors
|
5
|
+
$blue: #4aa3df
|
6
|
+
$blue_hover: #3498db
|
7
|
+
$green: #40d47e
|
8
|
+
$green_hover: #2ecc71
|
9
|
+
$red: #e74c3c
|
10
|
+
$red_hover: #e43725
|
11
|
+
|
12
|
+
$white: #bdc3c7
|
13
|
+
$white_hover: #fff
|
14
|
+
$orange: #f5b823
|
15
|
+
$orange_hover: #F5A623
|
16
|
+
|
17
|
+
|
18
|
+
/*=============================================================================
|
19
|
+
** Button
|
20
|
+
**==============================================================================
|
21
|
+
.btn
|
22
|
+
text-align: center
|
23
|
+
vertical-align: middle
|
24
|
+
border: 1px solid #e5e6e7
|
25
|
+
font-weight: 400
|
26
|
+
font-size: .85rem
|
27
|
+
padding: .4rem
|
28
|
+
line-height: 1.375rem
|
29
|
+
letter-spacing: .1rem
|
30
|
+
text-transform: uppercase
|
31
|
+
text-decoration: none
|
32
|
+
white-space: nowrap
|
33
|
+
color: #fff
|
34
|
+
&.default
|
35
|
+
color: #333
|
36
|
+
&:hover
|
37
|
+
background-color: #ccc
|
38
|
+
color: #fff
|
39
|
+
&.round
|
40
|
+
+border-radius (.5)
|
41
|
+
&.sm //Button size
|
42
|
+
font-size: 0.625rem
|
43
|
+
line-height: 1.675rem
|
44
|
+
&.lg
|
45
|
+
font-size: 1.625rem
|
46
|
+
line-height: 1.675rem
|
47
|
+
&.xl
|
48
|
+
font-size: 1.875rem
|
49
|
+
line-height: 1.875rem
|
50
|
+
&.blue //button color
|
51
|
+
border: 1px solid #3085d6
|
52
|
+
background-color: $blue
|
53
|
+
|
54
|
+
&:hover
|
55
|
+
background: $blue_hover
|
56
|
+
color: white
|
57
|
+
&.green
|
58
|
+
background-color: $green
|
59
|
+
border: 1px solid #5bde9b
|
60
|
+
&:hover
|
61
|
+
background: $green_hover
|
62
|
+
color: white
|
63
|
+
&.red
|
64
|
+
border: 1px solid #c6282a
|
65
|
+
background-color: $red
|
66
|
+
&:hover
|
67
|
+
background: $red_hover
|
68
|
+
color: white
|
69
|
+
&.orange
|
70
|
+
border: 1px solid $orange
|
71
|
+
background-color: $orange
|
72
|
+
&:hover
|
73
|
+
background: $orange_hover
|
74
|
+
color: white
|
75
|
+
&.transparent
|
76
|
+
background-color: transparent
|
77
|
+
|
78
|
+
|
@@ -0,0 +1,111 @@
|
|
1
|
+
$bg_color: white
|
2
|
+
$input_border_color: #D1D1D1
|
3
|
+
$input_focus_color: #33C3F0
|
4
|
+
$form_border_color: #CCC
|
5
|
+
|
6
|
+
.flash
|
7
|
+
border: 1px solid
|
8
|
+
border-radius: 7px
|
9
|
+
margin: 1% 0
|
10
|
+
padding: 1%
|
11
|
+
width: 80%
|
12
|
+
margin: auto
|
13
|
+
&.info
|
14
|
+
color: #00529B
|
15
|
+
background-color: #BDE5F8
|
16
|
+
|
17
|
+
&.success
|
18
|
+
color: #4F8A10
|
19
|
+
background-color: #DFF2BF
|
20
|
+
|
21
|
+
&.warning
|
22
|
+
color: #9F6000
|
23
|
+
background-color: #FEEFB3
|
24
|
+
|
25
|
+
&.error
|
26
|
+
color: #D8000C
|
27
|
+
background-color: #FFBABA
|
28
|
+
|
29
|
+
|
30
|
+
.form
|
31
|
+
margin: 0 auto
|
32
|
+
.row
|
33
|
+
max-width: 80%
|
34
|
+
margin: 0 auto
|
35
|
+
|
36
|
+
border-radius: 7px
|
37
|
+
&.border
|
38
|
+
border: 1px solid $form_border_color
|
39
|
+
background-color: $bg_color
|
40
|
+
.button-group
|
41
|
+
display: inline-block
|
42
|
+
margin-top: 2%
|
43
|
+
margin-bottom: 1%
|
44
|
+
&.no-space
|
45
|
+
float: left
|
46
|
+
&:after
|
47
|
+
display: table
|
48
|
+
clear: both
|
49
|
+
background-color: $bg_color
|
50
|
+
margin: 0 auto
|
51
|
+
|
52
|
+
input
|
53
|
+
&[type="email"], &[type="number"], &[type="search"], &[type="text"], &[type="tel"], &[type="url"], &[type="password"]
|
54
|
+
height: 38px
|
55
|
+
padding: 6px 10px
|
56
|
+
background-color: $bg_color
|
57
|
+
border: 1px solid $input_border_color
|
58
|
+
border-radius: 4px
|
59
|
+
box-shadow: none
|
60
|
+
box-sizing: border-box
|
61
|
+
|
62
|
+
textarea, select
|
63
|
+
height: 38px
|
64
|
+
padding: 6px 10px
|
65
|
+
background-color: #fff
|
66
|
+
border: 1px solid $input_border_color
|
67
|
+
border-radius: 4px
|
68
|
+
box-shadow: none
|
69
|
+
box-sizing: border-box
|
70
|
+
|
71
|
+
|
72
|
+
input
|
73
|
+
&[type="email"], &[type="number"], &[type="search"], &[type="text"], &[type="tel"], &[type="url"], &[type="password"]
|
74
|
+
-webkit-appearance: none
|
75
|
+
-moz-appearance: none
|
76
|
+
appearance: none
|
77
|
+
|
78
|
+
textarea
|
79
|
+
-webkit-appearance: none
|
80
|
+
-moz-appearance: none
|
81
|
+
appearance: none
|
82
|
+
min-height: 65px
|
83
|
+
padding-top: 6px
|
84
|
+
padding-bottom: 6px
|
85
|
+
|
86
|
+
input
|
87
|
+
&[type="email"]:focus, &[type="number"]:focus, &[type="search"]:focus, &[type="text"]:focus, &[type="tel"]:focus, &[type="url"]:focus, &[type="password"]:focus
|
88
|
+
border: 1px solid $input_focus_color
|
89
|
+
outline: 0
|
90
|
+
|
91
|
+
textarea:focus, select:focus
|
92
|
+
border: 1px solid $input_focus_color
|
93
|
+
outline: 0
|
94
|
+
|
95
|
+
label, legend
|
96
|
+
display: block
|
97
|
+
margin-bottom: .5rem
|
98
|
+
font-weight: 600
|
99
|
+
|
100
|
+
fieldset
|
101
|
+
padding: 0
|
102
|
+
border-width: 0
|
103
|
+
|
104
|
+
input
|
105
|
+
&[type="checkbox"], &[type="radio"]
|
106
|
+
display: inline
|
107
|
+
|
108
|
+
label > .label-body
|
109
|
+
display: inline-block
|
110
|
+
margin-left: .5rem
|
111
|
+
font-weight: normal
|