Advertisement
angelos

GreeceJS: Intro to jQuery code

Jun 1st, 2011
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 8.06 KB | None | 0 0
  1. <!doctype html>
  2. <head>
  3.     <meta charset="utf-8">
  4.     <title>Το πιο απιστευτο-απίθανο blog του πλανήτη</title>
  5.     <meta name="author" content="GreeceJS"/>
  6.     <style type="text/css">
  7.  
  8.         /* http://meyerweb.com/eric/tools/css/reset/
  9.             v2.0 | 20110126
  10.             License: none (public domain)
  11.          */
  12.  
  13.         html, body, div, span, applet, object, iframe,
  14.         h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  15.         a, abbr, acronym, address, big, cite, code,
  16.         del, dfn, em, img, ins, kbd, q, s, samp,
  17.         small, strike, strong, sub, sup, tt, var,
  18.         b, u, i, center,
  19.         dl, dt, dd, ol, ul, li,
  20.         fieldset, form, label, legend,
  21.         table, caption, tbody, tfoot, thead, tr, th, td,
  22.         article, aside, canvas, details, embed,
  23.         figure, figcaption, footer, header, hgroup,
  24.         menu, nav, output, ruby, section, summary,
  25.         time, mark, audio, video {
  26.             margin: 0;
  27.             padding: 0;
  28.             border: 0;
  29.             font-size: 100%;
  30.             font: inherit;
  31.             vertical-align: baseline;
  32.         }
  33.  
  34.             /* HTML5 display-role reset for older browsers */
  35.         article, aside, details, figcaption, figure,
  36.         footer, header, hgroup, menu, nav, section {
  37.             display: block;
  38.         }
  39.  
  40.         body {
  41.             line-height: 1.3;
  42.             background: #C1CBD7;
  43.             font-family:Calibri;
  44.         }
  45.  
  46.         ol, ul {
  47.             list-style: none;
  48.         }
  49.  
  50.         blockquote, q {
  51.             quotes: none;
  52.         }
  53.  
  54.         blockquote:before, blockquote:after,
  55.         q:before, q:after {
  56.             content: '';
  57.             content: none;
  58.         }
  59.  
  60.         table {
  61.             border-collapse: collapse;
  62.             border-spacing: 0;
  63.         }
  64.  
  65.         h1 {
  66.             font-size:32px;
  67.             line-height:1.2em;
  68.             font-weight:bold;
  69.             margin-bottom:20px;
  70.         }
  71.  
  72.         h2 {
  73.             font-size:20px;
  74.             font-weight:bold;
  75.             line-height:1.4em;
  76.             margin-bottom:20px;
  77.         }
  78.  
  79.         p {
  80.             margin-bottom:20px;
  81.         }
  82.  
  83.         a {
  84.             color:#ff4500;
  85.         }
  86.  
  87.         a:hover {
  88.             text-decoration:none;
  89.         }
  90.  
  91.         .canvas {
  92.             width:960px;
  93.             margin:0 auto;
  94.             position:relative;
  95.         }
  96.  
  97.         .header,
  98.         .article,
  99.         .box {
  100.             border-radius:20px;
  101.             background-color:white;
  102.             box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  103.         }
  104.  
  105.         .article p:last-child {
  106.             margin-bottom:0;
  107.         }
  108.  
  109.         #greecejs {
  110.             text-align:right;
  111.             font-weight:bold;
  112.             opacity:0.2;
  113.             padding: 10px;
  114.         }
  115.  
  116.         .header {
  117.             width:940px;
  118.             padding: 10px;
  119.             margin-bottom:20px;
  120.         }
  121.         .header_inside {
  122.             border: 4px solid #8096AD;
  123.             border-radius:16px;
  124.             background: #859ab1; /* Old browsers */
  125.             background: -moz-linear-gradient(top, #859ab1 0%, #5a728d 71%, #405164 100%); /* FF3.6+ */
  126.             background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#859ab1), color-stop(71%,#5a728d), color-stop(100%,#405164)); /* Chrome,Safari4+ */
  127.             background: -webkit-linear-gradient(top, #859ab1 0%,#5a728d 71%,#405164 100%); /* Chrome10+,Safari5.1+ */
  128.             background: -o-linear-gradient(top, #859ab1 0%,#5a728d 71%,#405164 100%); /* Opera11.10+ */
  129.             background: -ms-linear-gradient(top, #859ab1 0%,#5a728d 71%,#405164 100%); /* IE10+ */
  130.             filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#859ab1', endColorstr='#405164',GradientType=0 ); /* IE6-9 */
  131.             background: linear-gradient(top, #859ab1 0%,#5a728d 71%,#405164 100%); /* W3C */
  132.             height:160px;
  133.             position:relative;
  134.             overflow: hidden;
  135.         }
  136.         .header_inside span {
  137.             color:white;
  138.             font-size:40px;
  139.             position:absolute;
  140.             line-height:1em;
  141.             left:20px;
  142.         }
  143.         span.t1 {
  144.             top:10px;
  145.         }
  146.         span.t2 {
  147.             font-weight:bold;
  148.             font-size:60px;
  149.             top:40px;
  150.         }
  151.         span.t3 {
  152.             top:98px;
  153.         }
  154.  
  155.         .left_column {
  156.             width:640px;
  157.             float:left;
  158.         }
  159.         .right_column {
  160.             width:300px;
  161.             float:right;
  162.         }
  163.         .footer {
  164.             clear:both;
  165.             opacity:0.5;
  166.             padding-bottom:20px;
  167.         }
  168.  
  169.         .article {
  170.             padding: 30px;
  171.             margin-bottom:20px;
  172.         }
  173.  
  174.         .box {
  175.             padding: 20px;
  176.             margin-bottom:20px;
  177.         }
  178.  
  179.     </style>
  180. </head>
  181. <body>
  182. <div class="canvas">
  183.     <div id="greecejs">GreeceJS rulez</div>
  184.     <div class="header">
  185.         <div class="header_inside">
  186.             <span class="t1">Το πιό</span>
  187.             <span class="t2">Απιστευτο-απίθανο</span>
  188.             <span class="t3">blog του πλανήτη</span>
  189.         </div>
  190.     </div>
  191.     <div class="left_column">
  192.         <div class="article">
  193.             <h1>Τίτλος (h1) του άρθρου</h1>
  194.             <p>
  195.                 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam massa arcu, molestie in mollis at,
  196.                 cursus sit amet diam. Fusce accumsan odio id urna ullamcorper lobortis. Sed a tortor quis sapien
  197.                 ultrices iaculis at nec leo.
  198.             </p>
  199.             <h2>Μια υπο-κεφαλίδα (H2)</h2>
  200.             <p>
  201.                 Donec sapien purus, imperdiet nec adipiscing vel, vestibulum quis nisi.
  202.                 Phasellus vestibulum nisi non lorem adipiscing congue. Etiam sit amet rutrum arcu. Suspendisse nec eros
  203.                 turpis, in euismod erat. Nulla vel purus arcu, vel luctus odio. Cras dapibus cursus dui sit amet
  204.                 laoreet. Suspendisse mi augue, rhoncus nec egestas nec, convallis feugiat eros. Sed vitae orci lectus.
  205.                 Sed blandit eleifend purus, et faucibus elit ultricies id. Cras imperdiet malesuada hendrerit. Maecenas
  206.                 ornare dictum est, posuere malesuada odio vulputate sit amet. Pellentesque habitant morbi tristique
  207.                 senectus et netus et malesuada fames ac turpis egestas. <a href="#">Phasellus consequat</a> enim non neque mollis quis
  208.                 fermentum metus suscipit. Etiam id ante lorem, at euismod felis.
  209.             </p>
  210.             <p><a href="#">Read more &raquo;</a></p>
  211.         </div>
  212.         <div class="article">
  213.             <h1>Ενα δεύτερο άρθρο</h1>
  214.             <p>
  215.                 Ακόμα πιο σημαντικό από το προηγούμενο διότι lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam massa arcu, molestie in mollis at,
  216.                 cursus sit amet diam. Fusce accumsan odio id urna ullamcorper lobortis. Sed a tortor quis sapien
  217.                 ultrices iaculis at nec leo.
  218.             </p>
  219.             <p><a href="#">Read more &raquo;</a></p>
  220.         </div>
  221.     </div>
  222.     <div class="right_column">
  223.         <div class="box">
  224.             <h2>Ενδιαφέροντα links</h2>
  225.             <ul>
  226.                 <li><a href="http://www.jquery.com">jQuery website</a></li>
  227.                 <li><a href="http://docs.jquery.com/">jQuery documentation</a></li>
  228.                 <li><a href="http://jqueryui.com/">jQuery UI</a></li>
  229.                 <li><a href="http://www.ericmmartin.com/projects/simplemodal/">The best jQuery modalbox</a></li>
  230.                 <li><a href="http://jquery.malsup.com/cycle/">Cycle plugin: Awesome</a></li>
  231.             </ul>
  232.         </div>
  233.         <div class="box">
  234.             <h2>Κάποια άλλα links</h2>
  235.             <ul>
  236.                 <li><a href="http://www.google.com">Link #1</a></li>
  237.                 <li><a href="#">Link #2</a></li>
  238.                 <li><a href="#">Link #3</a></li>
  239.             </ul>
  240.         </div>
  241.     </div>
  242.     <div class="footer">Copyright &copy; 2011 - GreeceJS</div>
  243. </div>
  244. <script language="javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
  245. <!-- Offline access: <script language="javascript" src="jquery-1.6.1.min.js"></script> -->
  246. <script language="javascript">
  247.  
  248.     $('document').ready(function(){
  249.        
  250.         // Example #1: Chained animations with callback functions
  251.         /*
  252.         $('.header span').css('top','200px'); // "Κρύβουμε" όλα τα spans
  253.         $('span.t1').animate({'top':'10px'},500,function(){
  254.             $('span.t2').animate({'top':'40px'},500,function(){
  255.                 $('span.t3').animate({'top':'98px'},500);
  256.             });
  257.         });
  258.         */
  259.        
  260.         // Example #2: Async "Logged in users"
  261.         /*
  262.         var response = [
  263.             {
  264.                 "name"  :   "Άγγελος",
  265.                 "id"    :   "2435"
  266.             },
  267.             {
  268.                 "name"  :   "Ελένη",
  269.                 "id"    :   "2342"
  270.             }
  271.         ];
  272.        
  273.         var html = '<div class="box">';
  274.         html += '<h2>Logged in users:</h2>';
  275.         html +='<ul>';
  276.         for(i in response) {
  277.             html += '<li>';
  278.             html += '<a href="/show_user?id=' + response[i].id + '">' + response[i].name + '</a>';
  279.             html += '</li>';
  280.         }
  281.         html += '</ul>';
  282.         html += '</div>';
  283.         $(html).insertBefore('.box:first');
  284.         */
  285.        
  286.         // Example #3: Creating elements using jQuery
  287.         /*
  288.         $('<div></div>')
  289.         .addClass('box')
  290.         .css({
  291.             "background-color" : "#FFCC00",
  292.             "font-size" : "40px",
  293.             "font-weight" : "bold",
  294.             "text-align" : "center"
  295.         })
  296.         .text('Καλημέρα!')
  297.         .hide()
  298.         .insertBefore('.box:first')
  299.         .slideDown(500)
  300.         */
  301.        
  302.     });
  303.  
  304. </script>
  305. </body>
  306. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement