Skip to content

Commit

Permalink
project detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
xxseason committed Oct 24, 2015
1 parent 9d748f5 commit 56be228
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 33 deletions.
96 changes: 65 additions & 31 deletions app/assets/stylesheets/details.scss
Original file line number Diff line number Diff line change
@@ -1,45 +1,79 @@
.details {
// width: 749px;
width: 100%;
margin: 0 auto;
padding-bottom: 50px;
// position: relative;
.main-image {
// position: absolute;
// top: 0;
// z-index: -1px;
width: 100%;
}
.small-infos {
padding: 0px 5%;
margin-top: -108px;
> div {
display: inline-block;
width: 32%;
text-align: center;
color: #fff;
img {
display: block;
margin: auto;
height: 26px;
margin-bottom: 6px;
}
}
}
.address {
font-size: 18px;
color: #333;
text-align: center;
margin-top: -42px;
font-size: 18px;
margin-top: 24px;
color: #fff;
text-align: center;
}
.clearfix:after {
content: " ";
visibility: hidden;
display: block;
height: 0;
clear: both;
}
.location {
padding: 20px 6%;
div {
float: left;
margin-top: 5px;
margin-left: 14px;
}
}
.location-image {
height: 28px;
float: left;
}
.description {
font-size: 14px;
color: #666;
margin: 0px 20px;
padding: 48px 15px;
border-top: 1px solid #ebebeb;
border-bottom: 1px solid #ebebeb;
font-size: 14px;
color: #666;
margin: 0px 4%;
padding: 48px 2%;
border-top: 1px solid #ebebeb;
border-bottom: 1px solid #ebebeb;
}
.intro {
font-size: 14px;
color: #333;
margin: 0px 20px;
padding: 34px 15px;
span {
color: #2aa2cd;
}
.sponsor {
float: left;
}
img {
float: left;
height: 30px;
margin-top: 2px;
margin-left: 14px;
}
font-size: 14px;
color: #333;
margin: 0px 4%;
padding: 34px 2%;
span {
color: #2aa2cd;
}
.donate-image {
height: 20px;
}
.sponsor {
float: left;
}
> div {
img {
float: left;
height: 18px;
margin-left: 14px;
}
}
}
}
26 changes: 24 additions & 2 deletions app/views/projects/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
<div class="details">
<%= image_tag "http://7xleh2.dl1.z0.glb.clouddn.com/Top%20pic.png", class: "main-image" %>
<%= image_tag "http://7xleh2.dl1.z0.glb.clouddn.com/pic.png", class: "main-image" %>
<div class="small-infos">
<div class="distance">
<%= image_tag "http://7xleh2.dl1.z0.glb.clouddn.com/location.png" %>
<span>距离<%= @project.distance([0, 0]) %>km</span>
</div>
<div class="attendee">
<%= image_tag "http://7xleh2.dl1.z0.glb.clouddn.com/people.png" %>
<span>234人参加</span>
</div>
<div class="comments">
<%= image_tag "http://7xleh2.dl1.z0.glb.clouddn.com/review.png" %>
<span>45个评论</span>
</div>
</div>
<div class="address"><%= @project.address %></div>
<div class="location"></div>
<div class="location clearfix">
<%= image_tag "http://7xleh2.dl1.z0.glb.clouddn.com/address.png", class: "location-image" %>
<div>
<%= @project.location %>
</div>
</div>
<div class="description"><%= @project.description %></div>
<div class="intro">
<%= image_tag "http://7xleh2.dl1.z0.glb.clouddn.com/Donation.png", class: "donate-image" %>
<br>
<br>
<div class="">
<span>捐助项目:</span> 天翔助学计划。 天翔助学计划接收一对一的赞助, 希望能给贵州山区的孩子送去温暖.
</div>
Expand Down

0 comments on commit 56be228

Please sign in to comment.