Skip to content

Commit

Permalink
Added projects and website info
Browse files Browse the repository at this point in the history
  • Loading branch information
cherryymerryy committed Jul 19, 2023
1 parent f96ab68 commit 312f713
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 11 deletions.
18 changes: 10 additions & 8 deletions new/test/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<a class="lng-contacts" href="#contacts">Contacts</a>
</header>
<div class="blocks">
<script src="src/js/projectsInfo/stormInfo.js"></script>
<script src="src/js/projectsInfo/launcherInfo.js"></script>
<div class="about" id="about">
<div class="terminal">
<div class="terminal-text"> <span style="color: greenyellow">reverse@ubuntu</span>:<span style="color: cornflowerblue">~</span>$ about_us.txt </div>
Expand All @@ -40,7 +42,7 @@
<a>
<img class="listpic" src="src/img/Logo/TheOceanShore_MiniLogo.png"></img>
<div class="listinfo">
<div class="listname">The Ocean Shore | Game</div>
<div class="listname" id="storm_version">The Ocean Shore | Game |<script>getStormInfo()</script></div>
<div class="lng-storm_desc"></div>
</div>
<div class="actbtns">
Expand All @@ -50,7 +52,7 @@
<a>
<img class="listpic" src="src/img/Logo/Reverse_Launcher.png"></img>
<div class="listinfo">
<div class="listname">Reverse Launcher | App</div>
<div class="listname" id="launcher_version">Reverse Launcher | App<script>getLauncherInfo()</script></div>
<div class="lng-launcher_desc">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quas doloribus asperiores accusamus nulla? Officiis delectus aut enim soluta hic libero nobis quae nemo excepturi, corporis numquam. In inventore minima dolorem?</div>
</div>
<div class="actbtns">
Expand Down Expand Up @@ -148,13 +150,13 @@
</body>
<footer>
<div class="website_info">
<p class="version_text" id="version">
<p class="text-p">
Site info:
</p>
<p class="text-p" id="version_body_author">
<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>
getWebSiteInfo()
</script>
</p>
</div>
</footer>
Expand Down
29 changes: 29 additions & 0 deletions new/test/src/js/projectsInfo/launcherInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
function getLauncherLatestVersion() {
var xmlHttp = new XMLHttpRequest();
var requestLink = "https://api.github.com/repos/Reeversee/ReverseLauncherBeta/releases/latest";
xmlHttp.open("GET", requestLink, false);
xmlHttp.send(null);
var releaseInfo = JSON.parse(xmlHttp.responseText);
return releaseInfo.tag_name;
}

function getLauncherPreRelease() {
var xmlHttp = new XMLHttpRequest();
var requestLink = "https://api.github.com/repos/Reeversee/ReverseLauncherBeta/releases/latest";
xmlHttp.open("GET", requestLink, false);
xmlHttp.send(null);
var releaseInfo = JSON.parse(xmlHttp.responseText);
return releaseInfo.prerelease;
}

function getLauncherInfo() {
var version = getLauncherLatestVersion();
var prerelease = getLauncherPreRelease();
if (prerelease == 'false'){
prerelease = 'beta'
}
else {
prerelease = 'release'
}
document.getElementById("launcher_version").innerHTML = 'Reverse Launcher | App | ' + 'v' + version + ' | ' + prerelease;
}
29 changes: 29 additions & 0 deletions new/test/src/js/projectsInfo/stormInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
function getStormLatestVersion() {
var xmlHttp = new XMLHttpRequest();
var requestLink = "https://api.github.com/repos/bublickkk/StormImg/releases/latest";
xmlHttp.open("GET", requestLink, false);
xmlHttp.send(null);
var releaseInfo = JSON.parse(xmlHttp.responseText);
return releaseInfo.tag_name;
}

function getStormPreRelease() {
var xmlHttp = new XMLHttpRequest();
var requestLink = "https://api.github.com/repos/bublickkk/StormImg/releases/latest";
xmlHttp.open("GET", requestLink, false);
xmlHttp.send(null);
var releaseInfo = JSON.parse(xmlHttp.responseText);
return releaseInfo.prerelease;
}

function getStormInfo() {
var version = getStormLatestVersion();
var prerelease = getStormPreRelease();
if (prerelease == 'false'){
prerelease = 'beta'
}
else {
prerelease = 'release'
}
document.getElementById("storm_version").innerHTML = 'The Ocean Shore | Game | ' + 'v' + version + ' | ' + prerelease;
}
25 changes: 25 additions & 0 deletions new/test/src/js/websiteInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,29 @@ function getWebSiteLatestVersion() {
xmlHttp.send(null);
var releaseInfo = JSON.parse(xmlHttp.responseText);
return releaseInfo.tag_name;
}

function getWebSiteBody() {
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.body;
}

function getWebSiteAuthor() {
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.author.login;
}

function getWebSiteInfo() {
var version = getWebSiteLatestVersion();
var body = getWebSiteBody();
var author = getWebSiteAuthor();
document.getElementById("version_body_author").innerHTML = 'v' + version + ' Changelog: ' + body + ' ' + 'Committed by ' + author;
}
14 changes: 11 additions & 3 deletions new/test/src/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ select {
border-radius: 5px;
}

p {
.text-p,
.lng-about_us_desc {
background-color: #00000040;
color: #fff;
font-family: 'Fira Mono', monospace;
Expand All @@ -67,7 +68,8 @@ p {
transition: 0.3s;
}

p:hover {
.text-p:hover,
.lng-about_us_desc:hover {
color: greenyellow;
padding: 15px;
transition: 0.3s;
Expand All @@ -82,6 +84,11 @@ p:hover {
font-family: 'Fira Mono', monospace;
}

.git {
font-family: 'Fira Mono', monospace;
color: #fff;
}

/* team members styles */

.list {
Expand Down Expand Up @@ -181,7 +188,8 @@ p:hover {
.about,
.projects,
.team,
.contacts {
.contacts,
.website_info {
background-color: #202020;
border-radius: 10px;
padding: 10px;
Expand Down

1 comment on commit 312f713

@vercel
Copy link

@vercel vercel bot commented on 312f713 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.