homepage copy.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>Home</title>
  8. <link rel="stylesheet" href="../styles/homepage.css">
  9. <link href="favicon.png" rel="shortcut icon" type="image/x-icon" />
  10. </head>
  11. <body>
  12. <div id="search">
  13. <input id="search-field" type="text" name="search-field" />
  14. </div>
  15. <div class="container">
  16. <div id="clock"></div>
  17. <div class="weather-container">
  18. <div class="row">
  19. <div id="city-name" class="inline"></div>
  20. <div id="weather-description" class="inline"></div>
  21. <!-- <div class="inline">-</div> -->
  22. <div id="temp" class="inline"></div>
  23. </div>
  24. </div>
  25. <div class="bookmark-container">
  26. <div class="bookmark-set">
  27. <div class="bookmark-title">Most_used</div>
  28. <div class="bookmark-inner-container">
  29. <a class="bookmark" href="https://www.bps-sberbank.by/loginsbol" target="_blank">БПС-Сбербанк</a>
  30. <a class="bookmark" href="https://www.google.com/intl/ru/gmail/about/" target="_blank">GMail</a>
  31. <a class="bookmark" href="https://mail.yandex.ru/?from=vbff" target="_blank">YandexMail</a>
  32. <a class="bookmark" href="https://www.evernote.com/Login.action" target="_blank">Evernote</a>
  33. <a class="bookmark" href="https://www.deepl.com/translator" target="_blank">DeepL_Translate</a>
  34. <a class="bookmark" href="https://www.startpage.com/do/mypage.pl?prfe=e004f0542b4c9503bf0d89ea505333ad0386fee62ae1bdbf76516b783c510983c2dbad2de7bb68b5" target="_blank">StartPage</a>
  35. <a class="bookmark" href="https://www.speedtest.net/ru" target="_blank">Speedtest.net</a>
  36. <a class="bookmark" href="https://2ip.ru/speed/" target="_blank">2ip.ru</a>
  37. <a class="bookmark" href="https://rutracker.org/forum/index.php" target="_blank">RuTracker.org</a>
  38. <a class="bookmark" href="https://booktracker.org/" target="_blank">BookTracker.org</a>
  39. <a class="bookmark" href="https://gomelcgp.by/" target="_blank">ГГЦПоликлиника</a>
  40. <a class="bookmark" href="https://talon.by/" target="_blank">Талон.бай</a>
  41. </div>
  42. </div>
  43. <div class="bookmark-set">
  44. <div class="bookmark-title">Social/Video</div>
  45. <!-- <div class="bookmark-title">Social & Video</div> -->
  46. <div class="bookmark-inner-container">
  47. <a class="bookmark" href="https://youtube.com/" target="_blank">Youtube</a>
  48. <a class="bookmark" href="https://kinogo.eu/" target="_blank">kinogo.eu</a>
  49. <a class="bookmark" href="https://github.com/alkostuchkov/" target="_blank">GitHub (My)</a>
  50. <a class="bookmark" href="https://lbry.tv/@DistroTube:2" target="_blank">LBRY (DT)</a>
  51. <a class="bookmark" href="https://gitlab.com/dwt1" target="_blank">GitLab (DT)</a>
  52. <a class="bookmark" href="https://www.odnoklassniki.ru/" target="_blank">OK.RU</a>
  53. <a class="bookmark" href="http://tvext.ru/" target="_blank">КомфортноеТВ</a>
  54. <!-- <a class="bookmark" href="https://mastodon.technology/@distrotube" target="_blank">Mastodon</a> -->
  55. <!-- <a class="bookmark" href="https://diasp.org/stream" target="_blank">Diaspora</a> -->
  56. <!-- <a class="bookmark" href="https://netflix.com" target="_blank">Netflix</a> -->
  57. </div>
  58. </div>
  59. <div class="bookmark-set">
  60. <div class="bookmark-title">Devices(settings)</div>
  61. <div class="bookmark-inner-container">
  62. <a class="bookmark" href="http://192.168.1.1/" target="_blank">TL-WR841N</a>
  63. <a class="bookmark" href="http://tplinkrepeater.net/" target="_blank">TL-WA850RE</a>
  64. <a class="bookmark" href="http://192.168.8.1/" target="_blank">Wi-Fi USB-модем</a>
  65. <a class="bookmark" href="http://192.168.1.1/html/home.html" target="_blank">HiLink</a>
  66. </div>
  67. </div>
  68. <div class="bookmark-set">
  69. <div class="bookmark-title">Linux_News</div>
  70. <div class="bookmark-inner-container">
  71. <a class="bookmark" href="https://distrotube.com/" target="_blank">DistroTube.com</a>
  72. <a class="bookmark" href="https://www.linuxtoday.com/" target="_blank">LinuxToday</a>
  73. <a class="bookmark" href="https://www.linuxinsider.com/" target="_blank">LinuxInsider</a>
  74. <a class="bookmark" href="https://omgubuntu.co.uk/" target="_blank">OMG Ubuntu</a>
  75. <a class="bookmark" href="https://itsfoss.com/" target="_blank">It's Foss</a>
  76. <a class="bookmark" href="https://phoronix.com/" target="_blank">Phoronix</a>
  77. <a class="bookmark" href="https://www.zdnet.com/topic/linux/" target="_blank">ZDNet</a>
  78. </div>
  79. </div>
  80. <div class="bookmark-set">
  81. <div class="bookmark-title">Arch/Debian</div>
  82. <div class="bookmark-inner-container">
  83. <!-- <a class="bookmark" href="https://www.archlinux.org/" target="_blank">Arch Homepage</a> -->
  84. <a class="bookmark" href="https://wiki.archlinux.org/" target="_blank">Arch Wiki</a>
  85. <!-- <a class="bookmark" href="https://www.archlinux.org/packages/" target="_blank">Arch Packages</a> -->
  86. <!-- <a class="bookmark" href="https://aur.archlinux.org/" target="_blank">AUR Home</a> -->
  87. <!-- <a class="bookmark" href="https://bugs.archlinux.org/" target="_blank">Arch Bugs</a> -->
  88. <a class="bookmark" href="https://bbs.archlinux.org/" target="_blank">Arch Forums</a>
  89. <a class="bookmark" href="https://www.archlinux.org/planet/" target="_blank">Planet Arch</a>
  90. <a class="bookmark" href="https://wiki.debian.org/" target="_blank">Debian Wiki</a>
  91. </div>
  92. </div>
  93. <div class="bookmark-set">
  94. <div class="bookmark-title">Reddit</div>
  95. <div class="bookmark-inner-container">
  96. <a class="bookmark" href="https://reddit.com/r/linux" target="_blank">/r/linux</a>
  97. <a class="bookmark" href="https://reddit.com/r/archlinux" target="_blank">/r/archlinux</a>
  98. <a class="bookmark" href="https://reddit.com/r/commandline" target="_blank">/r/commandline</a>
  99. <a class="bookmark" href="https://reddit.com/r/linux4noobs" target="_blank">/r/linux4noobs</a>
  100. <a class="bookmark" href="https://reddit.com/r/linuxquestions" target="_blank">/r/linuxquestions</a>
  101. <a class="bookmark" href="https://reddit.com/r/linuxmemes" target="_blank">/r/linuxmemes</a>
  102. <a class="bookmark" href="https://reddit.com/r/suckless" target="_blank">/r/suckless</a>
  103. <a class="bookmark" href="https://reddit.com/r/unixporn" target="_blank">/r/unixporn</a>
  104. <a class="bookmark" href="https://reddit.com/r/vim" target="_blank">/r/vim</a>
  105. <a class="bookmark" href="https://reddit.com/r/emacs" target="_blank">/r/emacs</a>
  106. </div>
  107. </div>
  108. <div class="bookmark-set">
  109. <div class="bookmark-title">Suckless</div>
  110. <div class="bookmark-inner-container">
  111. <a class="bookmark" href="https://www.suckless.org/" target="_blank">Suckless Homepage</a>
  112. <a class="bookmark" href="https://git.suckless.org/" target="_blank">Suckless(Source_Code)</a>
  113. <a class="bookmark" href="https://tools.suckless.org/tabbed/" target="_blank">tabbed</a>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. <script>
  119. // Search on enter key event
  120. document.getElementById("search-field").addEventListener("keydown", event => {
  121. if (event.keyCode === 13) {
  122. var val = document.getElementById("search-field").value;
  123. window.open("https://google.com/search?q=" + val);
  124. }
  125. });
  126. // Get current time and format
  127. getTime = () => {
  128. let date = new Date(),
  129. min = date.getMinutes(),
  130. sec = date.getSeconds(),
  131. hour = date.getHours();
  132. return "" +
  133. (hour < 10 ? ("0" + hour) : hour) + ":" +
  134. (min < 10 ? ("0" + min) : min) + ":" +
  135. (sec < 10 ? ("0" + sec) : sec);
  136. }
  137. window.onload = () => {
  138. let xhr = new XMLHttpRequest();
  139. // Request to open weather map
  140. // xhr.open('GET', 'http://api.openweathermap.org/data/2.5/weather?id=4737316&units=imperial&appid=e5b292ae2f9dae5f29e11499c2d82ece');
  141. // 6cc6bc11b81b8fbc306d48dc50bbb88a
  142. // xhr.open('GET', 'https://api.openweathermap.org/data/2.5/weather?id=498817&units=metric&appid=6cc6bc11b81b8fbc306d48dc50bbb88a&lang=ru');
  143. // xhr.open('GET', 'https://api.openweathermap.org/data/2.5/weather?q=Homel&appid=6cc6bc11b81b8fbc306d48dc50bbb88a&units=metric&lang=ru');
  144. xhr.open('GET', 'https://api.openweathermap.org/data/2.5/weather?lat=52.4345&lon=30.9754&appid=6cc6bc11b81b8fbc306d48dc50bbb88a&units=metric&lang=en');
  145. xhr.onload = () => {
  146. if (xhr.readyState === 4) {
  147. if (xhr.status === 200) {
  148. let json = JSON.parse(xhr.responseText);
  149. console.log(json);
  150. document.getElementById("temp").innerHTML = json.main.temp.toFixed(0) + " C";
  151. document.getElementById("weather-description").innerHTML = json.weather[0].description;
  152. document.getElementById("city-name").innerHTML = json.name + ": ";
  153. } else {
  154. console.log('error msg: ' + xhr.status);
  155. }
  156. }
  157. }
  158. xhr.send();
  159. // Set up the clock
  160. document.getElementById("clock").innerHTML = getTime();
  161. // Set clock interval to tick clock
  162. setInterval(() => {
  163. document.getElementById("clock").innerHTML = getTime();
  164. }, 100);
  165. }
  166. document.addEventListener("keydown", event => {
  167. if (event.keyCode == 32) { // Spacebar code to open search
  168. document.getElementById('search').style.display = 'flex';
  169. document.getElementById('search-field').focus();
  170. } else if (event.keyCode == 27) { // Esc to close search
  171. document.getElementById('search-field').value = '';
  172. document.getElementById('search-field').blur();
  173. document.getElementById('search').style.display = 'none';
  174. }
  175. });
  176. </script>
  177. </body>
  178. </html>