homepage.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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">Python</div>
  70. <div class="bookmark-inner-container">
  71. <a class="bookmark" href="https://www.python.org/" target="_blank">python.org</a>
  72. <a class="bookmark" href="http://pypi.org/" target="_blank">pypi.org</a>
  73. <!-- <a class="bookmark" href="http://192.168.8.1/" target="_blank">Wi-Fi USB-модем</a> -->
  74. <!-- <a class="bookmark" href="http://192.168.1.1/html/home.html" target="_blank">HiLink</a> -->
  75. </div>
  76. </div>
  77. <div class="bookmark-set">
  78. <div class="bookmark-title">Linux</div>
  79. <div class="bookmark-inner-container">
  80. <a class="bookmark" href="https://losst.ru/" target="_blank">LOSST.ru</a>
  81. <a class="bookmark" href="https://distrotube.com/" target="_blank">DistroTube.com</a>
  82. <a class="bookmark" href="https://www.linuxtoday.com/" target="_blank">LinuxToday</a>
  83. <a class="bookmark" href="https://www.linuxinsider.com/" target="_blank">LinuxInsider</a>
  84. <a class="bookmark" href="https://omgubuntu.co.uk/" target="_blank">OMG Ubuntu</a>
  85. <a class="bookmark" href="https://itsfoss.com/" target="_blank">It's Foss</a>
  86. <a class="bookmark" href="https://phoronix.com/" target="_blank">Phoronix</a>
  87. <a class="bookmark" href="https://www.zdnet.com/topic/linux/" target="_blank">ZDNet</a>
  88. <!-- <a class="bookmark" href="https://www.archlinux.org/" target="_blank">Arch Homepage</a> -->
  89. <a class="bookmark" href="https://archlinux.org/" target="_blank">Arch Linux</a>
  90. <a class="bookmark" href="https://wiki.archlinux.org/" target="_blank">Arch Wiki</a>
  91. <a class="bookmark" href="https://bbs.archlinux.org/" target="_blank">Arch Forums</a>
  92. <a class="bookmark" href="https://www.archlinux.org/planet/" target="_blank">Planet Arch</a>
  93. <a class="bookmark" href="https://wiki.debian.org/" target="_blank">Debian Wiki</a>
  94. </div>
  95. </div>
  96. <div class="bookmark-set">
  97. <div class="bookmark-title">Reddit</div>
  98. <div class="bookmark-inner-container">
  99. <a class="bookmark" href="https://reddit.com/r/linux" target="_blank">/r/linux</a>
  100. <a class="bookmark" href="https://reddit.com/r/archlinux" target="_blank">/r/archlinux</a>
  101. <a class="bookmark" href="https://reddit.com/r/commandline" target="_blank">/r/commandline</a>
  102. <a class="bookmark" href="https://reddit.com/r/linux4noobs" target="_blank">/r/linux4noobs</a>
  103. <a class="bookmark" href="https://reddit.com/r/linuxquestions" target="_blank">/r/linuxquestions</a>
  104. <a class="bookmark" href="https://reddit.com/r/linuxmemes" target="_blank">/r/linuxmemes</a>
  105. <a class="bookmark" href="https://reddit.com/r/suckless" target="_blank">/r/suckless</a>
  106. <a class="bookmark" href="https://reddit.com/r/unixporn" target="_blank">/r/unixporn</a>
  107. <a class="bookmark" href="https://reddit.com/r/vim" target="_blank">/r/vim</a>
  108. <a class="bookmark" href="https://reddit.com/r/emacs" target="_blank">/r/emacs</a>
  109. </div>
  110. </div>
  111. <div class="bookmark-set">
  112. <div class="bookmark-title">Suckless</div>
  113. <div class="bookmark-inner-container">
  114. <a class="bookmark" href="https://www.suckless.org/" target="_blank">Suckless Homepage</a>
  115. <a class="bookmark" href="https://git.suckless.org/" target="_blank">Suckless(Source_Code)</a>
  116. <a class="bookmark" href="https://tools.suckless.org/tabbed/" target="_blank">tabbed</a>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <script>
  122. // Search on enter key event
  123. document.getElementById("search-field").addEventListener("keydown", event => {
  124. if (event.keyCode === 13) {
  125. var val = document.getElementById("search-field").value;
  126. window.open("https://google.com/search?q=" + val);
  127. }
  128. });
  129. // Get current time and format
  130. getTime = () => {
  131. let date = new Date(),
  132. min = date.getMinutes(),
  133. sec = date.getSeconds(),
  134. hour = date.getHours();
  135. return "" +
  136. (hour < 10 ? ("0" + hour) : hour) + ":" +
  137. (min < 10 ? ("0" + min) : min) + ":" +
  138. (sec < 10 ? ("0" + sec) : sec);
  139. }
  140. window.onload = () => {
  141. let xhr = new XMLHttpRequest();
  142. // Request to open weather map
  143. // xhr.open('GET', 'http://api.openweathermap.org/data/2.5/weather?id=4737316&units=imperial&appid=e5b292ae2f9dae5f29e11499c2d82ece');
  144. // 6cc6bc11b81b8fbc306d48dc50bbb88a
  145. // xhr.open('GET', 'https://api.openweathermap.org/data/2.5/weather?id=498817&units=metric&appid=6cc6bc11b81b8fbc306d48dc50bbb88a&lang=ru');
  146. // xhr.open('GET', 'https://api.openweathermap.org/data/2.5/weather?q=Homel&appid=6cc6bc11b81b8fbc306d48dc50bbb88a&units=metric&lang=ru');
  147. xhr.open('GET', 'https://api.openweathermap.org/data/2.5/weather?lat=52.4345&lon=30.9754&appid=6cc6bc11b81b8fbc306d48dc50bbb88a&units=metric&lang=en');
  148. xhr.onload = () => {
  149. if (xhr.readyState === 4) {
  150. if (xhr.status === 200) {
  151. let json = JSON.parse(xhr.responseText);
  152. console.log(json);
  153. document.getElementById("temp").innerHTML = json.main.temp.toFixed(0) + " C";
  154. document.getElementById("weather-description").innerHTML = json.weather[0].description;
  155. document.getElementById("city-name").innerHTML = json.name + ": ";
  156. } else {
  157. console.log('error msg: ' + xhr.status);
  158. }
  159. }
  160. }
  161. xhr.send();
  162. // Set up the clock
  163. document.getElementById("clock").innerHTML = getTime();
  164. // Set clock interval to tick clock
  165. setInterval(() => {
  166. document.getElementById("clock").innerHTML = getTime();
  167. }, 100);
  168. }
  169. document.addEventListener("keydown", event => {
  170. if (event.keyCode == 32) { // Spacebar code to open search
  171. document.getElementById('search').style.display = 'flex';
  172. document.getElementById('search-field').focus();
  173. } else if (event.keyCode == 27) { // Esc to close search
  174. document.getElementById('search-field').value = '';
  175. document.getElementById('search-field').blur();
  176. document.getElementById('search').style.display = 'none';
  177. }
  178. });
  179. </script>
  180. </body>
  181. </html>