diff --git a/app/assets/javascripts/errors.coffee b/app/assets/javascripts/errors.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/errors.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://coffeescript.org/ diff --git a/app/assets/stylesheets/account/posts.scss b/app/assets/stylesheets/account/posts.scss index 0b4d8f0..c1d570b 100644 --- a/app/assets/stylesheets/account/posts.scss +++ b/app/assets/stylesheets/account/posts.scss @@ -1,3 +1,20 @@ // Place all the styles related to the account::posts controller here. // They will automatically be included in application.css. // You can use Sass (SCSS) here: http://sass-lang.com/ + +.post-box{ + width:760px; + min-height: 200px; + .id{ + width: 30px; + } + .description{ + width: 430px; + } + .oprate{ + width: 100px; + } + .create-time{ + width: 200px; + } +} diff --git a/app/assets/stylesheets/devise.scss.erb b/app/assets/stylesheets/devise.scss.erb index 0f1dfe0..bbd1f2e 100644 --- a/app/assets/stylesheets/devise.scss.erb +++ b/app/assets/stylesheets/devise.scss.erb @@ -20,6 +20,18 @@ a:visited {color: #fff} ; a:hover {text-decoration:underline; color: #fff} ; a:active {text-decoration:underline; color: #fff} ; + .has-error .help-block, + .has-error .control-label, + .has-error .radio, + .has-error .checkbox, + .has-error .radio-inline, + .has-error .checkbox-inline, + .has-error.radio label, + .has-error.checkbox label, + .has-error.radio-inline label, + .has-error.checkbox-inline label{ + color: #fff; + } .btn-devise, .btn-devise:focus, .btn-devise.focus , diff --git a/app/assets/stylesheets/errors.scss b/app/assets/stylesheets/errors.scss new file mode 100644 index 0000000..4d61ffa --- /dev/null +++ b/app/assets/stylesheets/errors.scss @@ -0,0 +1,25 @@ +// Place all the styles related to the errors controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ + +.error-block{ + background-color: #fff; + margin: 20px; + padding-top: 100px; + width: 500px; + height: 300px; + i{ + font-size:1.2em; + padding-right: 5px; + color: #3499E0; + } + h1{ + font-size: 1.5em; + } + h2{ + font-size: 1.2em; + } + p{ + margin-top: 20px; + } +} diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index 1117586..3f657a1 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -91,6 +91,25 @@ hr{ border-bottom: 1px solid #CCCCCC; } +.navbar-link{ + font-size: 1em; + font-weight: bold; + margin-top: 20px; + margin-left: 30px; + a:link {color: #666}; + a:visited {color: #666} ; + a:hover {color: #43cb83} ; + a:active {color: #43cb83}; + a{ + margin-left: 12px; + } +} + +.logo span{ + font-size: 22px; + font-weight: bold; + // color: #43cb83 +} // config navbar end diff --git a/app/assets/stylesheets/newwelcome.scss.erb b/app/assets/stylesheets/newwelcome.scss.erb index 78bc660..6e0c3a4 100644 --- a/app/assets/stylesheets/newwelcome.scss.erb +++ b/app/assets/stylesheets/newwelcome.scss.erb @@ -204,7 +204,7 @@ top: 41px; z-index: 49; position: absolute; - background-image: url('<%= asset_path("quotes2.jpg") %>'); + // background-image: url('<%= asset_path("quotes2.jpg") %>'); } .lp-pom-box-77 { display: block; diff --git a/app/assets/stylesheets/projects.scss.erb b/app/assets/stylesheets/projects.scss.erb index bceb511..3f42af4 100644 --- a/app/assets/stylesheets/projects.scss.erb +++ b/app/assets/stylesheets/projects.scss.erb @@ -70,8 +70,7 @@ margin-top: 40px; .sh-progress-whole { margin: 10px 0 5px; - width: 100%; - min-width: 1200px; + width: 325px; height: 15px; } .sh-progress-content { @@ -244,7 +243,7 @@ // config project index .index-out{ - min-width:900px; + min-width: 1200px; margin: auto; text-align:center; } @@ -491,7 +490,259 @@ margin: -15px 0 15px; } -.user-info-edit{ +.user-center-detail-block{ width:400px; min-height: 630px; } + +.project-post-manage{ + width:400px; + min-height: 630px; +} + +// config new search bar +.header-categories__search { + float: right; + padding-top: 7px; + width: 170px +} + + +.search-field { + display: -webkit-flex; + display: -ms-flexbox; + display: flex +} + +.search-field.-size-xl { + font-size: 16px; + height: 60px +} + +.search-field.-size-l { + font-size: 16px; + height: 50px +} + +.search-field.-size-m { + font-size: 14px; + height: 40px +} + +.search-field,.search-field.-size-s { + font-size: 16px; + height: 30px +} + +@media (min-width: 1025px) { + .search-field,.search-field.-size-s { + font-size: 13px + } +} + +.search-field__input { + -webkit-flex: 1 auto; + -ms-flex: 1 auto; + flex: 1 auto; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + min-width: 0 +} + +input.search-field__input-field { + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + box-sizing: border-box; + padding: 5px 8px 6px; + border: 1px solid #bababa; + border-radius: 7px 0 0 7px; + border-right: 0; + color: gray; + -webkit-appearance: none; + outline: none; + min-width: 0 +} + +@media (min-width: 1025px) { + .-size-xl input.search-field__input-field { + padding: 5px 20px + } +} + +@media (min-width: 1025px) { + .-size-l input.search-field__input-field { + padding: 5px 15px + } +} + +.-border-none input.search-field__input-field { + border: none +} + +.-border-light input.search-field__input-field { + border-color: #dedede +} + +@media (min-width: 1025px) { + input.search-field__input-field.is-autosuggest-visible { + border-bottom-left-radius: 0 + } +} + +button.search-field__button { + -webkit-flex: 0 0 30px; + -ms-flex: 0 0 30px; + flex: 0 0 30px; + padding: 3px 0 2px; + background-color: #fff; + color: #999; + border-radius: 0 7px 7px 0; + border: 1px solid #bababa; + border-left: none; + font-size: 14px; + -webkit-transition: background-color 0.2s; + transition: background-color 0.2s +} + +button.search-field__button:hover { + background-color: #f5f5f5 +} + +button.search-field__button:hover:before { + color: #333 +} + +button.search-field__button:focus { + background-color: #fff +} + +button.search-field__button:active { + background-color: #ededed +} + +.-theme-3docean button.search-field__button:hover { + color: #ab0f34 +} + +.-theme-audiojungle button.search-field__button:hover { + color: #9ac130 +} + +.-theme-codecanyon button.search-field__button:hover { + color: #e78733 +} + +.-theme-graphicriver button.search-field__button:hover { + color: #308eb1 +} + +.-theme-photodune button.search-field__button:hover { + color: #0f8c98 +} + +.-theme-themeforest button.search-field__button:hover { + color: #1abc9c +} + +.-theme-videohive button.search-field__button:hover { + color: #e7a802 +} + +.-size-l button.search-field__button { + -webkit-flex-basis: 45px; + -ms-flex-preferred-size: 45px; + flex-basis: 45px; + font-size: 20px +} + +@media (min-width: 569px) { + .-size-l button.search-field__button { + -webkit-flex-basis: 70px; + -ms-flex-preferred-size: 70px; + flex-basis: 70px; + font-size: 24px + } +} + +.-size-xl button.search-field__button { + -webkit-flex-basis: 45px; + -ms-flex-preferred-size: 45px; + flex-basis: 45px; + font-size: 20px +} + +@media (min-width: 569px) { + .-size-xl button.search-field__button { + -webkit-flex-basis: 80px; + -ms-flex-preferred-size: 80px; + flex-basis: 80px; + font-size: 26px + } +} + +.-border-none button.search-field__button { + border: none +} + +.-border-light button.search-field__button { + border-color: #dedede +} + +.no-flexbox .search-field { + display: block; + width: 100% +} + +.no-flexbox .search-field:after { + content: ""; + display: table; + clear: both +} + +.no-flexbox .search-field.-size-l .search-field__button { + width: 18%; + max-width: 70px; + font-size: 24px +} + +.no-flexbox .search-field.-size-xl .search-field__button { + width: 18%; + max-width: 80px; + font-size: 26px +} + +.no-flexbox .search-field__input { + display: block; + float: left; + width: 85%; + height: 100% +} + +@media (max-width: 568px) { + .no-flexbox .search-field__input { + width: 82% + } +} + +.no-flexbox input[type='search']::-ms-clear { + height: 0; + width: 0 +} + +.no-flexbox .search-field__input-field { + width: 100%; + height: 100% +} + +.no-flexbox .search-field__button { + display: block; + float: left; + height: 100%; + width: 15% +} + +// new searchbar end diff --git a/app/assets/stylesheets/welcome.scss.erb b/app/assets/stylesheets/welcome.scss.erb index 5712d47..2ba4ca7 100644 --- a/app/assets/stylesheets/welcome.scss.erb +++ b/app/assets/stylesheets/welcome.scss.erb @@ -100,17 +100,20 @@ } .lp-action.btn.sm{ - font-size: 1em; + font-size: 15px; text-align: center; - padding: 5px; + padding: 7px 0 0 6px; margin: 3px; width: 95px; height: 35px; letter-spacing: 0.2em; a:link {color: #FFFFFF}; a:visited {color: #FFFFFF} ; - a:hover {color: #FBFBFB} ; - a:active {color: #FBFBFB}; +} + +.lp-action.btn.sm.btn:hover, .lp-action.btn.sm.btn:focus, .lp-action.btn.sm.btn.focus{ + background-color: #5ed295; + color: #FBFBFB; } // nfreeness定义样式结束 @@ -312,4 +315,18 @@ height: 110px; } + .side-bar-block{ + width: 110px; + // background-color: blue; + } + + .des-block{ + margin-top: 20px; + padding: 40px; + background-color: #fff; + p{ + padding:0 20px; + } + } + // liyanzeng定义样式结束 diff --git a/app/controllers/account/orders_controller.rb b/app/controllers/account/orders_controller.rb index 68cdff3..42f3432 100644 --- a/app/controllers/account/orders_controller.rb +++ b/app/controllers/account/orders_controller.rb @@ -4,7 +4,7 @@ class Account::OrdersController < AccountController def index @orders = current_user.orders.select("project_id, project_name").group(:project_id, :project_name) # @orders = current_user.orders.select("id").where(project_id: @project_ids).distinct - set_page_title_and_description("我支持的项目", view_context.truncate(@orders.first .nil? ? "我支持的项目" : @orders.first.project_name, :length => 100)) + set_page_title_and_description("我支持的项目", nil) end def show_orders_for_one_project diff --git a/app/controllers/account/projects_controller.rb b/app/controllers/account/projects_controller.rb index cec8ea8..2cd6002 100644 --- a/app/controllers/account/projects_controller.rb +++ b/app/controllers/account/projects_controller.rb @@ -7,7 +7,7 @@ def index if params[:category_id] @projects = current_user.projects.where(category_id: params[:category_id]) end - set_page_title_and_description("我发起的项目", view_context.truncate(@projects.first.nil? ? "我发起的项目" : @projects.first.name , :length => 100)) + set_page_title_and_description("我发起的项目", nil) end def new diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb new file mode 100644 index 0000000..2e647bb --- /dev/null +++ b/app/controllers/errors_controller.rb @@ -0,0 +1,9 @@ +class ErrorsController < ApplicationController + def not_found + render(:status => 404) + end + + def internal_server_error + render(:status => 500) + end +end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index eac5a73..7121cef 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -8,7 +8,18 @@ def how_it_works @projects = Project.find(1,2,3) set_page_title_and_description("用户指南", nil) end + + def help_term + set_page_title_and_description("服务协议", nil) + render layout: "about_us" + end + def about_us set_page_title_and_description("关于我们", nil) + render layout: "about_us" + end + def contact_us + set_page_title_and_description("联系我们", nil) + render layout: "about_us" end end diff --git a/app/helpers/errors_helper.rb b/app/helpers/errors_helper.rb new file mode 100644 index 0000000..8e3b415 --- /dev/null +++ b/app/helpers/errors_helper.rb @@ -0,0 +1,2 @@ +module ErrorsHelper +end diff --git a/app/views/account/posts/index.html.erb b/app/views/account/posts/index.html.erb index 6054742..2c2c0a0 100644 --- a/app/views/account/posts/index.html.erb +++ b/app/views/account/posts/index.html.erb @@ -1,15 +1,16 @@ +
| # | -动态内容 | -操作 | -创建时间 | +# | +动态内容 | +操作 | +创建时间 | <%= index + 1 %> | <%= render_post_description(post) %> | - <%= link_to("删除", account_project_post_path(post.project, post), method: :delete, class: "btn btn-sm btn-danger" , data: {confirm: "确认删除该回报么?"}) %> + <%= link_to("删除", account_project_post_path(post.project, post), method: :delete, class: "btn btn-sm btn-danger" , data: {confirm: "确定删除该动态吗?"}) %> | <%= render_order_created_at(post.created_at) %> | @@ -30,3 +31,4 @@
|---|