Advertisement
lollhosh

tcc pagina principal

Apr 24th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. <html>
  2. <head>
  3. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  4. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
  5.  
  6. <link rel="stylesheet" type="text/css" href="estilo.css" media="screen" />
  7.  
  8. <style>
  9. $cols: 10;
  10. $rows: 6;
  11. $cells: $cols * $rows;
  12. $bgcolor: #6223D2;
  13. $shapeHeight: 230;
  14. $shapeWidth: 200;
  15.  
  16. body {
  17. margin: 0;
  18. background-color: $bgcolor;
  19. height: 100vh;
  20. width: 100vw;
  21. position: relative;
  22. overflow: hidden;
  23. }
  24.  
  25. //Radial gradient to fade edges of viewport
  26. .overlay {
  27. width: 100vw;
  28. height: 100vh;
  29. position: absolute;
  30. z-index: 2;
  31. background: radial-gradient(circle, transparent 0%, transparentize($bgcolor, .15) 100%);
  32. }
  33.  
  34. //Container to provide grid layout for all items
  35. .container {
  36. display: grid;
  37.  
  38. grid-template-columns: repeat($cols, $shapeWidth+px);
  39. grid-template-rows: repeat($rows, $shapeHeight+px);
  40. transform: translate(-3%, -4%); // Starting point bleeds off edge
  41. }
  42.  
  43. //Invividual shapes
  44. .shape {
  45. width: $shapeWidth+px;
  46. height: $shapeHeight+px;
  47. //Create hexagon mask
  48. -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  49. clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  50.  
  51. //Snap hexagon together by moving each "row" up and over
  52. @for $i from 1 through $cells {
  53. @if $i > $cols {
  54. &:nth-child(#{$i}) {
  55. transform: translate(-50%, -25%);
  56. }
  57. }
  58. @if $i > ($cols * 2) {
  59. &:nth-child(#{$i}) {
  60. transform: translate(0%, -50%);
  61. }
  62. }
  63. @if $i > ($cols * 3) {
  64. &:nth-child(#{$i}) {
  65. transform: translate(-50%, -75%);
  66. }
  67. }
  68. @if $i > ($cols * 4) {
  69. &:nth-child(#{$i}) {
  70. transform: translate(0%, -100%);
  71. }
  72. }
  73. @if $i > ($cols * 5) {
  74. &:nth-child(#{$i}) {
  75. transform: translate(-50%, -125%);
  76. }
  77. }
  78. }
  79. }
  80.  
  81.  
  82. </style>
  83. <script>
  84. window.console = window.console || function(t) {};
  85. </script>
  86. <script>
  87. if (document.location.search.match(/type=embed/gi)) {
  88. window.parent.postMessage("resize", "*");
  89. }
  90. </script>
  91. <script src="https://static.codepen.io/assets/editor/live/css_reload-5619dc0905a68b2e6298901de54f73cefe4e079f65a75406858d92924b4938bf.js"></script>
  92.  
  93. </head>
  94.  
  95. <body>
  96.  
  97. mixin triangle(num, color)
  98. polygon(
  99. points=""
  100. fill="none"
  101. stroke=color
  102. stroke-width="5")
  103. animate(
  104. attributeName="points"
  105. repeatCount="indefinite"
  106. dur="4s"
  107. begin=num+"s"
  108. from="50 57.5, 50 57.5, 50 57.5"
  109. to="50 -75, 175 126, -75 126")
  110.  
  111. //- Create Overlay
  112. div(class="overlay")
  113.  
  114. //- Instantiate triangles
  115. div(class="container")
  116. - for (var x = 1; x < 60; x++)
  117. svg(class="shape" viewBox="0 0 100 115" preserveAspectRatio="xMidYMin slice")
  118. +triangle(0, "hsl(320,100%,70%)")
  119. +triangle(1, "hsl(240,100%,70%)")
  120. +triangle(2, "hsl(160,100%,70%)")
  121. +triangle(3, "hsl(80,100%,70%)")
  122. <center>
  123.  
  124. <br><br><br>
  125. <div class="text-center">
  126. <img src="logo.png" class="rounded" alt="..." width="300" height="300"/>
  127. </div>
  128. <br><br>
  129. <form class="form-inline mr-auto">
  130. <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
  131. <button class="btn blue-gradient btn-rounded btn-sm my-0" type="submit">Search</button>
  132. </form>
  133. </center>
  134. </body>
  135. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement