sexycullen

change tumblr controls theme 206

Nov 11th, 2021 (edited)
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. CSS PART: search for {block:ifCustomControls}, there are 2 of them. the first one is on the CSS of the code, you'll find a similar code to this one you'll replace. then find the closing tag, this one: {/block:ifCustomControls}.
  2.  
  3. replace everything inside with this code:
  4.  
  5. .controls-button {
  6. position: fixed;
  7. cursor: help;
  8. width: 1.5em;
  9. height: 1.5em;
  10. top: 20px;
  11. right: 20px;
  12. z-index: 1000;
  13. cursor: pointer;
  14. }
  15.  
  16. .tmblr-iframe {
  17. z-index: 999999999!important;
  18. opacity: 0;
  19. visibility: hidden;
  20. -webkit-transition: all 0.5s;
  21. -moz-transition: all 0.5s;
  22. -ms-transition: all 0.5s;
  23. -o-transition: all 0.5s;
  24. transition: all 0.5s;
  25. }
  26.  
  27. body.controls-click .tmblr-iframe {
  28. opacity: 1;
  29. margin-right: 3rem;
  30. visibility: visible;
  31. -webkit-transition: all 0.5s;
  32. -moz-transition: all 0.5s;
  33. -ms-transition: all 0.5s;
  34. -o-transition: all 0.5s;
  35. transition: all 0.5s;
  36. }
  37.  
  38.  
  39. .controls-button svg path {
  40. fill:#888888;/* change this to change the color of the icon
  41. ex: if you're gonna use a darker background color/image */}
  42.  
  43.  
  44.  
  45. ---------------------
  46.  
  47.  
  48. HTML part: search for {block:ifCustomControls} and this one is almost at the end of the code. right after that tag there is a div, change the class name from xx to controls-button, everything will look like this:
  49.  
  50. {block:ifCustomControls}
  51. <div class="controls-button"><svg version="1.1" id="Layer_1" xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 216 216" enable-background="new 0 0 216 216" xml:space="preserve"><path d="M106.6,134c14.3,0,26-11.7,26-26s-11.7-26-26-26s-26,11.7-26,26S92.2,134,106.6,134z M106.6,94c7.7,0,14,6.3,14,14s-6.3,14-14,14s-14-6.3-14-14S98.9,94,106.6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4.7-3.7,5.7-3.7s4.1,0.3,5.7,3.7l3.3,7.2c3,6.5,9.5,10.7,16.6,10.7c2.2,0,4.3-0.4,6.4-1.2l7.4-2.8c2.8-1,5.7,0,7.4,2.3c0.7,1,1.7,3,0.7,5.7l-2.8,7.4c-3.3,8.9,0.8,19,9.5,23l7.2,3.3c3.4,1.5,3.7,4.7,3.7,5.7s-0.3,4.1-3.7,5.7l-7.2,3.3c-8.7,4-12.9,14.1-9.5,23l2.8,7.4c1,2.7,0,4.7-0.7,5.7c-1.6,2.4-4.6,3.4-7.4,2.3l-7.4-2.8c-2.1-0.8-4.2-1.2-6.4-1.2c-7.1,0-13.6,4.2-16.6,10.7l-3.3,7.2c-1.5,3.4-4.7,3.7-5.7,3.7s-4.1-0.3-5.7-3.7l-3.3-7.2c-3-6.5-9.5-10.7-16.6-10.7c-2.2,0-4.3,0.4-6.4,1.2l-7.4,2.8c-2.8,1-5.7,0-7.4-2.3c-0.7-1-1.7-3-0.7-5.7l2.8-7.4c3.3-8.9-0.8-19-9.5-23l-7.2-3.3c-3.4-1.5-3.7-4.7-3.7-5.7S41.9,103.9,45.3,102.3z"/></svg></div>
  52. {/block:ifCustomControls}
  53.  
  54.  
  55. -------------------
  56.  
  57. JAVASCRIPT part: search for <script>, there is 4 of them, but you want the last one at the end of the code too. right before the closing tag </script>, paste this code:
  58.  
  59. $('.controls-button').click(function(){
  60. $('body').toggleClass('controls-click');
  61. });
Add Comment
Please, Sign In to add comment