danceforyous

Theme Three -Pop Up Ask Box

Oct 25th, 2012
1,428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.99 KB | None | 0 0
  1. <head>
  2.  
  3. <script type="text/javascript"
  4. src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
  5. <script>
  6. $(document).ready(function() {
  7. //
  8. $('a.poplight[href^=#]').click(function() {
  9. var popID = $(this).attr('rel'); //Get Popup Name
  10. var popURL = $(this).attr('href'); //Get Popup href to define size
  11. var query= popURL.split('?');
  12. var dim= query[1].split('&');
  13. var popWidth = dim[0].split('=')[1]; //Gets the first query string value
  14. $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" class="close"> </a>');
  15. var popMargTop = ($('#' + popID).height() + 80) / 2;
  16. var popMargLeft = ($('#' + popID).width() + 80) / 2;
  17. //Apply Margin to Popup
  18. $('#' + popID).css({
  19. 'margin-top' : -popMargTop,
  20. 'margin-left' : -popMargLeft
  21. });
  22. $('body').append('<div id="fade"></div>');
  23. $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer - .css({'filter' : 'alpha(opacity=80)'})
  24. return false;
  25. });
  26. $('a.close, #fade').live('click', function() {
  27. $('#fade , .popup_block').fadeOut(function() {
  28. $('#fade, a.close').remove(); //fade them both out
  29. });
  30. return false;
  31. });
  32. });
  33. </script>
  34.  
  35. <!--
  36.  
  37. theme by anne @ danceforyous
  38.  
  39. (you will be atacked by zombies if you steal
  40. and believe me, it's not cool.)
  41.  
  42. -->
  43.  
  44. <title>{Title}</title>
  45. <link rel="shortcut icon" href="{Favicon}">
  46. <link rel="alternate" type="application/rss+xml" href="{RSS}">
  47. {block:Description}<meta name="description" content="{MetaDescription}" />{/block:Description}
  48.  
  49. <!--- DEFAULTS --->
  50. <meta name="color:Background" content="#ffffff"/>
  51. <meta name="color:Text" content="#838282"/>
  52. <meta name="color:Link" content="#000">
  53. <meta name="color:Link Hover" content="#b8b8b8"/>
  54. <meta name="color:Scrollbar" content="#e7e3e4" />
  55.  
  56. <meta name="image:sidebar" content=""/>
  57.  
  58. <meta name="text:Link1 Title" content="link1" />
  59. <meta name="text:Link1" content="/" />
  60. <meta name="text:Link2 Title" content="link2" />
  61. <meta name="text:Link2" content="/" />
  62. <meta name="text:Link3 Title" content="link3" />
  63. <meta name="text:Link3" content="/" />
  64.  
  65. <style type="text/css">
  66.  
  67. #fade { /*--Transparent background layer--*/
  68. display: none; /*--hidden by default--*/
  69. background: #000;
  70. position: fixed; left: 0; top: 0;
  71. width: 100%; height: 100%;
  72. opacity: .80;
  73. z-index: 9999;
  74. }
  75. .popup_block{
  76. display: none; /*--hidden by default--*/
  77. background: #fcfbf8;
  78. padding: 10px;
  79. border: 5px solid #e8e8e8;
  80. float: left;
  81. font-size: 10;
  82. position: fixed;
  83. top: 50%; left: 50%;
  84. z-index: 99999;
  85. /*--CSS3 Box Shadows--*/
  86. -webkit-box-shadow: 0px 0px 20px #000;
  87. -moz-box-shadow: 0px 0px 20px #000;
  88. box-shadow: 0px 0px 20px #000;
  89. /*--CSS3 Rounded Corners--*/
  90. -webkit-border-radius: 5px;
  91. -moz-border-radius: 5px;
  92. border-radius: 5px;
  93. }
  94. img.btn_close {
  95. float: right;
  96. margin: -20 -20px 0 0;
  97. }
  98. /*--Making IE6 Understand Fixed Positioning--*/
  99. *html #fade {
  100. position: absolute;
  101. }
  102. *html .popup_block {
  103. position: absolute;
  104. }
  105.  
  106. /* scrolly */
  107.  
  108. ::-webkit-scrollbar{height: 9px; width: 6px; -webkit-border-radius: 0px; background-color:{color:background};}
  109.  
  110. ::-webkit-scrollbar-thumb{background-color:{color:scrollbar};}
  111.  
  112. ::-webkit-scrollbar-track{background-color:{color:background};}
  113.  
  114.  
  115. body {
  116. background:{color:background};
  117. color:{color:text};
  118. font-family:calibri;
  119. font-size:10px;
  120. line-height:100%;
  121. }
  122.  
  123.  
  124. a:link, a:active, a:visited { color: {color:link}; text-decoration:none;}
  125.  
  126. a:hover {color:{color:link hover};
  127. text-decoration:underline;
  128. letter-spacing:2px;
  129. transition:all 0.4s ease-in-out;
  130. -webkit-transition: all 0.4s ease-in-out;
  131. -moz-transition: all 0.4s ease-in-out;
  132. -ms-transition: all 0.4s ease-in-out;
  133. -o-transition: all 0.4s ease-in-out;
  134. }
  135.  
  136. a {
  137. text-decoration:none;
  138. outline:none;
  139. -moz-outline-style:none;
  140. color:{color:link};
  141. }
  142.  
  143. img {
  144. border:none;
  145. }
  146.  
  147. blockquote {
  148. padding-left:5px;
  149. border-left:2px solid;
  150. }
  151.  
  152. blockquote blockquote {
  153. padding-left:5px;
  154. border-left:2px solid;
  155. }
  156.  
  157. h1 {
  158. font-size:15px;
  159. }
  160.  
  161. #entries {
  162. padding:10px;
  163. width:500px;
  164. margin-left:500px;
  165. margin-top:40px;
  166. }
  167.  
  168. #title {
  169. font-size:19px;
  170. text-align:right;
  171. margin-right:90px;
  172. margin-bottom:5px;
  173. margin-top:5px;
  174. font-family:freestyle script;
  175. }
  176.  
  177. #sidebar {
  178. width:220px;
  179. position:fixed;
  180. margin-left:130px;
  181. margin-top:100px;
  182. }
  183.  
  184.  
  185. #sidebarimage {
  186. width:125px;
  187. opacity:1;
  188. -moz-transition-duration:0.5s;
  189. -webkit-transition-duration:0.5s;
  190. -o-transition-duration:0.5s;
  191. }
  192.  
  193. #sidebarimage img {
  194. width:125px;
  195. border:double #eee;
  196. padding:3px;
  197. }
  198.  
  199. #sidebarimage img:hover {
  200. opacity:0.75;
  201. -moz-transition-duration:0.5s;
  202. -webkit-transition-duration:0.5s;
  203. -o-transition-duration:0.5s;
  204. }
  205.  
  206. .sidelinks {
  207. color:{color:Link};
  208. width:200px;
  209. font-family:consolas;
  210. font-size:9px;
  211. font-weight:normal;
  212. text-transform:uppercase;
  213. margin-left:155px;
  214. margin-top:-90px;
  215. float:left;
  216. position:fixed;
  217. display:block;
  218. text-align:center;
  219. }
  220.  
  221. #description {
  222. font-family:trebuchet MS;
  223. font-size:9px;
  224. border-top: 1px #eee solid;
  225. text-align: center;
  226. margin-top:-70px;
  227. margin-left:155px;
  228. padding:10px;
  229. width:180px;
  230. }
  231.  
  232. #pagination {
  233. font-size:15px;
  234. font-style:italic;
  235. text-align:right;
  236. margin-right:-120px;
  237. margin-top:-7px;
  238. }
  239.  
  240. #post {
  241. width:500px;
  242. margin-top:15px;
  243. padding-bottom:10px;
  244. }
  245.  
  246. #pinfo {
  247. text-align:left;
  248. margin-top:10px;
  249. border-top:1px solid #adadad;
  250. padding:7px;
  251. }
  252.  
  253. #asker {
  254. float:left;
  255. margin-right:5px;
  256. }
  257.  
  258. #crdt {
  259. font-size:10px;
  260. font-family:trebuchet MS;
  261. text-transform:lowercase;
  262. bottom:10px;
  263. right:-8px;
  264. position:fixed;
  265. border-left:1px solid #e9e9e9;
  266. border-top:1px solid #e9e9e9;
  267. border-right:1px solid #e9e9e9;
  268. border-bottom:1px solid #e9e9e9;
  269. padding:5px;
  270. width:10px;
  271. -webkit-transition: opacity 0.6s linear;opacity: 1;-webkit-transition: all 0.5s ease-in; -moz-transition: all 0.5s ease-in;transition: all 0.5s ease-in;
  272. }
  273.  
  274. #crdt:hover{
  275. width:30px;
  276. -webkit-transition: opacity 0.6s linear;opacity: 1;-webkit-transition: all 0.5s ease-in; -moz-transition: all 0.5s ease-in;transition: all 0.5s ease-in;
  277. }
  278.  
  279. {CustomCSS}</style></head><body>
  280.  
  281. <div>
  282.  
  283. <div id="sidebar">
  284.  
  285. <div id="title">{Title}</div>
  286.  
  287. <div id="sidebarimage"><img src="{image:sidebar}"></div>
  288.  
  289. <div class="sidelinks">
  290.  
  291. <a href="/">home</a>
  292. <a href="#?w=500" rel="02" class="poplight">ask</a>
  293. <a href="{text:link1}">{text:link1 title}</a>
  294. <a href="{text:link2}">{text:link2 title}</a>
  295. <a href="{text:link3}">{text:link3 title}</a>
  296. </div>
  297.  
  298. <div id="description">{Description} </div>
  299.  
  300. <div id="pagination">
  301. {block:Pagination}{block:PreviousPage}<a href="{PreviousPage}">«</a>{/block:PreviousPage}
  302. {block:NextPage}<a href="{NextPage}">»</a>{/block:NextPage}{/block:Pagination} </div>
  303. </div>
  304.  
  305. <div id="entries">{block:Posts}<div id="post">
  306.  
  307. {block:Text}<h1>{block:Title}{Title}{/block:Title}</h1>{Body}{/block:Text}
  308.  
  309. {block:Link}<h1><a href="{URL}" {Target}>{Name}</a></h1>{block:Description}{Description}{/block:Description}{/block:Link}
  310.  
  311. {block:Photoset}{Photoset-500}{block:Caption}{Caption}{/block:Caption}{/block:Photoset}
  312.  
  313. {block:Photo}{LinkOpenTag}<img src="{PhotoURL-500}">{LinkCloseTag}{block:Caption}{Caption}{/block:Caption}{/block:Photo}
  314.  
  315. {block:Quote}{Quote}{block:Source} —{Source}{/block:Source}{/block:Quote}
  316.  
  317. {block:Answer}<div id="asker"><img src="{AskerPortraitURL-24}"></div>{Asker}:<br>{Question}<br>{Answer}{/block:Answer}
  318.  
  319. {block:Chat}{block:Title}<h1>{Title}</h1>{/block:Title}{block:Lines}{block:Label}<b>{Label}</b>{/block:Label} {Line}<br>{/block:Lines}{/block:Chat}
  320.  
  321. {block:Audio}{AudioPlayerWhite}{block:Caption}{Caption}{/block:Caption}{/block:Audio}
  322.  
  323. {block:Video}{VideoEmbed-500}{block:Caption}{Caption}{/block:Caption}{/block:Video}
  324.  
  325. <div id="pinfo">
  326. {block:Date}posted {TimeAgo}{/block:Date} - <a href="{Permalink}">
  327. {NoteCountWithLabel}</a>{block:RebloggedFrom}<br>via; <a href="{ReblogParentURL}" title="{ReblogParentTitle}">{ReblogParentName}</a>
  328. | originally; <a href="{ReblogRootURL}"title="{ReblogRoottitle}">{ReblogRootName}</a> - <a href="{ReblogURL}" target="_blank">reblog</a>
  329. {/block:RebloggedFrom}<br> {block:HasTags}{block:Tags} #<a href="{TagURL}">{Tag}</a>{/block:Tags}{/block:HasTags}</div>
  330.  
  331. {block:PostNotes}{PostNotes}{/block:PostNotes}
  332. {/block:Posts}</div>
  333.  
  334. <div id="crdt"><a href="http://www.danceforyous.tumblr.com/themage" target="_blank">©</a> </div>
  335.  
  336. </body>
  337.  
  338. <div id="02" class="popup_block">
  339.  
  340. <Center><iframe frameborder="0" scrolling="yes" width="100%" height="150" src="http://www.tumblr.com/ask_form/INSERTURLHERE.tumblr.com" style="background-color:transparent; overflow:hidden;" id="ask_form">
  341. </center></div>
  342.  
  343. </div></div></div></div></div></div></div></div></div></div>
  344.  
  345. </html>
Advertisement
Add Comment
Please, Sign In to add comment