public
Created — forked from /gist:2036312

Cesar Mobile Site

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
//html
 
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="css/styles.css" />
<script src="js/jquery.js"> </script>
<script src="js/source.js"></script>
<title>CESAR Professional Photographer</title>
</head>
<body>
 
<div id="container"> <!-- Container -->
<div id="home"> <!-- page Home -->
<div id="header"> <!-- Header -->
<span class="logo">Cesar</span>
<span class="slogan">Photographer</span>
</div> <!-- end Header -->
 
<div class="menu"> <!-- Menu -->
<ul>
<li class="submenu"><a href="#">Ensaios</a></li>
<ul>
<li class="pessoas"><a href="#">Pessoas</a></li>
<li class="outros"><a href="#">Outros</a></li>
 
</ul>
<li><a href="#">Paisagens</a></li>
<li><a href="#">Quem somos</a></li>
<li><a href="#">Contato</a></li>
</ul>
</div> <!-- end Menu -->
<div class="footer"> <!-- Footer -->
<div class="texto">
<p>Alguns direitos reservados <span class="bold">Marcker &copy;</span> 2012 </p>
</div>
</div> <!-- end Footer -->
 
</div> <!-- end page Home -->
 
<div id="ensaios"> <!-- page Ensaios -->
<div class="menu"> <!-- Menu -->
<ul>
<li>Home</li>
</ul>
</div> <!-- end Menu -->
 
<div id="pessoas">
<h1> Pessoas</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
</div>
 
<div id="outros">
<h1>Outros</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
</div>
</div> <!-- end page Ensaios -->
 
<div id="paisagens"> <!-- page Paisagens -->
<div class="menu"> <!-- Menu -->
<ul>
<li>Home</li>
</ul>
</div> <!-- end Menu -->
 
<div class="content">
<h1> Arvores</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
</div>
 
</div> <!-- end page Paisagens -->
 
<div id="quemsomos"> <!-- page Quemsomos -->
<div class="menu"> <!-- Menu -->
<ul>
<li>Home</li>
</ul>
</div> <!-- end Menu -->
 
<div class="content">
<h1> Quem Somos</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
</div>
</div> <!-- end page Quemsomos -->
 
<div id="contato"> <!-- page Contato -->
<div class="menu"> <!-- Menu -->
<ul>
<li>Home</li>
</ul>
</div> <!-- end Menu -->
 
<div id="content">
<h1> Contato</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.</p>
</div>
</div> <!-- end page Contato-->
 
</div> <!-- end Container -->
 
</body>
</html>
 
//css
 
body{
font-family:Helvetica,Arial,sans-serif;
margin:0;
}
 
.bold {
font-weight:bold;
}
 
#home,
#ensaios,
#paisagens,
#contato,
#quemsomos{
margin-bottom:10px;
}
 
#header{
background:url('../img/bg_header.jpg') repeat-x #585451;
height:auto;
margin-bottom:10px;
padding:2px;
}
.logo{
font-size:45px;
color:#ccc;
margin-left:20px;
}
 
.slogan{
font-size:25px;
font-weight:bold;
color:#999;
font-style:italic;
text-align:right;
margin-left:3px;
vertical-align:-70%;
}
 
.menu{
text-align:center;
}
 
.menu *{
margin: 0 auto;
}
 
.menu ul{
list-style-type:none;
font-weight:bold;
margin-left:-40px;
}
 
.menu ul li{
background: url('../img/bg_menu.jpg') repeat-x #95d2f1;
width:200px;
height:35px;
line-height:35px;
margin-bottom:10px;
border-radius: 5px;
}
 
.menu ul li:hover{
background: #CCC;
}
 
.menu ul > ul li{
background:#999;
}
 
.submenu{
background: url('../img/mais.png') no-repeat #95d2f1 15px center !important; /* dando prioridade para o sinal de + */
}
 
.menu a{
text-decoration:none;
color:#FFF;
}
 
.footer{
position:absolute;
left:0px;
bottom:0px;
height:5%;
width:100%;
background:#999;
}
 
.footer p{
color:#FFF;
text-align:center;
}
 
//jquery
 
$(document).ready(function() {
 
function viewport_height(){
return $(window).height();
}
 
function viewport_width(){
return $(window).width();
}
 
function ajustar_viewport(ids){
var i;
 
for (i = 0; i < ids.length; i += 1){
$(ids[i]).height(viewport_height());
 
}
}
 
function effect(selectors, speed, event) {
$(selectors).next().toggle(speed);
}
 
function hidden(selectors){
$(selectors).next().hide();
}
 
function scroller(destino) {
$(document.body).animate({ scrollTop: $(destino).offset().top }, 'slow');
}
 
hidden('.submenu');
ajustar_viewport([
'#home',
'#ensaios',
'#paisagens',
'#quemsomos',
'#contato'
]);
 
$('.submenu').click(function(e){
effect(this, 'slow');
e.preventDefault();
});
 
$('.pessoas').click(function(e) {
scroller('#pessoas');
e.preventDefault();
});
 
$('.outros').click(function(e) {
scroller('#outros');
e.preventDefault();
});
});

Editar até 19/03/2012

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.