tmatt_cms 0.0.0 → 0.1.0
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/lib/generators/tmatt_cms/install_generator.rb +316 -0
- data/lib/generators/tmatt_cms/templates/.keep +0 -0
- data/lib/generators/tmatt_cms/templates/concerns/db_init.rb +12 -0
- data/lib/generators/tmatt_cms/templates/concerns/pretty_url.rb +38 -0
- data/lib/generators/tmatt_cms/templates/concerns/string_addition.rb +8 -0
- data/lib/generators/tmatt_cms/templates/concerns/translatable.rb +43 -0
- data/lib/generators/tmatt_cms/templates/config/application.rb +41 -0
- data/lib/generators/tmatt_cms/templates/config/application.yml +12 -0
- data/lib/generators/tmatt_cms/templates/config/initializers/active_job.rb +3 -0
- data/lib/generators/tmatt_cms/templates/config/locales/views/dashboard/en.yml +11 -0
- data/lib/generators/tmatt_cms/templates/config/locales/views/dashboard/zh.yml +11 -0
- data/lib/generators/tmatt_cms/templates/config/locales/views/global/en.yml +2 -0
- data/lib/generators/tmatt_cms/templates/config/locales/views/global/zh.yml +2 -0
- data/lib/generators/tmatt_cms/templates/css/application/application.css +18 -0
- data/lib/generators/tmatt_cms/templates/css/application/ckeditor.css.scss +4 -0
- data/lib/generators/tmatt_cms/templates/css/application/index.css.scss +40 -0
- data/lib/generators/tmatt_cms/templates/css/application/magnific_popup_rails.css.scss +45 -0
- data/lib/generators/tmatt_cms/templates/css/application/main.css.scss +0 -0
- data/lib/generators/tmatt_cms/templates/css/application/mixin.css.scss +43 -0
- data/lib/generators/tmatt_cms/templates/css/application/variables.css.scss +55 -0
- data/lib/generators/tmatt_cms/templates/css/application/z_index.css.scss +2 -0
- data/lib/generators/tmatt_cms/templates/css/layouts/footer.css.scss +3 -0
- data/lib/generators/tmatt_cms/templates/css/layouts/form.css.scss +3 -0
- data/lib/generators/tmatt_cms/templates/css/layouts/header.css.scss +0 -0
- data/lib/generators/tmatt_cms/templates/css/style.css.scss +242 -0
- data/lib/generators/tmatt_cms/templates/css/utils/jasny-bootstrap.min.css +7 -0
- data/lib/generators/tmatt_cms/templates/gemfile/Gemfile +128 -0
- data/lib/generators/tmatt_cms/templates/git_ignore/gitignore +29 -0
- data/lib/generators/tmatt_cms/templates/inputs/ckeditor_translation_input.rb +11 -0
- data/lib/generators/tmatt_cms/templates/inputs/concerns/translation_hint.rb +12 -0
- data/lib/generators/tmatt_cms/templates/inputs/translation_input.rb +11 -0
- data/lib/generators/tmatt_cms/templates/js/application.js +23 -0
- data/lib/generators/tmatt_cms/templates/js/utils/jasny-bootstrap.min.js +6 -0
- data/lib/generators/tmatt_cms/templates/js/utils/magnificPopup.js +16 -0
- data/lib/generators/tmatt_cms/templates/seed_bank/all.seeds.rb +0 -0
- data/lib/generators/tmatt_cms/templates/views/dashboard/partial/_sidebar.html.haml +29 -0
- data/lib/generators/tmatt_cms/templates/views/layouts/dashboard.html.haml +19 -0
- data/lib/generators/tmatt_cms/templates/views/utils/_image_cover.html.haml +2 -0
- data/lib/tmatt_cms.rb +1 -5
- data/lib/tmatt_cms/version.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- data/spec/tmatt_cms_spec.rb +11 -0
- data/tmatt_cms.gemspec +6 -7
- metadata +57 -30
@@ -0,0 +1,18 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
|
12
|
+
*= require application/chromeframe
|
13
|
+
*= require font-awesome
|
14
|
+
*= require jquery-ui
|
15
|
+
*= require owl.carousel
|
16
|
+
*= require owl.theme
|
17
|
+
*= require magnific-popup
|
18
|
+
*/
|
@@ -0,0 +1,40 @@
|
|
1
|
+
// This file was generated by html5-rails
|
2
|
+
// https://github.com/sporkd/html5-rails
|
3
|
+
// Upgrade with: $ rails generate html5:install
|
4
|
+
//
|
5
|
+
// application styles
|
6
|
+
|
7
|
+
//-----------------------------------------
|
8
|
+
// Variables
|
9
|
+
//-----------------------------------------
|
10
|
+
@import 'variables';
|
11
|
+
|
12
|
+
//-----------------------------------------
|
13
|
+
// Vendor imports
|
14
|
+
//-----------------------------------------
|
15
|
+
// @import 'compass/css3';
|
16
|
+
@import 'h5bp';
|
17
|
+
|
18
|
+
//-----------------------------------------
|
19
|
+
// Vendor includes
|
20
|
+
//-----------------------------------------
|
21
|
+
@include h5bp-normalize;
|
22
|
+
@include h5bp-main;
|
23
|
+
@include h5bp-helpers;
|
24
|
+
|
25
|
+
|
26
|
+
//-----------------------------------------
|
27
|
+
// Custom imports
|
28
|
+
//-----------------------------------------
|
29
|
+
@import 'mixin';
|
30
|
+
@import 'z_index';
|
31
|
+
@import 'magnific_popup_rails';
|
32
|
+
@import 'main';
|
33
|
+
@import 'ckeditor';
|
34
|
+
|
35
|
+
@import 'bootstrap';
|
36
|
+
@import 'application';
|
37
|
+
@import 'style';
|
38
|
+
@import 'style.responsive';
|
39
|
+
|
40
|
+
@import '../layouts/*';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
.mfp-zoom-in {
|
2
|
+
/* start state */
|
3
|
+
.mfp-with-anim {
|
4
|
+
opacity: 0;
|
5
|
+
transition: all 0.2s ease-in-out;
|
6
|
+
transform: scale(0.8);
|
7
|
+
}
|
8
|
+
|
9
|
+
&.mfp-bg {
|
10
|
+
opacity: 0;
|
11
|
+
transition: all 0.3s ease-out;
|
12
|
+
}
|
13
|
+
|
14
|
+
/* animate in */
|
15
|
+
&.mfp-ready {
|
16
|
+
.mfp-with-anim {
|
17
|
+
opacity: 1;
|
18
|
+
transform: scale(1);
|
19
|
+
}
|
20
|
+
&.mfp-bg {
|
21
|
+
opacity: 0.8;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
/* animate out */
|
26
|
+
&.mfp-removing {
|
27
|
+
.mfp-with-anim {
|
28
|
+
transform: scale(0.8);
|
29
|
+
opacity: 0;
|
30
|
+
}
|
31
|
+
&.mfp-bg {
|
32
|
+
opacity: 0;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.white-popup {
|
38
|
+
position: relative;
|
39
|
+
background: $white;
|
40
|
+
width: auto;
|
41
|
+
max-width: 50rem;
|
42
|
+
|
43
|
+
@extend .padd;
|
44
|
+
@extend .m-4-a;
|
45
|
+
}
|
File without changes
|
@@ -0,0 +1,43 @@
|
|
1
|
+
@mixin respond-to($breakpoint) {
|
2
|
+
@if map-has-key($grid-breakpoints, $breakpoint) {
|
3
|
+
$value: map-get($grid-breakpoints, $breakpoint);
|
4
|
+
|
5
|
+
@media screen and (min-width: $value) {
|
6
|
+
@content;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
@warn "Unknown `#{$breakpoint}` in $breakpoints";
|
11
|
+
}
|
12
|
+
|
13
|
+
@mixin inner_border{
|
14
|
+
box-sizing: border-box;
|
15
|
+
-moz-box-sizing: border-box;
|
16
|
+
-webkit-box-sizing: border-box;
|
17
|
+
}
|
18
|
+
|
19
|
+
@mixin blur_image($blur) {
|
20
|
+
-webkit-filter: blur($blur);
|
21
|
+
-moz-filter: blur($blur);
|
22
|
+
-o-filter: blur($blur);
|
23
|
+
-ms-filter: blur($blur);
|
24
|
+
filter: blur($blur);
|
25
|
+
}
|
26
|
+
|
27
|
+
@mixin default_background() {
|
28
|
+
background: image_url('bg.png') repeat;
|
29
|
+
}
|
30
|
+
|
31
|
+
@mixin class_transition($time) {
|
32
|
+
-webkit-transition: all $time;
|
33
|
+
-moz-transition: all $time;
|
34
|
+
-o-transition: all $time;
|
35
|
+
transition: all $time;
|
36
|
+
}
|
37
|
+
|
38
|
+
@mixin linear_gradient($color_from, $color_to) {
|
39
|
+
background: -webkit-linear-gradient($color_from, $color_from, $color_from, $color_to);
|
40
|
+
background: -o-linear-gradient($color_from, $color_from, $color_from, $color_to);
|
41
|
+
background: -moz-linear-gradient($color_from, $color_from, $color_from, $color_to);
|
42
|
+
background: linear-gradient($color_from, $color_from, $color_from, $color_to);
|
43
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
// This file was generated by html5-rails
|
2
|
+
// https://github.com/sporkd/html5-rails
|
3
|
+
// Upgrade with: $ rails generate html5:install
|
4
|
+
//
|
5
|
+
// These global SCSS(SASS) variables will be
|
6
|
+
// available to all your stylesheets.
|
7
|
+
|
8
|
+
//----------------------------------------------
|
9
|
+
// Html5 Boilerplate overrides
|
10
|
+
//----------------------------------------------
|
11
|
+
$font-heading: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
12
|
+
$font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
13
|
+
|
14
|
+
$font-color: #333;
|
15
|
+
$link-color: #0e3c5d;
|
16
|
+
|
17
|
+
$font-highlight-color: #e32a29;
|
18
|
+
|
19
|
+
$white: #fff;
|
20
|
+
$gray: #999;
|
21
|
+
$light-gray: #575757;
|
22
|
+
$dark-gray: #333;
|
23
|
+
$black: #000;
|
24
|
+
$light-grey: #bababa;
|
25
|
+
$bg-light-grey: #f7f7f7;
|
26
|
+
$carousel-nav-bg: rgba(51, 51, 51, 0.8);
|
27
|
+
|
28
|
+
$red: #e32a29;
|
29
|
+
$blue: #00a0ff;
|
30
|
+
$dark-blue: #242b39;
|
31
|
+
$border-dark-blue: #2f343f;
|
32
|
+
$footer-dark-blue: #242b38;
|
33
|
+
$footer-copyright-dark-blue: #0c0e13;
|
34
|
+
$orange: #ffa200;
|
35
|
+
$green: #70da65;
|
36
|
+
|
37
|
+
$radius: 0.8rem;
|
38
|
+
$gutter: 2rem;
|
39
|
+
$min-width: 0;
|
40
|
+
|
41
|
+
|
42
|
+
//----------------------------------------------
|
43
|
+
// Bootstrap overrides
|
44
|
+
//----------------------------------------------
|
45
|
+
|
46
|
+
$btn-danger-bg: $red;
|
47
|
+
$btn-primary-bg: $blue;
|
48
|
+
|
49
|
+
$grid-breakpoints: (
|
50
|
+
xs: 0,
|
51
|
+
sm: 576px,
|
52
|
+
md: 768px,
|
53
|
+
lg: 992px,
|
54
|
+
xl: 1200px
|
55
|
+
);
|
File without changes
|
@@ -0,0 +1,242 @@
|
|
1
|
+
@include respond-to(xs) {
|
2
|
+
html, body { height: 100%; font-size: 62.5%; }
|
3
|
+
}
|
4
|
+
@include respond-to(md) {
|
5
|
+
html, body { height: 100%; font-size: 62.5%; }
|
6
|
+
}
|
7
|
+
@include respond-to(lg) {
|
8
|
+
html, body { height: 100%; font-size: 62.5%; }
|
9
|
+
}
|
10
|
+
|
11
|
+
body {
|
12
|
+
position: relative;
|
13
|
+
font: 16px/1.6 $font-body;
|
14
|
+
color: $font-color;
|
15
|
+
width: 100%;
|
16
|
+
min-width: $min-width;
|
17
|
+
}
|
18
|
+
h1, h2, h3 {
|
19
|
+
font-family: $font-heading;
|
20
|
+
line-height: 1.3;
|
21
|
+
margin-top: 0;
|
22
|
+
}
|
23
|
+
h4, h5, h6 { font-family: $font-heading; font-weight: bold; }
|
24
|
+
h3 { margin-bottom: $gutter/1.5; }
|
25
|
+
h4 { @extend .font-xlarge; }
|
26
|
+
h5 { @extend .font-large; }
|
27
|
+
h6 { @extend .font-medium; }
|
28
|
+
a, button, .btn-link, input[type="submit"] {
|
29
|
+
outline: 0 !important;
|
30
|
+
}
|
31
|
+
img { max-width: 100%; }
|
32
|
+
|
33
|
+
ul {
|
34
|
+
&.fa-ul li {
|
35
|
+
margin-bottom: $gutter/2.5;
|
36
|
+
.fa { margin-right: 5px; }
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
hr {
|
41
|
+
margin: $gutter 0;
|
42
|
+
border-top: 1px solid $light-gray;
|
43
|
+
}
|
44
|
+
|
45
|
+
mark { background: none; color: $font-highlight-color; }
|
46
|
+
abbr[title] { border: 0; }
|
47
|
+
|
48
|
+
.block { display:block; }
|
49
|
+
.inline-block { display:inline-block; }
|
50
|
+
.relative { position:relative; }
|
51
|
+
.m-c { margin:0 !important; }
|
52
|
+
.m-a { margin:0 auto !important; }
|
53
|
+
.m-4-a { margin: $gutter*4 auto !important; }
|
54
|
+
.m-b { margin-bottom: $gutter !important; }
|
55
|
+
.m-b-1_2 { margin-bottom: $gutter/2 !important; }
|
56
|
+
.m-b-1_4 { margin-bottom: $gutter/4 !important; }
|
57
|
+
.m-b-c { margin-bottom:0 !important; }
|
58
|
+
.m-t-1_2 { margin-top: $gutter/2; }
|
59
|
+
|
60
|
+
.padd { padding: $gutter;}
|
61
|
+
.padd-1_2 { padding: $gutter/2;}
|
62
|
+
.padd-2 { padding: $gutter*2;}
|
63
|
+
.padd-side { padding: 0 $gutter;}
|
64
|
+
.padd-side-c { padding-left: 0 !important; padding-right: 0 !important; }
|
65
|
+
.padd-side-1_2 { padding: 0 $gutter/2; }
|
66
|
+
.padd-side-3_4 { padding: 0 $gutter/4*3; }
|
67
|
+
.padd-side-2 { padding: 0 $gutter*2; }
|
68
|
+
.padd-side-3 { padding: 0 $gutter*3; }
|
69
|
+
.padd-l-3 { padding-left: $gutter*3; }
|
70
|
+
.padd-t { padding-top: $gutter; }
|
71
|
+
.padd-t-1_2 { padding-top: $gutter/2; }
|
72
|
+
.padd-t-3 { padding-top: $gutter*3; }
|
73
|
+
.padd-b { padding-bottom: $gutter; }
|
74
|
+
.padd-b-1_2 { padding-bottom: $gutter/2; }
|
75
|
+
.padd-b-1_4 { padding-bottom: $gutter/4; }
|
76
|
+
.padd-b-2 { padding-bottom: $gutter*2; }
|
77
|
+
.padd-b-5 { padding-bottom: $gutter*5; }
|
78
|
+
.padd-t-b-c { padding-top: 0 !important; padding-bottom: 0 !important; }
|
79
|
+
.padd-t-b-3 { padding: $gutter*3 0; }
|
80
|
+
.padd-t-b-5 { padding: $gutter*5 0; }
|
81
|
+
|
82
|
+
.bordered { border:0.1rem solid #ddd; }
|
83
|
+
|
84
|
+
.caps { text-transform: uppercase; }
|
85
|
+
.font-light { font-weight: 300; }
|
86
|
+
.font-normal { font-weight:normal !important; }
|
87
|
+
|
88
|
+
.w_3 { width:3% !important; }
|
89
|
+
.w_5 { width:5% !important; }
|
90
|
+
.w_10 { width:10% !important; }
|
91
|
+
.w_20 { width:20% !important; }
|
92
|
+
.w_25 { width:25% !important; }
|
93
|
+
.w_30 { width:30% !important; }
|
94
|
+
.w_33 { width:33% !important; }
|
95
|
+
.w_40 { width:40% !important; }
|
96
|
+
.w_50 { width:50% !important; }
|
97
|
+
.w_60 { width:60% !important; }
|
98
|
+
.w_70 { width:70% !important; }
|
99
|
+
.w_80 { width:80% !important; }
|
100
|
+
.w_90 { width:90% !important; }
|
101
|
+
.w_100 { width:100% !important; }
|
102
|
+
.w_auto { width:auto !important; }
|
103
|
+
|
104
|
+
.h_3 { height:3% !important; }
|
105
|
+
.h_5 { height:5% !important; }
|
106
|
+
.h_10 { height:10% !important; }
|
107
|
+
.h_20 { height:20% !important; }
|
108
|
+
.h_25 { height:25% !important; }
|
109
|
+
.h_30 { height:30% !important; }
|
110
|
+
.h_33 { height:33% !important; }
|
111
|
+
.h_40 { height:40% !important; }
|
112
|
+
.h_50 { height:50% !important; }
|
113
|
+
.h_60 { height:60% !important; }
|
114
|
+
.h_70 { height:70% !important; }
|
115
|
+
.h_80 { height:80% !important; }
|
116
|
+
.h_90 { height:90% !important; }
|
117
|
+
.h_100 { height:100% !important; }
|
118
|
+
.h_auto { height:auto !important; }
|
119
|
+
|
120
|
+
.h_100_vh { height: 100vh; }
|
121
|
+
.h_100 { height:100%; }
|
122
|
+
|
123
|
+
.font-mini { font-size:1.1rem !important; }
|
124
|
+
.font-small { font-size:1.3rem !important; }
|
125
|
+
.font-medium { font-size:1.6rem !important; }
|
126
|
+
.font-large { font-size:1.8rem !important; }
|
127
|
+
.font-xlarge { font-size:2.2rem !important; }
|
128
|
+
.font-2xlarge { font-size:2.8rem !important; }
|
129
|
+
.font-3xlarge { font-size:3.6rem !important; }
|
130
|
+
.font-4xlarge { font-size:5.0rem !important; }
|
131
|
+
.font-5xlarge { font-size:6.0rem !important; }
|
132
|
+
|
133
|
+
.text-primary { color: $blue !important; }
|
134
|
+
.text-danger { color: $red !important; }
|
135
|
+
|
136
|
+
.text-white { color: $white !important; }
|
137
|
+
.text-black { color: $black !important; }
|
138
|
+
.text-orange { color: $orange !important; }
|
139
|
+
.text-blue { color: $blue !important; }
|
140
|
+
|
141
|
+
.pull-none { float: none; }
|
142
|
+
.media > .pull-left { margin-right: $gutter*2; }
|
143
|
+
.media > .pull-right { margin-left: $gutter*2; }
|
144
|
+
|
145
|
+
.btn {
|
146
|
+
border-radius: .4rem;
|
147
|
+
border: .1rem solid $black;
|
148
|
+
}
|
149
|
+
|
150
|
+
.vertical-relative-center {
|
151
|
+
position: relative;
|
152
|
+
top: 50%;
|
153
|
+
-ms-transform: translateY(-50%);
|
154
|
+
-webkit-transform: translateY(-50%);
|
155
|
+
-moz-transform: translateY(-50%);
|
156
|
+
-o-transform: translateY(-50%);
|
157
|
+
transform: translateY(-50%);
|
158
|
+
}
|
159
|
+
|
160
|
+
.vertical-absolute-center {
|
161
|
+
position: absolute;
|
162
|
+
top: 50%;
|
163
|
+
-ms-transform: translateY(-50%);
|
164
|
+
-webkit-transform: translateY(-50%);
|
165
|
+
-moz-transform: translateY(-50%);
|
166
|
+
-o-transform: translateY(-50%);
|
167
|
+
transform: translateY(-50%);
|
168
|
+
}
|
169
|
+
|
170
|
+
.table { display:table; }
|
171
|
+
.table-row { display:table-row; }
|
172
|
+
.table-cell { display:table-cell; }
|
173
|
+
|
174
|
+
.bg-blur {
|
175
|
+
@include blur_image(10px);
|
176
|
+
}
|
177
|
+
|
178
|
+
.cover-black:after {
|
179
|
+
@extend .image-bg;
|
180
|
+
content: '';
|
181
|
+
background-color: rgba(0, 0, 0, 0.4);
|
182
|
+
}
|
183
|
+
|
184
|
+
.cover-white:after {
|
185
|
+
@extend .image-bg;
|
186
|
+
content: '';
|
187
|
+
background-color: rgba(255, 255, 255, 0.4);
|
188
|
+
}
|
189
|
+
|
190
|
+
.image-bg {
|
191
|
+
position: absolute;
|
192
|
+
top: 0;
|
193
|
+
right: 0;
|
194
|
+
bottom: 0;
|
195
|
+
left: 0;
|
196
|
+
overflow: hidden;
|
197
|
+
}
|
198
|
+
|
199
|
+
.cover-image {
|
200
|
+
background-repeat: no-repeat;background-size: cover;
|
201
|
+
}
|
202
|
+
|
203
|
+
.sccsa_link:hover, .sccsa_link.active {
|
204
|
+
color: $blue !important;
|
205
|
+
border-bottom: 0.2rem solid $blue;
|
206
|
+
text-decoration: none;
|
207
|
+
}
|
208
|
+
|
209
|
+
|
210
|
+
ul, li {
|
211
|
+
padding: 0;
|
212
|
+
margin: 0;
|
213
|
+
list-style: none;
|
214
|
+
}
|
215
|
+
|
216
|
+
ol, ul {
|
217
|
+
margin-top: 0;
|
218
|
+
margin-bottom: 10px;
|
219
|
+
}
|
220
|
+
|
221
|
+
|
222
|
+
ul, menu, dir {
|
223
|
+
display: block;
|
224
|
+
list-style-type: disc;
|
225
|
+
-webkit-margin-before: 1rem;
|
226
|
+
-webkit-margin-after: 1rem;
|
227
|
+
-webkit-margin-start: 0;
|
228
|
+
-webkit-margin-end: 0;
|
229
|
+
-webkit-padding-start: 0;
|
230
|
+
}
|
231
|
+
|
232
|
+
a, a:hover {
|
233
|
+
outline: none;
|
234
|
+
text-decoration: none;
|
235
|
+
color: currentColor;
|
236
|
+
}
|
237
|
+
|
238
|
+
a:visited, a:hover, a:active, a:focus {
|
239
|
+
text-decoration: none;
|
240
|
+
outline: none;
|
241
|
+
color: currentColor;
|
242
|
+
}
|