mirror of
https://github.com/driftywinds/driftywinds.github.io.git
synced 2026-01-10 11:24:18 +00:00
Update UI
This commit is contained in:
@@ -13,12 +13,10 @@ a {
|
||||
/* Main */
|
||||
|
||||
#main {
|
||||
padding: unset;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#main .item {
|
||||
margin-top: 30%;
|
||||
margin-bottom: 0;
|
||||
padding: 1em;
|
||||
}
|
||||
@@ -91,8 +89,7 @@ a {
|
||||
/* What's new */
|
||||
|
||||
#whats-new,
|
||||
#permissions,
|
||||
#source {
|
||||
#permissions {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
@@ -207,6 +204,10 @@ a {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#source .header {
|
||||
margin: 1rem;
|
||||
}
|
||||
|
||||
#source .row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -31,12 +31,12 @@ const bundleId = urlSearchParams.get('id');
|
||||
const title = document.getElementById("title");
|
||||
const button = document.querySelector("#nav-bar .install");
|
||||
|
||||
if (hidden && appName.getBoundingClientRect().y >= 72) { // App name not visible
|
||||
if (hidden && appName.getBoundingClientRect().y >= 30) { // App name not visible
|
||||
hidden = false;
|
||||
title.classList.add("hidden");
|
||||
button.classList.add("hidden");
|
||||
button.disaled = true;
|
||||
} else if (!hidden && appName.getBoundingClientRect().y < 72) {
|
||||
} else if (!hidden && appName.getBoundingClientRect().y < 30) {
|
||||
hidden = true;
|
||||
title.classList.remove("hidden");
|
||||
button.classList.remove("hidden");
|
||||
@@ -219,10 +219,33 @@ main((json) => {
|
||||
//
|
||||
// Source info
|
||||
const source = document.getElementById("source");
|
||||
const sourceContainer = source.querySelector(".container");
|
||||
const sourceTitle = source.querySelector(".row-title");
|
||||
const sourceSubtitle = source.querySelector(".row-subtitle");
|
||||
const sourceA = source.querySelector("a");
|
||||
const sourceContainer = source.querySelector(".source");
|
||||
const sourceIcon = source.querySelector("img");
|
||||
const sourceTitle = source.querySelector(".title");
|
||||
const sourceSubtitle = source.querySelector(".subtitle");
|
||||
const sourceAppCount = source.querySelector(".app-count");
|
||||
|
||||
let lastUpdated = new Date("1970-01-01");
|
||||
let appCount = 0;
|
||||
let altSourceIcon = "../../common/assets/img/generic_app.jpeg";
|
||||
let altSourceTintColor = "var(--app-tint-color);";
|
||||
for (const app of json.apps) {
|
||||
if (app.beta || app.patreon?.hidden) return;
|
||||
let appVersionDate = new Date(app.versions ? app.versions[0].date : app.versionDate);
|
||||
if (appVersionDate > lastUpdated) {
|
||||
lastUpdated = appVersionDate;
|
||||
altSourceIcon = app.iconURL;
|
||||
altSourceTintColor = app.tintColor;
|
||||
}
|
||||
appCount++;
|
||||
}
|
||||
|
||||
sourceA.href = `../../view/?source=${sourceURL}`;
|
||||
sourceContainer.style.backgroundColor = `#${(json.tintColor ?? altSourceTintColor).replaceAll("#", "")}`;
|
||||
sourceIcon.src = json.iconURL ?? altSourceIcon;
|
||||
sourceTitle.innerText = json.name;
|
||||
sourceContainer.href = `../?source=${sourceURL}`;
|
||||
sourceSubtitle.innerText = json.description ?? "Tap to get started";
|
||||
sourceSubtitle.innerText = `Last updated: ${lastUpdated.toISOString().split("T")[0]}`;
|
||||
sourceAppCount.innerText = appCount;
|
||||
});
|
||||
|
||||
@@ -15,30 +15,26 @@
|
||||
<link rel="stylesheet" href="../../common/style.css">
|
||||
<link rel="stylesheet" href="app.css">
|
||||
</head>
|
||||
<body class="loading">
|
||||
<div id="loading">
|
||||
<img src="../../common/assets/img/loading.gif" alt="loading">
|
||||
<p>Loading</p>
|
||||
<body>
|
||||
<div id="top">
|
||||
<!-- Navigation bar -->
|
||||
<div id="nav-bar">
|
||||
<div id="back-container">
|
||||
<button id="back" type="button">
|
||||
<i class="bi bi-chevron-left"></i>
|
||||
Back
|
||||
</button>
|
||||
</div>
|
||||
<div id="title" class="hidden">
|
||||
<img id="app-icon" src="../../common/assets/img/generic_app.jpeg" alt="generic-app-icon">
|
||||
<p>AltSource</p>
|
||||
</div>
|
||||
<a href="https://example.com" class="install hidden">
|
||||
<button class="uibutton">Free</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="main">
|
||||
<div id="top">
|
||||
<!-- Navigation bar -->
|
||||
<div id="nav-bar">
|
||||
<div id="back-container">
|
||||
<button id="back" type="button">
|
||||
<i class="bi bi-chevron-left"></i>
|
||||
Back
|
||||
</button>
|
||||
</div>
|
||||
<div id="title" class="hidden">
|
||||
<img id="app-icon" src="../../common/assets/img/generic_app.jpeg" alt="generic-app-icon">
|
||||
<p>AltSource</p>
|
||||
</div>
|
||||
<a href="https://example.com" class="install hidden">
|
||||
<button class="uibutton">Free</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Content -->
|
||||
<div class="item">
|
||||
<div class="app-header">
|
||||
@@ -111,13 +107,20 @@
|
||||
<div class="header">
|
||||
<h2>Discover More On</h2>
|
||||
</div>
|
||||
<a class="container" target="_self">
|
||||
<div class="row">
|
||||
<p class="row-title"></p>
|
||||
<p class="row-subtitle"></p>
|
||||
<a href="../../view/">
|
||||
<div class="source">
|
||||
<img src="../../common/assets/img/generic_app.jpeg" alt="source-icon">
|
||||
<div class="right">
|
||||
<div class="text">
|
||||
<p class="title">Source</p>
|
||||
<p class="subtitle">Last updated: unknown</p>
|
||||
</div>
|
||||
<div class="app-count">
|
||||
0
|
||||
</div>
|
||||
</div>
|
||||
<i class="bi bi-arrow-up-right-square"></i>
|
||||
</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<script src="app.js" type="module"></script>
|
||||
|
||||
@@ -15,11 +15,7 @@
|
||||
<link rel="stylesheet" href="../../../common/style.css">
|
||||
<link rel="stylesheet" href="version-history.css">
|
||||
</head>
|
||||
<body class="loading">
|
||||
<div id="loading">
|
||||
<img src="../../../common/assets/img/loading.gif" alt="loading">
|
||||
<p>Loading</p>
|
||||
</div>
|
||||
<body>
|
||||
<!-- Add to AltStore banner & navigation bar -->
|
||||
<div id="top"></div>
|
||||
<div id="main">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#main {
|
||||
padding-top: 8rem;
|
||||
padding-top: 4rem;
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
Reference in New Issue
Block a user