Commit bfed24d1 by vulehuan

create master page

parent 717420e6
# 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/
// Extra small screen / phone
$screen-xs: 480px;
$screen-phone: $screen-xs;
// Small screen / tablet
$screen-sm: 768px;
$screen-tablet: $screen-sm;
// Medium screen / desktop
$screen-md: 992px;
$screen-desktop: $screen-md;
// Large screen / wide desktop
$screen-lg: 1200px;
$screen-lg-desktop: $screen-lg;
body {
font-family: Tahoma, "Times New Roman", Times, serif;
font-size: 12px;
color: #000;
background-image: url("../images/bg1.jpg");
}
.container {
background: #FFF;
}
.sprite-1 {
background: url("../images/sprite_1.png");
}
.sprite-2 {
background: url("../images/sprite_2.png");
}
.margin-1 {
margin-top: 10px;
}
header {
padding: 5px 0;
margin-right: -15px;
@media (max-width: $screen-xs) {
margin-right: 0;
}
position: relative;
.banner {
margin-top: 9px;
@media (min-width: $screen-lg-desktop) {
margin-top: 3px;
}
img {
border-radius: 4px;
box-shadow: 4px 4px 4px #888888;
}
}
.block-user-action {
position: absolute;
bottom: 19px;
right: 10px;
box-shadow: 4px 4px 4px #666;
border-radius: 5px;
@media (min-width: $screen-lg-desktop) {
bottom: 8px;
}
ul, li {
list-style: none;
margin: 0;
padding: 0;
}
li {
float: left;
margin-left: 10px;
}
}
}
h1 {
&.logo {
a {
width: 160px;
height: 100px;
color: transparent;
font-size: 0;
overflow: hidden;
display: inline-block;
background: url("../images/logo.jpg") no-repeat;
}
}
}
.block-search {
margin-right: -15px;
@media (max-width: $screen-xs) {
margin-right: 0;
}
padding-bottom: 10px;
.btn {
span {
margin-right: 7px;
}
&:hover {
color: #FFFF00;
}
}
.btn-default {
font-weight: bold;
text-transform: uppercase;
color: #FFF;
background-color: #72a930;
border-color: #ccc;
padding: 7px 12px;
margin-top: -1px;
}
}
.breadcrumb {
margin-left: -15px;
font-size: 13px;
font-weight: bold;
padding: 4px 15px 4px 0;
span {
display: block;
float: left;
margin-right: 10px;
}
ul, li {
list-style: none;
margin: 0;
padding: 0;
}
li {
float: left;
color: #428bca;
&:after {
content: ">>";
}
&.last:after {
content: "";
}
a {
padding: 0 10px;
}
}
}
.box {
border: 1px solid #ccc;
border-radius: 4px;
margin-bottom: 13px;
&.bg {
background: url("../images/n.jpg");
}
h2 {
position: relative;
margin: 0;
padding: 2px 0;
background: #f1f3ee;
.corner-left, .corner-right {
position: absolute;
display: block;
width: 32px;
height: 26px;
overflow: hidden;
top: 2px;
}
.corner-left {
left: 3px;
}
.corner-right {
right: 3px;
background-position: top right;
background-position-y: -100px;
}
.text {
display: block;
background-position-y: -50px;
color: #FFF;
font-weight: bold;
text-transform: uppercase;
font-family: Tahoma;
font-size: 11px;
min-height: 26px;
line-height: 26px;
text-align: center;
margin: 0 7px 0 3px;
}
}
a {
font-weight: bold;
color: #000;
&:hover {
color: #900;
}
}
.list, .list li {
list-style: none;
margin: 0;
padding: 0;
}
.list {
&>li {
background: url("../images/icon_1.gif") 0 7px no-repeat;
border-bottom: 1px solid #CCC;
&.last {
border-bottom: none;
}
&>a {
border: none;
border-radius: 0;
display: block;
padding: 7px 15px 7px 20px;
&:hover, &:focus {
background: none;
border-color: #CCC;
}
}
}
}
}
footer {
background: url("../images/bg_footer.jpg") repeat-x;
padding: 20px 10px 10px 10px;
margin-top: 10px;
margin-left: -15px;
margin-right: -15px;
@media (max-width: $screen-xs) {
margin-right: 0;
margin-left: 0;
}
}
.body-box {
border: 1px solid #CCC;
margin-left: -15px;
margin-right: -15px;
padding-left: 16px;
padding-right: 16px;
@media (max-width: $screen-xs) {
margin-right: 0;
margin-left: 0;
}
h2 {
margin: 0;
padding: 0;
background-position-y: -50px;
background-repeat: repeat-x;
height: 29px;
position: relative;
padding-left: 29px;
line-height: 29px;
margin-left: -15px;
margin-right: -15px;
color: #9A370B;
font-weight: bold;
text-decoration: none;
text-transform: uppercase;
font-size: 11px;
font-family: Tahoma;
background-position-y: -50px;
span {
display: block;
width: 29px;
height: 29px;
position: absolute;
width: 29px;
top: 0;
left: 0;
}
}
}
.grid-view {
.col-md-3 {
padding: 0;
}
.item {
border: 1px solid #CCC;
margin: 1px 1px 2px 1px;
.thumbnail {
border: none;
}
h4 {
font-family: Tahoma;
font-size: 11px;
font-weight: bold;
text-align: center;
line-height: 120%;
a {
color: #333;
}
}
.price {
color: #000;
font-weight: bold;
text-align: center;
padding-top: 15px;
padding-bottom: 5px;
span {
color: #F00;
}
}
.action {
text-align: center;
padding-bottom: 7px;
.view-detail, .order {
color: transparent;
font-size: 0;
display: inline-block;
overflow: hidden;
height: 19px;
}
.view-detail {
width: 74px;
background: url("../images/detail.png") no-repeat;
margin-right: 10px;
}
.order {
width: 84px;
background: url("../images/order.png") no-repeat;
}
}
}
}
.list-view {
.col-md-3 {
width: 100%;
clear: left;
padding-top: 10px;
}
.item {
.thumbnail {
width: 25%;
float: left;
margin-right: 10px;
}
h4 {
padding-left: 10px;
margin-left: 25%;
margin-bottom: -25px;
}
.price {
font-size: 13px;
padding-bottom: 5px;
font-weight: bold;
padding-top: 35px;
span {
font-size: 14px;
color: #FF0000;
}
}
.action {
padding-bottom: 7px;
text-align: left;
.view-detail, .order {
color: transparent;
font-size: 0;
display: inline-block;
overflow: hidden;
height: 19px;
}
.view-detail {
width: 74px;
background: url("../images/detail.png") no-repeat;
margin-right: 10px;
}
.order {
width: 84px;
background: url("../images/order.png") no-repeat;
}
}
}
}
#block-slide {
margin-left: -15px;
margin-right: -15px;
@media (max-width: $screen-xs) {
margin-right: 0;
margin-left: 0;
}
padding-bottom: 10px;
}
.block-advertising .thumbnail {
margin: 5px;
margin-top: 0;
}
\ No newline at end of file
// Place all the styles related to the DefaultPages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
class DefaultPagesController < ApplicationController
def home
end
end
module ApplicationHelper
# Returns the full title on a per-page basis.
def full_title(page_title)
base_title = "Venshop"
if page_title.empty?
base_title
else
"#{page_title} | #{base_title}"
end
end
end
<% provide(:title, "Home page") %>
<h1>DefaultPages#home</h1>
<p>Find me in app/views/default_pages/home.html.erb</p>
<!-- Advertising -->
<div class="box">
<h2>
<span class="sprite-1 text">Advertising</span><span
class="sprite-1 corner-left"></span><span
class="sprite-1 corner-right"></span>
</h2>
<div class="block-advertising">
<a href="" class="thumbnail"><img
src="<%= image_path('') %>/images/upload/ads/1.jpg" alt="" /></a> <a href=""
class="thumbnail"><img src="<%= image_path('') %>/images/upload/ads/2.gif" alt="" /></a>
<a href="" class="thumbnail"><img
src="<%= image_path('') %>/images/upload/ads/3.png" alt="" /></a> <a href=""
class="thumbnail"><img src="<%= image_path('') %>/images/upload/ads/4.jpg" alt="" /></a>
<a href="" class="thumbnail"><img
src="<%= image_path('') %>/images/upload/ads/5.jpg" alt="" /></a> <a href=""
class="thumbnail"><img src="<%= image_path('') %>/images/upload/ads/6.jpg" alt="" /></a>
</div>
</div>
\ No newline at end of file
<!-- footer -->
<div class="container">
<footer>
<b>Venshop - Huan Vu Le</b><br /> <b>Address</b>: 17 No.2 street, Cu
Xa Do Thanh, Ward 4 Dist. 3, HCMC, Vietnam <br /> <b>Email</b>: <a
href="mailto:info@zigexn.vn">info@zigexn.vn</a><br /> <b>Website</b>:
<a href="http://zigexn.vn">http://http://zigexn.vn.com</a>
</footer>
</div>
\ No newline at end of file
<header>
<div class="row">
<div class="col-md-2 col-sm-2">
<h1 class="logo pull-left"><a href="">Venshop</a></h1>
</div>
<div class="col-md-10 col-sm-10">
<div class="banner pull-right">
<a href=""><img src="<%= image_path('') %>/images/upload/banner/1.png" class="img-responsive" alt="" /></a>
</div>
</div>
</div>
<div class="block-user-action">
<div class="btn-group">
<a data-toggle="modal" href="#map-modal" class="btn btn-primary">
<span class="glyphicon glyphicon-user"></span> Login
</a> <a href="" class="btn btn-default"> <span
class="glyphicon glyphicon-hand-right"></span> Register
</a> <a href="" class="btn btn-danger last"> <span
class="glyphicon glyphicon-shopping-cart"></span> 0 item(s)
</a>
</div>
</div>
<div class="clearfix"></div>
</header>
<!-- search -->
<div class="input-group block-search">
<input id="txt-keyword" type="text" class="form-control"
placeholder="Enter keywords" value=""> <span
class="input-group-btn"> <a id="btn-search"
class="btn btn-default" href="javascript:void(0)"><span
class="glyphicon glyphicon-search"></span>Search</a>
</span>
</div>
\ No newline at end of file
<!-- Product category -->
<div class="box bg">
<h2>
<span class="sprite-1 text">Category</span><span
class="sprite-1 corner-left"></span><span
class="sprite-1 corner-right"></span>
</h2>
<ul class="list">
<li><a href="" title="">Category 1</a></li>
<li><a href="" title="">Category 2</a></li>
<li><a href="" title="">Category 3</a></li>
<li><a href="" title="">Category 4</a></li>
<li><a href="" title="">Category 5</a></li>
<li><a href="" title="">Category 6</a></li>
<li><a href="" title="">Category 7</a></li>
<li><a href="" title="">Category 8</a></li>
<li><a href="" title="">Category 9</a></li>
<li class="last"><a href="" title="">Category 10</a></li>
</ul>
</div>
\ No newline at end of file
<!-- slide -->
<div id="block-slide">
<div id="carousel-example-generic"
class="carousel carousel-fade slide">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0"
class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<a href=""><img class="img-responsive"
src="<%= image_path('') %>/images/upload/slide/1.png" alt="" /></a>
</div>
<div class="item">
<a href=""><img class="img-responsive"
src="<%= image_path('') %>/images/upload/slide/2.jpg" alt="" /></a>
</div>
<div class="item">
<a href=""><img class="img-responsive"
src="<%= image_path('') %>/images/upload/slide/3.jpg" alt="" /></a>
</div>
</div>
</div>
</div>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>VenshopApp</title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<title><%= full_title(yield(:title)) %></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%= csrf_meta_tags %>
<!-- Bootstrap core CSS -->
<link
href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"
rel="stylesheet">
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2pre/html5shiv.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<%= yield %>
<div class="container">
<!-- header -->
<%= render 'layouts/header' %>
</div>
<div class="container">
<div class="row">
<div class="col-md-3 col-sm-3 sidebar-first">
<%= render 'layouts/product_category' %>
<%= render 'layouts/advertising' %>
</div>
<div class="col-md-9 col-sm-9">
<%= render 'layouts/slide' %>
<nav class="breadcrumb">
<span>You are in: </span>
<ul>
<li><a href="">Home</a></li>
<li class="last"><a href="">Lorem Ipsum</a></li>
</ul>
</nav>
<div class="clearfix"></div>
<% flash.each do |key, value| %>
<%= content_tag(:div, value, class: "alert alert-#{key}") %>
<% end %>
<%= yield %>
</div>
</div>
</div>
<%= render 'layouts/footer' %>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
</body>
</html>
VenshopApp::Application.routes.draw do
get "default_pages/home"
get "users/new"
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
# root 'welcome#index'
root 'default_pages#home'
# Example of regular route:
# get 'products/:id' => 'catalog#view'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment