leostratus / lunchbattle

White Day Hackathon Project Repo
1 stars 1 forks source link

Style restaurant entries #6

Open chancancode opened 12 years ago

chancancode commented 12 years ago

What I have so far, feel free to change however you want. Don't be afraid to change the html to meet your needs (it's in app/views/restaurants/_restaurant.html.erb).

See http://foodfight2.herokuapp.com/searches/9 and http://foodfight2.herokuapp.com/fights/1 for how it is currently used.

Desktop: desktop mobile desktop mobile

CSS (merge this into your scss when you're up and running):

div#fight-wrapper {
  text-align: center;
}

div#fight {
  display: inline-block;
  vertical-align: top;
  width: 441px;
  padding: 35px 20px 15px;
  background: white;
  border: 3px solid black;
  margin: 10px 0;
}

div#fight div.vote {
  padding: 10px 0;
}

div#results {
  margin: 10px 0;
  text-align: left;
}

div.restaurant {
  margin: 0;
  padding: 10px;
  border-top: 1px solid #DDD;
  text-align: left;
  overflow: hidden;
}

div.restaurant span {
  padding: 0;
  display: block;
}

div.restaurant>span {
  margin-left: 94px;
}

div.restaurant span.photo {
  float: left;
  margin: 0;
  padding: 0;
  width: 84px;
  height: 84px;
  overflow: hidden;
}

div.restaurant span.photo img {
  border-radius: 5px;
  width: 84px;
  height: 84px;
}

div.restaurant span.rating {
  clear: left;
  float: left;
  margin: 5px 0 0 0;
  padding: 0;
}

div.restaurant span.name.mobile {
  display: none;
}

div.restaurant span.country, div.restaurant span.state, div.restaurant span.zip {
  display: inline-block;
  margin-right: 5px;
}

div.restaurant span.address {
  padding: 5px 0;
}