Advertisement
Guest User

Untitled

a guest
Jun 29th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.16 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  5. <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
  6.  
  7. <title><?php bloginfo('name'); ?><?php wp_title();?></title>
  8.  
  9. <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
  10.  
  11. <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
  12. <link rel="pingback" href="<?php bloginfo('pingback_url');?>" />
  13.  
  14. <?php wp_head(); ?>
  15. <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/favicon.ico" />
  16. </head>
  17.  
  18. <body>
  19. <div id="main">
  20.  
  21. <div class="container">
  22.  
  23. <div id="header">
  24. <ul id="menu">
  25. <li><a href="<?php bloginfo('url'); ?>" title="Home">Home</a></li>
  26. <?php wp_list_pages('title_li='); ?>
  27. </ul>
  28.  
  29. <div id="logo">
  30. <h1>TheAfterMatter</h1>
  31. </div>
  32. </div>
  33.  
  34. <div id="banner">
  35. <h1>theaftermatter</h1>
  36. <h2><?php bloginfo('description'); ?></h2>
  37. </div>
  38.  
  39. <div id="bar">
  40.  
  41. <div id="twitter" style="z-index:100">
  42.  
  43. <h2><a href="http://www.twitter.com/#!/theaftermatter/"><img src="<?php bloginfo('template_directory'); ?>/images/twitter.png" alt="twitter" /></a></h2>
  44.  
  45. <p style="display:inline"></p>
  46.  
  47. <noscript><p>This feature requires JavaScript</p></noscript>
  48.  
  49. </div>
  50.  
  51. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
  52. <script src="<?php bloginfo('template_directory'); ?>/scripts/gistfile1.js"></script>
  53. <script type="text/javascript">
  54.  
  55. jQuery(document).ready(function($) {
  56. // $() will work as an alias for jQuery() inside of this function
  57.  
  58. var Twitter = {
  59. init: function () {
  60. // Pass in the username you want to display feeds for
  61. this.insertLatestTweets('theaftermatter');
  62. },
  63.  
  64. // This replaces the 'Loading...' with the tweets
  65. insertLatestTweets: function (username) {
  66. var limit = 5; // How many feeds do you want?
  67. var url = 'http://twitter.com/statuses/user_timeline.json?screen_name=' + username + '&count=' + limit + '&callback=?';
  68.  
  69. // Now ajax in the feeds from twitter.com
  70. $.getJSON(url, function (data) {
  71. // We'll start by creating a normal marquee-element for the tweets
  72. var html = '<marquee behavior="scroll" scrollamount="3" direction="left">';
  73.  
  74. // Loop through all the tweets and create a link for each
  75. for (var i in data) {
  76. html += '<a href="http://twitter.com/' + username + '/status/' + data[i].id_str + '">' + data[i].text + ' <i>' + Twitter.daysAgo(data[i].created_at) + '</i></a>';
  77. }
  78.  
  79. html += '</marquee>';
  80.  
  81. // Now replace the 'p' with our 'marquee' element
  82. $('#twitter p').replaceWith(html);
  83.  
  84. // The marquee element looks quite shite so we'll use Remy Sharp's plug-in to replace it with a smooth one
  85. Twitter.fancyMarquee();
  86. });
  87. },
  88.  
  89. // Replaces the marquee-element with a fancy one
  90. fancyMarquee: function () {
  91. // Replace the marquee and do some fancy stuff (taken from remy sharp's website)
  92. $('#twitter marquee').marquee('pointer')
  93. .mouseover(function () {
  94. $(this).trigger('stop');
  95. })
  96. .mouseout(function () {
  97. $(this).trigger('start');
  98. })
  99. .mousemove(function (event) {
  100. if ($(this).data('drag') == true) {
  101. this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
  102. }
  103. })
  104. .mousedown(function (event) {
  105. $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
  106. })
  107. .mouseup(function () {
  108. $(this).data('drag', false);
  109. });
  110. },
  111.  
  112. // Takes a date and return the number of days it's been since said date
  113. daysAgo: function (date) {
  114. // TODO: Fix date for IE...
  115. if ($.browser.msie) {
  116. return '1 day ago';
  117. }
  118.  
  119. var d = new Date(date).getTime();
  120. var n = new Date().getTime();
  121.  
  122. var numDays = Math.round(Math.abs(n - d) / (1000 * 60 * 60 * 24));
  123. var daysAgo = numDays + ' Days Ago';
  124.  
  125. if (numDays == 0) {
  126. daysAgo = 'Today';
  127. }
  128. else if (numDays == 1) {
  129. daysAgo = numDays + ' Day Ago';
  130. }
  131.  
  132. return daysAgo;
  133. }
  134. };
  135.  
  136. Twitter.init();
  137.  
  138. });
  139. </script>
  140.  
  141. <div id="icons">
  142. <a href="http://www.facebook.com/TheAfterMatter" style="padding-right:9px;"><img src="<?php bloginfo('template_directory'); ?>/images/facebook.png" alt="facebook" /></a>
  143. <a href="http://www.twitter.com/#!/TheAfterMatter" style="padding-right:9px;"><img src="<?php bloginfo('template_directory'); ?>/images/twitter2.png" alt="twitter" /></a>
  144. <a href="mailto:contactus@theaftermatter.com?subject=AfterMatter Question" style="padding-right:9px;"><img src="<?php bloginfo('template_directory'); ?>/images/email.png" alt="twitter" /></a>
  145. <a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/rss.png" alt="twitter" /></a>
  146. </div>
  147.  
  148. <div id="searchwrapper">
  149. <?php include(TEMPLATEPATH.'/searchform.php'); ?>
  150. </div>
  151.  
  152. <div id="fade">
  153. <img src="<?php bloginfo('template_directory'); ?>/images/fadeleft.png" style="padding-left:30px; width:80px; height:33px;" alt="fadeleft" />
  154. <img src="<?php bloginfo('template_directory'); ?>/images/faderight.png" style="padding-left:390px; width:80px; height:33px;" alt="faderight"/>
  155. </div>
  156.  
  157. </div>
  158. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement