Skip to content

Commit

Permalink
feat: create basic extension page
Browse files Browse the repository at this point in the history
  • Loading branch information
prplwtf committed Dec 29, 2024
1 parent b5b5bc6 commit 01858f4
Show file tree
Hide file tree
Showing 3 changed files with 276 additions and 2 deletions.
41 changes: 41 additions & 0 deletions browse/extensions/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.blur-gradient-overlay {
position: absolute;
inset: 0;
backdrop-filter: blur(0px);
-webkit-backdrop-filter: blur(0px);
mask-image: linear-gradient(
to bottom,
transparent,
black 80%
);
-webkit-mask-image: linear-gradient(
to bottom,
transparent,
black 80%
);
backdrop-filter: blur(7px);
-webkit-backdrop-filter: blur(7px);
pointer-events: none;
background: linear-gradient(
to bottom,
#12151700 50%,
#121517aa
);
}

[data-bs-theme=light] .platform-button {
--bs-btn-color: #000;
--bs-btn-bg: #f8f9fa;
--bs-btn-border-color: #f8f9fa;
--bs-btn-hover-color: #000;
--bs-btn-hover-bg: #d3d4d5;
--bs-btn-hover-border-color: #c6c7c8;
--bs-btn-focus-shadow-rgb: 211,212,213;
--bs-btn-active-color: #000;
--bs-btn-active-bg: #c6c7c8;
--bs-btn-active-border-color: #babbbc;
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
--bs-btn-disabled-color: #000;
--bs-btn-disabled-bg: #f8f9fa;
--bs-btn-disabled-border-color: #f8f9fa;
}
233 changes: 233 additions & 0 deletions browse/extensions/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Blueprint Extensions</title>
<link href="../../.modules/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../../.modules/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="../../.modules/global/global.css" rel="stylesheet">
<link href="./index.css" rel="stylesheet">
<link rel="icon" type="image/x-icon" href="../../favicon.ico">

<!-- Social Embeds -->
<meta property="theme-color" content="#4642f5">
<meta property="og:title" content="blueprint.zip">
<meta property="og:description" content="Powerful, fast and developer-friendly extension framework for Pterodactyl. Utilize extension APIs, inject HTML, modify stylesheets, package extensions and so much more.">
<meta property="og:url" content="https://blueprint.zip">
<meta property="og:image" content="/.assets/brand/og.jpg">
<meta property="og:type" content="website">
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://blueprint.zip">
<meta property="twitter:title" content="blueprint.zip">
<meta property="twitter:description" content="Powerful, fast and developer-friendly extension framework for Pterodactyl. Utilize extension APIs, inject HTML, modify stylesheets, package extensions and so much more.">
<meta property="twitter:image" content="/.assets/brand/og.jpg">
</head>

<body data-bs-theme="dark">

<!-- Desktop Navbar -->
<div class="p-2 d-lg-inline d-none"></div>
<header class="p-3 mb-3 border-bottom fixed-top d-lg-inline d-none blueprint-navbar">
<div class="container">
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
<a href="../../" class="d-flex align-items-center mb-2 me-2 mb-lg-0 link-body-emphasis text-decoration-none">
<img src="../../.assets/brand/logo.jpg" width="35" height="35" class="rounded-3" alt="" />
</a>
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
<li><a href="../../" class="nav-link px-2 link-body-emphasis">Home</a></li>
<li><a href="../" class="nav-link px-2 link-secondary">Browse</a></li>
<li><a href="../../docs" class="nav-link px-2 link-body-emphasis">Documentation</a></li>
</ul>
<ul class="navbar-nav flex-row flex-wrap ms-md-auto">
<li class="nav-item me-1 ms-1"><a class="nav-link px-1 nav-svg" href="https://bsky.app/profile/blueprint.zip"><img src="../../.assets/storage/icons/bluesky.svg"/></a></li>
<li class="nav-item me-1 ms-1 py-1"><a class="nav-link px-1" href="https://discord.gg/CUwHwv6xRe"><i class="bi bi-discord"></i></a></li>
<li class="nav-item me-1 ms-1 py-1"><a class="nav-link px-1" href="https://github.com/BlueprintFramework"><i class="bi bi-github"></i></a></li>
<li class="nav-item py-2 py-lg-1 col-12 col-lg-auto">
<div class="vr d-none d-lg-flex h-100 mx-lg-2 text-white"></div>
<hr class="d-lg-none my-2 text-white-50">
</li>
<li class="nav-item dropdown">
<button class="btn btn-link nav-link py-2 px-0 px-lg-2 dropdown-toggle d-flex align-items-center" id="bd-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown" data-bs-display="static" aria-label="Toggle theme (dark)">
<i class="bi bi-moon-stars-fill my-1 theme-icon-active"></i>
<span class="d-lg-none ms-2" id="bd-theme-text">Toggle theme</span>
</button>
<ul class="dropdown-menu dropdown-menu-end position-absolute gap-1 p-2 rounded-3 mx-0 border-0 shadow w-220px" aria-labelledby="bd-theme-text">
<li><button type="button" class="theme-switcher-btn dropdown-item rounded-2 d-flex align-items-center" data-bs-theme-value="light" aria-pressed="false"><i class="bi bi-sun-fill me-2 opacity-50"></i> Light</button></li>
<li><button type="button" class="theme-switcher-btn dropdown-item rounded-2 d-flex align-items-center active" data-bs-theme-value="dark" aria-pressed="true"><i class="bi bi-moon-stars-fill me-2 opacity-50"></i> Dark</button></li>
<li><button type="button" class="theme-switcher-btn dropdown-item rounded-2 d-flex align-items-center" data-bs-theme-value="auto" aria-pressed="false"><i class="bi bi-circle-half me-2 opacity-50"></i> Auto</button></li>
</ul>
</li>
</ul>
</div>
</div>
</header>

<!-- Mobile/Tablet Navbar -->
<div class="p-2 d-lg-none d-inline"></div>
<nav class="navbar fixed-top d-lg-none d-inline blueprint-navbar-mobile">
<div class="container-fluid">
<a href="../../" class="d-flex align-items-center mb-2 me-2 mt-2 mb-lg-0 link-body-emphasis text-decoration-none"><img src="../../.assets/brand/logo.jpg" width="40" height="40" class="rounded-3" alt="" /></a>
<div class="dropdown">
<button class="btn btn-secondary bg-dark-subtle border-0 nav-dropdown-btn" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<span class="navbar-toggler-icon"></span>
</button>
<ul class="dropdown-menu dropdown-menu-end gap-1 p-2 rounded-3 mx-0 border-0 shadow w-220px">
<li><a class="dropdown-item rounded-2" href="../../">Home</a></li>
<li><a class="dropdown-item rounded-2 disabled" href="../">Browse</a></li>
<li><a class="dropdown-item rounded-2" href="../../docs">Documentation</a></li>
<li>
<hr class="dropdown-divider">
</li>
<div class="mobile-theme-switcher">
<a href="javascript:void" class="dropdown-item rounded-2 mobile-theme-switcher-btn" data-bs-theme-value="light"><i class="bi bi-sun-fill opacity-50"></i></a>
<a href="javascript:void" class="dropdown-item rounded-2 mobile-theme-switcher-btn" data-bs-theme-value="dark"><i class="bi bi-moon-stars-fill opacity-50"></i></a>
<a href="javascript:void" class="dropdown-item rounded-2 mobile-theme-switcher-btn" data-bs-theme-value="auto"><i class="bi bi-circle-half opacity-50"></i></a>
</div>
</ul>
</div>
</div>
</nav>



<!-- Content -->
<div class="container mt-5 mb-5 pt-5" id="productContainer">
<div class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg pt-5">
<div class="d-flex flex-column h-100 p-5 pb-4 text-white text-shadow-1">
<h3 class="pt-5 mt-5 mb-3 placeholder-wave">
<span class="placeholder col-6 rounded-3"></span>
</h3>
<p class="placeholder-wave">
<span class="placeholder col-12 rounded-5"></span>
</p>
</div>
</div>
</div>


<!-- Footer -->
<div class="container">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<div class="col-md-4 d-flex align-items-center">
<a href="../" class="mb-3 me-2 mb-md-0 text-body-secondary text-decoration-none lh-1">
<svg viewBox="0 0 500 500" class="text-body-secondary" xmlns="http://www.w3.org/2000/svg" width="30" height="24" fill="currentColor">
<rect x="0" y="166.6666" width="166.6666" height="166.6666"/>
<rect x="166.6666" y="0" width="166.6666" height="166.6666"/>
<rect x="166.6666" y="333.3332" width="166.667" height="166.6666"/>
<rect x="333.3332" y="166.6666" width="166.667" height="333.3332"/>
</svg>
</a>
<span class="mb-3 mb-md-0 text-body-secondary">© 2023-2024 Emma (<a href="https://prpl.wtf" class="text-body-secondary" target="_blank">prpl.wtf</a>)</span>
</div>

<ul class="nav col-md-4 justify-content-end list-unstyled d-flex">
<li class="ms-3"><a class="text-body-secondary" href="https://discord.gg/CUwHwv6xRe"><i class="bi bi-discord" width="24" height="24"></i></a></li>
<li class="ms-3"><a class="text-body-secondary" href="https://github.com/BlueprintFramework"><i class="bi bi-github" width="24" height="24"></i></a></li>
<li class="ms-3"><a class="text-body-secondary" href="https://github.com/sponsors/prplwtf"><i class="bi bi-chat-right-heart-fill" width="24" height="24"></i></a></li>
</ul>
</footer>
</div>

<div id="social-push">
<div>
<p>
<b>Become part of Blueprint's Discord community</b> and be one of the first to get notified about new extension releases and framework updates.
</p>
<a href="https://discord.gg/CUwHwv6xRe" class="link-underline link-underline-opacity-0 me-3"><i class="bi bi-discord me-1"></i> Join the community</a>
<a href="javascript:void" onclick="dismissSocial()" class="link-underline link-underline-opacity-0 pe-pointer text-secondary"><i class="bi bi-x-lg me-1"></i> Close</a>
</div>
</div>

<script src="../../.modules/bootstrap/js/bootstrap.bundle.js"></script>
<script src="../../.modules/bootstrap/etc/theme-switcher.js"></script>
<script src="../../.modules/global/global.js"></script>
<script>
/**
* @typedef {{
* name: string;
* summary: string;
* banner: string;
* identifier: string;
* author: { name: string; };
* type: 'THEME' | 'EXTENSION';
* created: string;
* platforms: Record<string, {
* url: string;
* price: number;
* currency: string;
* }>;
* stats: {
* panels: number;
* };
* }} Product
*
* @type {Product[]}
*/
let product;

/** @type {Object<string, [name: string, icon: string]>} */
const platforms = {
BUILTBYBIT: ["BuiltByBit", "BBB.png"],
SOURCEXCHANGE: ["sourceXchange", "SXC.png"],
GITHUB: ["GitHub", "GH.png"],
};

/** @param {Product[]} products */
function displayProduct(data) {
const productContainer = document.getElementById("productContainer");
productContainer.innerHTML = `
<div class="shadow-lg rounded-4">
<div class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 rounded-bottom-0 position-relative pt-5" style="background: url('${data.banner}') center; background-size: cover; border: unset;">
<div class="blur-gradient-overlay"></div>
<div class="d-flex flex-column h-100 p-5 pt-5 text-white text-shadow-1 position-relative">
<h3 class="pt-5 mt-5 mb-3 fw-bolder">
${data.name}
</h3>
${data.summary}
</div>
</div>
<div class="rounded-4 rounded-top-0 bg-dark-subtle p-4 py-2">
<div class="row">
${Object.entries(data.platforms)
.map(
([platform, _data]) => `
<a
class="dropdown-item rounded-2 col m-2"
href="${
platform === "BUILTBYBIT"
? "https://" +
_data.url.replace(/^https?:\/\//i, "") +
"?ref=449337&"
: _data.url + "?"
}utm_source=blueprint.zip&utm_medium=card&utm_content=for_${
data.identifier
}"
>
<button class="btn btn-dark platform-button w-100">
<img src="/browse/assets/source/${
platforms[platform][1]
}" alt="" width="24" height="24">
${platforms[platform][0]}
</button>
</a>
`
)
.join("")}
</div>
</div>
</div>
`
}

// Load product
const extension_id = (new URL(window.location)).hash.slice(1);

fetch("https://api.blueprintframe.work/api/extensions/"+extension_id)
.then((response) => response.json())
.then((data) => {
displayProduct(data);
});
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions browse/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ <h1 class="display-4 fw-normal lh-1 mb-2 d-lg-none d-block text-center byte-txt"
</div>
</div>

<div class="modal fade" id="filterModal" aria-hidden="true" aria-labelledby="filterModalToggleLabel" tabindex="-1">
<div class="modal fade" id="filterModal" aria-hidden="true" aria-labelledby="filterModalLabel" tabindex="-1">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="filterModalToggleLabel"><i class="bi bi-filter"></i> Filters</h1>
<h1 class="modal-title fs-5" id="filterModalLabel"><i class="bi bi-filter"></i> Filters</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
Expand Down

0 comments on commit 01858f4

Please sign in to comment.