modules/src/views/pages/modules.ejs

96 lines
4.3 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= title %></title>
<link href="/css/styles.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.1/css/all.min.css" integrity="sha512-5Hs3dF2AEPkpNAR7UiOHba+lRSJNeM2ECkwxUIxC1Q/FLycGTbNapWXB4tP889k5T5Ju8fs4b1P5z/iB4nMfSQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FYEEKTVVK2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-FYEEKTVVK2');
</script>
</head>
<body class="bg-slate-900">
<header class="sticky top-0 bg-slate-900 z-50">
<div class="container mx-auto p-4 flex justify-between items-center">
<h1 class="text-4xl font-bold text-white"><a href="/">modules.</a></h1>
<nav class="hidden md:flex space-x-4">
<a href="/" class="text-white hover:text-gray-400 flex items-center">
<i class="fas fa-home mr-2"></i> Home
</a>
<a href="/apps" class="text-white hover:text-gray-400 flex items-center">
<i class="fa-brands fa-google-play mr-2"></i> Apps
</a>
<p class="text-gray-300 flex items-center">
<i class="fas fa-puzzle-piece mr-2"></i> Modules
</p>
<!--
NOT FINISHED YET
=====================================================================
<a href="#" class="text-white hover:text-gray-400 flex items-center">
<i class="fas fa-tags mr-2"></i> Categories
</a>
=====================================================================
-->
</nav>
<button id="menu-btn" class="md:hidden text-white focus:outline-none"><i class="fas fa-bars"></i></button>
</div>
<div id="mobile-menu" class="hidden md:hidden">
<a href="/" class="block px-4 py-2 text-white hover:bg-gray-700 flex items-center">
<i class="fas fa-home mr-2"></i> Home
</a>
<a href="/apps" class="block px-4 py-2 text-white hover:bg-gray-700 flex items-center">
<i class="fa-brands fa-google-play mr-2"></i> Apps
</a>
<p class="block px-4 py-2 text-gray-300 flex items-center">
<i class="fas fa-puzzle-piece mr-2"></i> Modules
</p>
<!--
NOT FINISHED YET
===================================================================================
<a href="#" class="block px-4 py-2 text-white hover:bg-gray-700 flex items-center">
<i class="fas fa-tags mr-2"></i> Categories
</a>
===================================================================================
-->
</div>
</header>
<div class="container mx-auto p-4">
<h1 class="text-4xl font-bold text-white my-6">Modules</h1>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
<% modules.forEach(module => { %>
<a href="/modules/<%= module.id %>" class="bg-slate-700 rounded-lg shadow-md p-4 flex flex-col justify-between no-underline text-black">
<div>
<img src="<%= module.icon %>" alt="<%= module.name %> icon" class="w-16 h-16 mx-auto rounded-full">
<h2 class="text-xl font-bold text-center text-white mt-4"><%= module.name %></h2>
</div>
<p class="text-center text-gray-700 mt-2">
<span class="bg-slate-500 text-white font-bold rounded-full px-3 py-1">
<% if (module.price === 'FREE') { %>
<%= module.price %>
<% } else { %>
$<%= module.price %>
<% } %>
</span>
<% if (module.foss) { %>
<span class="bg-yellow-500 text-white font-bold rounded-full px-3 py-1 ml-2">FOSS</span>
<% } %>
<% if (module.selfHosted) { %>
<span class="bg-green-500 text-white font-bold rounded-full px-3 py-1 ml-2">SelfHost</span>
<% } %>
<% if (module.lsposed) { %>
<span class="bg-pink-400 text-white font-bold rounded-full px-3 py-1 ml-2">LSPosed</span>
<% } %>
</p>
</a>
<% }) %>
</div>
</div>
<script src="/js/main.js"></script>
</body>
</html>