lyonlyke

BIBLE SVG ICON JS

Jul 25th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>BIBLE SVG JS</title>
  5.  
  6. <style>
  7.  
  8. body {background-color:black;}
  9.  
  10. #boxe {
  11. display:block;
  12. margin:0 auto;
  13. height:320px;
  14. width:320px;
  15. }
  16.  
  17.  
  18. #boxe svg {
  19. display:block;
  20. width:100%;
  21. height:100%;
  22. margin:0 auto;
  23.  
  24. }
  25.  
  26. </style>
  27.  
  28. </head>
  29. <body>
  30.  
  31. <script>
  32.  
  33. function bibleRender(){
  34. var pieces = [
  35. '#A9825A','32,0 32,64 16,64 14,63 13,62 12,60.25 12,3 12.5,2 13.5,0.75 15,0 32,0',
  36. '#7E6142','32,0 48,0 50,0.5 51.25,1.5 52,3 52,57 51,57.75 50.5,59 51,60.25 52,61 52,64 32,64 32,0',
  37. '#FFDC35','30,10 32,8.5 34,10 34,15 39,15 40.5,17 39,19 34,19 34,31 32,32.5 30,31 30,19 25,19 23.5,17 25,15 30,15 30,10',
  38. '#FAC678','52,61 32,61 32,57 52,57 51,57.75 50.5,59 51,60.25 52,61',
  39. '#F5D5A6','32,61 16,61 15.2,60 15,59 15.2,58 16,57 32,57',
  40.  
  41. ];
  42.  
  43. document.write('<span id="boxe"><svg viewBox="0 0 64 64">');
  44. document.write('<defs>');
  45. document.write('<pattern id="slate" width="64" height="64" patternUnits="userSpaceOnUse"><g>');
  46.  
  47. for(i = 0; i < pieces.length;i = i + 2){
  48. var j = i + 1;
  49.  
  50. document.write('<polyline fill="'+pieces[i]+'" points="'+pieces[j]+'"><\/polyline>');
  51. }
  52.  
  53. document.write('<\/g><\/pattern><\/defs>');
  54. document.write('<rect x="0" y="0" width="100%" height="100%" fill="url(#slate)" \/>');
  55. document.write('<\/svg><\/span>');
  56. }
  57. bibleRender();
  58.  
  59. </script>
  60.  
  61.  
  62. </body>
  63. </html>
Advertisement
Add Comment
Please, Sign In to add comment