Advertisement
ruesha

codes for dil crd

Feb 13th, 2022
1,961
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. note: there are a lot of codes.. i'll try to section this off as best as i can! please refer to the tutorial for edits / how to make it look good on mobile! :) [the list of embeds may NOT be as in order as the tutorial, i've put it in order from the top code to the bottom code based off the carrd]
  2.  
  3. ---- for header embed ----
  4. <link rel="stylesheet" href="https://unpkg.com/98.css">
  5. <div class="window" style="box-shadow:inset -1px -0px #0a0a0a,inset 1px 1px #fff,inset -2px -0px grey,inset 2px 2px #dfdfdf;">
  6. <div class="title-bar">
  7. <div class="title-bar-text">
  8. ruesha's site (o´ω`o)
  9. </div>
  10. <div class="title-bar-controls">
  11. <button aria-label="Minimize">
  12. </button><button aria-label="Maximize">
  13. </button><button aria-label="Close">
  14. </button></div></div></div>
  15.  
  16. ---- for the image ----
  17. border: 2px inset;
  18.  
  19. ---- main container ----
  20. box-shadow: inset -1px -1px #0a0a0a, inset 1px 0px #fff, inset -2px -2px grey, inset 2px 0px #dfdfdf;
  21.  
  22. ---- colored scrollbox w/ credits ----
  23. font-family: pixel;
  24. height: 75px;
  25. background: #FFB5D9;
  26. padding: 5px;
  27. border: 2px inset;
  28. border-radius: 6px;
  29. font-size: 1em;
  30. overflow-y: scroll;
  31.  
  32. ---- for button design ----
  33. font-family: pixel;
  34. box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 0px #dfdfdf;
  35. clicksound.playclip(); in "On Click"
  36.  
  37. ---- embed 'buttons' ----
  38. <style>
  39. #buttons01 {
  40. transition: .2s ease;
  41. }
  42. a:hover {
  43. transform: translateY(-20%);
  44. }
  45. </style>
  46.  
  47. ---- embed 'style' ----
  48. <style>
  49. <link rel="stylesheet" href="https://unpkg.com/98.css" >
  50. </style>
  51.  
  52. ---- embed 'sound' ----
  53. <script>
  54.  
  55. // Mouseover/ Click sound effect- by JavaScript Kit (www.javascriptkit.com)
  56. // Visit JavaScript Kit at http://www.javascriptkit.com/ for full source code
  57.  
  58. //** Usage: Instantiate script by calling: var uniquevar=createsoundbite("soundfile1", "fallbackfile2", "fallebacksound3", etc)
  59. //** Call: uniquevar.playclip() to play sound
  60.  
  61. var html5_audiotypes={ //define list of audio file extensions and their associated audio types. Add to it if your specified audio file isn't on this list:
  62. "mp3": "audio/mpeg",
  63. "mp4": "audio/mp4",
  64. "ogg": "audio/ogg",
  65. "wav": "audio/wav"
  66. }
  67.  
  68. function createsoundbite(sound){
  69. var html5audio=document.createElement('audio')
  70. if (html5audio.canPlayType){ //check support for HTML5 audio
  71. for (var i=0; i<arguments.length; i++){
  72. var sourceel=document.createElement('source')
  73. sourceel.setAttribute('src', arguments[i])
  74. if (arguments[i].match(/\.(\w+)$/i))
  75. sourceel.setAttribute('type', html5_audiotypes[RegExp.$1])
  76. html5audio.appendChild(sourceel)
  77. }
  78. html5audio.load()
  79. html5audio.playclip=function(){
  80. html5audio.pause()
  81. html5audio.currentTime=0
  82. html5audio.play()
  83. }
  84. return html5audio
  85. }
  86. else{
  87. return {playclip:function(){throw new Error("Your browser doesn't support HTML5 audio unfortunately")}}
  88. }
  89. }
  90.  
  91. //Initialize two sound clips with 1 fallback file each:
  92.  
  93. var mouseoversound=createsoundbite("https://a.tumblr.com/tumblr_ojrn7aGBii1w2e2oyo1.mp3")
  94. var clicksound=createsoundbite("https://a.tumblr.com/tumblr_ojrmy55yUN1w2e2oyo1.mp3")
  95.  
  96. </script>
  97.  
  98. ---- for white scrollbox w/ info ----
  99. (to adjust for mobile, check the tutorial; you might have to adjust it for your carrd!)
  100. height: 225px;
  101. background: #fff;
  102. padding: 5px;
  103. overflow: auto;
  104. border: 2px inset;
  105. border-radius: 6px;
  106. width: 200px;
  107. position: absolute;
  108. left: 14em;
  109. bottom: 5.5em;
  110. z-index: 100;
  111.  
  112.  
  113. ---- texts ----
  114. <style>
  115. @font-face {
  116. font-family: emoji;
  117. src: url(https://dl.dropbox.com/s/cvba4kh6qm23mru/EmojiFont.ttf);
  118. }
  119. @font-face {
  120. font-family: pixel;
  121. src: url(https://dl.dropbox.com/s/kmhe7d3n18vdz5e/w95fa.woff?dl=0);
  122. }
  123. </style>
  124.  
  125. ---- embed 'hover' ----
  126. <style>
  127. a { transition: .4s; }
  128. a:hover { letter-spacing: 2px; }
  129. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement