Skip to content

Commit

Permalink
结构调整,增加了分渠道
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyc-z committed Aug 7, 2017
1 parent 4a632e1 commit 4dd8fda
Show file tree
Hide file tree
Showing 32 changed files with 588 additions and 180 deletions.
59 changes: 59 additions & 0 deletions app/assets/stylesheets/apps/index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,65 @@
.app.index{
&.app-host-container{
margin-top: 20px;
@media (min-width: 901px){
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-content: flex-start;
.cell{
overflow: hidden;
$icon_with : 100px;
margin-bottom: 20px;
&.new{
.cell-container{
border: solid 1px #337ab7;
}
}
.divider{
display: none;
}
.cell-container{
overflow: hidden;
height: 460px;
border: none;
box-sizing: border-box;
background-color: #fff;
padding: 20px 32px;
.icon{
width: $icon_with;
height: $icon_with;
border-radius: 17.544%;
overflow: hidden;
margin: 12px 0;
img{
width: 100%;
}
}
.detail{
display: block;
width:-moz-calc(100% - 48px);
width:-webkit-calc(100% - 48px);
width: calc(100% - 48px);
.title{
display: block;
width: 100%;
font-size: 16px;
}
.date-label{
float: right;
font-size: 13px;
color: #999999;
}
.sub-title{
color: #666666;
font-size: 13px;
}
}
}
}

}
@media (max-width: 900px){
padding-left: 0px;
padding-right: 0px;
Expand Down
13 changes: 8 additions & 5 deletions app/assets/stylesheets/apps/new.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
.new_app{
margin: 0 auto;
border: solid 1px #ddd;
width: 400px;
margin-top: 80px;
width: 360px;
margin-top: 16%;
border-radius: 4px;
box-sizing: border-box;
padding: 12px;
background-color: #fff;
@media (max-width: 900px){
width: 100%;
}
.title{
border-bottom: solid 1px #ddd;
font-size: 20px;
font-size: 18px;
color: #03A3FC;
font-weight: normal;
line-height: 34px;
span{
border-bottom: solid 1px #03A3FC;
line-height: 34px;
Expand All @@ -22,7 +25,7 @@
.form-group{
margin-top: 22px;
label{
color: #666;
color: #999;
font-size: 14px;
font-weight: normal;
}
Expand Down
97 changes: 1 addition & 96 deletions app/assets/stylesheets/apps/show.scss
Original file line number Diff line number Diff line change
@@ -1,98 +1,3 @@
.app.show{
.first-page{
height: 100vh;
display: flex;
width: 100%;
/*background-color: yellow;*/
.info-container{
margin: auto;
/*background-color: red; */
}
.app-info{
.icon{
width: 75px;
height: 75px;
border-radius: 10px;
margin: 0 auto;
overflow: hidden;
img{
width: 100%;
}
}
.title{
text-align: center;
color: #4A4A4A;
font-size: 20px;
margin-top: 18px;
}
.info{
text-align: center;
color: #9B9B9B;
font-size: 14px;

}
}
.download-btn{
width: 165px;
display: block;
margin: 0 auto;
background-color: #03A3FC;
color: white;
font-size: 16px;
border-radius: 20px;
text-align: center;
line-height: 40px;
margin-top: 60px;
}
}
.qrcode{
position: relative;
text-align: center;
top: -30px;
img{
width: 91px;
margin: 0 auto;
}
label{
font-size: 13px;
color: #9B9B9B;
text-align: center;
margin-top: 6px;
font-weight: normal;
}
}
.history{
box-sizing: border-box;
padding: 0 12px;
width: 100%;
.wrap{
background-color: #F8F8F8;
border-radius: 4px;
padding: 1px 20px;
.title{
font-size: 14px;
color: #666666;
}
.day-block{
.title{
font-size: 14px;
color: #9B9B9B;
font-weight: normal;
}
li{
color: #9B9B9B;
font-size: 13px;
}
}
}
}

.footer{
text-align: center;
a{
font-size: 14px;
color: #DEDEDE;
line-height: 44px;
}
}
padding-top: 22px;
}
98 changes: 98 additions & 0 deletions app/assets/stylesheets/packages/show.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
.app.show{
.first-page{
height: 100vh;
display: flex;
width: 100%;
/*background-color: yellow;*/
.info-container{
margin: auto;
/*background-color: red; */
}
.app-info{
.icon{
width: 75px;
height: 75px;
border-radius: 10px;
margin: 0 auto;
overflow: hidden;
img{
width: 100%;
}
}
.title{
text-align: center;
color: #4A4A4A;
font-size: 20px;
margin-top: 18px;
}
.info{
text-align: center;
color: #9B9B9B;
font-size: 14px;

}
}
.download-btn{
width: 165px;
display: block;
margin: 0 auto;
background-color: #03A3FC;
color: white;
font-size: 16px;
border-radius: 20px;
text-align: center;
line-height: 40px;
margin-top: 60px;
}
}
.qrcode{
position: relative;
text-align: center;
top: -30px;
img{
width: 91px;
margin: 0 auto;
}
label{
font-size: 13px;
color: #9B9B9B;
text-align: center;
margin-top: 6px;
font-weight: normal;
}
}
.history{
box-sizing: border-box;
padding: 0 12px;
width: 100%;
.wrap{
background-color: #F8F8F8;
border-radius: 4px;
padding: 1px 20px;
.title{
font-size: 14px;
color: #666666;
}
.day-block{
.title{
font-size: 14px;
color: #9B9B9B;
font-weight: normal;
}
li{
color: #9B9B9B;
font-size: 13px;
}
}
}
}

.footer{
text-align: center;
a{
font-size: 14px;
color: #DEDEDE;
line-height: 44px;
}
}
}
32 changes: 32 additions & 0 deletions app/assets/stylesheets/scaffolds.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,35 @@
border-color: #f9f9f9;
}

.ui-plat{
border-radius: 2px;
}
.ui-color{
color: #03A3FC;
}
.ui-bgcolor{
background-color: #03A3FC;
}

.app{
input[type=text],textarea{
border-color: #ddd;
border-radius: 2px;
}
}

@media (min-width: 1200px){
.container{
width: 1024px;
}
}

@media (min-width: 901px){
body{
background-color: #F6F6F6;
}
.app-host-nav {
color: #463265;
background-color: #fff;
}
}
12 changes: 7 additions & 5 deletions app/controllers/apps_controller.rb
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
class AppsController < ApplicationController
# before_action :set_app, only: [:show, :edit, :update, :destroy, :comments]
before_action :set_app, only: [:show, :edit, :update, :destroy, :comments]

def index

@apps = App.all
end

def show
redirect_to app_plats_path @app
end

def new
@app = App.new
end

def create
byebug
app = App.create(app_params)
redirect_to app
end

private
# Use callbacks to share common setup or constraints between actions.
def set_app
@post = App.find(params[:id])
@app = App.find(params[:id])
end


# Never trust parameters from the scary internet, only allow the white list through.
def app_params
params.require(:post).permit(:title,:image,:content,:contact,:copyright_origin,:copyright_wechat,:copyright_share,:copyright_anony);
params.require(:app).permit(:name,:desc);
end
end
Loading

0 comments on commit 4dd8fda

Please sign in to comment.