Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

index.html 4.9 KiB

5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
5 anni fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <head><title>Azure.com Various</title>
  2. <script src="http://pablojs.com/downloads/pablo.min.js"></script>
  3. </head>
  4. <style>
  5. body {
  6. font-family: 'Segoe UI', Arial;
  7. background-color: #aaa;
  8. padding: 0;
  9. margin: 0;
  10. }
  11. .bg0 {
  12. background-image: url("https://github.com/benc-uk/icon-collection/raw/master/_tools/background.png")
  13. }
  14. .bg1 {
  15. background-color: #333;
  16. }
  17. .bg2 {
  18. background-color: #fff;
  19. }
  20. .imgbox img {
  21. width: 10.5rem;
  22. height: 10.5rem;
  23. object-fit: contain;
  24. cursor: pointer;
  25. }
  26. .imgbox {
  27. margin: 0.6rem;
  28. padding: 0.5rem;
  29. text-align: center;
  30. width: 12rem;
  31. height: 12rem;
  32. background-color: #e0e0e0;
  33. }
  34. h1 {
  35. font-size: 2.6rem;
  36. }
  37. .find, .find input {
  38. font-size: 1.5rem;
  39. }
  40. .top {
  41. position: -webkit-sticky;
  42. position: sticky;
  43. top: 0;
  44. background-color: #aaa;
  45. padding: 1rem;
  46. padding-top: 0;
  47. box-shadow: 0px 5px 18px 3px rgba(0,0,0,0.59);
  48. }
  49. .top button {
  50. float: right;
  51. position: relative;
  52. top: -2rem;
  53. font-size: 1.5rem;
  54. }
  55. .pngbox {
  56. position: absolute;
  57. top: 2rem;
  58. right: 1rem;
  59. font-size: 1.5rem;
  60. }
  61. input[type="checkbox"] {
  62. width: 1.6em;
  63. height: 1.6em;
  64. }
  65. .label {
  66. height: 2.5em;
  67. line-height: 1em;
  68. overflow: hidden;
  69. font-size: 0.9rem;
  70. }
  71. .grid {
  72. display: flex;
  73. flex-wrap: wrap;
  74. width: 100%;
  75. }
  76. </style>
  77. <body>
  78. <div class="top">
  79. <h1>Azure.com Various</h1>
  80. <span class="find">Finder: <input onkeyup="search()" id="finder"><br></span>
  81. <div class="pngbox"><input type="checkbox" id="pngcheck"><label for="pngcheck">Download as PNG</label></div>
  82. <button onclick="toggleBg()">Change Background</button>
  83. </div>
  84. <div class="grid">
  85. <div id="backup-archive.svg" class="imgbox"><img src="backup-archive.svg" class="bg0" onclick="download('backup-archive.svg', this)"/><div class="label">backup-archive.svg</div></div>
  86. <div id="blockchain.svg" class="imgbox"><img src="blockchain.svg" class="bg0" onclick="download('blockchain.svg', this)"/><div class="label">blockchain.svg</div></div>
  87. <div id="digital-marketing.svg" class="imgbox"><img src="digital-marketing.svg" class="bg0" onclick="download('digital-marketing.svg', this)"/><div class="label">digital-marketing.svg</div></div>
  88. <div id="e-commerce.svg" class="imgbox"><img src="e-commerce.svg" class="bg0" onclick="download('e-commerce.svg', this)"/><div class="label">e-commerce.svg</div></div>
  89. <div id="high-performance-computing.svg" class="imgbox"><img src="high-performance-computing.svg" class="bg0" onclick="download('high-performance-computing.svg', this)"/><div class="label">high-performance-computing.svg</div></div>
  90. <div id="hybrid-cloud-app.svg" class="imgbox"><img src="hybrid-cloud-app.svg" class="bg0" onclick="download('hybrid-cloud-app.svg', this)"/><div class="label">hybrid-cloud-app.svg</div></div>
  91. <div id="internet-of-things.svg" class="imgbox"><img src="internet-of-things.svg" class="bg0" onclick="download('internet-of-things.svg', this)"/><div class="label">internet-of-things.svg</div></div>
  92. <div id="lob-applications.svg" class="imgbox"><img src="lob-applications.svg" class="bg0" onclick="download('lob-applications.svg', this)"/><div class="label">lob-applications.svg</div></div>
  93. <div id="saas.svg" class="imgbox"><img src="saas.svg" class="bg0" onclick="download('saas.svg', this)"/><div class="label">saas.svg</div></div>
  94. <div id="serverless.svg" class="imgbox"><img src="serverless.svg" class="bg0" onclick="download('serverless.svg', this)"/><div class="label">serverless.svg</div></div>
  95. <div id="solutions.svg" class="imgbox"><img src="solutions.svg" class="bg0" onclick="download('solutions.svg', this)"/><div class="label">solutions.svg</div></div>
  96. </div>
  97. <script>
  98. var bg = 0;
  99. function toggleBg() {
  100. bg++
  101. if(bg > 2) bg = 0;
  102. for(let img of document.getElementsByTagName("img")) {
  103. img.className = `bg${bg}`;
  104. }
  105. }
  106. function search() {
  107. let q = document.getElementById('finder').value.trim().toLowerCase()
  108. if(q.length <= 0) {
  109. for(let imgbox of document.getElementsByClassName("imgbox")) {
  110. imgbox.style.display = "inline-block"
  111. }
  112. }
  113. for(let imgbox of document.getElementsByClassName("imgbox")) {
  114. imgbox.style.display = "inline-block"
  115. if(!imgbox.id.includes(q)) {
  116. imgbox.style.display = "none"
  117. }
  118. }
  119. }
  120. function download(f, e) {
  121. var downloadPNG = document.getElementById("pngcheck").checked;
  122. if(downloadPNG) {
  123. var data = getBase64Image(e);
  124. let a = document.createElement('a')
  125. a.href = "data:application/octet-stream;base64," + data
  126. a.download = f.replace('.svg', '.png')
  127. a.click()
  128. } else {
  129. let a = document.createElement('a')
  130. a.href = f
  131. a.download = f
  132. a.click()
  133. }
  134. }
  135. function getBase64Image(img) {
  136. var canvas = document.createElement("canvas");
  137. canvas.width = img.naturalWidth;
  138. canvas.height = img.naturalHeight;
  139. console.log(canvas.width , canvas.height)
  140. var ctx = canvas.getContext("2d");
  141. ctx.drawImage(img, 0, 0);
  142. var dataURL = canvas.toDataURL("image/png");
  143. return dataURL.replace(/^data:image\/(png|jpg);base64,/, "");
  144. }
  145. </script>
  146. </body></html>