Skip to content

Commit

Permalink
uwu
Browse files Browse the repository at this point in the history
  • Loading branch information
novafurry committed Aug 12, 2024
1 parent 81e0e17 commit 59b5fde
Show file tree
Hide file tree
Showing 4 changed files with 283 additions and 17 deletions.
26 changes: 25 additions & 1 deletion assets/code/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,30 @@ var app = {
}, appearPane); tk.cb('b1', 'Back', () => ui.sw2(appearPane, mainPane), appearPane);
}
},
store: {
runs: true,
name: 'AppStore',
icon: './assets/img/systemIcons/store.svg',
init: async function () {
const main = tk.mbw('Store', '800px', '500px', true, true, true, undefined, './assets/img/systemIcons/store.svg');
// tk.cb('b1 b2', 'Home', function(){}, )
var navbar = main.win.children[0].children[0];
navbar.appendChild(tk.cb('b4', 'Home', function () {}, null))
navbar.appendChild(tk.cb('b4', 'Categories', function () {}, null))
navbar.appendChild(tk.cb('b4', 'This Device', function () {}, null))
var wc = main.main;
var appstorepage = tk.c('iframe', wc);
appstorepage.setAttribute("frameborder", "0")
appstorepage.src = "/assets/sysappfiles/appstore/index.html";
appstorepage.style.width = "100%"
appstorepage.style.height = "100%"
wc.style.height = "calc(100% - 65px)"
appstorepage.onload = function(){
console.log(document.body.parentElement)
appstorepage.contentDocument.body.parentElement.setAttribute("style",document.body.parentElement.getAttribute("style"))
}
}
},
setup: {
runs: false,
init: async function () {
Expand Down Expand Up @@ -515,4 +539,4 @@ var app = {
}
}

app.files.init()
app.store.init()
18 changes: 2 additions & 16 deletions assets/code/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,22 +124,8 @@ var wd = {
<img src='${apps[key].icon}' class='appIcon'/>
<span class='appName'>${apps[key].name}</span>`
btn.classList.add("appItem");
btn.addEventListener('click', function () {
if (apps[key].hasOwnProperty("requiresServices")) {
apps[key].requiresServices.forEach(service => {
if (!window.servicesStarted.includes(service)) {
console.log(`Service ${service} not started!`);
wm.wal(`The app ${apps[key].name} requires the service ${service} to be started. It wil not launch until ${service} is started.`, "error");
return;
} else {
console.log(`Service ${service} started!`);
ui.dest(el.sm, 150);
el.sm = undefined;
apps[key].init();
}
});
}
});
var $thisapp = app[key]
btn.onclick = $thisapp.init
} else {
console.log(`<i> ${apps[key].name} is not launchable! :(`);
}
Expand Down
Binary file added assets/sysappfiles/appstore/Frame 3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
256 changes: 256 additions & 0 deletions assets/sysappfiles/appstore/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>NovaStore App Store</title>
</head>
<body>
<i id="home"></i>
<i id="categories"></i>
<i id="thissystem"></i>

<main>
<br>
<div class="carousel__container">
<div class="carousel__item">
<img src="Frame 3.png" alt="image1">
</div>
<div class="carousel__item active">
<img src="Frame 3.png" alt="image2">
</div>
<div class="carousel__item">
<img src="Frame 3.png" alt="image3">
</div>
</div>
<h2>Top Charts</h2>
<div class="approw">
<div class="application">
<img src="Frame 3.png" alt="image1">
<h3>Application 1</h3>
<p>Description of Application 1</p>
</div>
<div class="application">
<img src="Frame 3.png" alt="image1">
<h3>Application 1</h3>
<p>Description of Application 1</p>
</div>
<div class="application">
<img src="Frame 3.png" alt="image1">
<h3>Application 1</h3>
<p>Description of Application 1</p>
</div>
</div>
<h2>Offical Applications<br><small>Applications developed by the NovaOS Team</small></h2>
<div class="approw">
<div class="application">
<img src="Frame 3.png" alt="image1">
<h3>Application 1</h3>
<p>Description of Application 1</p>
</div>
<div class="application">
<img src="Frame 3.png" alt="image1">
<h3>Application 1</h3>
<p>Description of Application 1</p>
</div>
<div class="application">
<img src="Frame 3.png" alt="image1">
<h3>Application 1</h3>
<p>Description of Application 1</p>
</div>
</div>
<br>
<br>
</main>
<style>
:root {
--sh1: #9999FF;
--sh2: #bbbbff;
--bg1: #eeeeff;
--bg2: #ccccff;
--accent: 60, 70, 235;
--acc: var(--accent);
--ui1: rgb(255, 255, 255, 0.6);
--ui2: #ffffff;
--ui3: #dddddd;
--font: #000;
--bl1: 12px;
--bl2: 8px;
--rad1: 16px;
--rad2: 12px;
--rad3: 8px;
--fz1: 15px;
--fz2: 12px;
--inv: 0;
}
body {
margin: 0px;
}
main{
justify-content: center;
align-items: center;
height: 100%;
width: calc(100vw);
margin-left: auto;
margin-right: auto;
color: var(--font);
text-align: center;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
header{
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 10px;
padding-right: 10px;
vertical-align: middle;
position: sticky;
top:0px;
left:0px;
width: calc(100vw - 20px);
background-color: #151515;
}
header h1{
margin-block-start: 0;
margin-block-end: 0;
}
small{
font-size: 0.6em;
font-weight: normal;
}
a{
text-decoration: none;
color: #fefefe;
margin-left: 2.5x;
margin-right: 2.5px;
padding:2px;
border-radius:5px;
}
body:has(i:target#home) a#home{
background-color: #fefefe;
color: #101010;
}
body:has(i:target#categories) a#categories{
background-color: #fefefe;
color: #101010;
}
body:has(i:target#thissystem) a#thissystem{
background-color: #fefefe;
color: #101010;
}
.carousel__container {
width: 100vw;
height: 40vh;
display: flex;
justify-content: center;
align-items: center;
margin-left: auto;
margin-right: auto;
overflow: visible;
}

.carousel__item {
width: 50vw;
height: 40vh;
justify-content: center;
align-items: center;
transition: all 0.5s;
margin:5px;
border-radius: 25px;
box-shadow: rgba(var(--acc), 0.3) 0px 0px;
overflow: hidden;
}
.carousel__item.active{
z-index: 5;
box-shadow:rgba(var(--acc), 0.3) 5px 5px;
}
.carousel__item:not(.active) {
width: calc(50vw * 0.9);
height: calc(40vh * 0.9);
}
.carousel__item img {
width: 100%;
height: 100%;
}
.approw{
display: flex;
justify-content: center;
align-items: center;
}
/* .application{
width: 20vw;
height: auto;
margin: 5px;
border-radius: 25px;
overflow: hidden;
box-shadow: var(--acc) 0px 0px 3px;
background-color: rgba(var(--acc), 0.3);
padding: 5px 8px;
margin: 1px;
transition: 0.08s ease-in-out;
cursor: pointer;
} */
.application {
background-color: rgba(var(--acc), 0.3);
border-radius: var(--rad2);
font-size: var(--fz1);
width: 20vw;
margin: 1px;
transition: 0.08s ease-in-out;
cursor: pointer;
border: 1px solid transparent;
}

.application:hover, .application.on, .ckbx.on {
background-color: rgba(var(--acc), 0.4);
border: 1px solid rgba(var(--acc), 0.6);
box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 20px 4px;
}

.application:active, .application.on:hover, .ckbx.on:hover {
transform: scale(0.88);
background-color: rgba(var(--acc), 0.20);
}
.application img{
width: 100%;
border-radius: var(--rad2);
height: 60%;
object-fit: cover;
}
h3{
margin-block-start:0em;
margin-block-end:0em;
}
</style>
<script>
const carousel = document.body
const carouselContainer = carousel.querySelector('.carousel__container');
const carouselItems = carousel.querySelectorAll('.carousel__item');
carouselItems.forEach((item, index) => {
item.addEventListener('mouseover', () => {
document.querySelector('.carousel__item.active').classList.remove('active');
item.classList.add('active');
});
});
var isMouseInCards = false;
carousel.onmouseenter = () => {
isMouseInCards = true;
}
carousel.onmouseleave = () => {
isMouseInCards = false;
}
let currentIndex = 0;
let nextIndex = 1;

setInterval(() => {
if (isMouseInCards) {
return;
} else {
document.querySelector('.carousel__item.active').classList.remove('active');
carouselItems[nextIndex].classList.add('active');
currentIndex = nextIndex;
nextIndex = (nextIndex + 1) % carouselItems.length;
}
}, 2000);
</script>
</body>
</html>

0 comments on commit 59b5fde

Please sign in to comment.