Skip to content

Commit

Permalink
Added website info
Browse files Browse the repository at this point in the history
  • Loading branch information
cherryymerryy committed Jul 19, 2023
1 parent d461f73 commit 4c0b585
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
17 changes: 15 additions & 2 deletions new/test/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
<link rel="stylesheet" href="src/style/fonts.css">
<link rel="stylesheet" href="src/style/scrollbar.css">
<!-- styles -->
<script src="src/js/websiteInfo.js"></script>
</head>
<body>
<header>
<div class="lang">
<select class="change-lang">
<option value="ru">Russian</option>
<option value="en" selected>English</option>
<option value="ru">RU</option>
<option value="en" selected>EN</option>
</select>
</div>
<a class="lng-about_us" href="#about">About us</a>
Expand Down Expand Up @@ -141,4 +142,16 @@
<script src="src/js/lang.js"></script>
<script src="src/js/app.js"></script>
</body>
<footer>
<div class="website_info">
<p class="version_text" id="version">
<script>
var version = getWebSiteLatestVersion();
document.getElementById("version").innerHTML = 'v' + version;
</script><br>
made by bublickk🦦<br>
<a class="lng-sourcecode" href="https://github.com/Reeversee/reeversee.github.io/">Source code available on GitHub</a>
</p>
</div>
</footer>
</html>
4 changes: 4 additions & 0 deletions new/test/src/js/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ const LangArray = {
"ru": "Дев & владелец паблика 'ОКОКА'",
"en": "Dev",
},
"sourcecode" : {
"ru": "Исходный код доступен на GitHub",
"en": "Source code available on GitHub",
},
}
8 changes: 8 additions & 0 deletions new/test/src/js/websiteInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function getWebSiteLatestVersion() {
var xmlHttp = new XMLHttpRequest();
var requestLink = "https://api.github.com/repos/Reeversee/reeversee.github.io/releases/latest";
xmlHttp.open("GET", requestLink, false);
xmlHttp.send(null);
var releaseInfo = JSON.parse(xmlHttp.responseText);
return releaseInfo.tag_name;
}

1 comment on commit 4c0b585

@vercel
Copy link

@vercel vercel bot commented on 4c0b585 Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.