Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | None | 0 0
  1. #headerLogo{
  2. background: url(https://images2.alphacoders.com/698/698137.jpg);
  3. background-size: cover;
  4. height: 250px;
  5. display: block;
  6. margin-top: 50px;
  7. }
  8. #text{
  9. color: white;
  10. position: absolute;
  11. text-align:center;
  12. font-size: 36px;
  13. width: 100%;
  14. padding: 0;
  15. margin: 0;
  16. line-height: 250px;
  17. }
  18. .navbar{
  19. margin-bottom: 0px;
  20. }
  21. .fa{
  22. font-size:22px;
  23. color: #0077cd;
  24. }
  25. .fa:hover{
  26. color: #0890f2;
  27. }
  28. .footer{
  29. text-align: center;
  30. color: #c6c6c6;
  31. }
  32. #indexImage{
  33. width:100%;
  34. height: auto;
  35. }
  36. #myImg {
  37. border-radius: 5px;
  38. cursor: pointer;
  39. transition: 0.3s;
  40. }
  41.  
  42. #myImg:hover {opacity: 0.7;}
  43.  
  44. /* The Modal (background) */
  45. .modal {
  46. display: none;
  47. position: fixed;
  48. z-index: 1;
  49. padding-top: 100px;
  50. left: 0;
  51. top: 0;
  52. width: 100%;
  53. height: 100%;
  54. overflow: auto;
  55. }
  56.  
  57. .modal-content {
  58. margin: auto;
  59. display: block;
  60. width: 80%;
  61. max-width: 700px;
  62. }
  63.  
  64. /* Caption of Modal Image (Image Text) - Same Width as the Image */
  65. #caption {
  66. margin: auto;
  67. display: block;
  68. width: 80%;
  69. max-width: 700px;
  70. text-align: center;
  71. color: #000000;
  72. padding: 10px 0;
  73. height: 150px;
  74. }
  75.  
  76. /* Add Animation - Zoom in the Modal */
  77. .modal-content, #caption {
  78. -webkit-animation-name: zoom;
  79. -webkit-animation-duration: 0.6s;
  80. animation-name: zoom;
  81. animation-duration: 0.6s;
  82. }
  83.  
  84. @-webkit-keyframes zoom {
  85. from {-webkit-transform:scale(0)}
  86. to {-webkit-transform:scale(1)}
  87. }
  88.  
  89. @keyframes zoom {
  90. from {transform:scale(0)}
  91. to {transform:scale(1)}
  92. }
  93.  
  94. /* The Close Button */
  95. .close {
  96. top: 15px;
  97. right: 35px;
  98. color: #ffffff;
  99. font-size: 60px;
  100. font-weight: bold;
  101. transition: 0.3s;
  102. }
  103.  
  104. .close:hover,
  105. .close:focus {
  106. color: #bbb;
  107. text-decoration: none;
  108. cursor: pointer;
  109. }
  110.  
  111. /* 100% Image Width on Smaller Screens */
  112. @media only screen and (max-width: 700px){
  113. .modal-content {
  114. width: 100%;
  115. }
  116. }
  117.  
  118. // Get the modal
  119. var modal = document.getElementById('myModal');
  120. var images = document.getElementsByClassName("imageClass");
  121. for(var i = 0; i < images.length; i++){
  122. var img = images[i];
  123. var modalImg = document.getElementById("img01");
  124. var captionText = document.getElementById("caption");
  125. img.onclick = function(){
  126. modal.style.display = "block";
  127. modalImg.src = this.src;
  128. modalImg.alt = this.alt;
  129. captionText.innerHTML = this.alt;
  130. }
  131. }
  132. var span = document.getElementsByClassName("close")[0];
  133.  
  134. // When the user clicks on <span> (x), close the modal
  135. $('#closeImage').onclick = function() {
  136. modal.style.display = "none";
  137. }
  138.  
  139. {% extends 'layout.html' %}
  140.  
  141. {% block title %}{{ title }}{% endblock %}
  142. {% block header %}{% include 'header.html' %}{% endblock %}
  143. {% block headerLogo %}{% include 'headerLogo.html' %}{% endblock %}
  144. {% block styles %}{% include 'styles.html' %}{% endblock %}
  145. {% block content %}
  146.  
  147. <div>
  148. {% for key, val in projectImages %}
  149. {% if val.type == "image" %}
  150. <img id="myImg" class="imageClass" src="{{val.src}}" alt="{{val.title}}" width="300" height="200">
  151. {% elseif val.type == "video" %}
  152. <img id="myImg" class="videoClass" src="http://img.youtube.com/vi/{{val.src}}/0.jpg" alt="{{val.title}}" width="300" height="200">
  153. {% endif %}
  154. {% endfor %}
  155. <div id="myModal" class="modal">
  156. <span id="closeImage" class="close" onclick="document.getElementById('myModal').style.display='none'">&times;</span>
  157. <img class="modal-content" id="img01">
  158. <div id="caption"></div>
  159. </div>
  160. </div>
  161. <script src="../js/fotoInModal.js"></script>
  162. {% endblock %}
  163.  
  164. {
  165. "title": "Argochamber",
  166. "indexContent":"Was created in 2012, by Pablo Blanco Celdrán and Eric Dacal Sanchez, in order to create fun games and for the whole world.",
  167. "navButtons" : [{"name": "Projects", "src": "./projects.html"}, {"name": "Contacts", "src": "./contacts.html"},{"name": "Teams", "src":"./teams.html"}],
  168. "imageUrl" : "https://avatars0.githubusercontent.com/u/17063359?v=4&s=200",
  169. "imageHeaderLogo" : "https://images2.alphacoders.com/698/698137.jpg",
  170. "headerNavBar": "navbar-light bg-primary",
  171. "fontawesome": [{"icon": "fa fa-facebook-official", "src": "https://www.facebook.com/argochamber/?ref=br_rs"},
  172. {"icon": "fa fa-twitter-square", "src": "https://twitter.com/argochamber"}],
  173. "projectImages":[{"title": "Spiderman in New York", "src": "../image/spidey.jpg", "type": "image"},
  174. {"title": "Sculpting link", "src":"ALbt17LLH54", "type": "video"}],
  175. "css": {
  176. "headerTextColor": "white",
  177. "headerFontSize": "36px"
  178. }
  179. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement