Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.84 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="pl">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport"
  6. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <link rel="stylesheet" href="style/style.css">
  9. <title>Document</title>
  10. </head>
  11. <body>
  12. <div class="content-wrapper">
  13. <header class="header">
  14. <h1 class="header__heading">Nagłówek</h1>
  15. </header>
  16. <div class="container">
  17. <aside class="news-wrapper">
  18. <div class="news">
  19. <p class="news__title">news</p>
  20. <article class="news__content">
  21. <p>Cześć <span id="name" class="news__inserted">Łukasz</span></p>
  22. <p>Dzisiaj jest: <span id="curDate" class="news__inserted"></span></p>
  23. <p>Godzina: <span id="curTime" class="news__inserted"></span></p>
  24. <p>Przedmiot <span id="subject" class="news__inserted">Techniki internetowe</span></p>
  25. <p>Urodziny masz za: <span id="birthday" class="news__inserted">podaj datę urodzin</span></p>
  26. </article>
  27. </div>
  28. <div class="result">
  29. <p id="result">Wyniki</p>
  30. </div>
  31. </aside>
  32. <main class="content">
  33. <div class="main__wrapper">
  34.  
  35. <embed src="matematyka.html" id="embed" class="iframe">
  36.  
  37. </div>
  38. </main>
  39. <nav class="nav">
  40. <ul class="nav__list">
  41. <li class="nav__item"><a href="#" id="glowna" class="nav__link">Strona główna</a></li>
  42. <li class="nav__item"><a href="#" id="matma" class="nav__link">ax<sup>2</sup> + bx + c = 0</a></li>
  43. <li class="nav__item"><a href="#" class="nav__link">LINK3</a></li>
  44. </ul>
  45. </nav>
  46. </div>
  47. <div class="push"></div>
  48. </div>
  49. <footer class="footer">
  50. <p>&copy; STOPKA | 2019</p>
  51. </footer>
  52. <script src="js/script.js"></script>
  53. </body>
  54. </html>
  55.  
  56. * {
  57. margin: 0;
  58. padding: 0;
  59. box-sizing: border-box;
  60. }
  61.  
  62. body {
  63. font-family: "Arial";
  64. }
  65.  
  66. sup,sub {
  67. position: relative;
  68. font-size: 0.8em;
  69. }
  70.  
  71. sup {
  72. top: -0.4em;
  73. }
  74.  
  75. sub {
  76. top: 0.2em;
  77. }
  78.  
  79. .header {
  80. width: 100%;
  81. min-height: 150px;
  82. display: flex;
  83. justify-content: center;
  84. align-items: center;
  85. background: #CCCCCC;
  86. margin: 0;
  87. }
  88.  
  89. .header__heading {
  90. text-transform: uppercase;
  91. font-size: 26px;
  92. font-weight: 400;
  93. }
  94.  
  95. .nav__list {
  96. display: flex;
  97. flex-direction: row;
  98. justify-content: space-around;
  99. flex-wrap: wrap;
  100. align-items: center;
  101. list-style: none;
  102. margin: 20px 0;
  103. }
  104.  
  105. .nav__item {
  106. width: 30%;
  107. min-width: 135px;
  108. height: 50px;
  109. padding: 5px;
  110. position: relative;
  111. }
  112.  
  113. .nav__link {
  114. display: flex;
  115. align-items: center;
  116. justify-content: center;
  117. color: #000;
  118. width: 100%;
  119. height: 100%;
  120. text-decoration: none;
  121. font-weight: 600;
  122. background: #CCCCCC;
  123. padding: 0 5px;
  124. }
  125.  
  126. .nav__link:hover, .nav__link:visited {
  127. text-decoration: none;
  128. color: #000;
  129. }
  130.  
  131. .nav__link:hover {
  132. background: #b8b8b8;
  133. transition: background 0.2s;
  134. }
  135.  
  136. .content {
  137. margin: 20px 0;
  138. }
  139.  
  140. .main__wrapper {
  141. padding: 15px;
  142. width: 100%;
  143. }
  144.  
  145. .result {
  146. min-height: 200px;
  147. border: 6px solid #CCCCCC;
  148. margin-top: 20px;
  149. padding: 15px;
  150.  
  151. }
  152.  
  153. .result p {
  154. margin: 0;
  155. }
  156.  
  157. .iframe {
  158. width: 100%;
  159. height: 100%;
  160. border: 0;
  161. overflow: visible;
  162. }
  163.  
  164. .news {
  165. display: flex;
  166. flex-direction: column;
  167. justify-content: flex-start;
  168. align-items: center;
  169. padding: 15px;
  170. background: #CCCCCC;
  171. }
  172.  
  173. .news__title {
  174. text-transform: uppercase;
  175. font-weight: 700;
  176. margin: 10px 0;
  177. }
  178.  
  179. .news__content {
  180. background: white;
  181. display: block;
  182. width: 100%;
  183. min-height: 200px;
  184. padding: 15px;
  185. word-break: break-word;
  186. }
  187.  
  188. .news__inserted {
  189. font-weight: 600;
  190. }
  191.  
  192. .footer {
  193. height: 70px;
  194. width: 100%;
  195. display: flex;
  196. justify-content: center;
  197. align-items: center;
  198. background: #CCCCCC;
  199. font-weight: 600;
  200. margin-top: 25px;
  201. }
  202. .container {
  203. width: 100%;
  204. padding: 15px;
  205. margin: 0 auto;
  206. }
  207.  
  208.  
  209. /*
  210. Tu jest po Leśniakowemu zrobiona stopka "zawsze na dole" (stopka musi mieć znaną nam wysokość).
  211. Kluczem jest oplecenie wszystkiego poza stopką w jakiś wrapper (.content-wrapper) oraz dodanie na końcu
  212. pomocniczego diva (.push).
  213. */
  214.  
  215. /* html,body - wymagane height 100% na oba te tagi */
  216. html, body {
  217. height: 100%;
  218. }
  219.  
  220. .push {
  221. height: 95px; /* rzeczywista wysokość stopki (w typ wypadku height 70px + margin-top 25px */
  222. }
  223.  
  224. .content-wrapper {
  225. min-height: 100%; /* element stały - musi mieć tą wartość */
  226. margin-bottom: -95px; /* rzeczywista wysokość stopki jak wyżej z tym że na minus */
  227. }
  228.  
  229. .form {
  230. }
  231.  
  232. .form__title {
  233. text-transform: uppercase;
  234. margin: 0 0 15px;
  235. }
  236.  
  237. .form__input-wrapper {
  238. display: flex;
  239. flex-direction: row;
  240. justify-content: space-around;
  241. flex-wrap: wrap;
  242. }
  243.  
  244. .form__input, .form__submit {
  245. padding: 5px 10px;
  246. width: 30%;
  247. margin: 0 5px 10px;
  248. min-width: 120px;
  249. border: 1px solid #000;
  250. background: white;
  251. text-transform: uppercase;
  252. }
  253.  
  254. .form__input--invalid {
  255. border: 1px solid #F00!important;
  256. }
  257.  
  258. .form__input::placeholder {
  259. color: #000;
  260. text-transform: uppercase;
  261. }
  262. @media screen and (min-width: 600px) {
  263. .header {
  264. min-height: 300px;
  265. }
  266. .header__heading {
  267. font-size: 40px;
  268. }
  269. .nav {
  270. width: 100%;
  271. }
  272. .container {
  273. max-width: 1160px;
  274. display: flex;
  275. flex-wrap: wrap;
  276. flex-direction: row;
  277. margin: 15px auto 70px;
  278. }
  279. .nav__list {
  280. flex-direction: column;
  281. align-items: flex-start;
  282. flex-wrap: wrap;
  283. margin: 0;
  284. }
  285. .nav__item {
  286. margin: 10px 0;
  287. width: 100%;
  288. height: 80px;
  289. }
  290. .nav__item:first-child {
  291. margin-top: 0;
  292. }
  293. .nav__item:last-child {
  294. margin-bottom: 0;
  295. }
  296. .nav, .news-wrapper {
  297. max-width: 25%;
  298. flex: 0 0 100%;
  299. }
  300. .news {
  301. display: inline-flex;
  302. margin-left: auto;
  303. }
  304. .content {
  305. display: inline-flex;
  306. max-width: 50%;
  307. flex: 0 0 50%;
  308. padding: 0 20px;
  309. margin: 0;
  310. }
  311.  
  312. .form__input-wrapper {
  313. display: flex;
  314. flex-direction: row;
  315. justify-content: space-around;
  316. flex-wrap: wrap;
  317. }
  318. .form__input {
  319. padding: 5px 10px;
  320. width: 30%;
  321. margin-bottom: 10px;
  322. min-width: 120px;
  323. }
  324. .form__submit {
  325. width: 30%;
  326. min-width: 120px;
  327. }
  328. }
  329. const curDate = document.getElementById("curDate");
  330. const curTime = document.getElementById("curTime");
  331.  
  332. const glowna = document.getElementById("glowna");
  333. const matma = document.getElementById("matma");
  334. const embed = document.getElementById("embed");
  335.  
  336. let today = new Date();
  337.  
  338. updateTime();
  339.  
  340. function updateTime() {
  341. today = new Date();
  342. curTime.innerText = today.toLocaleTimeString("pl-PL", {
  343. hour: "2-digit",
  344. minute: "2-digit",
  345. hour12: false
  346. });
  347. curDate.innerText = today.toLocaleDateString("nb-NO", {
  348. year: "numeric",
  349. month: "2-digit",
  350. day: "2-digit",
  351. });
  352. interval = setTimeout(function(){
  353. updateTime()
  354. }, 5000);
  355. }
  356.  
  357. glowna.addEventListener("click", function() {
  358. embed.setAttribute("src", "matematyka.html");
  359. })
  360. matma.addEventListener("click", function() {
  361. embed.setAttribute("src", "akytama.html");
  362. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement