从bitbucket迁移过来
0 parents
Showing
247 changed files
with
3383 additions
and
0 deletions
.gitignore
0 → 100644
1 | # See http://help.github.com/ignore-files/ for more about ignoring files. | ||
2 | # | ||
3 | # If you find yourself ignoring temporary files generated by your text editor | ||
4 | # or operating system, you probably want to add a global ignore instead: | ||
5 | # git config --global core.excludesfile ~/.gitignore_global | ||
6 | |||
7 | # Ignore bundler config | ||
8 | /.bundle | ||
9 | |||
10 | # Ignore the default SQLite database. | ||
11 | /db/*.sqlite3 | ||
12 | |||
13 | # Ignore all logfiles and tempfiles. | ||
14 | /log | ||
15 | /tmp | ||
16 | /www |
Capfile
0 → 100644
1 | # Load DSL and set up stages | ||
2 | require 'capistrano/setup' | ||
3 | |||
4 | # Include default deployment tasks | ||
5 | require 'capistrano/deploy' | ||
6 | |||
7 | # Include tasks from other gems included in your Gemfile | ||
8 | # | ||
9 | # For documentation on these, see for example: | ||
10 | # | ||
11 | # https://github.com/capistrano/rvm | ||
12 | # https://github.com/capistrano/rbenv | ||
13 | # https://github.com/capistrano/chruby | ||
14 | # https://github.com/capistrano/bundler | ||
15 | # https://github.com/capistrano/rails | ||
16 | # https://github.com/capistrano/passenger | ||
17 | # | ||
18 | require 'capistrano/rvm' | ||
19 | # require 'capistrano/rbenv' | ||
20 | # require 'capistrano/chruby' | ||
21 | require 'capistrano/bundler' | ||
22 | # require 'capistrano/rails/assets' | ||
23 | # require 'capistrano/rails/migrations' | ||
24 | # require 'capistrano/passenger' | ||
25 | |||
26 | # Load custom tasks from `lib/capistrano/tasks` if you have any defined | ||
27 | Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r } |
Gemfile
0 → 100644
1 | source 'https://rubygems.org' | ||
2 | |||
3 | gem 'rails', '3.2.15' | ||
4 | |||
5 | # Bundle edge Rails instead: | ||
6 | # gem 'rails', :git => 'git://github.com/rails/rails.git' | ||
7 | |||
8 | gem 'mysql2' | ||
9 | # 分页插件 | ||
10 | gem "kaminari" | ||
11 | gem "awesome_print" | ||
12 | gem 'capistrano', '~> 3.4.0' | ||
13 | gem 'capistrano-bundler' | ||
14 | gem 'capistrano-rvm' | ||
15 | gem 'unicorn' | ||
16 | |||
17 | |||
18 | # Gems used only for assets and not required | ||
19 | # in production environments by default. | ||
20 | group :assets do | ||
21 | gem 'sass-rails', '~> 3.2.3' | ||
22 | gem 'coffee-rails', '~> 3.2.1' | ||
23 | |||
24 | # See https://github.com/sstephenson/execjs#readme for more supported runtimes | ||
25 | # gem 'therubyracer', :platforms => :ruby | ||
26 | |||
27 | gem 'uglifier', '>= 1.0.3' | ||
28 | end | ||
29 | |||
30 | gem 'jquery-rails' | ||
31 | |||
32 | # To use ActiveModel has_secure_password | ||
33 | # gem 'bcrypt-ruby', '~> 3.0.0' | ||
34 | |||
35 | # To use Jbuilder templates for JSON | ||
36 | # gem 'jbuilder' | ||
37 | |||
38 | # Use unicorn as the app server | ||
39 | # gem 'unicorn' | ||
40 | |||
41 | # Deploy with Capistrano | ||
42 | # gem 'capistrano' | ||
43 | |||
44 | # To use debugger | ||
45 | # gem 'debugger' |
Gemfile.lock
0 → 100644
1 | GEM | ||
2 | remote: https://rubygems.org/ | ||
3 | specs: | ||
4 | actionmailer (3.2.15) | ||
5 | actionpack (= 3.2.15) | ||
6 | mail (~> 2.5.4) | ||
7 | actionpack (3.2.15) | ||
8 | activemodel (= 3.2.15) | ||
9 | activesupport (= 3.2.15) | ||
10 | builder (~> 3.0.0) | ||
11 | erubis (~> 2.7.0) | ||
12 | journey (~> 1.0.4) | ||
13 | rack (~> 1.4.5) | ||
14 | rack-cache (~> 1.2) | ||
15 | rack-test (~> 0.6.1) | ||
16 | sprockets (~> 2.2.1) | ||
17 | activemodel (3.2.15) | ||
18 | activesupport (= 3.2.15) | ||
19 | builder (~> 3.0.0) | ||
20 | activerecord (3.2.15) | ||
21 | activemodel (= 3.2.15) | ||
22 | activesupport (= 3.2.15) | ||
23 | arel (~> 3.0.2) | ||
24 | tzinfo (~> 0.3.29) | ||
25 | activeresource (3.2.15) | ||
26 | activemodel (= 3.2.15) | ||
27 | activesupport (= 3.2.15) | ||
28 | activesupport (3.2.15) | ||
29 | i18n (~> 0.6, >= 0.6.4) | ||
30 | multi_json (~> 1.0) | ||
31 | arel (3.0.3) | ||
32 | awesome_print (1.6.1) | ||
33 | builder (3.0.4) | ||
34 | capistrano (3.4.0) | ||
35 | i18n | ||
36 | rake (>= 10.0.0) | ||
37 | sshkit (~> 1.3) | ||
38 | capistrano-bundler (1.1.4) | ||
39 | capistrano (~> 3.1) | ||
40 | sshkit (~> 1.2) | ||
41 | capistrano-rvm (0.1.2) | ||
42 | capistrano (~> 3.0) | ||
43 | sshkit (~> 1.2) | ||
44 | coffee-rails (3.2.2) | ||
45 | coffee-script (>= 2.2.0) | ||
46 | railties (~> 3.2.0) | ||
47 | coffee-script (2.3.0) | ||
48 | coffee-script-source | ||
49 | execjs | ||
50 | coffee-script-source (1.8.0) | ||
51 | colorize (0.7.7) | ||
52 | erubis (2.7.0) | ||
53 | execjs (2.2.2) | ||
54 | hike (1.2.3) | ||
55 | i18n (0.6.11) | ||
56 | journey (1.0.4) | ||
57 | jquery-rails (3.1.2) | ||
58 | railties (>= 3.0, < 5.0) | ||
59 | thor (>= 0.14, < 2.0) | ||
60 | json (1.8.3) | ||
61 | kaminari (0.16.1) | ||
62 | actionpack (>= 3.0.0) | ||
63 | activesupport (>= 3.0.0) | ||
64 | kgio (2.10.0) | ||
65 | mail (2.5.4) | ||
66 | mime-types (~> 1.16) | ||
67 | treetop (~> 1.4.8) | ||
68 | mime-types (1.25.1) | ||
69 | multi_json (1.11.2) | ||
70 | mysql2 (0.3.16) | ||
71 | net-scp (1.2.1) | ||
72 | net-ssh (>= 2.6.5) | ||
73 | net-ssh (3.0.1) | ||
74 | polyglot (0.3.5) | ||
75 | rack (1.4.7) | ||
76 | rack-cache (1.2) | ||
77 | rack (>= 0.4) | ||
78 | rack-ssl (1.3.4) | ||
79 | rack | ||
80 | rack-test (0.6.3) | ||
81 | rack (>= 1.0) | ||
82 | rails (3.2.15) | ||
83 | actionmailer (= 3.2.15) | ||
84 | actionpack (= 3.2.15) | ||
85 | activerecord (= 3.2.15) | ||
86 | activeresource (= 3.2.15) | ||
87 | activesupport (= 3.2.15) | ||
88 | bundler (~> 1.0) | ||
89 | railties (= 3.2.15) | ||
90 | railties (3.2.15) | ||
91 | actionpack (= 3.2.15) | ||
92 | activesupport (= 3.2.15) | ||
93 | rack-ssl (~> 1.3.2) | ||
94 | rake (>= 0.8.7) | ||
95 | rdoc (~> 3.4) | ||
96 | thor (>= 0.14.6, < 2.0) | ||
97 | raindrops (0.15.0) | ||
98 | rake (10.4.2) | ||
99 | rdoc (3.12.2) | ||
100 | json (~> 1.4) | ||
101 | sass (3.4.6) | ||
102 | sass-rails (3.2.6) | ||
103 | railties (~> 3.2.0) | ||
104 | sass (>= 3.1.10) | ||
105 | tilt (~> 1.3) | ||
106 | sprockets (2.2.3) | ||
107 | hike (~> 1.2) | ||
108 | multi_json (~> 1.0) | ||
109 | rack (~> 1.0) | ||
110 | tilt (~> 1.1, != 1.3.0) | ||
111 | sshkit (1.7.1) | ||
112 | colorize (>= 0.7.0) | ||
113 | net-scp (>= 1.1.2) | ||
114 | net-ssh (>= 2.8.0) | ||
115 | thor (0.19.1) | ||
116 | tilt (1.4.1) | ||
117 | treetop (1.4.15) | ||
118 | polyglot | ||
119 | polyglot (>= 0.3.1) | ||
120 | tzinfo (0.3.42) | ||
121 | uglifier (2.5.3) | ||
122 | execjs (>= 0.3.0) | ||
123 | json (>= 1.8.0) | ||
124 | unicorn (5.0.1) | ||
125 | kgio (~> 2.6) | ||
126 | rack | ||
127 | raindrops (~> 0.7) | ||
128 | |||
129 | PLATFORMS | ||
130 | ruby | ||
131 | |||
132 | DEPENDENCIES | ||
133 | awesome_print | ||
134 | capistrano (~> 3.4.0) | ||
135 | capistrano-bundler | ||
136 | capistrano-rvm | ||
137 | coffee-rails (~> 3.2.1) | ||
138 | jquery-rails | ||
139 | kaminari | ||
140 | mysql2 | ||
141 | rails (= 3.2.15) | ||
142 | sass-rails (~> 3.2.3) | ||
143 | uglifier (>= 1.0.3) | ||
144 | unicorn | ||
145 | |||
146 | BUNDLED WITH | ||
147 | 1.16.2 |
Rakefile
0 → 100644
app/assets/images/rails.png
0 → 100644
6.49 KB
app/assets/javascripts/application.js
0 → 100644
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files | ||
2 | // listed below. | ||
3 | // | ||
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | ||
5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. | ||
6 | // | ||
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | ||
8 | // the compiled file. | ||
9 | // | ||
10 | // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD | ||
11 | // GO AFTER THE REQUIRES BELOW. | ||
12 | // | ||
13 | //= require jquery | ||
14 | //= require jquery_ujs | ||
15 | //= require_directory ./plugin |
This diff is collapsed.
Click to expand it.
app/assets/javascripts/plugin/wow.js
0 → 100755
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/admin.css
0 → 100644
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 | *= require_self | ||
12 | *= require_directory ./admin | ||
13 | */ |
app/assets/stylesheets/admin/base.css
0 → 100644
1 | input:focus, | ||
2 | textarea:focus{ | ||
3 | outline: none; | ||
4 | } | ||
5 | .posts a:link, .posts a:visited{ | ||
6 | color: #7594B3; | ||
7 | } | ||
8 | .posts a:hover{ | ||
9 | color: #f78927; | ||
10 | } | ||
11 | .posts a{ | ||
12 | text-decoration: none; | ||
13 | } | ||
14 | .postdetail{ | ||
15 | padding: 20px 0; | ||
16 | margin-bottom: 50px; | ||
17 | border-bottom: 3px solid #ccc; | ||
18 | min-height:400px; | ||
19 | } | ||
20 | .postdetail li{ | ||
21 | margin: 0.5em auto; | ||
22 | line-height: 26px; | ||
23 | } | ||
24 | .postdetail p{ | ||
25 | line-height: 30px; | ||
26 | margin: 0.5em auto; | ||
27 | } | ||
28 | .postdetail img, | ||
29 | .mp4 video, | ||
30 | .mp4 object{ | ||
31 | max-width: 100%; | ||
32 | height: auto; | ||
33 | } | ||
34 | .postdetail > table, | ||
35 | .posts > table{ | ||
36 | width: 100%; | ||
37 | border-collapse: collapse; | ||
38 | empty-cells: show; | ||
39 | border: 1px solid #ddd; | ||
40 | } | ||
41 | .postdetail > table th, | ||
42 | .posts > table th{ | ||
43 | font-size: 13px; | ||
44 | height: 30px; | ||
45 | line-height: 30px; | ||
46 | font-weight: bold; | ||
47 | text-align: center; | ||
48 | background: #EEEEEE; | ||
49 | position: relative; | ||
50 | } | ||
51 | .postdetail > table td, | ||
52 | .posts > table td{ | ||
53 | text-align: center; | ||
54 | font-size: 12px; | ||
55 | color: #666; | ||
56 | line-height: 30px; | ||
57 | padding-left: 10px; | ||
58 | border: 1px solid #ddd; | ||
59 | } | ||
60 | .posts{ | ||
61 | width: 96%; | ||
62 | max-width: 960px; | ||
63 | margin: 50px auto; | ||
64 | } | ||
65 | .posts > table th input{ | ||
66 | position: absolute; | ||
67 | left: 2%; | ||
68 | top: 17%; | ||
69 | width: 100px; | ||
70 | } | ||
71 | .posts h3.title{ | ||
72 | position: relative; | ||
73 | } | ||
74 | .posts h3.title small{ | ||
75 | position: absolute; | ||
76 | right: 0; | ||
77 | bottom: 0; | ||
78 | font-weight: normal; | ||
79 | font-size: 14px; | ||
80 | } | ||
81 | .posts textarea{ | ||
82 | resize:none; | ||
83 | } | ||
84 | .posts .field{ | ||
85 | margin-bottom: 20px; | ||
86 | font-size: 14px; | ||
87 | } | ||
88 | .posts .field span{ | ||
89 | margin-right: 10px; | ||
90 | } | ||
91 | .posts .field input{ | ||
92 | width: 300px; | ||
93 | line-height: 21px; | ||
94 | padding: 2px 5px; | ||
95 | } | ||
96 | .posts .field select{ | ||
97 | width: 100px; | ||
98 | } | ||
99 | .postdetail form .field{ | ||
100 | margin: auto auto 20px auto; | ||
101 | } | ||
102 | .postdetail form .field label{ | ||
103 | width: 70px; | ||
104 | display: inline-block; | ||
105 | vertical-align: middle; | ||
106 | overflow: hidden; | ||
107 | font-size: 14px; | ||
108 | padding: 0 20px 0 0; | ||
109 | } | ||
110 | .postdetail form .field input, | ||
111 | .postdetail form .field textarea{ | ||
112 | width: 320px; | ||
113 | line-height: 20px; | ||
114 | border: 1px solid #2aad6f; | ||
115 | font-size: 12px; | ||
116 | padding: .5em .8em; | ||
117 | border-radius: 2px; | ||
118 | vertical-align: middle; | ||
119 | background: #ffffff; | ||
120 | } | ||
121 | .postdetail form .field input.captcha{ | ||
122 | width: 160px; | ||
123 | } | ||
124 | .postdetail form .field input.submit{ | ||
125 | width: 120px; | ||
126 | padding: 0 30px; | ||
127 | border: none; | ||
128 | color: #fff; | ||
129 | background-color: #2aad6f; | ||
130 | -webkit-border-radius: 3px; | ||
131 | -moz-border-radius: 3px; | ||
132 | border-radius: 3px; | ||
133 | line-height: 34px; | ||
134 | font-size: 14px; | ||
135 | cursor: pointer; | ||
136 | } | ||
137 | .postdetail form .field textarea{ | ||
138 | height: 120px; | ||
139 | resize: none; | ||
140 | } | ||
141 | .pagination { | ||
142 | margin: 10px auto; | ||
143 | overflow: hidden; | ||
144 | padding: 10px 0; | ||
145 | } | ||
146 | .pagination li{ | ||
147 | display: inline-block; | ||
148 | margin: auto 2px; | ||
149 | } | ||
150 | .pagination li.disabled a{ | ||
151 | background-color: #cccccc; | ||
152 | } | ||
153 | .pagination li.active a{ | ||
154 | border: 1px solid #398439; | ||
155 | color: #ffffff; | ||
156 | background-color: #00AA91; | ||
157 | } | ||
158 | .pagination a { | ||
159 | border: 1px solid #cccccc; | ||
160 | color: #666666; | ||
161 | height: 26px; | ||
162 | line-height: 26px; | ||
163 | display: inline-block; | ||
164 | padding: 0 10px; | ||
165 | } | ||
166 | .pagination li.disabled a:hover, | ||
167 | .pagination li.disabled a:active{ | ||
168 | color: #666666; | ||
169 | } | ||
170 | .pagination a:hover, | ||
171 | .pagination a:active { | ||
172 | color: #990000; | ||
173 | } |
app/assets/stylesheets/application.css
0 → 100644
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 | *= require_self | ||
12 | *= require_directory ./plugin | ||
13 | *= require_directory ./website | ||
14 | */ |
app/assets/stylesheets/mobile.css
0 → 100644
1 | .gallery-view .image-container{position:relative;overflow:hidden;border:2px solid white}.gallery-view .image-container img{position:absolute;top:-9999px;bottom:-9999px;left:-9999px;right:-9999px;margin:auto}.imageView .has-no-header{top:0px !important}.imageView .close-btn{font-weight:900;border:2px solid;position:absolute;right:5px;border-radius:5px}.imageView .headerView{background-image:none;background-color:black}.imageView .gallery-slide-view{width:98%;background-color:transparent}.imageView .image-subtitle{color:white;position:absolute;bottom:0px;left:10px;width:95%;height:15%;z-index:100}.imageView .listContainer{width:100%;height:100%;background-color:black}.imageView .hideAll{display:none}.imageView img{display:block;width:100%;height:auto}.imageView .scroll-view{position:absolute;width:100%;height:100%}.imageView .scroll-view .scroll{min-height:100%;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:center;-moz-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-content:stretch;-ms-flex-line-pack:stretch;align-content:stretch;-webkit-box-align:center;-moz-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center} |
app/assets/stylesheets/mobile/ionic.css
0 → 100644
This diff could not be displayed because it is too large.
app/assets/stylesheets/mobile/ionic.min.css
0 → 100644
This diff could not be displayed because it is too large.
app/assets/stylesheets/mobile/style.css
0 → 100644
app/assets/stylesheets/plugin/animate.css
0 → 100755
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/plugin/ihover.css
0 → 100755
1 | .detectype h2, .service h2{ | ||
2 | text-align: center; | ||
3 | font-weight: 400; | ||
4 | color: #433e51; | ||
5 | font-size: 45px; | ||
6 | padding: 0; | ||
7 | margin: 50px 0; | ||
8 | } | ||
9 | .detectype .detectrange{ | ||
10 | float: left; | ||
11 | min-height: 1px; | ||
12 | position: relative; | ||
13 | cursor: pointer; | ||
14 | width: 22.75%; | ||
15 | margin-right: 3%; | ||
16 | overflow: hidden; | ||
17 | } | ||
18 | .detectype .detectrange.mb{ | ||
19 | margin-bottom: 50px; | ||
20 | } | ||
21 | .detectype .detectrange .mask{ | ||
22 | position: absolute; | ||
23 | top: 0; | ||
24 | bottom: 0; | ||
25 | left: 0; | ||
26 | right: 0; | ||
27 | text-align: center; | ||
28 | -webkit-backface-visibility: hidden; | ||
29 | backface-visibility: hidden; | ||
30 | } | ||
31 | .detectype .detectrange.l{ | ||
32 | margin-right: 0; | ||
33 | } | ||
34 | .detectype .detectrange .detecticon{ | ||
35 | height: 150px; | ||
36 | } | ||
37 | .detectype .detectrange .detectfood{ | ||
38 | background: url(/images/jcrange/nongchanpin.jpg); | ||
39 | } | ||
40 | .detectype .detectrange .detectmeat{ | ||
41 | background: url(/images/jcrange/rouzhipin.jpg); | ||
42 | } | ||
43 | .detectype .detectrange .detectfire{ | ||
44 | background: url(/images/jcrange/xiaofangjiance.jpg); | ||
45 | } | ||
46 | .detectype .detectrange .detectmilieu{ | ||
47 | background: url(/images/jcrange/huanjing.jpg); | ||
48 | } | ||
49 | .detectype .detectrange .detectfeiliao{ | ||
50 | background: url(/images/jcrange/fljc.jpg); | ||
51 | } | ||
52 | .detectype .detectrange .detectsiliao{ | ||
53 | background: url(/images/jcrange/sljc.jpg); | ||
54 | } | ||
55 | .detectype .detectrange .detectshuichan{ | ||
56 | background: url(/images/jcrange/scjc.jpg); | ||
57 | } | ||
58 | .detectype .detectrange .detectshipin{ | ||
59 | background: url(/images/jcrange/spjc.jpg?v=2); | ||
60 | } | ||
61 | .detectype .detectrange .detecttext{ | ||
62 | padding: 15px 10px; | ||
63 | height: 80px; | ||
64 | border: 1px solid #ccc; | ||
65 | border-top: 0; | ||
66 | } | ||
67 | .detectype .detectrange .detecttext h5{ | ||
68 | margin: 0 0 10px; | ||
69 | font-size: 18px; | ||
70 | font-weight: 400; | ||
71 | color: #433e51; | ||
72 | } | ||
73 | .detectype .detectrange .detecttext p{ | ||
74 | line-height: 1.6em; | ||
75 | font-size: 14px; | ||
76 | margin: 0 0 10px; | ||
77 | color: #7b7b7b; | ||
78 | } | ||
79 | .detectype .detectrange .mask { | ||
80 | background: #1a4a72; | ||
81 | background: rgba(26, 74, 114, 0.6); | ||
82 | visibility: hidden; | ||
83 | opacity: 0; | ||
84 | -webkit-transition: all 0.35s ease-in; | ||
85 | -moz-transition: all 0.35s ease-in; | ||
86 | transition: all 0.35s ease-in; | ||
87 | } | ||
88 | .detectype .detectrange .mask a{ | ||
89 | color: #fff; | ||
90 | } | ||
91 | .detectype .detectrange .mask h3 { | ||
92 | text-transform: uppercase; | ||
93 | color: #fff; | ||
94 | text-align: center; | ||
95 | font-size: 17px; | ||
96 | padding: 10px; | ||
97 | background: #111111; | ||
98 | background: rgba(12, 34, 52, 0.6); | ||
99 | margin: 30px 0 0 0; | ||
100 | -webkit-transition: all 0.35s ease-in; | ||
101 | -moz-transition: all 0.35s ease-in; | ||
102 | transition: all 0.35s ease-in; | ||
103 | } | ||
104 | .detectype .detectrange .mask p { | ||
105 | font-size: 12px; | ||
106 | position: relative; | ||
107 | color: #bbb; | ||
108 | padding: 20px 20px 20px; | ||
109 | text-align: center; | ||
110 | -webkit-transition: all 0.35s ease-in; | ||
111 | -moz-transition: all 0.35s ease-in; | ||
112 | transition: all 0.35s ease-in; | ||
113 | } | ||
114 | .detectype .detectrange:hover .mask { | ||
115 | visibility: visible; | ||
116 | opacity: 1; | ||
117 | -webkit-transition-delay: 0.2s; | ||
118 | -moz-transition-delay: 0.2s; | ||
119 | transition-delay: 0.2s; | ||
120 | } | ||
121 | .detectype .detectrange:hover .mask h3 { | ||
122 | -webkit-transition-delay: 0.3s; | ||
123 | -moz-transition-delay: 0.3s; | ||
124 | transition-delay: 0.3s; | ||
125 | } | ||
126 | .detectype .detectrange:hover .mask p { | ||
127 | -webkit-transition-delay: 0.25s; | ||
128 | -moz-transition-delay: 0.25s; | ||
129 | transition-delay: 0.25s; | ||
130 | } | ||
131 | |||
132 | .detectype .detectrange .mask { | ||
133 | -webkit-transform: translate(-460px, -100px) rotate(-180deg); | ||
134 | -moz-transform: translate(-460px, -100px) rotate(-180deg); | ||
135 | -ms-transform: translate(-460px, -100px) rotate(-180deg); | ||
136 | -o-transform: translate(-460px, -100px) rotate(-180deg); | ||
137 | transform: translate(-460px, -100px) rotate(-180deg); | ||
138 | } | ||
139 | .detectype .detectrange .mask h3 { | ||
140 | -webkit-transform: translateY(-100px); | ||
141 | -moz-transform: translateY(-100px); | ||
142 | -ms-transform: translateY(-100px); | ||
143 | -o-transform: translateY(-100px); | ||
144 | transform: translateY(-100px); | ||
145 | } | ||
146 | .detectype .detectrange .mask p { | ||
147 | -webkit-transform: translateX(-300px) rotate(-90deg); | ||
148 | -moz-transform: translateX(-300px) rotate(-90deg); | ||
149 | -ms-transform: translateX(-300px) rotate(-90deg); | ||
150 | -o-transform: translateX(-300px) rotate(-90deg); | ||
151 | transform: translateX(-300px) rotate(-90deg); | ||
152 | } | ||
153 | .detectype .detectrange:hover .mask { | ||
154 | -webkit-transform: translate(0px, 0px); | ||
155 | -moz-transform: translate(0px, 0px); | ||
156 | -ms-transform: translate(0px, 0px); | ||
157 | -o-transform: translate(0px, 0px); | ||
158 | transform: translate(0px, 0px); | ||
159 | } | ||
160 | .detectype .detectrange:hover .mask h3 { | ||
161 | -webkit-transform: translateY(0px); | ||
162 | -moz-transform: translateY(0px); | ||
163 | -ms-transform: translateY(0px); | ||
164 | -o-transform: translateY(0px); | ||
165 | transform: translateY(0px); | ||
166 | } | ||
167 | .detectype .detectrange:hover .mask p { | ||
168 | -webkit-transform: translateX(0px) rotate(0deg); | ||
169 | -moz-transform: translateX(0px) rotate(0deg); | ||
170 | -ms-transform: translateX(0px) rotate(0deg); | ||
171 | -o-transform: translateX(0px) rotate(0deg); | ||
172 | transform: translateX(0px) rotate(0deg); | ||
173 | } |
app/assets/stylesheets/website/base.css
0 → 100644
1 | body{ | ||
2 | margin: 0px; | ||
3 | color: #393939; | ||
4 | } | ||
5 | a{ | ||
6 | text-decoration: none; | ||
7 | } | ||
8 | input:focus, | ||
9 | textarea:focus{ | ||
10 | outline: none; | ||
11 | } | ||
12 | .wrapper:after { | ||
13 | clear: both; | ||
14 | content: ''; | ||
15 | display: table; | ||
16 | } | ||
17 | .wrapper { | ||
18 | padding: 0; | ||
19 | max-width: 1200px; | ||
20 | margin: 0 auto; | ||
21 | width: 96%; | ||
22 | } | ||
23 | .header{ | ||
24 | background: #ffffff; | ||
25 | position: relative; | ||
26 | z-index: 100; | ||
27 | height: 80px; | ||
28 | } | ||
29 | .header .wrapper .logo{ | ||
30 | min-width: 100px; | ||
31 | padding: 0; | ||
32 | text-align: left; | ||
33 | float: left; | ||
34 | } | ||
35 | .header .wrapper .logo a{ | ||
36 | display: inline-block; | ||
37 | line-height: 80px; | ||
38 | } | ||
39 | .header .wrapper .logo a img{ | ||
40 | border: none; | ||
41 | vertical-align: middle; | ||
42 | } | ||
43 | .header .wrapper .nav{ | ||
44 | display: block; | ||
45 | position: relative; | ||
46 | width: auto; | ||
47 | background: none; | ||
48 | float: right; | ||
49 | } | ||
50 | .header .wrapper .nav ul.menu{ | ||
51 | list-style: none; | ||
52 | padding: 0; | ||
53 | margin: 0; | ||
54 | display: block; | ||
55 | height: 80px; | ||
56 | line-height: 80px; | ||
57 | } | ||
58 | |||
59 | .header .wrapper .nav ul.menu li{ | ||
60 | float: left; | ||
61 | display: inline-block; | ||
62 | height: 30px; | ||
63 | line-height: 30px; | ||
64 | margin: 40px 10px 10px 10px; | ||
65 | } | ||
66 | .header .wrapper .nav ul.menu li a{ | ||
67 | font-size: 0.9375rem; | ||
68 | display: block; | ||
69 | height: 30px; | ||
70 | width: 75px; | ||
71 | color: #1f8657; | ||
72 | font-weight: bold; | ||
73 | text-align: center; | ||
74 | } | ||
75 | .header .wrapper .nav ul.menu li a:hover, | ||
76 | .header .wrapper .nav ul.menu li a.active{ | ||
77 | color: #393939; | ||
78 | border-bottom: 2px solid #2aad6f; | ||
79 | } | ||
80 | .uptoshow{ | ||
81 | margin-top: 20px; | ||
82 | } | ||
83 | .uptoshow .leftrow, | ||
84 | .uptoshow .rightrow{ | ||
85 | float: left; | ||
86 | width: 50%; | ||
87 | } | ||
88 | .uptoshow .leftrow{ | ||
89 | text-align: right; | ||
90 | } | ||
91 | .uptoshow .rightrow{ | ||
92 | text-align: left; | ||
93 | } | ||
94 | .uptoshow .leftrow .wow{ | ||
95 | margin-top: 10px; | ||
96 | } | ||
97 | .uptoshow .leftrow .wow img{ | ||
98 | height: 40px; | ||
99 | margin-right: 15px; | ||
100 | } | ||
101 | .uptoshow .rightrow .wow img{ | ||
102 | max-width: 100%; | ||
103 | margin-left: 15px; | ||
104 | } | ||
105 | |||
106 | |||
107 | |||
108 | |||
109 | |||
110 | |||
111 | |||
112 | |||
113 | .navi-scroll{ | ||
114 | position: fixed; | ||
115 | right: 32px; | ||
116 | bottom: 32px; | ||
117 | width: 42px; | ||
118 | min-height: 74px; | ||
119 | z-index: 999; | ||
120 | } | ||
121 | .navi-scroll .navi-scroll-content { | ||
122 | position: relative; | ||
123 | text-align: center; | ||
124 | width: 100%; | ||
125 | height: 100%; | ||
126 | } | ||
127 | .navi-scroll .navi-scroll-content a { | ||
128 | width: 42px; | ||
129 | height: 36px; | ||
130 | display: block; | ||
131 | overflow: hidden; | ||
132 | position: relative; | ||
133 | background-color: #ededed; | ||
134 | } | ||
135 | .navi-scroll .navi-scroll-content a span { | ||
136 | width: 78px; | ||
137 | height: 36px; | ||
138 | color: #fff; | ||
139 | line-height: 36px; | ||
140 | font-size: 14px; | ||
141 | text-align: center; | ||
142 | display: none; | ||
143 | } | ||
144 | .navi-scroll .navi-scroll-content a i { | ||
145 | width: 20px; | ||
146 | height: 20px; | ||
147 | position: absolute; | ||
148 | right: 0; | ||
149 | top: 50%; | ||
150 | background-repeat: no-repeat; | ||
151 | background-position: center center; | ||
152 | } | ||
153 | .navi-scroll .navi-scroll-content .scroll-top-btn i { | ||
154 | width: 20px; | ||
155 | height: 20px; | ||
156 | margin-top: -10px; | ||
157 | right: 11px; | ||
158 | background-image: url("/images/icons/backtop-icon.png"); | ||
159 | } | ||
160 | .navi-scroll .navi-scroll-content .scroll-contact-btn i { | ||
161 | width: 18px; | ||
162 | height: 18px; | ||
163 | margin-top: -9px; | ||
164 | right: 12px; | ||
165 | background-image: url("/images/icons/contact-icon.png"); | ||
166 | } | ||
167 | .navi-scroll .navi-scroll-content .scroll-order-btn i { | ||
168 | width: 20px; | ||
169 | height: 20px; | ||
170 | margin-top: -9px; | ||
171 | right: 12px; | ||
172 | background-image: url("/images/icons/intent-icon.png"); | ||
173 | } | ||
174 | .navi-scroll .navi-scroll-content a:hover { | ||
175 | width: 120px; | ||
176 | margin-left: -78px; | ||
177 | background-color: #47b488; | ||
178 | } | ||
179 | .navi-scroll .navi-scroll-content a:hover span{ | ||
180 | display: block; | ||
181 | } | ||
182 | .navi-scroll .navi-scroll-content .scroll-top-btn:hover i { | ||
183 | background-image: url("/images/icons/backtop-icon-active.png"); | ||
184 | } | ||
185 | .navi-scroll .navi-scroll-content .scroll-contact-btn:hover i { | ||
186 | background-image: url("/images/icons/contact-icon-active.png"); | ||
187 | } | ||
188 | .navi-scroll .navi-scroll-content .scroll-order-btn:hover i { | ||
189 | background-image: url("/images/icons/intent-icon-active.png"); | ||
190 | } | ||
191 | .navi-scroll .navi-scroll-content .scroll-contact-btn, | ||
192 | .navi-scroll .navi-scroll-content .scroll-order-btn { | ||
193 | margin-bottom: 2px; | ||
194 | } | ||
195 | .ftcontact.wrapper.wechat{ | ||
196 | margin-top: 10px; | ||
197 | } | ||
198 | .ftcontact.wrapper{ | ||
199 | padding: 0; | ||
200 | } | ||
201 | .ftcontact .ftphoneicon{ | ||
202 | width: 67px; | ||
203 | height: 67px; | ||
204 | line-height: 67px; | ||
205 | background: #2aad6f; | ||
206 | border-radius: 50%; | ||
207 | text-align: center; | ||
208 | float: left; | ||
209 | } | ||
210 | .ftcontact .ftphoneicon span{ | ||
211 | background: url(http://www.oppo.com/cn/assets/images/sprite-icons.png); | ||
212 | width: 100%; | ||
213 | height: 100%; | ||
214 | display: inline-block; | ||
215 | background-position: -417px -1px; | ||
216 | background-repeat: no-repeat; | ||
217 | } | ||
218 | .ftcontact.wechat .ftphoneicon span{ | ||
219 | background-position: -420px -791px; | ||
220 | height: 50px; | ||
221 | margin-top: 10px; | ||
222 | } | ||
223 | .ftcontact .ftphoneinfo{ | ||
224 | text-align: left; | ||
225 | float: left; | ||
226 | margin-left: 15px; | ||
227 | } | ||
228 | .ftcontact .ftphoneinfo h4{ | ||
229 | font-size: 20px; | ||
230 | font-size: 1.25rem; | ||
231 | margin: 10px 0 5px 0; | ||
232 | color: #1f8657; | ||
233 | } | ||
234 | .ftcontact .ftphoneinfo p{ | ||
235 | margin: 0; | ||
236 | text-align: left; | ||
237 | } | ||
238 | .footer{ | ||
239 | padding: 50px 0; | ||
240 | background: #fff; | ||
241 | } | ||
242 | .footer .ftservice{ | ||
243 | height: 125px; | ||
244 | list-style-type: none; | ||
245 | overflow: hidden; | ||
246 | } | ||
247 | .footer .ftservice .item{ | ||
248 | display: inline-block; | ||
249 | width: 20%; | ||
250 | height: 125px; | ||
251 | zoom: 1; | ||
252 | position: relative; | ||
253 | float: left; | ||
254 | } | ||
255 | .footer .ftservice .item img{ | ||
256 | position: absolute; | ||
257 | width: 45px; | ||
258 | height: 45px; | ||
259 | top: 45px; | ||
260 | } | ||
261 | .footer .ftservice .item h5{ | ||
262 | position: absolute; | ||
263 | font-size: 18px; | ||
264 | font-weight: bold; | ||
265 | margin: 0; | ||
266 | top: 50px; | ||
267 | left: 50px; | ||
268 | color: rgb(54, 54, 54); | ||
269 | } | ||
270 | .footer .ftservice .item p{ | ||
271 | position: absolute; | ||
272 | color: rgb(152, 152, 152); | ||
273 | margin: 0; | ||
274 | font-size: 12px; | ||
275 | left: 50px; | ||
276 | bottom: 40px; | ||
277 | } | ||
278 | .line{ | ||
279 | background: #ededed; | ||
280 | height: 1px; | ||
281 | } | ||
282 | .footer .ftlinks{ | ||
283 | list-style-type: none; | ||
284 | margin-top: 20px; | ||
285 | } | ||
286 | .footer .ftlinks .ftlink{ | ||
287 | width: 20%; | ||
288 | display: inline-block; | ||
289 | float: left; | ||
290 | height: 200px; | ||
291 | } | ||
292 | .footer .ftlinks .ftlink .linktitle{ | ||
293 | display: inline-block; | ||
294 | padding: 0; | ||
295 | margin-bottom: 20px; | ||
296 | color: #1f8657; | ||
297 | font-size: 1.125rem; | ||
298 | font-weight: bold; | ||
299 | } | ||
300 | .footer .ftlinks .ftlink ul{ | ||
301 | padding: 0; | ||
302 | margin: 0; | ||
303 | list-style-type: none; | ||
304 | } | ||
305 | .footer .ftlinks .ftlink ul li{ | ||
306 | |||
307 | } | ||
308 | .footer .ftlinks .ftlink ul li a{ | ||
309 | margin: 10px 0; | ||
310 | display: block; | ||
311 | font-size: 15px; | ||
312 | font-size: 0.9375rem; | ||
313 | color: #7b7b7b; | ||
314 | } | ||
315 | .footer .ftlinks .ftlink ul li a:hover{ | ||
316 | color: #1f8657; | ||
317 | } | ||
318 | .footer .ftwarp{ | ||
319 | margin-top: 20px; | ||
320 | color: #7b7b7b; | ||
321 | font-size: 13px; | ||
322 | font-size: 0.8125rem; | ||
323 | } | ||
324 | .footer .ftwarp .copyright{ | ||
325 | width: 45%; | ||
326 | height: 50px; | ||
327 | float: left; | ||
328 | text-align: left; | ||
329 | } | ||
330 | .footer .ftwarp ul{ | ||
331 | width: 45%; | ||
332 | height: 50px; | ||
333 | float: right; | ||
334 | list-style-type: none; | ||
335 | margin: 0; | ||
336 | padding: 0; | ||
337 | } | ||
338 | .footer .ftwarp ul li{ | ||
339 | float: right; | ||
340 | margin-left: 15px; | ||
341 | } | ||
342 | .footer .ftwarp ul li a{ | ||
343 | color: #7b7b7b; | ||
344 | } | ||
345 | .footer .ftwarp ul li a:hover{ | ||
346 | color: #1f8657; | ||
347 | } | ||
348 | |||
349 | .pagination { | ||
350 | margin: 10px auto; | ||
351 | overflow: hidden; | ||
352 | padding: 10px 0; | ||
353 | } | ||
354 | .pagination li{ | ||
355 | display: inline-block; | ||
356 | margin: auto 2px; | ||
357 | } | ||
358 | .pagination li.disabled a{ | ||
359 | background-color: #cccccc; | ||
360 | } | ||
361 | .pagination li.active a{ | ||
362 | border: 1px solid #398439; | ||
363 | color: #ffffff; | ||
364 | background-color: #00AA91; | ||
365 | } | ||
366 | .pagination a { | ||
367 | border: 1px solid #cccccc; | ||
368 | color: #666666; | ||
369 | height: 26px; | ||
370 | line-height: 26px; | ||
371 | display: inline-block; | ||
372 | padding: 0 10px; | ||
373 | } | ||
374 | .pagination li.disabled a:hover, | ||
375 | .pagination li.disabled a:active{ | ||
376 | color: #666666; | ||
377 | } | ||
378 | .pagination a:hover, | ||
379 | .pagination a:active { | ||
380 | color: #990000; | ||
381 | } |
app/assets/stylesheets/website/default.css
0 → 100644
1 | .banner{ | ||
2 | overflow: hidden; | ||
3 | background-repeat: no-repeat; | ||
4 | -webkit-background-size: cover; | ||
5 | background-size: cover; | ||
6 | background-position: 50% 50%; | ||
7 | width:100%; | ||
8 | height: 300px; | ||
9 | position: relative; | ||
10 | } | ||
11 | .inside{ | ||
12 | padding-top: 50px; | ||
13 | } | ||
14 | .inside .inside-left{ | ||
15 | width: 25%; | ||
16 | float: left; | ||
17 | } | ||
18 | .inside .inside-left .top{ | ||
19 | height: 60px; | ||
20 | background: #2aad6f; | ||
21 | color: #ffffff; | ||
22 | text-align: center; | ||
23 | line-height: 60px; | ||
24 | font-size: 24px; | ||
25 | font-weight: bold; | ||
26 | } | ||
27 | .inside .inside-left ul{ | ||
28 | margin: 0; | ||
29 | list-style: none; | ||
30 | padding: 0; | ||
31 | } | ||
32 | .inside .inside-left ul li{ | ||
33 | padding: 0 10px; | ||
34 | margin-top: 10px; | ||
35 | border: 1px solid #ededed; | ||
36 | background: #ffffff; | ||
37 | height: 35px; | ||
38 | line-height: 35px; | ||
39 | } | ||
40 | .inside .inside-left ul li a{ | ||
41 | display: inline-block; | ||
42 | width: 100%; | ||
43 | height: 100%; | ||
44 | font-weight: bold; | ||
45 | color: #333333; | ||
46 | } | ||
47 | .inside .inside-left ul li:hover, | ||
48 | .inside .inside-left ul li.active{ | ||
49 | background: #2aad6f; | ||
50 | } | ||
51 | .inside .inside-left ul li:hover a, | ||
52 | .inside .inside-left ul li.active a{ | ||
53 | color: #ffffff; | ||
54 | } | ||
55 | .inside .inside-right{ | ||
56 | width: 75%; | ||
57 | float: left; | ||
58 | } | ||
59 | .inside .inside-right .detail{ | ||
60 | padding-left: 20px; | ||
61 | } | ||
62 | .inside .inside-right .detail .title{ | ||
63 | height: 40px; | ||
64 | border-bottom: 1px solid #ededed; | ||
65 | margin-bottom: 20px; | ||
66 | } | ||
67 | .inside .inside-right .detail .title h3{ | ||
68 | margin: 0; | ||
69 | } | ||
70 | .inside .inside-right .detail .title small{ | ||
71 | float: right; | ||
72 | } | ||
73 | .inside .inside-right .detail .title small a{ | ||
74 | color: #7b7b7b; | ||
75 | } | ||
76 | .inside .inside-right .detail .title small a:hover{ | ||
77 | color: #1f8657; | ||
78 | } | ||
79 | .inside .inside-right .detail .preview{ | ||
80 | |||
81 | } | ||
82 | .inside .inside-right .detail .preview .item{ | ||
83 | cursor: pointer; | ||
84 | margin-bottom: 50px; | ||
85 | position: relative; | ||
86 | height: 150px; | ||
87 | padding-bottom: 10px; | ||
88 | border-bottom: 1px solid #ccc; | ||
89 | } | ||
90 | .inside .inside-right .detail .preview .item img{ | ||
91 | max-width: 200px; | ||
92 | } | ||
93 | .inside .inside-right .detail .preview .item .posth4{ | ||
94 | position: absolute; | ||
95 | left: 220px; | ||
96 | top: 0; | ||
97 | margin: 0; | ||
98 | font-size: 18px; | ||
99 | } | ||
100 | .inside .inside-right .detail .preview .item .posth4 a{ | ||
101 | color: #1f8657; | ||
102 | } | ||
103 | .inside .inside-right .detail .preview .item .posth4 a:hover, | ||
104 | .inside .inside-right .detail .preview .item .posth4 a:visited{ | ||
105 | color: #1f8657; | ||
106 | } | ||
107 | .inside .inside-right .detail .preview .item .postdesc{ | ||
108 | position: absolute; | ||
109 | left: 220px; | ||
110 | top: 30px; | ||
111 | line-height: 22px; | ||
112 | } | ||
113 | .inside .inside-right .detail .preview p, | ||
114 | .inside .inside-right .detail .preview li{ | ||
115 | line-height: 30px; | ||
116 | margin: 0.5em auto; | ||
117 | } | ||
118 | .inside .inside-right .detail .preview li{ | ||
119 | line-height: 26px; | ||
120 | } | ||
121 | .inside .inside-right .detail .preview img{ | ||
122 | max-width: 100%; | ||
123 | } | ||
124 | .inside .inside-right .detail .preview .mp4 video, | ||
125 | .inside .inside-right .detail .preview .mp4 object, | ||
126 | .inside .inside-right .detail .preview .mp4 object img{ | ||
127 | width: 100%; | ||
128 | height: auto; | ||
129 | } | ||
130 | .inside .inside-right .detail .preview form .field{ | ||
131 | margin: auto auto 20px auto; | ||
132 | } | ||
133 | .inside .inside-right .detail .preview form .field label{ | ||
134 | width: 70px; | ||
135 | display: inline-block; | ||
136 | vertical-align: middle; | ||
137 | overflow: hidden; | ||
138 | font-size: 14px; | ||
139 | padding: 0 20px 0 0; | ||
140 | } | ||
141 | .inside .inside-right .detail .preview form .field input, | ||
142 | .inside .inside-right .detail .preview form .field textarea{ | ||
143 | width: 320px; | ||
144 | line-height: 20px; | ||
145 | border: 1px solid #2aad6f; | ||
146 | font-size: 12px; | ||
147 | padding: .5em .8em; | ||
148 | border-radius: 2px; | ||
149 | vertical-align: middle; | ||
150 | background: #ffffff; | ||
151 | } | ||
152 | .inside .inside-right .detail .preview form .field input.captcha{ | ||
153 | width: 160px; | ||
154 | } | ||
155 | .inside .inside-right .detail .preview form .field input.submit{ | ||
156 | width: 120px; | ||
157 | padding: 0 30px; | ||
158 | border: none; | ||
159 | color: #fff; | ||
160 | background-color: #2aad6f; | ||
161 | -webkit-border-radius: 3px; | ||
162 | -moz-border-radius: 3px; | ||
163 | border-radius: 3px; | ||
164 | line-height: 34px; | ||
165 | font-size: 14px; | ||
166 | cursor: pointer; | ||
167 | } | ||
168 | .inside .inside-right .detail .preview form .field textarea{ | ||
169 | height: 120px; | ||
170 | resize: none; | ||
171 | } |
app/assets/stylesheets/website/home.css
0 → 100644
1 | .captionOrange, .captionBlue, .captionBlack, .captionSymbol | ||
2 | { | ||
3 | display: block; | ||
4 | color: #fff; | ||
5 | /*font-size: 20px;*/ | ||
6 | font-size: 18px; | ||
7 | line-height: 30px; | ||
8 | text-align: center; | ||
9 | border-radius: 4px; | ||
10 | } | ||
11 | .captionOrange | ||
12 | { | ||
13 | background: #EB5100; | ||
14 | background-color: rgba(235, 81, 0, 0.6); | ||
15 | } | ||
16 | .captionBlue | ||
17 | { | ||
18 | background: #746FBD; | ||
19 | background-color: rgba(21, 21, 120, 0.6); | ||
20 | } | ||
21 | .captionBlack | ||
22 | { | ||
23 | background: #000; | ||
24 | background-color: rgba(0, 0, 0, 0.4); | ||
25 | } | ||
26 | .captionSymbol | ||
27 | { | ||
28 | border-radius: 100px !important; | ||
29 | font-weight: 400 !important; | ||
30 | font-size: 26px !important; | ||
31 | background: #000; | ||
32 | background-color: rgba(0, 0, 0, 0.4); | ||
33 | } | ||
34 | .captionTextBlack | ||
35 | { | ||
36 | display: block; | ||
37 | color: #000; | ||
38 | font-size: 20px; | ||
39 | line-height: 30px; | ||
40 | } | ||
41 | .captionTextWhite | ||
42 | { | ||
43 | display: block; | ||
44 | color: #fff; | ||
45 | font-size: 20px; | ||
46 | line-height: 30px; | ||
47 | } | ||
48 | a.captionOrange, a.captionOrange:active, a.captionOrange:visited,a.captionTextWhite, a.captionTextWhite:active, a.captionTextWhite:visited | ||
49 | { | ||
50 | color: #fff; | ||
51 | text-decoration: none; | ||
52 | } | ||
53 | a.captionOrange:hover | ||
54 | { | ||
55 | color: #eb5100; | ||
56 | text-decoration: underline; | ||
57 | background-color: #eeeeee; | ||
58 | background-color: rgba(238, 238, 238, 0.7); | ||
59 | } | ||
60 | a.captionTextBlack, a.captionTextBlack:active, a.captionTextBlack:visited | ||
61 | { | ||
62 | color: #000; | ||
63 | text-decoration: none; | ||
64 | } | ||
65 | a.captionTextWhite:hover | ||
66 | { | ||
67 | color: #eb5100; | ||
68 | text-decoration: underline; | ||
69 | } | ||
70 | a.captionTextBlack:hover | ||
71 | { | ||
72 | color: #eb5100; | ||
73 | text-decoration: underline; | ||
74 | } | ||
75 | .jssorb01 { | ||
76 | position: absolute; | ||
77 | } | ||
78 | .jssorb01 div, .jssorb01 div:hover, .jssorb01 .av { | ||
79 | position: absolute; | ||
80 | /* size of bullet elment */ | ||
81 | width: 12px; | ||
82 | height: 12px; | ||
83 | filter: alpha(opacity=70); | ||
84 | opacity: .7; | ||
85 | overflow: hidden; | ||
86 | cursor: pointer; | ||
87 | border: #000 1px solid; | ||
88 | } | ||
89 | .jssorb01 div { background-color: gray; } | ||
90 | .jssorb01 div:hover, .jssorb01 .av:hover { background-color: #d3d3d3; } | ||
91 | .jssorb01 .av { background-color: #fff; } | ||
92 | .jssorb01 .dn, .jssorb01 .dn:hover { background-color: #555555; } | ||
93 | .jssorb17 { | ||
94 | position: absolute; | ||
95 | } | ||
96 | .jssorb17 div, .jssorb17 div:hover, .jssorb17 .av { | ||
97 | position: absolute; | ||
98 | /* size of bullet elment */ | ||
99 | width: 16px; | ||
100 | height: 16px; | ||
101 | background: url(/images/banner/b17.png) no-repeat; | ||
102 | overflow: hidden; | ||
103 | cursor: pointer; | ||
104 | } | ||
105 | .jssorb17 div { background-position: -7px -7px; } | ||
106 | .jssorb17 div:hover, .jssorb17 .av:hover { background-position: -37px -7px; } | ||
107 | .jssorb17 .av { background-position: -67px -7px; } | ||
108 | .jssorb17 .dn, .jssorb17 .dn:hover { background-position: -97px -7px; } | ||
109 | .jssora05l, .jssora05r { | ||
110 | display: block; | ||
111 | position: absolute; | ||
112 | /* size of arrow element */ | ||
113 | width: 40px; | ||
114 | height: 40px; | ||
115 | cursor: pointer; | ||
116 | background: url(/images/banner/a17.png) no-repeat; | ||
117 | overflow: hidden; | ||
118 | } | ||
119 | .jssora05l { background-position: -10px -40px; } | ||
120 | .jssora05r { background-position: -70px -40px; } | ||
121 | .jssora05l:hover { background-position: -130px -40px; } | ||
122 | .jssora05r:hover { background-position: -190px -40px; } | ||
123 | .jssora05l.jssora05ldn { background-position: -250px -40px; } | ||
124 | .jssora05r.jssora05rdn { background-position: -310px -40px; } | ||
125 | |||
126 | .jssorb05 { | ||
127 | position: absolute; | ||
128 | } | ||
129 | .jssorb05 div, .jssorb05 div:hover, .jssorb05 .av { | ||
130 | position: absolute; | ||
131 | /* size of bullet elment */ | ||
132 | width: 16px; | ||
133 | height: 16px; | ||
134 | background: url(/images/banner/b05.png) no-repeat; | ||
135 | overflow: hidden; | ||
136 | cursor: pointer; | ||
137 | } | ||
138 | .jssorb05 div { background-position: -7px -7px; } | ||
139 | .jssorb05 div:hover, .jssorb05 .av:hover { background-position: -37px -7px; } | ||
140 | .jssorb05 .av { background-position: -67px -7px; } | ||
141 | .jssorb05 .dn, .jssorb05 .dn:hover { background-position: -97px -7px; } | ||
142 | |||
143 | .jssora22l, .jssora22r { | ||
144 | display: block; | ||
145 | position: absolute; | ||
146 | /* size of arrow element */ | ||
147 | width: 40px; | ||
148 | height: 58px; | ||
149 | cursor: pointer; | ||
150 | background: url(/images/banner/a22.png) center center no-repeat; | ||
151 | overflow: hidden; | ||
152 | } | ||
153 | .jssora22l { background-position: -10px -31px; } | ||
154 | .jssora22r { background-position: -70px -31px; } | ||
155 | .jssora22l:hover { background-position: -130px -31px; } | ||
156 | .jssora22r:hover { background-position: -190px -31px; } | ||
157 | .jssora22l.jssora22ldn { background-position: -250px -31px; } | ||
158 | .jssora22r.jssora22rdn { background-position: -310px -31px; } | ||
159 | |||
160 | .service .block{ | ||
161 | margin-bottom: 80px; | ||
162 | } | ||
163 | .service .block.blocklast{ | ||
164 | margin-bottom: 0px; | ||
165 | } | ||
166 | .service .block:after { | ||
167 | clear: both; | ||
168 | } | ||
169 | .service .block:before, .service .block:after { | ||
170 | display: table; | ||
171 | line-height: 0; | ||
172 | content: ""; | ||
173 | } | ||
174 | .service .block .imgblock{ | ||
175 | float: left; | ||
176 | margin-right: 20px; | ||
177 | } | ||
178 | .service .block .imgblock.r{ | ||
179 | margin-left: 20px; | ||
180 | float: right; | ||
181 | } | ||
182 | .service .block .imgblock img{ | ||
183 | -webkit-border-radius: 10px; | ||
184 | -moz-border-radius: 10px; | ||
185 | -ms-border-radius: 10px; | ||
186 | -o-border-radius: 10px; | ||
187 | border-radius: 10px; | ||
188 | } | ||
189 | .service .block .txtblock{ | ||
190 | /*float: left;*/ | ||
191 | } | ||
192 | .service .block .txtblock h3{ | ||
193 | font-size: 26px; | ||
194 | margin: 0; | ||
195 | opacity: .99; | ||
196 | text-transform: uppercase; | ||
197 | color: #475f75; | ||
198 | font-weight: normal; | ||
199 | } | ||
200 | .service .block .txtblock p{ | ||
201 | font-size: 15px; | ||
202 | margin: 10px 0 0; | ||
203 | line-height: 23px; | ||
204 | color: #666666; | ||
205 | font-weight: lighter; | ||
206 | } | ||
207 | /*.service .block .txtblock ul{ | ||
208 | display: block; | ||
209 | padding: 0; | ||
210 | list-style: outside; | ||
211 | width: 95%; | ||
212 | } | ||
213 | .service .block .txtblock ul li{ | ||
214 | font-size: 15px; | ||
215 | line-height: 23px; | ||
216 | display: list-item; | ||
217 | text-align: -webkit-match-parent; | ||
218 | color: #666666; | ||
219 | }*/ | ||
220 | |||
221 |
app/controllers/application_controller.rb
0 → 100644
1 | class ApplicationController < ActionController::Base | ||
2 | protect_from_forgery | ||
3 | |||
4 | before_filter :subdomain_filter, :key_words_filter | ||
5 | |||
6 | def key_words_filter | ||
7 | title_arr = ['诺正检测 | NORMZ TESTING'] | ||
8 | keywords_arr = ['诺正', '山东诺正', '诺正检测', '食品检测', '消防检测', '第三方检测', '环境检测', '农产品检测', '肉制品检测', 'CANS认证'] | ||
9 | # description | ||
10 | if (chan = params[:chan]).present? | ||
11 | @chan = Post::CATE[chan] # => {name: '招贤纳士', cate: {'shzp' => '社会招聘''xyzp' => '校园招聘'}} | ||
12 | @chan_name = @chan[:name] | ||
13 | @cates = @chan[:cate] # 找到当前频道下的所有类别, 用作左侧导航 | ||
14 | @cate_name = @cates[params[:cate]] # 当前类别的中文名称 | ||
15 | title_arr.unshift(@chan_name) if @chan_name.present? | ||
16 | title_arr.unshift(@cate_name) if @cate_name | ||
17 | end | ||
18 | @title = title_arr.join(" - ") | ||
19 | @keywords = keywords_arr.join(",") | ||
20 | # @description = "诺正检测是独立的第三方检测公司,具有省级资质及农业行业机构的认证,主要从事食品检测、消防检测、环境检测及农产品、饲料、肥料、水产养殖、畜牧产品等领域的检验检测,以及相关技术咨询、培训、研发。" | ||
21 | @description = "诺正检测是在中国科学院沈阳应用生态研究所技术支持下成立的综合性第三方检测公司,是通过山东省级资质认定及农业行业机构认证的第三方检验机构,主要从事食品、农产品、环境、饲料、肥料及水产养殖、畜牧产品、消防设施等领域的检验检测,以及相关技术咨询、培训、研发。" | ||
22 | end | ||
23 | |||
24 | def subdomain_filter | ||
25 | subdomain = request.subdomain | ||
26 | ismobile = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.match(request.user_agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.match(request.user_agent[0..3]) | ||
27 | # 不存在www的情况 subdomain != 'www' | ||
28 | if params[:type] != 'api' | ||
29 | if Rails.env.production? and ismobile and subdomain.blank? | ||
30 | # redirect_to 'http://h5.normz.cn/#/app/' + request.path | ||
31 | url = request.url.to_s.sub('normz.cn/', 'h5.normz.cn/#/app/') | ||
32 | if url == 'http://h5.normz.cn/#/app/' | ||
33 | url = 'http://h5.normz.cn/#/app/home' | ||
34 | end | ||
35 | redirect_to url | ||
36 | end | ||
37 | # if subdomain.present? and !@ismobile | ||
38 | # redirect_to request.url.to_s.sub('h5.localhost:3001/#/', 'localhost:3001/') | ||
39 | # end | ||
40 | end | ||
41 | end | ||
42 | end |
app/controllers/home_controller.rb
0 → 100644
1 | class HomeController < ApplicationController | ||
2 | def index | ||
3 | end | ||
4 | |||
5 | # /:chan/:cate/:flag | ||
6 | def show | ||
7 | if @cate.blank? | ||
8 | @cate = params[:cate] || @cates.keys[0]# 如果没有类别, 默认第一个为当前类别 | ||
9 | @cate_name = @cates[@cate]# 当前类别的中文名称 | ||
10 | end | ||
11 | |||
12 | @posts = Post.where(isdel: false, chan: params[:chan], cate: @cate).page(params[:page]).per(5).order('id desc') | ||
13 | unless params[:page].to_i > 1 | ||
14 | @post = @posts.first if @posts.length == 1 | ||
15 | @post = @posts.find_by_flag(params[:flag]) if params[:flag].present? | ||
16 | # 网页关键词 | ||
17 | if @post and @post.words | ||
18 | keywords = @post.words.split(",") + @keywords.split(",") | ||
19 | keystr = keywords.uniq.join(",") | ||
20 | if keystr.length > 100 # 如果长度大于200截取, 删掉最后一个 | ||
21 | keywords = keystr[0..100].split(",") | ||
22 | keywords.pop | ||
23 | keystr = keywords.join(',') | ||
24 | end | ||
25 | @keywords = keystr | ||
26 | if params[:flag].present? | ||
27 | @title = @post.title + " 诺正检测 | NORMZ TESTING" | ||
28 | end | ||
29 | end | ||
30 | end | ||
31 | |||
32 | if params[:type] == 'api' | ||
33 | posts = @posts.map do |post| | ||
34 | img = post.detail.scan(/<img[^>]+src\s*=\s*(['\"][^'\"]+['\"])[^>]*>/).flatten.first.gsub(/\"/, '') rescue '/images/default_200x150.jpg' | ||
35 | detail = post.detail.gsub(/<\/?.*?>/,"")[0..120] | ||
36 | {title: post.title, flag: post.flag, detail: post.detail, sub_detail: detail, img: img} | ||
37 | end | ||
38 | post = {title: @post.title, flag: @post.flag, detail: @post.detail} if @post | ||
39 | render json: {code: 200, posts: posts, post: post} | ||
40 | end | ||
41 | end | ||
42 | end | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
app/controllers/mobile_controller.rb
0 → 100644
app/controllers/posts_controller.rb
0 → 100644
1 | class PostsController < ApplicationController | ||
2 | |||
3 | before_filter :current_user, except: [:sign_in] | ||
4 | # GET /posts | ||
5 | # GET /posts.json | ||
6 | def index | ||
7 | sort = [] | ||
8 | params[:screa] ||= 'desc' | ||
9 | {scate: :cate, schan: :chan, screa: :created_at}.each do |key, val| | ||
10 | if params[key].present? | ||
11 | sort.push(params[key] == "desc" ? "#{val} desc" : "#{val} asc") | ||
12 | end | ||
13 | end | ||
14 | @posts = Post.where(isdel: false).page(params[:page]).per(20).order(sort.join(', ')) | ||
15 | |||
16 | respond_to do |format| | ||
17 | format.html # index.html.erb | ||
18 | format.json { render json: @posts } | ||
19 | end | ||
20 | end | ||
21 | |||
22 | # GET /posts/1 | ||
23 | # GET /posts/1.json | ||
24 | def show | ||
25 | @post = Post.find_by_flag(params[:id]) | ||
26 | |||
27 | respond_to do |format| | ||
28 | format.html # show.html.erb | ||
29 | format.json { render json: @post } | ||
30 | end | ||
31 | end | ||
32 | |||
33 | # GET /posts/new | ||
34 | # GET /posts/new.json | ||
35 | def new | ||
36 | @post = Post.new | ||
37 | |||
38 | respond_to do |format| | ||
39 | format.html # new.html.erb | ||
40 | format.json { render json: @post } | ||
41 | end | ||
42 | end | ||
43 | |||
44 | # GET /posts/1/edit | ||
45 | def edit | ||
46 | @post = Post.find_by_flag(params[:id]) | ||
47 | end | ||
48 | |||
49 | # POST /posts | ||
50 | # POST /posts.json | ||
51 | def create | ||
52 | @post = Post.new(params[:post]) | ||
53 | |||
54 | respond_to do |format| | ||
55 | if @post.save | ||
56 | format.html { redirect_to @post, notice: '文章创建成功.' } | ||
57 | format.json { render json: @post, status: :created, location: @post } | ||
58 | else | ||
59 | format.html { render action: "new" } | ||
60 | format.json { render json: @post.errors, status: :unprocessable_entity } | ||
61 | end | ||
62 | end | ||
63 | end | ||
64 | |||
65 | # PUT /posts/1 | ||
66 | # PUT /posts/1.json | ||
67 | def update | ||
68 | @post = Post.find_by_flag(params[:id]) | ||
69 | |||
70 | respond_to do |format| | ||
71 | if @post.update_attributes(params[:post]) | ||
72 | format.html { redirect_to @post, notice: '文章修改成功.' } | ||
73 | format.json { head :no_content } | ||
74 | else | ||
75 | format.html { render action: "edit" } | ||
76 | format.json { render json: @post.errors, status: :unprocessable_entity } | ||
77 | end | ||
78 | end | ||
79 | end | ||
80 | |||
81 | # DELETE /posts/1 | ||
82 | # DELETE /posts/1.json | ||
83 | def destroy | ||
84 | @post = Post.find_by_flag(params[:id]) | ||
85 | @post.update_attributes(isdel: true) if @post | ||
86 | |||
87 | redirect_to :back | ||
88 | end | ||
89 | |||
90 | # 上传图片 | ||
91 | def upload | ||
92 | if params[:upload_file].present? | ||
93 | upload = params[:upload_file] | ||
94 | ext = File.extname(upload.original_filename).downcase | ||
95 | picture = Picture.create(filename: upload.original_filename) | ||
96 | system("convert #{upload.tempfile.path} -auto-orient -resize '1000>' -gravity center -strip -quality 85 -format jpg public/uploads/#{picture.id}.jpg") | ||
97 | # 有一个2:1.5的缩略图裁剪 最宽200 | ||
98 | # File.open("public/uploads/#{picture.id}#{ext}", "wb") { |f| f.write(upload.read) } | ||
99 | render json: {success: true, msg: '上传成功', file_path: "/uploads/#{picture.id}.jpg"} | ||
100 | else | ||
101 | render json: {success: false, msg: '上传错误,联系管理员', file_path: '/images/logo.png'} | ||
102 | end | ||
103 | end | ||
104 | |||
105 | def sign_in | ||
106 | if request.post? | ||
107 | if params[:username] == 'normz' and params[:password] == 'normz-nuozheng' | ||
108 | session[:current_user] = 'normz' | ||
109 | redirect_to posts_path | ||
110 | else | ||
111 | flash[:notice] = '账号或密码错误' | ||
112 | redirect_to :sign_in | ||
113 | end | ||
114 | end | ||
115 | end | ||
116 | |||
117 | def sign_out | ||
118 | session[:current_user] = nil | ||
119 | redirect_to root_path | ||
120 | end | ||
121 | |||
122 | private | ||
123 | |||
124 | def current_user | ||
125 | unless session[:current_user] == 'normz' | ||
126 | redirect_to :sign_in and return | ||
127 | end | ||
128 | end | ||
129 | end |
app/helpers/application_helper.rb
0 → 100644
app/helpers/posts_helper.rb
0 → 100644
app/mailers/.gitkeep
0 → 100644
File mode changed
app/models/.gitkeep
0 → 100644
File mode changed
app/models/picture.rb
0 → 100644
app/models/post.rb
0 → 100644
1 | class Post < ActiveRecord::Base | ||
2 | attr_accessible :title, :flag, :detail, :chan, :cate, :words, :parent_id, :isdel | ||
3 | |||
4 | CATE = { | ||
5 | 'ranges' => { | ||
6 | name: '诺正业务', | ||
7 | cate: { | ||
8 | # 'kyly' => '科研领域', | ||
9 | 'spncp' => '食品/农产品检测', | ||
10 | # 'ncpjc' => '农产品检测', | ||
11 | # 'rzpjc' => '肉制品检测', | ||
12 | 'hjjc' => '环境检测', | ||
13 | # 'swjc' => '生物检测', | ||
14 | # 'yyjc' => '医药检测', | ||
15 | 'xfjc' => '消防检测', | ||
16 | 'rhpjc' => '日化品检测', | ||
17 | 'hfsl' => '化肥/饲料检测', | ||
18 | 'sfjd' => '环境损害司法鉴定', | ||
19 | # 'jtjjc' => '添加剂检测', | ||
20 | } | ||
21 | }, | ||
22 | 'sources' => { | ||
23 | name: '资源中心', | ||
24 | cate: { | ||
25 | # 'zscx' => '证书查询', | ||
26 | 'bgcx' => '报告查询', | ||
27 | 'wssj' => '网上送检' | ||
28 | } | ||
29 | }, | ||
30 | 'dynamics' => { | ||
31 | name: '诺正动态', | ||
32 | cate: { | ||
33 | 'gsdt' => '公司动态', | ||
34 | 'hykx' => '行业快讯', | ||
35 | 'pxxx' => '培训学习' | ||
36 | } | ||
37 | }, | ||
38 | 'cultures' => { | ||
39 | name: '诺正文化', | ||
40 | cate: { | ||
41 | 'jzg' => '诺正价值观', | ||
42 | # 'hj' => '诺正环境', | ||
43 | # 'yj' => '诺正愿景', | ||
44 | # 'ygfc' => '员工风采', | ||
45 | # 'zd' => '诺正制度', | ||
46 | 'js' => '诺正精神' | ||
47 | } | ||
48 | }, | ||
49 | 'abouts' => { | ||
50 | name: '关于诺正', | ||
51 | cate: { | ||
52 | 'gsjj' => '公司简介', | ||
53 | 'jclc' => '检测流程', | ||
54 | 'yjss' => '硬件设施', | ||
55 | 'fwcn' => '服务承诺', | ||
56 | # 'lxwm' => '联系我们' | ||
57 | } | ||
58 | }, | ||
59 | 'contact' => { | ||
60 | name: '联系我们', | ||
61 | cate: { | ||
62 | 'lxdz' => '联系地址' | ||
63 | } | ||
64 | }, | ||
65 | 'jobs' => { | ||
66 | name: '招贤纳士', | ||
67 | cate: { | ||
68 | 'shzp' => '社会招聘', | ||
69 | 'xyzp' => '校园招聘' | ||
70 | } | ||
71 | } | ||
72 | } | ||
73 | |||
74 | BaseArr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] | ||
75 | |||
76 | validates_presence_of :title, :detail, :chan, :cate, message: '不能为空' | ||
77 | validates_uniqueness_of :flag, allow_blank: true, message: '已存在' | ||
78 | |||
79 | def to_param | ||
80 | flag | ||
81 | end | ||
82 | |||
83 | def flag=(val) | ||
84 | if flag.blank? | ||
85 | write_attribute(:flag, val.blank? ? shorturl : val) | ||
86 | else | ||
87 | if flag != val and val.present? | ||
88 | write_attribute(:flag, val) | ||
89 | end | ||
90 | end | ||
91 | end | ||
92 | |||
93 | def shorturl | ||
94 | hex = Digest::MD5.hexdigest("base_key" + Time.now.to_f.to_s) | ||
95 | output = [] | ||
96 | 4.times do |i| | ||
97 | str = hex[(i * 8)...(8 * (i + 1))] | ||
98 | int = 0x3FFFFFFF & ('0x' + str).to_i(16) | ||
99 | out = '' | ||
100 | 6.times do | ||
101 | out += BaseArr[0x0000003D & int] | ||
102 | int = int >> 5 | ||
103 | end | ||
104 | output << out | ||
105 | end | ||
106 | output.sort_by{rand}[0] | ||
107 | end | ||
108 | end |
app/views/home/_banner.html.erb
0 → 100644
This diff is collapsed.
Click to expand it.
app/views/home/_chart.html.erb
0 → 100644
This diff is collapsed.
Click to expand it.
app/views/home/_range.html.erb
0 → 100644
1 | <div class="detectype wrapper"> | ||
2 | <h2>检测范围</h2> | ||
3 | <div class="detectrange left_to_right mb"> | ||
4 | <div class="mask"> | ||
5 | <h3>图表展示</h3> | ||
6 | <p>详细内容/跳转检测业务/详细描述页</p> | ||
7 | </div> | ||
8 | <div class="detecticon detectfood"></div> | ||
9 | <div class="detecttext"> | ||
10 | <h5>农产品检测</h5> | ||
11 | <p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、营养含量等</p> | ||
12 | </div> | ||
13 | </div> | ||
14 | <div class="detectrange left_to_right mb"> | ||
15 | <div class="mask"> | ||
16 | <h3><a href="javascript:void(0);">图表展示</a></h3> | ||
17 | <p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p> | ||
18 | </div> | ||
19 | <div class="detecticon detectmeat"></div> | ||
20 | <div class="detecttext"> | ||
21 | <h5>肉制品检测</h5> | ||
22 | <p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p> | ||
23 | </div> | ||
24 | </div> | ||
25 | <div class="detectrange left_to_right mb"> | ||
26 | <div class="mask"> | ||
27 | <h3><a href="javascript:void(0);">图表展示</a></h3> | ||
28 | <p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p> | ||
29 | </div> | ||
30 | <div class="detecticon detectmilieu"></div> | ||
31 | <div class="detecttext"> | ||
32 | <h5>环境检测</h5> | ||
33 | <p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p> | ||
34 | </div> | ||
35 | </div> | ||
36 | <div class="detectrange left_to_right mb l"> | ||
37 | <div class="mask"> | ||
38 | <h3><a href="javascript:void(0);">图表展示</a></h3> | ||
39 | <p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p> | ||
40 | </div> | ||
41 | <div class="detecticon detectfire"></div> | ||
42 | <div class="detecttext"> | ||
43 | <h5>消防检测</h5> | ||
44 | <p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p> | ||
45 | </div> | ||
46 | </div> | ||
47 | <div class="detectrange left_to_right"> | ||
48 | <div class="mask"> | ||
49 | <h3>图表展示</h3> | ||
50 | <p>详细内容/跳转检测业务/详细描述页</p> | ||
51 | </div> | ||
52 | <div class="detecticon detectfeiliao"></div> | ||
53 | <div class="detecttext"> | ||
54 | <h5>肥料检测</h5> | ||
55 | <p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p> | ||
56 | </div> | ||
57 | </div> | ||
58 | <div class="detectrange left_to_right"> | ||
59 | <div class="mask"> | ||
60 | <h3><a href="javascript:void(0);">图表展示</a></h3> | ||
61 | <p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p> | ||
62 | </div> | ||
63 | <div class="detecticon detectsiliao"></div> | ||
64 | <div class="detecttext"> | ||
65 | <h5>饲料检测</h5> | ||
66 | <p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p> | ||
67 | </div> | ||
68 | </div> | ||
69 | |||
70 | <div class="detectrange left_to_right"> | ||
71 | <div class="mask"> | ||
72 | <h3><a href="javascript:void(0);">图表展示</a></h3> | ||
73 | <p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p> | ||
74 | </div> | ||
75 | <div class="detecticon detectshipin"></div> | ||
76 | <div class="detecttext"> | ||
77 | <h5>食品检测</h5> | ||
78 | <p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p> | ||
79 | </div> | ||
80 | </div> | ||
81 | <div class="detectrange left_to_right l"> | ||
82 | <div class="mask"> | ||
83 | <h3><a href="javascript:void(0);">图表展示</a></h3> | ||
84 | <p><a href="javascript:void(0);">详细内容/跳转检测业务/详细描述页</a></p> | ||
85 | </div> | ||
86 | <div class="detecticon detectshuichan"></div> | ||
87 | <div class="detecttext"> | ||
88 | <h5>水产品检测</h5> | ||
89 | <p>诺正检测具备省级检测资质, 检测范围涵盖农药残留、化学品含量等</p> | ||
90 | </div> | ||
91 | </div> | ||
92 | </div> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
app/views/home/_service.html.erb
0 → 100644
1 | <div class="service wrapper"> | ||
2 | <h2>服务宗旨</h2> | ||
3 | <div class="block wow bounceInLeft"> | ||
4 | <div class="imgblock" data-wow-delay="0.1s"> | ||
5 | <img src="/images/jcrange/mubiao.jpg" alt="图片"> | ||
6 | </div> | ||
7 | <div class="txtblock"> | ||
8 | <h3>质量方针</h3> | ||
9 | <p> | ||
10 | 诚信、公正、科学、高效地保证质量第一。<br> | ||
11 | 坚持秉公检验,保证良好的职业规范和职业道德。<br> | ||
12 | 坚持信誉至上,保守秘密,确保客户权益。<br> | ||
13 | 坚持科学管理,保证资源,切实执行规范程序。<br> | ||
14 | 坚持高效服务,保证准确及时出具检验报告。<br> | ||
15 | 坚持服务质量第一、体系运行质量第一。<br> | ||
16 | </p> | ||
17 | <h3 style="margin-top:20px;">质量目标</h3> | ||
18 | <p> | ||
19 | 全年测试项目错误率不大于1‰。<br> | ||
20 | 报告及时率不低于99%。<br> | ||
21 | 客户投诉率不大于1%、投诉处理率100%。 | ||
22 | </p> | ||
23 | </div> | ||
24 | </div> | ||
25 | <div class="block wow bounceInRight"> | ||
26 | <div class="imgblock r"> | ||
27 | <img src="/images/jcrange/shangyang.jpg" alt="图片"> | ||
28 | </div> | ||
29 | <div class="txtblock"> | ||
30 | <h3>科学速检</h3> | ||
31 | <p>中科院沈阳生态应用研究所是中国农产品检测标准的制定者, 也是国内农产品检测技术最前沿的团队。</p> | ||
32 | <p>诺正检测与中科院沈阳生态应用研究所深入合作, 强强联手, 培养了大批国内顶尖的检测人员服务于诺正检测。并且公司购入大量进口的先进检测设备, 保证检测的权威, 公正, 科学性。</p> | ||
33 | </div> | ||
34 | </div> | ||
35 | <div class="block blocklast"> | ||
36 | <div class="imgblock wow bounceInLeft"> | ||
37 | <img src="/images/jcrange/kexuegongzheng.jpg" alt="图片"> | ||
38 | </div> | ||
39 | <div class="txtblock wow bounceInRight"> | ||
40 | <h3>服务承诺</h3> | ||
41 | <p>本公司具有第三方实验室的地位,检测工作不受任何来自内、外部的不正当的行政干预、商业利润和其它方面压力的影响。不生产、不经营所检验的产品,不和被检测单位发生利益冲突。</p> | ||
42 | <p>本公司严格遵守保密原则,保证不泄漏用户技术资料和检测结果。保证完善质量体系,提高检测水平和管理水平,在确保检验报告的真实和准确的前提下,使客户满意率达到100%。</p> | ||
43 | </div> | ||
44 | </div> | ||
45 | </div> |
app/views/home/index.html.erb
0 → 100644
app/views/home/show.html.erb
0 → 100644
1 | <% if params[:chan] == 'cultures' or params[:chan] == 'dynamics' %> | ||
2 | <div class="banner" style="background-image: url(/images/banner/<%= params[:chan] %>.jpg?v=1);"></div> | ||
3 | <% else %> | ||
4 | <div class="banner" style="background-image: url(/images/banner/banner.jpg?v=1);"></div> | ||
5 | <% end %> | ||
6 | |||
7 | <div class="inside wrapper"> | ||
8 | <div class="inside-left"> | ||
9 | <div class="top"><%= @chan_name %></div> | ||
10 | <ul> | ||
11 | <% @cates.each do |key, val| %> | ||
12 | <% if key.eql?(@cate) %> | ||
13 | <li class="active"> | ||
14 | <%= link_to val, {controller: :home, action: :show, chan: params[:chan], cate: key} %> | ||
15 | </li> | ||
16 | <% else %> | ||
17 | <li> | ||
18 | <%= link_to val, {controller: :home, action: :show, chan: params[:chan], cate: key} %> | ||
19 | </li> | ||
20 | <% end %> | ||
21 | <% end %> | ||
22 | </ul> | ||
23 | </div> | ||
24 | <div class="inside-right"> | ||
25 | <div class="detail"> | ||
26 | <div class="title"> | ||
27 | <h3><%= @post.try(:title) || @cate_name %></h3> | ||
28 | <small> | ||
29 | <%= link_to '首页', root_path %> | ||
30 | - | ||
31 | <%= link_to @chan_name, controller: :home, action: :show, chan: params[:chan] %> | ||
32 | - | ||
33 | <%= link_to @cate_name, controller: :home, action: :show, chan: params[:chan], cate: @cate %> | ||
34 | <% if params[:flag].present? %> | ||
35 | - | ||
36 | <%= link_to @post.title, 'javascript:void(0);' %> | ||
37 | <% end %> | ||
38 | </small> | ||
39 | </div> | ||
40 | <div class="preview"> | ||
41 | <% if @post %> | ||
42 | <%= @post.detail.html_safe %> | ||
43 | <% else %> | ||
44 | <% @posts.each do |post| %> | ||
45 | <div class="item"> | ||
46 | <% img_path = post.detail.scan(/<img[^>]+src\s*=\s*(['\"][^'\"]+['\"])[^>]*>/).flatten.first.gsub(/\"/, '') rescue '/images/default_200x150.jpg' %> | ||
47 | <img src="<%= img_path %>" alt="默认图片" class="pic"> | ||
48 | <h4 class="posth4"> | ||
49 | <%= link_to post.title, controller: :home, action: :show, chan: params[:chan], cate: @cate, flag: post.flag %> | ||
50 | </h4> | ||
51 | <div class="postdesc"> | ||
52 | <%= truncate(post.detail.gsub(/<\/?.*?>/,""), length: 120) %> | ||
53 | </div> | ||
54 | </div> | ||
55 | <% end %> | ||
56 | <%= paginate @posts %> | ||
57 | <% end %> | ||
58 | </div> | ||
59 | </div> | ||
60 | </div> | ||
61 | </div> |
app/views/kaminari/_first_page.html.erb
0 → 100644
app/views/kaminari/_gap.html.erb
0 → 100644
app/views/kaminari/_last_page.html.erb
0 → 100644
app/views/kaminari/_next_page.html.erb
0 → 100644
1 | <% if current_page.last? %> | ||
2 | <li class="disabled"> | ||
3 | <%= link_to raw(t 'views.pagination.next'), 'javascript:void(0);', :rel =>'next' %> | ||
4 | </li> | ||
5 | <% else %> | ||
6 | <li> | ||
7 | <%= link_to raw(t 'views.pagination.next'), url, :rel =>'next', :remote => remote %> | ||
8 | </li> | ||
9 | <% end %> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
app/views/kaminari/_page.html.erb
0 → 100644
app/views/kaminari/_paginator.html.erb
0 → 100644
1 | <%= paginator.render do -%> | ||
2 | <ul class="pagination<%= " page#{size}" if defined?(size) %> text-center"> | ||
3 | <%= first_page_tag %> | ||
4 | <%= prev_page_tag %> | ||
5 | <% each_page do |page| -%> | ||
6 | <% if page.left_outer? || page.right_outer? || page.inside_window? -%> | ||
7 | <%= page_tag page %> | ||
8 | <% elsif !page.was_truncated? -%> | ||
9 | <%= gap_tag %> | ||
10 | <% end -%> | ||
11 | <% end -%> | ||
12 | <%= next_page_tag %> | ||
13 | <%= last_page_tag %> | ||
14 | </ul> | ||
15 | <% end -%> |
app/views/kaminari/_prev_page.html.erb
0 → 100644
app/views/layouts/application.html.erb
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title><%= @title %></title> | ||
5 | <meta name="keywords" content="<%= @keywords %>"> | ||
6 | <meta name="description" content="<%= @description %>"> | ||
7 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
8 | <meta http-equiv="content-type" content="text/html;charset=utf-8"> | ||
9 | <link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"> | ||
10 | <%= stylesheet_link_tag "application", :media => "all" %> | ||
11 | <%= javascript_include_tag "application" %> | ||
12 | <%= csrf_meta_tags %> | ||
13 | </head> | ||
14 | <body> | ||
15 | <%= render 'shared/header' %> | ||
16 | <%= yield %> | ||
17 | <%= render 'shared/footer' %> | ||
18 | <div class="navi-scroll" style="display: block;"> | ||
19 | <div class="navi-scroll-content"> | ||
20 | <a href="/abouts/lxwm" class="scroll-contact-btn"> | ||
21 | <span>联系我们</span> | ||
22 | <i></i> | ||
23 | </a> | ||
24 | <a href="/sources/wssj" class="scroll-order-btn"> | ||
25 | <span>我要送检</span> | ||
26 | <i></i> | ||
27 | </a> | ||
28 | <a href="javascript:void(0);" class="scroll-top-btn" id="to-top"> | ||
29 | <span>回到顶部</span> | ||
30 | <i></i> | ||
31 | </a> | ||
32 | </div> | ||
33 | </div> | ||
34 | <script src="/javascripts/initialize.js" type="text/javascript"></script> | ||
35 | </body> | ||
36 | </html> |
app/views/layouts/mobile.html.erb
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title><%= @title %></title> | ||
5 | <meta charset="utf-8"> | ||
6 | <meta name="keywords" content="<%= @keywords %>"> | ||
7 | <meta name="description" content="<%= @description %>"> | ||
8 | <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | ||
9 | |||
10 | <script> | ||
11 | window.CHANNELS = <%= raw Post::CATE.to_json %>; | ||
12 | </script> | ||
13 | <%= stylesheet_link_tag "mobile", :media => "all" %> | ||
14 | <script src="/javascripts/mobile/ionic.bundle.js"></script> | ||
15 | <script src="/javascripts/mobile/ion-gallery.js"></script> | ||
16 | <script src="/javascripts/mobile/app.js"></script> | ||
17 | <script src="/javascripts/mobile/controllers.js"></script> | ||
18 | <%= csrf_meta_tags %> | ||
19 | </head> | ||
20 | <body ng-app="starter"> | ||
21 | <ion-nav-view></ion-nav-view> | ||
22 | </body> | ||
23 | </html> |
app/views/layouts/posts.html.erb
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>诺正检测 | NORMZ TESTING</title> | ||
5 | <meta name="keywords" content="诺正检测,农产品检测,肉制品检测,消防检测,环境检测,CANS认证"> | ||
6 | <meta name="description" content="诺正检测是在中国科学院沈阳应用生态研究所技术支持下成立的综合性检测公司,是通过山东省级资质认定及农业行业机构认证的第三方检验机构,主要从事食品、农产品、环境、饲料、肥料及水产养殖、畜牧产品、消防设施等领域的检验检测,以及相关技术咨询、培训、研发。"> | ||
7 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | ||
8 | <meta http-equiv="content-type" content="text/html;charset=utf-8"> | ||
9 | <link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"> | ||
10 | <%= stylesheet_link_tag "admin", :media => "all" %> | ||
11 | <%= javascript_include_tag "application" %> | ||
12 | <link rel="stylesheet" type="text/css" href="/stylesheets/simditor.css" /> | ||
13 | <script type="text/javascript" src="/javascripts/simditor/module.js"></script> | ||
14 | <script type="text/javascript" src="/javascripts/simditor/uploader.js"></script> | ||
15 | <script type="text/javascript" src="/javascripts/simditor/hotkeys.js"></script> | ||
16 | <script type="text/javascript" src="/javascripts/simditor/simditor.js"></script> | ||
17 | <script type="text/javascript" src="/javascripts/simditor/mobilecheck.js"></script> | ||
18 | <%= csrf_meta_tags %> | ||
19 | </head> | ||
20 | <body> | ||
21 | <div class="posts"> | ||
22 | <%= yield %> | ||
23 | </div> | ||
24 | <script type="text/javascript"> | ||
25 | $(function(){ | ||
26 | var cate = <%= Post::CATE.to_json.html_safe %>; | ||
27 | $(document).on("change", "#post_chan", function(){ | ||
28 | var _val = cate[$(this).val()]['cate']; | ||
29 | var _str = ''; | ||
30 | for(var k in _val){ | ||
31 | _str += '<option value="' + k + '">' + _val[k] + '</option>'; | ||
32 | } | ||
33 | $("#post_cate").html(_str); | ||
34 | }) | ||
35 | }) | ||
36 | </script> | ||
37 | </body> | ||
38 | </html> |
app/views/mobile/index.html.erb
0 → 100644
File mode changed
app/views/posts/_form.html.erb
0 → 100644
1 | <%= form_for(@post) do |f| %> | ||
2 | <% if @post.errors.any? %> | ||
3 | <div id="error_explanation"> | ||
4 | <h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2> | ||
5 | <ul> | ||
6 | <% @post.errors.full_messages.each do |msg| %> | ||
7 | <li><%= msg %></li> | ||
8 | <% end %> | ||
9 | </ul> | ||
10 | </div> | ||
11 | <% end %> | ||
12 | <div class="field"> | ||
13 | <span><%= f.label :title, '标题' %></span> | ||
14 | <%= f.text_field :title, placeholder: '标题 30字以内 不能为空' %> | ||
15 | </div> | ||
16 | <div class="field"> | ||
17 | <span><%= f.label :flag, '别名' %></span> | ||
18 | <%= f.text_field :flag, placeholder: '可以不填让系统自动生成' %> | ||
19 | </div> | ||
20 | <div class="field"> | ||
21 | <span><%= f.label :words, '关键词' %></span> | ||
22 | <%= f.text_field :words, placeholder: '英文逗号隔开,' %> | ||
23 | </div> | ||
24 | <div class="field"> | ||
25 | <span><%= f.label :chan, '频道' %></span> | ||
26 | <%= f.select :chan, Hash[Post::CATE.map{|k, v| [v[:name], k]}] %> | ||
27 | | ||
28 | | ||
29 | <span><%= f.label :cate, '类别' %></span> | ||
30 | <%= f.select :cate, Post::CATE[@post.try(:chan) || Post::CATE.keys.first][:cate].invert %> | ||
31 | </div> | ||
32 | <% if params[:source] == 'edit' %> | ||
33 | <%= f.text_area :detail, style: "border: 1px solid #c9d8db;width:100%;height:400px;" %> | ||
34 | <% else %> | ||
35 | <%= render 'source', f: f %> | ||
36 | <% end %> | ||
37 | <br> | ||
38 | <%= f.submit %> | ||
39 | <% end %> |
app/views/posts/_source.html.erb
0 → 100644
1 | <section id="nuozheng-post"> | ||
2 | <%= f.text_area :detail, id: 'txt-content', 'data-autosave' => 'editor-content', autofocus: nil %> | ||
3 | <div class="postdetail"></div> | ||
4 | </section> | ||
5 | <script> | ||
6 | (function() { | ||
7 | $(function() { | ||
8 | var $preview, editor, mobileToolbar, toolbar; | ||
9 | Simditor.locale = 'zh-CN'; | ||
10 | toolbar = ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', '|', 'ol', 'ul', 'blockquote', 'table', '|', 'link', 'image', 'hr', '|', 'indent', 'outdent', 'alignment']; | ||
11 | mobileToolbar = ["bold", "underline", "strikethrough", "color", "ul", "ol"]; | ||
12 | if (mobilecheck()) { | ||
13 | toolbar = mobileToolbar; | ||
14 | } | ||
15 | editor = new Simditor({ | ||
16 | textarea: $('#txt-content'), | ||
17 | placeholder: '这里输入文字...', | ||
18 | toolbar: toolbar, | ||
19 | pasteImage: true, | ||
20 | defaultImage: '/images/logo.png', | ||
21 | upload: { | ||
22 | url: '/upload' | ||
23 | } | ||
24 | }); | ||
25 | $preview = $('.postdetail'); | ||
26 | if ($preview.length > 0) { | ||
27 | return editor.on('valuechanged', function(e) { | ||
28 | return $preview.html(editor.getValue()); | ||
29 | }); | ||
30 | } | ||
31 | }); | ||
32 | |||
33 | }).call(this); | ||
34 | </script> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
app/views/posts/edit.html.erb
0 → 100644
1 | <h3 class="title"> | ||
2 | 修改文章 | ||
3 | <small> | ||
4 | <%= link_to '返回文章列表', posts_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
5 | / | ||
6 | <%= link_to '预览效果', post_path(@post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
7 | / | ||
8 | <% if params[:source] == 'edit' %> | ||
9 | <%= link_to '正常编辑', edit_post_path(@post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
10 | <% else %> | ||
11 | <%= link_to '源码编辑', edit_post_path(@post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page], source: 'edit') %> | ||
12 | <% end %> | ||
13 | </small> | ||
14 | </h3> | ||
15 | |||
16 | <%= render 'form' %> |
app/views/posts/index.html.erb
0 → 100644
1 | <h3 class="title"> | ||
2 | 文章管理 | ||
3 | <small> | ||
4 | <%= link_to '去首页', root_path %> | ||
5 | / | ||
6 | <%= link_to '注销', sign_out_path %> | ||
7 | / | ||
8 | <%= link_to '发布文章', new_post_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
9 | </small> | ||
10 | </h3> | ||
11 | <table class="list"> | ||
12 | <tr> | ||
13 | <th width="3%"> | ||
14 | ID | ||
15 | </th> | ||
16 | <th width="25%"> | ||
17 | <!-- <input> --> | ||
18 | 标题 | ||
19 | </th> | ||
20 | <th width="16%"> | ||
21 | <%= link_to "类别#{params[:scate] == 'desc' ? '△' : '▽'}", posts_path(scate: params[:scate] == 'desc' ? 'asc' : 'desc') %> | ||
22 | </th> | ||
23 | <th width="16%"> | ||
24 | <%= link_to "频道#{params[:schan] == 'desc' ? '△' : '▽'}", posts_path(schan: params[:schan] == 'desc' ? 'asc' : 'desc') %> | ||
25 | </th> | ||
26 | <th width="10%"> | ||
27 | <%= link_to "日期#{params[:screa] == 'desc' ? '▽' : '△'}", posts_path(screa: params[:screa] == 'desc' ? 'asc' : 'desc') %> | ||
28 | </th> | ||
29 | <th width="10%">别名</th> | ||
30 | <th width="20%">操作</th> | ||
31 | </tr> | ||
32 | |||
33 | <% @posts.each do |post| %> | ||
34 | <tr> | ||
35 | <td><%= post.id %></td> | ||
36 | <td><%= post.title %></td> | ||
37 | <td><%= Post::CATE[post.chan][:cate][post.cate] %></td> | ||
38 | <td><%= Post::CATE[post.chan][:name] %></td> | ||
39 | <td><%= post.created_at.to_date %></td> | ||
40 | <td><%= post.flag %></td> | ||
41 | <td> | ||
42 | <%= link_to '详细', post_path(post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
43 | / | ||
44 | <%= link_to '编辑', edit_post_path(post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
45 | / | ||
46 | <%= link_to '删除', post, method: :delete, data: { confirm: '确定删除?' } %> | ||
47 | </tr> | ||
48 | <% end %> | ||
49 | </table> | ||
50 | <%= paginate @posts %> |
app/views/posts/new.html.erb
0 → 100644
1 | <h3 class="title"> | ||
2 | 发布文章 | ||
3 | <small> | ||
4 | <%= link_to '返回文章列表', posts_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
5 | / | ||
6 | <% if params[:source] == 'edit' %> | ||
7 | <%= link_to '正常编辑', new_post_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
8 | <% else %> | ||
9 | <%= link_to '源码编辑', new_post_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page], source: 'edit') %> | ||
10 | <% end %> | ||
11 | </small> | ||
12 | </h3> | ||
13 | |||
14 | <%= render 'form' %> | ||
15 | |||
16 |
app/views/posts/show.html.erb
0 → 100644
1 | <div style="border-bottom: 3px solid #ccc;"> | ||
2 | <h3 class="title"> | ||
3 | <%= @post.title %> | ||
4 | <small> | ||
5 | <%= link_to '文章列表', posts_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
6 | / | ||
7 | <%= link_to '编辑文章', edit_post_path(@post, schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
8 | / | ||
9 | <%= link_to '发布文章', new_post_path(schan: params[:schan], scate: params[:scate], screa: params[:screa], page: params[:page]) %> | ||
10 | / | ||
11 | 首页 - <%= Post::CATE[@post.chan][:name] %> - <%= Post::CATE[@post.chan][:cate][@post.cate] %> | ||
12 | </small> | ||
13 | </h3> | ||
14 | </div> | ||
15 | <div class="postdetail"> | ||
16 | <%= @post.detail.html_safe %> | ||
17 | </div> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
app/views/posts/sign_in.html.erb
0 → 100644
1 | <p> | ||
2 | <%= flash[:notice] %> | ||
3 | </p> | ||
4 | <form action="/sign_in" method="post"> | ||
5 | <input name="utf8" type="hidden" value="✓"> | ||
6 | <input name="authenticity_token" type="hidden" value="<%= form_authenticity_token %>"> | ||
7 | 账号 <input type="text" name="username"> | ||
8 | 密码 <input type="password" name="password"> | ||
9 | <input type="submit" value="登陆"> | ||
10 | </form> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
app/views/shared/_footer.html.erb
0 → 100644
1 | <div class="footer"> | ||
2 | <ul class="ftservice wrapper"> | ||
3 | <% if controller_name.eql?('home') and action_name.eql?('index') %> | ||
4 | <li class="item wow fadeInUpBig" data-wow-delay="0.0s"> | ||
5 | <img src="/images/bottom/1.jpg" alt="公正独立"> | ||
6 | <h5>公正独立</h5> | ||
7 | <p>不受任何一方制约的第三方机构</p> | ||
8 | </li> | ||
9 | <li class="item wow fadeInUpBig" data-wow-delay="0.3s"> | ||
10 | <img src="/images/bottom/2.jpg" alt="3天速检"> | ||
11 | <h5>3天速检</h5> | ||
12 | <p>高效快速的检测效果</p> | ||
13 | </li> | ||
14 | <li class="item wow fadeInUpBig" data-wow-delay="0.6s"> | ||
15 | <img src="/images/bottom/3.jpg" alt="国家级认证"> | ||
16 | <h5>国家级认证</h5> | ||
17 | <p>国家级认定权威检测机构</p> | ||
18 | </li> | ||
19 | <li class="item wow fadeInUpBig" data-wow-delay="0.9s"> | ||
20 | <img src="/images/bottom/4.jpg" alt="全程记录"> | ||
21 | <h5>全程记录</h5> | ||
22 | <p>检验过程全程记录存档</p> | ||
23 | </li> | ||
24 | <li class="item wow fadeInUpBig" data-wow-delay="1.2s"> | ||
25 | <img src="/images/bottom/5.jpg" alt="先进软硬件设施"> | ||
26 | <h5>先进软硬件设施</h5> | ||
27 | <p>采用国外先进检测设备</p> | ||
28 | </li> | ||
29 | <% else %> | ||
30 | <li class="item"> | ||
31 | <img src="/images/bottom/1.jpg" alt="公正独立"> | ||
32 | <h5>公正独立</h5> | ||
33 | <p>不受任何一方制约的第三方机构</p> | ||
34 | </li> | ||
35 | <li class="item"> | ||
36 | <img src="/images/bottom/2.jpg" alt="3天速检"> | ||
37 | <h5>3天速检</h5> | ||
38 | <p>高效快速的检测效果</p> | ||
39 | </li> | ||
40 | <li class="item"> | ||
41 | <img src="/images/bottom/3.jpg" alt="国家级认证"> | ||
42 | <h5>国家级认证</h5> | ||
43 | <p>国家级认定权威检测机构</p> | ||
44 | </li> | ||
45 | <li class="item"> | ||
46 | <img src="/images/bottom/4.jpg" alt="全程记录"> | ||
47 | <h5>全程记录</h5> | ||
48 | <p>检验过程全程记录存档</p> | ||
49 | </li> | ||
50 | <li class="item"> | ||
51 | <img src="/images/bottom/5.jpg" alt="先进软硬件设施"> | ||
52 | <h5>先进软硬件设施</h5> | ||
53 | <p>采用国外先进检测设备</p> | ||
54 | </li> | ||
55 | <% end %> | ||
56 | </ul> | ||
57 | <div class="line"></div> | ||
58 | <ul class="ftlinks wrapper"> | ||
59 | <li class="ftlink"> | ||
60 | <a class="linktitle" href="javascript:void(0);">关于我们</a> | ||
61 | <ul> | ||
62 | <li> | ||
63 | <a href="/abouts/gsjj/jianjie"> | ||
64 | 公司简介 | ||
65 | </a> | ||
66 | </li> | ||
67 | <li> | ||
68 | <a href="/cultures"> | ||
69 | 企业文化 | ||
70 | </a> | ||
71 | </li> | ||
72 | <li> | ||
73 | <a href="/abouts/fwcn"> | ||
74 | 服务宗旨 | ||
75 | </a> | ||
76 | </li> | ||
77 | <li> | ||
78 | <a href="/abouts/yjss/devices"> | ||
79 | 实验室仪器 | ||
80 | </a> | ||
81 | </li> | ||
82 | <li> | ||
83 | <a href="/abouts/gsjj/BrYJrm"> | ||
84 | 企业宣传片 | ||
85 | </a> | ||
86 | </li> | ||
87 | </ul> | ||
88 | </li> | ||
89 | <li class="ftlink"> | ||
90 | <a class="linktitle" href="javascript:void(0);">业务领域</a> | ||
91 | <ul> | ||
92 | <li> | ||
93 | <a href="/ranges/hjjc"> | ||
94 | 环境检测 | ||
95 | </a> | ||
96 | </li> | ||
97 | <li> | ||
98 | <a href="/ranges/xfjc"> | ||
99 | 消防检测 | ||
100 | </a> | ||
101 | </li> | ||
102 | <li> | ||
103 | <a href="/ranges/ncpjc"> | ||
104 | 农产品检测 | ||
105 | </a> | ||
106 | </li> | ||
107 | <li> | ||
108 | <a href="/ranges/rzpjc"> | ||
109 | 肉制品检测 | ||
110 | </a> | ||
111 | </li> | ||
112 | <li> | ||
113 | <a href="javascript:void(0);"> | ||
114 | 添加剂检测 | ||
115 | </a> | ||
116 | </li> | ||
117 | </ul> | ||
118 | </li> | ||
119 | <li class="ftlink"> | ||
120 | <a class="linktitle" href="javascript:void(0);">检测范围</a> | ||
121 | <ul> | ||
122 | <li> | ||
123 | <a href="javascript:void(0);"> | ||
124 | 农药残留 | ||
125 | </a> | ||
126 | </li> | ||
127 | <li> | ||
128 | <a href="javascript:void(0);"> | ||
129 | 食品添加剂 | ||
130 | </a> | ||
131 | </li> | ||
132 | <li> | ||
133 | <a href="javascript:void(0);"> | ||
134 | 重金属含量 | ||
135 | </a> | ||
136 | </li> | ||
137 | <li> | ||
138 | <a href="javascript:void(0);"> | ||
139 | 微生物检测 | ||
140 | </a> | ||
141 | </li> | ||
142 | <li> | ||
143 | <a href="javascript:void(0);"> | ||
144 | 塑化剂检测 | ||
145 | </a> | ||
146 | </li> | ||
147 | </ul> | ||
148 | </li> | ||
149 | <li class="ftlink"> | ||
150 | <a class="linktitle" href="javascript:void(0);">合作单位</a> | ||
151 | <ul> | ||
152 | <li> | ||
153 | <a href="http://www.iae.cas.cn/" target="_blank"> | ||
154 | 中科院沈阳应用生态研究所 | ||
155 | </a> | ||
156 | </li> | ||
157 | <!-- <li> | ||
158 | <a href="javascript:void(0);"> | ||
159 | 中国水科院 | ||
160 | </a> | ||
161 | </li> | ||
162 | <li> | ||
163 | <a href="javascript:void(0);"> | ||
164 | 青岛啤酒 | ||
165 | </a> | ||
166 | </li> | ||
167 | <li> | ||
168 | <a href="javascript:void(0);"> | ||
169 | 北京沙河水库 | ||
170 | </a> | ||
171 | </li> | ||
172 | <li> | ||
173 | <a href="javascript:void(0);"> | ||
174 | 菏泽牡丹园 | ||
175 | </a> | ||
176 | </li> --> | ||
177 | </ul> | ||
178 | </li> | ||
179 | <li class="ftlink"> | ||
180 | <a class="linktitle" href="javascript:void(0);">联系我们</a> | ||
181 | <div class="ftcontact wrapper"> | ||
182 | <div class="ftphoneicon"> | ||
183 | <span></span> | ||
184 | </div> | ||
185 | <div class="ftphoneinfo"> | ||
186 | <h4>0536-5607056</h4> | ||
187 | <p>7*24小时客服电话</p> | ||
188 | </div> | ||
189 | </div> | ||
190 | <!-- <div class="ftcontact wrapper wechat"> | ||
191 | <div class="ftphoneicon"> | ||
192 | <span></span> | ||
193 | </div> | ||
194 | <div class="ftphoneinfo"> | ||
195 | <h4>微信客服</h4> | ||
196 | <p>扫码关注</p> | ||
197 | </div> | ||
198 | </div> --> | ||
199 | <!-- <ul> | ||
200 | <li> | ||
201 | <a href="javascript:void(0);"> | ||
202 | 微信 | ||
203 | </a> | ||
204 | <a href="javascript:void(0);"> | ||
205 | 微博 | ||
206 | </a> | ||
207 | <a href="javascript:void(0);"> | ||
208 | 邮箱 | ||
209 | </a> | ||
210 | <a href="javascript:void(0);"> | ||
211 | 电话 | ||
212 | </a> | ||
213 | <a href="javascript:void(0);"> | ||
214 | 地址 | ||
215 | </a> | ||
216 | </li> | ||
217 | </ul> --> | ||
218 | </li> | ||
219 | </ul> | ||
220 | <div class="line"></div> | ||
221 | <div class="ftwarp wrapper"> | ||
222 | <div class="copyright"> | ||
223 | Copyright © 2015-2016 山东诺正检测有限公司 | ||
224 | <br><br> | ||
225 | 版权所有 鲁ICP备15045188号 | ||
226 | </div> | ||
227 | <ul class="copyul"> | ||
228 | <li> | ||
229 | <a href="javascript:void(0);" title="诺正版权, 翻版必究">版权说明</a> | ||
230 | </li> | ||
231 | <li> | ||
232 | <a href="javascript:void(0);">使用协议</a> | ||
233 | </li> | ||
234 | <li> | ||
235 | <a href="javascript:void(0);" title="山东懒虫科技有限公司">技术支持</a> | ||
236 | </li> | ||
237 | <li> | ||
238 | <a href="/sign_in">后台管理</a> | ||
239 | </li> | ||
240 | </ul> | ||
241 | </div> | ||
242 | </div> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
app/views/shared/_header.html.erb
0 → 100644
1 | <div class="header"> | ||
2 | <div class="wrapper"> | ||
3 | <div class="logo"> | ||
4 | <a href="/" title="山东诺正检测有限公司"> | ||
5 | <img src="/images/logo.png" alt="诺正Logo"> | ||
6 | </a> | ||
7 | <span style="font-size: 25px;">山东诺正检测有限公司</span> | ||
8 | </div> | ||
9 | <div class="nav"> | ||
10 | <ul class="menu"> | ||
11 | <li> | ||
12 | <%= link_to '诺正首页', root_path, class: "#{'active' if request.path == '/'}" %> | ||
13 | </li> | ||
14 | <% Post::CATE.each do |key, val| %> | ||
15 | <li> | ||
16 | <%= link_to val[:name], {controller: :home, action: :show, chan: key}, class: "#{'active' if params[:chan].eql?(key)}" %> | ||
17 | </li> | ||
18 | <% end %> | ||
19 | </ul> | ||
20 | </div> | ||
21 | </div> | ||
22 | </div> |
config.ru
0 → 100644
config/application.rb
0 → 100644
1 | require File.expand_path('../boot', __FILE__) | ||
2 | |||
3 | require 'rails/all' | ||
4 | |||
5 | if defined?(Bundler) | ||
6 | # If you precompile assets before deploying to production, use this line | ||
7 | Bundler.require(*Rails.groups(:assets => %w(development test))) | ||
8 | # If you want your assets lazily compiled in production, use this line | ||
9 | # Bundler.require(:default, :assets, Rails.env) | ||
10 | end | ||
11 | |||
12 | module Nuozheng | ||
13 | class Application < Rails::Application | ||
14 | # Settings in config/environments/* take precedence over those specified here. | ||
15 | # Application configuration should go into files in config/initializers | ||
16 | # -- all .rb files in that directory are automatically loaded. | ||
17 | |||
18 | # Custom directories with classes and modules you want to be autoloadable. | ||
19 | # config.autoload_paths += %W(#{config.root}/extras) | ||
20 | |||
21 | # Only load the plugins named here, in the order given (default is alphabetical). | ||
22 | # :all can be used as a placeholder for all plugins not explicitly named. | ||
23 | # config.plugins = [ :exception_notification, :ssl_requirement, :all ] | ||
24 | |||
25 | # Activate observers that should always be running. | ||
26 | # config.active_record.observers = :cacher, :garbage_collector, :forum_observer | ||
27 | |||
28 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. | ||
29 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. | ||
30 | # config.time_zone = 'Central Time (US & Canada)' | ||
31 | |||
32 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | ||
33 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] | ||
34 | # config.i18n.default_locale = :de | ||
35 | |||
36 | # Configure the default encoding used in templates for Ruby 1.9. | ||
37 | config.encoding = "utf-8" | ||
38 | |||
39 | # Configure sensitive parameters which will be filtered from the log file. | ||
40 | config.filter_parameters += [:password] | ||
41 | |||
42 | # Enable escaping HTML in JSON. | ||
43 | config.active_support.escape_html_entities_in_json = true | ||
44 | |||
45 | # Use SQL instead of Active Record's schema dumper when creating the database. | ||
46 | # This is necessary if your schema can't be completely dumped by the schema dumper, | ||
47 | # like if you have constraints or database-specific column types | ||
48 | # config.active_record.schema_format = :sql | ||
49 | |||
50 | # Enforce whitelist mode for mass assignment. | ||
51 | # This will create an empty whitelist of attributes available for mass-assignment for all models | ||
52 | # in your app. As such, your models will need to explicitly whitelist or blacklist accessible | ||
53 | # parameters by using an attr_accessible or attr_protected declaration. | ||
54 | config.active_record.whitelist_attributes = true | ||
55 | |||
56 | # Enable the asset pipeline | ||
57 | config.assets.enabled = true | ||
58 | |||
59 | # Version of your assets, change this if you want to expire all your assets | ||
60 | config.assets.version = '1.0' | ||
61 | end | ||
62 | end |
config/boot.rb
0 → 100644
config/database.yml
0 → 100644
1 | # MySQL. Versions 4.1 and 5.0 are recommended. | ||
2 | # | ||
3 | # Install the MYSQL driver | ||
4 | # gem install mysql2 | ||
5 | # | ||
6 | # Ensure the MySQL gem is defined in your Gemfile | ||
7 | # gem 'mysql2' | ||
8 | # | ||
9 | # And be sure to use new-style password hashing: | ||
10 | # http://dev.mysql.com/doc/refman/5.0/en/old-client.html | ||
11 | development: | ||
12 | adapter: mysql2 | ||
13 | encoding: utf8 | ||
14 | reconnect: false | ||
15 | database: nuozheng | ||
16 | pool: 5 | ||
17 | username: tmp | ||
18 | password: tmp | ||
19 | |||
20 | # Warning: The database defined as "test" will be erased and | ||
21 | # re-generated from your development database when you run "rake". | ||
22 | # Do not set this db to the same as development or production. | ||
23 | test: | ||
24 | adapter: mysql2 | ||
25 | encoding: utf8 | ||
26 | reconnect: false | ||
27 | database: nuozheng | ||
28 | pool: 5 | ||
29 | username: tmp | ||
30 | password: tmp | ||
31 | |||
32 | production: | ||
33 | adapter: mysql2 | ||
34 | encoding: utf8 | ||
35 | reconnect: false | ||
36 | database: nuozheng | ||
37 | pool: 5 | ||
38 | username: tmp | ||
39 | password: tmp |
config/deploy.rb
0 → 100644
1 | require "awesome_print" | ||
2 | # config valid only for current version of Capistrano | ||
3 | lock '3.4.0' | ||
4 | |||
5 | set :application, 'nuozheng' | ||
6 | set :repo_url, 'git@bitbucket.org:bopro/nuozheng.git' | ||
7 | set :branch, "master" | ||
8 | set :deploy_to, '/home/web/nuozheng' | ||
9 | set :scm, :git | ||
10 | set :pty, false | ||
11 | |||
12 | set :keep_releases, 3 | ||
13 | set :unicorn_config, "#{current_path}/config/unicorn.rb" | ||
14 | set :unicorn_pid, "#{shared_path}/tmp/pids/unicorn_nuozheng.pid" | ||
15 | |||
16 | namespace :deploy do | ||
17 | |||
18 | task :start do | ||
19 | on roles(:web) do | ||
20 | within current_path do | ||
21 | with rails_env: 'production' do | ||
22 | execute :bundle, "exec unicorn_rails -c #{fetch(:unicorn_config)} -D" | ||
23 | end | ||
24 | end | ||
25 | end | ||
26 | end | ||
27 | |||
28 | task :stop do | ||
29 | on roles(:web) do | ||
30 | execute "if [ -f #{fetch(:unicorn_pid)} ]; then kill -QUIT `cat #{fetch(:unicorn_pid)}`; fi" | ||
31 | end | ||
32 | end | ||
33 | |||
34 | task :restart do | ||
35 | on roles(:web) do | ||
36 | # within current_path do | ||
37 | # 用USR2信号来实现无缝部署重启 | ||
38 | execute "if [ -f #{fetch(:unicorn_pid)} ]; then kill -s USR2 `cat #{fetch(:unicorn_pid)}`; fi" | ||
39 | # end | ||
40 | end | ||
41 | end | ||
42 | |||
43 | task :mkdir_shared do | ||
44 | on roles(:web) do | ||
45 | execute "mkdir -p #{shared_path}/log" | ||
46 | execute "mkdir -p #{shared_path}/assets" | ||
47 | execute "mkdir -p #{shared_path}/tmp/pids" | ||
48 | execute "mkdir -p #{shared_path}/tmp/cache" | ||
49 | end | ||
50 | end | ||
51 | |||
52 | task :link_shared do | ||
53 | on roles(:web) do | ||
54 | execute "ln -sf #{shared_path}/log #{current_path}/log" | ||
55 | execute "ln -sf #{shared_path}/assets #{current_path}/public/assets" | ||
56 | execute "ln -sf #{shared_path}/tmp #{current_path}/tmp" | ||
57 | end | ||
58 | end | ||
59 | |||
60 | task :db_migrate do | ||
61 | on roles(:web) do | ||
62 | within current_path do | ||
63 | with rails_env: 'production' do | ||
64 | execute :bundle, :exec, :rake, 'db:migrate' | ||
65 | end | ||
66 | end | ||
67 | end | ||
68 | end | ||
69 | |||
70 | task :bundle_install do | ||
71 | on roles(:web) do | ||
72 | within current_path do | ||
73 | with rails_env: 'production' do | ||
74 | execute :bundle, 'install' | ||
75 | end | ||
76 | end | ||
77 | end | ||
78 | end | ||
79 | |||
80 | before :starting, :mkdir_shared | ||
81 | after :publishing, :link_shared | ||
82 | after :publishing, :bundle_install | ||
83 | after :publishing, :db_migrate | ||
84 | after :publishing, :restart # 第一次部署会有找不到unicron.pid的bug | ||
85 | |||
86 | end |
config/deploy/production.rb
0 → 100644
1 | # server-based syntax | ||
2 | # ====================== | ||
3 | # Defines a single server with a list of roles and multiple properties. | ||
4 | # You can define all roles on a single server, or split them: | ||
5 | |||
6 | # server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value | ||
7 | # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value | ||
8 | server '115.28.86.237', user: 'web', roles: %w{app db web} | ||
9 | |||
10 | |||
11 | |||
12 | # role-based syntax | ||
13 | # ================== | ||
14 | |||
15 | # Defines a role with one or multiple servers. The primary server in each | ||
16 | # group is considered to be the first unless any hosts have the primary | ||
17 | # property set. Specify the username and a domain or IP for the server. | ||
18 | # Don't use `:all`, it's a meta role. | ||
19 | |||
20 | role :app, "115.28.86.237" | ||
21 | # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value | ||
22 | # role :db, %w{deploy@example.com} | ||
23 | |||
24 | |||
25 | |||
26 | # Configuration | ||
27 | # ============= | ||
28 | # You can set any configuration variable like in config/deploy.rb | ||
29 | # These variables are then only loaded and set in this stage. | ||
30 | # For available Capistrano configuration variables see the documentation page. | ||
31 | # http://capistranorb.com/documentation/getting-started/configuration/ | ||
32 | # Feel free to add new variables to customise your setup. | ||
33 | |||
34 | |||
35 | |||
36 | # Custom SSH Options | ||
37 | # ================== | ||
38 | # You may pass any option but keep in mind that net/ssh understands a | ||
39 | # limited set of options, consult the Net::SSH documentation. | ||
40 | # http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start | ||
41 | # | ||
42 | # Global options | ||
43 | # -------------- | ||
44 | # set :ssh_options, { | ||
45 | # keys: %w(/home/rlisowski/.ssh/id_rsa), | ||
46 | # forward_agent: false, | ||
47 | # auth_methods: %w(password) | ||
48 | # } | ||
49 | # | ||
50 | # The server-based syntax can be used to override options: | ||
51 | # ------------------------------------ | ||
52 | # server 'example.com', | ||
53 | # user: 'user_name', | ||
54 | # roles: %w{web app}, | ||
55 | # ssh_options: { | ||
56 | # user: 'user_name', # overrides user setting above | ||
57 | # keys: %w(/home/user_name/.ssh/id_rsa), | ||
58 | # forward_agent: false, | ||
59 | # auth_methods: %w(publickey password) | ||
60 | # # password: 'please use keys' | ||
61 | # } |
config/deploy/staging.rb
0 → 100644
1 | # server-based syntax | ||
2 | # ====================== | ||
3 | # Defines a single server with a list of roles and multiple properties. | ||
4 | # You can define all roles on a single server, or split them: | ||
5 | |||
6 | # server 'example.com', user: 'deploy', roles: %w{app db web}, my_property: :my_value | ||
7 | # server 'example.com', user: 'deploy', roles: %w{app web}, other_property: :other_value | ||
8 | # server 'db.example.com', user: 'deploy', roles: %w{db} | ||
9 | |||
10 | |||
11 | |||
12 | # role-based syntax | ||
13 | # ================== | ||
14 | |||
15 | # Defines a role with one or multiple servers. The primary server in each | ||
16 | # group is considered to be the first unless any hosts have the primary | ||
17 | # property set. Specify the username and a domain or IP for the server. | ||
18 | # Don't use `:all`, it's a meta role. | ||
19 | |||
20 | # role :app, %w{deploy@example.com}, my_property: :my_value | ||
21 | # role :web, %w{user1@primary.com user2@additional.com}, other_property: :other_value | ||
22 | # role :db, %w{deploy@example.com} | ||
23 | |||
24 | |||
25 | |||
26 | # Configuration | ||
27 | # ============= | ||
28 | # You can set any configuration variable like in config/deploy.rb | ||
29 | # These variables are then only loaded and set in this stage. | ||
30 | # For available Capistrano configuration variables see the documentation page. | ||
31 | # http://capistranorb.com/documentation/getting-started/configuration/ | ||
32 | # Feel free to add new variables to customise your setup. | ||
33 | |||
34 | |||
35 | |||
36 | # Custom SSH Options | ||
37 | # ================== | ||
38 | # You may pass any option but keep in mind that net/ssh understands a | ||
39 | # limited set of options, consult the Net::SSH documentation. | ||
40 | # http://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start | ||
41 | # | ||
42 | # Global options | ||
43 | # -------------- | ||
44 | # set :ssh_options, { | ||
45 | # keys: %w(/home/rlisowski/.ssh/id_rsa), | ||
46 | # forward_agent: false, | ||
47 | # auth_methods: %w(password) | ||
48 | # } | ||
49 | # | ||
50 | # The server-based syntax can be used to override options: | ||
51 | # ------------------------------------ | ||
52 | # server 'example.com', | ||
53 | # user: 'user_name', | ||
54 | # roles: %w{web app}, | ||
55 | # ssh_options: { | ||
56 | # user: 'user_name', # overrides user setting above | ||
57 | # keys: %w(/home/user_name/.ssh/id_rsa), | ||
58 | # forward_agent: false, | ||
59 | # auth_methods: %w(publickey password) | ||
60 | # # password: 'please use keys' | ||
61 | # } |
config/environment.rb
0 → 100644
config/environments/development.rb
0 → 100644
1 | Nuozheng::Application.configure do | ||
2 | # Settings specified here will take precedence over those in config/application.rb | ||
3 | |||
4 | # In the development environment your application's code is reloaded on | ||
5 | # every request. This slows down response time but is perfect for development | ||
6 | # since you don't have to restart the web server when you make code changes. | ||
7 | config.cache_classes = false | ||
8 | |||
9 | # Log error messages when you accidentally call methods on nil. | ||
10 | config.whiny_nils = true | ||
11 | |||
12 | # Show full error reports and disable caching | ||
13 | config.consider_all_requests_local = true | ||
14 | config.action_controller.perform_caching = false | ||
15 | |||
16 | # Don't care if the mailer can't send | ||
17 | config.action_mailer.raise_delivery_errors = false | ||
18 | |||
19 | # Print deprecation notices to the Rails logger | ||
20 | config.active_support.deprecation = :log | ||
21 | |||
22 | # Only use best-standards-support built into browsers | ||
23 | config.action_dispatch.best_standards_support = :builtin | ||
24 | |||
25 | # Raise exception on mass assignment protection for Active Record models | ||
26 | config.active_record.mass_assignment_sanitizer = :strict | ||
27 | |||
28 | # Log the query plan for queries taking more than this (works | ||
29 | # with SQLite, MySQL, and PostgreSQL) | ||
30 | config.active_record.auto_explain_threshold_in_seconds = 0.5 | ||
31 | |||
32 | # Do not compress assets | ||
33 | config.assets.compress = false | ||
34 | |||
35 | # Expands the lines which load the assets | ||
36 | config.assets.debug = true | ||
37 | end |
config/environments/production.rb
0 → 100644
1 | Nuozheng::Application.configure do | ||
2 | # Settings specified here will take precedence over those in config/application.rb | ||
3 | |||
4 | # Code is not reloaded between requests | ||
5 | config.cache_classes = true | ||
6 | |||
7 | # Full error reports are disabled and caching is turned on | ||
8 | config.consider_all_requests_local = false | ||
9 | config.action_controller.perform_caching = true | ||
10 | |||
11 | # Disable Rails's static asset server (Apache or nginx will already do this) | ||
12 | config.serve_static_assets = true | ||
13 | |||
14 | # Compress JavaScripts and CSS | ||
15 | config.assets.compress = true | ||
16 | |||
17 | # Don't fallback to assets pipeline if a precompiled asset is missed | ||
18 | config.assets.compile = true | ||
19 | |||
20 | # Generate digests for assets URLs | ||
21 | config.assets.digest = true | ||
22 | config.assets.js_compressor = :uglifier | ||
23 | |||
24 | # Defaults to nil and saved in location specified by config.assets.prefix | ||
25 | # config.assets.manifest = YOUR_PATH | ||
26 | |||
27 | # Specifies the header that your server uses for sending files | ||
28 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache | ||
29 | config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx | ||
30 | |||
31 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. | ||
32 | # config.force_ssl = true | ||
33 | |||
34 | # See everything in the log (default is :info) | ||
35 | # config.log_level = :debug | ||
36 | |||
37 | # Prepend all log lines with the following tags | ||
38 | # config.log_tags = [ :subdomain, :uuid ] | ||
39 | |||
40 | # Use a different logger for distributed setups | ||
41 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) | ||
42 | |||
43 | # Use a different cache store in production | ||
44 | # config.cache_store = :mem_cache_store | ||
45 | |||
46 | # Enable serving of images, stylesheets, and JavaScripts from an asset server | ||
47 | # config.action_controller.asset_host = "http://assets.example.com" | ||
48 | |||
49 | # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) | ||
50 | # config.assets.precompile += %w( search.js ) | ||
51 | |||
52 | # Disable delivery errors, bad email addresses will be ignored | ||
53 | # config.action_mailer.raise_delivery_errors = false | ||
54 | |||
55 | # Enable threaded mode | ||
56 | # config.threadsafe! | ||
57 | |||
58 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to | ||
59 | # the I18n.default_locale when a translation can not be found) | ||
60 | config.i18n.fallbacks = true | ||
61 | |||
62 | # Send deprecation notices to registered listeners | ||
63 | config.active_support.deprecation = :notify | ||
64 | |||
65 | # Log the query plan for queries taking more than this (works | ||
66 | # with SQLite, MySQL, and PostgreSQL) | ||
67 | # config.active_record.auto_explain_threshold_in_seconds = 0.5 | ||
68 | # config.action_mailer.default_url_options = {:host => 'www.normz.cn'} | ||
69 | end |
config/environments/test.rb
0 → 100644
1 | Nuozheng::Application.configure do | ||
2 | # Settings specified here will take precedence over those in config/application.rb | ||
3 | |||
4 | # The test environment is used exclusively to run your application's | ||
5 | # test suite. You never need to work with it otherwise. Remember that | ||
6 | # your test database is "scratch space" for the test suite and is wiped | ||
7 | # and recreated between test runs. Don't rely on the data there! | ||
8 | config.cache_classes = true | ||
9 | |||
10 | # Configure static asset server for tests with Cache-Control for performance | ||
11 | config.serve_static_assets = true | ||
12 | config.static_cache_control = "public, max-age=3600" | ||
13 | |||
14 | # Log error messages when you accidentally call methods on nil | ||
15 | config.whiny_nils = true | ||
16 | |||
17 | # Show full error reports and disable caching | ||
18 | config.consider_all_requests_local = true | ||
19 | config.action_controller.perform_caching = false | ||
20 | |||
21 | # Raise exceptions instead of rendering exception templates | ||
22 | config.action_dispatch.show_exceptions = false | ||
23 | |||
24 | # Disable request forgery protection in test environment | ||
25 | config.action_controller.allow_forgery_protection = false | ||
26 | |||
27 | # Tell Action Mailer not to deliver emails to the real world. | ||
28 | # The :test delivery method accumulates sent emails in the | ||
29 | # ActionMailer::Base.deliveries array. | ||
30 | config.action_mailer.delivery_method = :test | ||
31 | |||
32 | # Raise exception on mass assignment protection for Active Record models | ||
33 | config.active_record.mass_assignment_sanitizer = :strict | ||
34 | |||
35 | # Print deprecation notices to the stderr | ||
36 | config.active_support.deprecation = :stderr | ||
37 | end |
config/initializers/backtrace_silencers.rb
0 → 100644
1 | # Be sure to restart your server when you modify this file. | ||
2 | |||
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. | ||
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } | ||
5 | |||
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. | ||
7 | # Rails.backtrace_cleaner.remove_silencers! |
config/initializers/inflections.rb
0 → 100644
1 | # Be sure to restart your server when you modify this file. | ||
2 | |||
3 | # Add new inflection rules using the following format | ||
4 | # (all these examples are active by default): | ||
5 | # ActiveSupport::Inflector.inflections do |inflect| | ||
6 | # inflect.plural /^(ox)$/i, '\1en' | ||
7 | # inflect.singular /^(ox)en/i, '\1' | ||
8 | # inflect.irregular 'person', 'people' | ||
9 | # inflect.uncountable %w( fish sheep ) | ||
10 | # end | ||
11 | # | ||
12 | # These inflection rules are supported but not enabled by default: | ||
13 | # ActiveSupport::Inflector.inflections do |inflect| | ||
14 | # inflect.acronym 'RESTful' | ||
15 | # end |
config/initializers/kaminari_config.rb
0 → 100644
config/initializers/mime_types.rb
0 → 100644
config/initializers/secret_token.rb
0 → 100644
1 | # Be sure to restart your server when you modify this file. | ||
2 | |||
3 | # Your secret key for verifying the integrity of signed cookies. | ||
4 | # If you change this key, all old signed cookies will become invalid! | ||
5 | # Make sure the secret is at least 30 characters and all random, | ||
6 | # no regular words or you'll be exposed to dictionary attacks. | ||
7 | Nuozheng::Application.config.secret_token = '8b17a9f8327eae4357722ea078c5905462235872cb3cb0c89680fe21a6a0e74cacc995202b6e998221ecf8f7e5625b22388c9cfef51b2a08111a54e127f27d64' |
config/initializers/session_store.rb
0 → 100644
1 | # Be sure to restart your server when you modify this file. | ||
2 | |||
3 | Nuozheng::Application.config.session_store :cookie_store, key: '_nuozheng_session' | ||
4 | |||
5 | # Use the database for sessions instead of the cookie-based default, | ||
6 | # which shouldn't be used to store highly confidential information | ||
7 | # (create the session table with "rails generate session_migration") | ||
8 | # Nuozheng::Application.config.session_store :active_record_store |
config/initializers/wrap_parameters.rb
0 → 100644
1 | # Be sure to restart your server when you modify this file. | ||
2 | # | ||
3 | # This file contains settings for ActionController::ParamsWrapper which | ||
4 | # is enabled by default. | ||
5 | |||
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. | ||
7 | ActiveSupport.on_load(:action_controller) do | ||
8 | wrap_parameters format: [:json] | ||
9 | end | ||
10 | |||
11 | # Disable root element in JSON by default. | ||
12 | ActiveSupport.on_load(:active_record) do | ||
13 | self.include_root_in_json = false | ||
14 | end |
config/locales/en.yml
0 → 100644
config/locales/kaminari.en.yml
0 → 100644
config/locales/kaminari.zh-CN.yml
0 → 100644
config/routes.rb
0 → 100644
1 | Nuozheng::Application.routes.draw do | ||
2 | post '/upload' => 'posts#upload' | ||
3 | get '/sign_in' => 'posts#sign_in' | ||
4 | post '/sign_in' => 'posts#sign_in' | ||
5 | get '/sign_out' => 'posts#sign_out' | ||
6 | resources :posts | ||
7 | |||
8 | constraints subdomain: 'h5' do | ||
9 | root :to => 'mobile#index' | ||
10 | end | ||
11 | get ':chan(/:cate(/:flag))(.:format)' => 'home#show' | ||
12 | # cultures | ||
13 | |||
14 | |||
15 | # resources :ranges, only: [:index, :show] | ||
16 | # resources :dynamics, only: [:index, :show] | ||
17 | # resources :cultures, only: [:index, :show] | ||
18 | # resources :abouts, only: [:index, :show] | ||
19 | # resources :jobs, only: [:index, :show] | ||
20 | |||
21 | # The priority is based upon order of creation: | ||
22 | # first created -> highest priority. | ||
23 | |||
24 | # Sample of regular route: | ||
25 | # match 'products/:id' => 'catalog#view' | ||
26 | # Keep in mind you can assign values other than :controller and :action | ||
27 | |||
28 | # Sample of named route: | ||
29 | # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase | ||
30 | # This route can be invoked with purchase_url(:id => product.id) | ||
31 | |||
32 | # Sample resource route (maps HTTP verbs to controller actions automatically): | ||
33 | # resources :products | ||
34 | |||
35 | # Sample resource route with options: | ||
36 | # resources :products do | ||
37 | # member do | ||
38 | # get 'short' | ||
39 | # post 'toggle' | ||
40 | # end | ||
41 | # | ||
42 | # collection do | ||
43 | # get 'sold' | ||
44 | # end | ||
45 | # end | ||
46 | |||
47 | # Sample resource route with sub-resources: | ||
48 | # resources :products do | ||
49 | # resources :comments, :sales | ||
50 | # resource :seller | ||
51 | # end | ||
52 | |||
53 | # Sample resource route with more complex sub-resources | ||
54 | # resources :products do | ||
55 | # resources :comments | ||
56 | # resources :sales do | ||
57 | # get 'recent', :on => :collection | ||
58 | # end | ||
59 | # end | ||
60 | |||
61 | # Sample resource route within a namespace: | ||
62 | # namespace :admin do | ||
63 | # # Directs /admin/products/* to Admin::ProductsController | ||
64 | # # (app/controllers/admin/products_controller.rb) | ||
65 | # resources :products | ||
66 | # end | ||
67 | |||
68 | # You can have the root of your site routed with "root" | ||
69 | # just remember to delete public/index.html. | ||
70 | root :to => 'home#index' | ||
71 | |||
72 | # See how all your routes lay out with "rake routes" | ||
73 | |||
74 | # This is a legacy wild controller route that's not recommended for RESTful applications. | ||
75 | # Note: This route will make all actions in every controller accessible via GET requests. | ||
76 | # match ':controller(/:action(/:id))(.:format)' | ||
77 | end |
config/unicorn.rb
0 → 100644
1 | worker_processes 1 | ||
2 | |||
3 | app_root = File.expand_path("../..", __FILE__) | ||
4 | working_directory app_root | ||
5 | |||
6 | # Listen on fs socket for better performance | ||
7 | listen "/tmp/unicorn.nuozheng.sock", :backlog => 64 | ||
8 | listen 5096, :tcp_nopush => false | ||
9 | |||
10 | # Nuke workers after 30 seconds instead of 60 seconds (the default) | ||
11 | timeout 30 | ||
12 | |||
13 | # App PID | ||
14 | pid "#{app_root}/tmp/pids/unicorn_nuozheng.pid" | ||
15 | |||
16 | # By default, the Unicorn logger will write to stderr. | ||
17 | # Additionally, some applications/frameworks log to stderr or stdout, | ||
18 | # so prevent them from going to /dev/null when daemonized here: | ||
19 | stderr_path "#{app_root}/log/unicorn.stderr.log" | ||
20 | stdout_path "#{app_root}/log/unicorn.stdout.log" | ||
21 | |||
22 | # To save some memory and improve performance | ||
23 | preload_app true | ||
24 | # GC.respond_to?(:copy_on_write_friendly=) and GC.copy_on_write_friendly = true | ||
25 | |||
26 | # Force the bundler gemfile environment variable to | ||
27 | # reference the Сapistrano "current" symlink | ||
28 | before_exec do |_| | ||
29 | ENV["BUNDLE_GEMFILE"] = File.join(app_root, 'Gemfile') | ||
30 | end | ||
31 | |||
32 | before_fork do |server, worker| | ||
33 | # 参考 http://unicorn.bogomips.org/SIGNALS.html | ||
34 | # 使用USR2信号,以及在进程完成后用QUIT信号来实现无缝重启 | ||
35 | old_pid = app_root + '/tmp/pids/unicorn_nuozheng.pid.oldbin' | ||
36 | if File.exists?(old_pid) && server.pid != old_pid | ||
37 | begin | ||
38 | Process.kill("QUIT", File.read(old_pid).to_i) | ||
39 | rescue Errno::ENOENT, Errno::ESRCH | ||
40 | # someone else did our job for us | ||
41 | end | ||
42 | end | ||
43 | |||
44 | # the following is highly recomended for Rails + "preload_app true" | ||
45 | # as there's no need for the master process to hold a connection | ||
46 | defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect! | ||
47 | end | ||
48 | |||
49 | after_fork do |server, worker| | ||
50 | # # 禁止GC,配合后续的OOB,来减少请求的执行时间 | ||
51 | # GC.disable | ||
52 | # the following is *required* for Rails + "preload_app true", | ||
53 | defined?(ActiveRecord::Base) and ActiveRecord::Base.establish_connection | ||
54 | end |
db/migrate/20160102123308_create_posts.rb
0 → 100644
db/migrate/20160109100011_create_pictures.rb
0 → 100644
db/schema.rb
0 → 100644
1 | # encoding: UTF-8 | ||
2 | # This file is auto-generated from the current state of the database. Instead | ||
3 | # of editing this file, please use the migrations feature of Active Record to | ||
4 | # incrementally modify your database, and then regenerate this schema definition. | ||
5 | # | ||
6 | # Note that this schema.rb definition is the authoritative source for your | ||
7 | # database schema. If you need to create the application database on another | ||
8 | # system, you should be using db:schema:load, not running all the migrations | ||
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations | ||
10 | # you'll amass, the slower it'll run and the greater likelihood for issues). | ||
11 | # | ||
12 | # It's strongly recommended to check this file into your version control system. | ||
13 | |||
14 | ActiveRecord::Schema.define(:version => 20160109100011) do | ||
15 | |||
16 | create_table "pictures", :force => true do |t| | ||
17 | t.string "filename" | ||
18 | t.datetime "created_at", :null => false | ||
19 | t.datetime "updated_at", :null => false | ||
20 | end | ||
21 | |||
22 | create_table "posts", :force => true do |t| | ||
23 | t.string "title" | ||
24 | t.string "flag" | ||
25 | t.text "detail" | ||
26 | t.integer "parent_id" | ||
27 | t.string "chan" | ||
28 | t.string "cate" | ||
29 | t.boolean "isdel", :default => false | ||
30 | t.datetime "created_at", :null => false | ||
31 | t.datetime "updated_at", :null => false | ||
32 | end | ||
33 | |||
34 | end |
db/seeds.rb
0 → 100644
1 | # This file should contain all the record creation needed to seed the database with its default values. | ||
2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). | ||
3 | # | ||
4 | # Examples: | ||
5 | # | ||
6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) | ||
7 | # Mayor.create(name: 'Emanuel', city: cities.first) |
doc/README_FOR_APP
0 → 100644
lib/assets/.gitkeep
0 → 100644
File mode changed
lib/tasks/.gitkeep
0 → 100644
File mode changed
public/.DS_Store
0 → 100644
No preview for this file type
public/404.html
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>The page you were looking for doesn't exist (404)</title> | ||
5 | <style type="text/css"> | ||
6 | body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } | ||
7 | div.dialog { | ||
8 | width: 25em; | ||
9 | padding: 0 4em; | ||
10 | margin: 4em auto 0 auto; | ||
11 | border: 1px solid #ccc; | ||
12 | border-right-color: #999; | ||
13 | border-bottom-color: #999; | ||
14 | } | ||
15 | h1 { font-size: 100%; color: #f00; line-height: 1.5em; } | ||
16 | </style> | ||
17 | </head> | ||
18 | |||
19 | <body> | ||
20 | <!-- This file lives in public/404.html --> | ||
21 | <div class="dialog"> | ||
22 | <h1>The page you were looking for doesn't exist.</h1> | ||
23 | <p>You may have mistyped the address or the page may have moved.</p> | ||
24 | </div> | ||
25 | </body> | ||
26 | </html> |
public/422.html
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>The change you wanted was rejected (422)</title> | ||
5 | <style type="text/css"> | ||
6 | body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } | ||
7 | div.dialog { | ||
8 | width: 25em; | ||
9 | padding: 0 4em; | ||
10 | margin: 4em auto 0 auto; | ||
11 | border: 1px solid #ccc; | ||
12 | border-right-color: #999; | ||
13 | border-bottom-color: #999; | ||
14 | } | ||
15 | h1 { font-size: 100%; color: #f00; line-height: 1.5em; } | ||
16 | </style> | ||
17 | </head> | ||
18 | |||
19 | <body> | ||
20 | <!-- This file lives in public/422.html --> | ||
21 | <div class="dialog"> | ||
22 | <h1>The change you wanted was rejected.</h1> | ||
23 | <p>Maybe you tried to change something you didn't have access to.</p> | ||
24 | </div> | ||
25 | </body> | ||
26 | </html> |
public/500.html
0 → 100644
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>We're sorry, but something went wrong (500)</title> | ||
5 | <style type="text/css"> | ||
6 | body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } | ||
7 | div.dialog { | ||
8 | width: 25em; | ||
9 | padding: 0 4em; | ||
10 | margin: 4em auto 0 auto; | ||
11 | border: 1px solid #ccc; | ||
12 | border-right-color: #999; | ||
13 | border-bottom-color: #999; | ||
14 | } | ||
15 | h1 { font-size: 100%; color: #f00; line-height: 1.5em; } | ||
16 | </style> | ||
17 | </head> | ||
18 | |||
19 | <body> | ||
20 | <!-- This file lives in public/500.html --> | ||
21 | <div class="dialog"> | ||
22 | <h1>We're sorry, but something went wrong.</h1> | ||
23 | </div> | ||
24 | </body> | ||
25 | </html> |
public/favicon.ico
0 → 100644
File mode changed
public/fonts/ionicons.eot
0 → 100644
No preview for this file type
public/fonts/ionicons.svg
0 → 100644
This diff could not be displayed because it is too large.
public/fonts/ionicons.ttf
0 → 100644
No preview for this file type
public/fonts/ionicons.woff
0 → 100644
No preview for this file type
public/images/.DS_Store
0 → 100644
No preview for this file type
public/images/banner.png
0 → 100644
158 KB
public/images/banner/.DS_Store
0 → 100644
No preview for this file type
public/images/banner/1-1.jpg
0 → 100644
38.4 KB
public/images/banner/1-2.jpg
0 → 100644
63.8 KB
public/images/banner/1-3.jpg
0 → 100644
201 KB
public/images/banner/1-4.jpg
0 → 100644
182 KB
public/images/banner/2-1.jpg
0 → 100644
225 KB
public/images/banner/2-2.jpg
0 → 100644
75.9 KB
public/images/banner/2-3.jpg
0 → 100644
62.1 KB
public/images/banner/2-4.jpg
0 → 100644
66.7 KB
public/images/banner/3-1.jpg
0 → 100644
200 KB
public/images/banner/3-2.jpg
0 → 100644
197 KB
public/images/banner/3-3.jpg
0 → 100644
46 KB
public/images/banner/3-4.jpg
0 → 100644
216 KB
public/images/banner/a17.png
0 → 100755
5.38 KB
public/images/banner/a20.png
0 → 100755
5.79 KB
public/images/banner/a22.png
0 → 100755
2.63 KB
public/images/banner/b05.png
0 → 100755
1.38 KB
public/images/banner/b17.png
0 → 100755
801 Bytes
public/images/banner/back-dice-02.jpg
0 → 100755
12.3 KB
public/images/banner/back-dice-03.jpg
0 → 100644
217 KB
public/images/banner/banner.jpg
0 → 100644
355 KB
public/images/banner/cultures.jpg
0 → 100644
417 KB
public/images/banner/dynamics.jpg
0 → 100644
307 KB
public/images/banner/loading.gif
0 → 100755
4.65 KB
public/images/bottom/.DS_Store
0 → 100644
No preview for this file type
public/images/bottom/1.jpg
0 → 100644
18.5 KB
public/images/bottom/2.jpg
0 → 100644
17.5 KB
public/images/bottom/3.jpg
0 → 100644
19.2 KB
public/images/bottom/4.jpg
0 → 100644
17.5 KB
public/images/bottom/5.jpg
0 → 100644
19.4 KB
public/images/captcha.gif
0 → 100644
1.45 KB
public/images/default_200x100.jpg
0 → 100644
6.2 KB
public/images/default_200x150.jpg
0 → 100644
6.64 KB
public/images/default_330x165.jpg
0 → 100644
14.7 KB
public/images/default_330x220.jpg
0 → 100644
15.9 KB
public/images/devices/.DS_Store
0 → 100644
No preview for this file type
public/images/devices/01.jpg
0 → 100644
192 KB
public/images/devices/02.jpg
0 → 100644
288 KB
public/images/devices/03.jpg
0 → 100644
265 KB
public/images/devices/04.jpg
0 → 100644
283 KB
public/images/devices/05.jpg
0 → 100644
261 KB
public/images/devices/06.jpg
0 → 100644
201 KB
public/images/devices/07.jpg
0 → 100644
246 KB
public/images/devices/08.jpg
0 → 100644
268 KB
public/images/devices/09.jpg
0 → 100644
273 KB
public/images/devices/10.jpg
0 → 100644
190 KB
public/images/devices/11.jpg
0 → 100644
216 KB
public/images/devices/12.jpg
0 → 100644
217 KB
public/images/devices/13.jpg
0 → 100644
263 KB
public/images/devices/14.jpg
0 → 100644
218 KB
public/images/devices/a17.png
0 → 100644
5.38 KB
public/images/devices/loading.gif
0 → 100644
4.65 KB
public/images/devices/t01.png
0 → 100644
1.58 KB
public/images/devices/thumb-01.jpg
0 → 100644
69.5 KB
public/images/devices/thumb-02.jpg
0 → 100644
72 KB
public/images/devices/thumb-03.jpg
0 → 100644
71.8 KB
public/images/devices/thumb-04.jpg
0 → 100644
71.5 KB
public/images/devices/thumb-05.jpg
0 → 100644
71.5 KB
public/images/devices/thumb-06.jpg
0 → 100644
70 KB
public/images/devices/thumb-07.jpg
0 → 100644
70.7 KB
public/images/devices/thumb-08.jpg
0 → 100644
71.8 KB
public/images/devices/thumb-09.jpg
0 → 100644
71.8 KB
public/images/devices/thumb-10.jpg
0 → 100644
69.5 KB
public/images/devices/thumb-11.jpg
0 → 100644
70.7 KB
public/images/devices/thumb-12.jpg
0 → 100644
70.5 KB
public/images/devices/thumb-13.jpg
0 → 100644
71.4 KB
public/images/devices/thumb-14.jpg
0 → 100644
69.5 KB
public/images/favicon.ico
0 → 100644
No preview for this file type
public/images/icons/backtop-icon-active.png
0 → 100644
1.12 KB
public/images/icons/backtop-icon.png
0 → 100644
1.19 KB
public/images/icons/contact-icon-active.png
0 → 100644
20 KB
public/images/icons/contact-icon.png
0 → 100644
20.1 KB
public/images/icons/intent-icon-active.png
0 → 100644
20.1 KB
public/images/icons/intent-icon.png
0 → 100644
18.4 KB
public/images/jcrange/fljc.jpg
0 → 100644
23.1 KB
public/images/jcrange/huanjing.jpg
0 → 100644
36.6 KB
public/images/jcrange/kexuegongzheng.jpg
0 → 100644
208 KB
public/images/jcrange/liucheng.jpg
0 → 100644
43.5 KB
public/images/jcrange/mubiao.jpg
0 → 100644
30.8 KB
public/images/jcrange/nongchanpin.jpg
0 → 100644
11.6 KB
public/images/jcrange/nongchanpin1.jpg
0 → 100644
17.9 KB
public/images/jcrange/rouzhipin.jpg
0 → 100644
7.77 KB
public/images/jcrange/scjc.jpg
0 → 100644
9.69 KB
public/images/jcrange/scjc1.jpg
0 → 100644
6.85 KB
public/images/jcrange/shangyang.jpg
0 → 100644
198 KB
public/images/jcrange/sljc.jpg
0 → 100644
24.3 KB
public/images/jcrange/spjc.jpg
0 → 100644
19.2 KB
public/images/jcrange/xiaofangjiance.jpg
0 → 100644
7.59 KB
public/images/logo.png
0 → 100644
2.92 KB
public/javascripts/.DS_Store
0 → 100644
No preview for this file type
public/javascripts/initialize.js
0 → 100644
This diff is collapsed.
Click to expand it.
public/javascripts/liucheng.js
0 → 100644
This diff is collapsed.
Click to expand it.
public/javascripts/mobile/app.js
0 → 100644
This diff is collapsed.
Click to expand it.
public/javascripts/mobile/controllers.js
0 → 100644
This diff is collapsed.
Click to expand it.
public/javascripts/mobile/ion-gallery.js
0 → 100644
This diff is collapsed.
Click to expand it.
public/javascripts/mobile/ionic.bundle.js
0 → 100644
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
public/javascripts/simditor/hotkeys.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/javascripts/simditor/jquery.min.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/javascripts/simditor/mobilecheck.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/javascripts/simditor/module.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/javascripts/simditor/simditor.js
0 → 100755
This diff could not be displayed because it is too large.
public/javascripts/simditor/uploader.js
0 → 100755
This diff is collapsed.
Click to expand it.
public/robots.txt
0 → 100644
This diff is collapsed.
Click to expand it.
public/stylesheets/app.css
0 → 100755
This diff is collapsed.
Click to expand it.
public/stylesheets/mobile.css
0 → 100755
This diff is collapsed.
Click to expand it.
public/stylesheets/simditor.css
0 → 100755
This diff is collapsed.
Click to expand it.
public/templates/bgcx.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/templates/category.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/templates/channel.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/templates/devices.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/templates/gsjj.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/templates/home.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/templates/login.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/templates/menu.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/templates/post.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/templates/wssj.html
0 → 100644
This diff is collapsed.
Click to expand it.
public/uploads/.DS_Store
0 → 100644
No preview for this file type
public/uploads/1.jpg
0 → 100644
57.3 KB
public/uploads/10.jpg
0 → 100644
33.1 KB
public/uploads/11.jpg
0 → 100644
102 KB
public/uploads/12.jpg
0 → 100644
115 KB
public/uploads/13.jpg
0 → 100644
107 KB
public/uploads/14.jpg
0 → 100644
129 KB
public/uploads/15.jpg
0 → 100644
147 KB
public/uploads/16.jpg
0 → 100644
75.6 KB
public/uploads/17.jpg
0 → 100644
139 KB
public/uploads/18.jpg
0 → 100644
179 KB
public/uploads/19.jpg
0 → 100644
23.8 KB
public/uploads/20.jpg
0 → 100644
121 KB
public/uploads/3.jpg
0 → 100644
77.6 KB
public/uploads/4.jpg
0 → 100644
34.1 KB
public/uploads/5.jpg
0 → 100644
33.8 KB
public/uploads/6.jpg
0 → 100644
27.2 KB
public/uploads/7.jpg
0 → 100644
40.2 KB
public/uploads/8.jpg
0 → 100644
39.3 KB
public/uploads/9.jpg
0 → 100644
34.3 KB
script/rails
0 → 100755
This diff is collapsed.
Click to expand it.
test/fixtures/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
test/functional/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
test/integration/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
test/performance/browsing_test.rb
0 → 100644
This diff is collapsed.
Click to expand it.
test/test_helper.rb
0 → 100644
This diff is collapsed.
Click to expand it.
test/unit/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
vendor/assets/javascripts/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
vendor/assets/stylesheets/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
vendor/plugins/.gitkeep
0 → 100644
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment