Advertisement
Guest User

Untitled

a guest
Jan 31st, 2012
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.75 KB | None | 0 0
  1. n<!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <link rel="stylesheet" href="css/themes/theme.min.css" />
  6. <link rel="stylesheet" href="js/jquery.mobile-1.0.min.css" />
  7. <script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
  8. <script type="text/javascript" src="js/jquery.mobile-1.0.min.js"></script>
  9. <script type="text/javascript" src="phonegap-1.3.0.js"></script>
  10.  
  11. <style>
  12.  
  13. img {
  14. -webkit-border-radius: 20px;
  15. border-top-left-radius: 20px 20px;
  16. border-top-right-radius: 20px 20px;
  17. border-bottom-right-radius: 20px 20px;
  18. border-bottom-left-radius: 20px 20px;
  19. -webkit-box-shadow: 0px 6px 8px rgba(0, 0, 0, .5);
  20.  
  21. }
  22.  
  23. #video .ui-icon { background: url(icons/video.png)
  24. no-repeat;
  25. height:40px;
  26. width:40px; }
  27.  
  28. #scores .ui-icon { background: url(icons/scores.png)
  29. no-repeat;
  30. height:40px;
  31. width:40px;
  32. }
  33.  
  34. #audio .ui-icon { background: url(icons/audio.png)
  35. no-repeat;
  36. height:40px;
  37. width:40px; }`
  38.  
  39. .tabs li a {
  40. text-indent:5px;
  41. position:relative;
  42. margin-bottom:20px;
  43. }
  44.  
  45. </style>
  46.  
  47. <script type="text/javascript">
  48.  
  49. $.ajaxSetup({
  50. error:function(x,e,errorThrown) {
  51. console.log(x.getStatusCode());
  52. $("#status").prepend("Error!");
  53. }
  54. });
  55.  
  56. //EDIT THESE LINES
  57. //Title of the blog
  58. var TITLE = "BS Report";
  59. //RSS url
  60. var RSS = "http://pipes.yahoo.com/pipes/pipe.run?_id=e067750dbdb959e1ae07c4a4d263fabd&_render=rss";
  61. //Stores entries
  62. var entries = [];
  63. var selectedEntry = "";
  64.  
  65. //listen for detail links
  66. $(".contentLink").live("click", function() {
  67. selectedEntry = $(this).data("entryid");
  68. });
  69.  
  70. //Listen for main page
  71. $("#mainPage").live("pageinit", function() {
  72. //Set the title
  73. $("h1", this).text(TITLE);
  74.  
  75. $.get(RSS, {}, function(res, code) {
  76. entries = [];
  77. var xml = $(res);
  78. var items = xml.find("item");
  79. $.each(items, function(i, v) {
  80. entry = {
  81. title:$(v).find("title").text(),
  82. link:$(v).find("link").text(),
  83. description:$.trim($(v).find("description").text())
  84. };
  85. entries.push(entry);
  86. });
  87.  
  88. //now draw the list
  89. var s = '';
  90. $.each(entries, function(i, v) {
  91. s += '<li><a href="'+v.link+'">'+v.title+'</a></li>';
  92. });
  93. $("#linksList").html(s);
  94. $("#linksList").listview("refresh");
  95. });
  96.  
  97. });
  98.  
  99. //Listen for the content page to load
  100. $("#contentPage").live("pageshow", function(prepage) {
  101. //Set the title
  102. $("h1", this).text(entries[selectedEntry].title);
  103. var contentHTML = "";
  104. contentHTML += entries[selectedEntry].description;
  105. contentHTML += '<p/><a href="'+entries[selectedEntry].link + '">Read Entry on Site</a>';
  106. $("#entryText",this).html(contentHTML);
  107. });
  108.  
  109.  
  110.  
  111. </script>
  112.  
  113.  
  114. </head>
  115. <body>
  116.  
  117.  
  118.  
  119. <div data-role="page" id="mainPage">
  120.  
  121. <div data-role="header">
  122. <h1></h1>
  123. <a href="audiohome.html">Back</a>
  124. </div>
  125.  
  126. <div data-role="content">
  127. <div id="status"></div>
  128. <ul id="linksList" data-role="listview" data-inset="true"></ul>
  129. </div>
  130.  
  131. <!-- <div data-role="footer">
  132. <h4>BS Report</h4>
  133.  
  134. </div>
  135. -->
  136.  
  137. <div data-role="footer" data-position="" class="ui-footer ui-bar-a ui-footer-fixed fade ui-fixed-inline"role="contentinfo">
  138. <div data-role="navbar" class="ui-state-persist" class="ui-navbar ui-navbar-noicons" role="navigation">
  139. <ul class="tabs" class="ui-grid-b">
  140. <li><a href="index.html" rel="external" id="video" data-icon="custom"></a></li>
  141. <li><a href="scorepage.html" rel="external" id="scores" data-icon="custom"></a></li>
  142. <li><a href="audiohome.html" rel="external" id="audio" data-icon="custom" ></a></li>
  143. </ul>
  144. </div>
  145.  
  146.  
  147. </div><!-- /footer -->
  148.  
  149. </div>
  150.  
  151. <div data-role="page" id="contentPage">
  152.  
  153. <div data-role="header">
  154. <a href="#mainPage" data-rel="back">Home</a>
  155. <h1></h1>
  156. </div>
  157.  
  158. <div data-role="content" id="entryText">
  159. </div>
  160.  
  161.  
  162. </body>
  163. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement