Fixed featured projects in home page.
This commit is contained in:
parent
e54f2336db
commit
bb218c9c12
11 changed files with 47 additions and 97 deletions
20
_includes/featured.njk
Normal file
20
_includes/featured.njk
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{% macro projectShowcase(projects, c) %}
|
||||
<div id="featured">
|
||||
<div id="featuredHelper">
|
||||
{% for project in projects %}
|
||||
{% for item in c %}
|
||||
{% if item.fileSlug == project %}
|
||||
{% set projectData = item %}
|
||||
<div class="featuredProject">
|
||||
<a href="/projects/{{ project }}">
|
||||
<img src="{% if projectData.data.logoName and projectData.data.logoExtension %}/projects/{{project}}/{{ projectData.data.logoName }}.{{ projectData.data.logoExtension }}{% else %}/assets/mod-placeholder.png{% endif %}">
|
||||
</a>
|
||||
<p class="featuredProjectName">{{ projectData.data.name }}</p>
|
||||
<p>by <a href="/authors/{{ projectData.data.author }}/">{{ projectData.data.author }}</a></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<div id="projectTitleSubtitle">
|
||||
<div id="projectTitleAuthor">
|
||||
<h1 id="projectTitle">{{ name }}</h1>
|
||||
<p id="projectAuthor">by {{ author }}</p>
|
||||
<p id="projectAuthor">by <a href="/authors/{{ author }}">{{ author }}</a></p>
|
||||
</div>
|
||||
<p id="projectSubtitle">{{ subtitle }}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
const featuredHelper = document.querySelector("#featuredHelper");
|
||||
|
||||
async function getFeaturedJSON() {
|
||||
const response = await fetch(`/assets/featured.json`);
|
||||
if (!response.ok) {
|
||||
featuredHelper.innerHTML = `
|
||||
<p>;( Oopsie! Could not load featured projects...</p>
|
||||
`
|
||||
throw new Error("Failed to fetch featured projects JSON");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
data.forEach(project => {
|
||||
const featuredDiv = document.createElement("div");
|
||||
featuredDiv.classList.add("featuredProject");
|
||||
featuredDiv.id = `featured-${project}`;
|
||||
featuredDiv.innerHTML = `
|
||||
<a href="project.html?id=${project}">
|
||||
<img src="/projects/${project}/logo.png">
|
||||
<p>${project}</p>
|
||||
</a>
|
||||
`;
|
||||
featuredHelper.appendChild(featuredDiv);
|
||||
});
|
||||
}
|
||||
|
||||
getFeaturedJSON();
|
||||
|
|
@ -1 +0,0 @@
|
|||
["aboukkit", "ghostsandstuff", "tenkumalib"]
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
const featuredHelper = document.querySelector("#featuredHelper")
|
||||
|
||||
async function loadFeatured() {
|
||||
const response = await fetch(`bananas.json`);
|
||||
if (!response.ok) {
|
||||
featuredHelper.innerHTML = `
|
||||
<p>Oops! Failed to fetch featured projects...</p>
|
||||
`
|
||||
throw new Error("Failed to fetch featured projects JSON");
|
||||
}
|
||||
}
|
||||
BIN
assets/mod-placeholder.png
Normal file
BIN
assets/mod-placeholder.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
|
|
@ -65,6 +65,10 @@ p, ul {
|
|||
padding-bottom: .6em;
|
||||
}
|
||||
|
||||
img {
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
#linksBox {
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
|
|
@ -102,9 +106,6 @@ p, ul {
|
|||
}
|
||||
|
||||
#featured {
|
||||
margin-top: 20px;
|
||||
border: 2px solid greenyellow;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
|
@ -117,20 +118,19 @@ p, ul {
|
|||
|
||||
.featuredProject {
|
||||
transition: .2s;
|
||||
height: fit-content;
|
||||
width: 15%;
|
||||
font-size: smaller;
|
||||
padding: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.featuredProject:hover {
|
||||
transition: .2s;
|
||||
outline: 4px solid gray;
|
||||
.featuredProjectName {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.featuredProject img {
|
||||
width: 100%;
|
||||
border: medium solid yellowgreen;
|
||||
}
|
||||
|
||||
.featuredProject p {
|
||||
|
|
@ -159,11 +159,12 @@ p, ul {
|
|||
padding-top: 20px;
|
||||
gap: 20px;
|
||||
display: flex;
|
||||
/* text-shadow: 2px 2px gray; */
|
||||
}
|
||||
|
||||
#downloadButton {
|
||||
border: 2px solid gray;
|
||||
border: none;
|
||||
background: linear-gradient(yellowgreen, green);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
#downloadLink {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ export default function (eleventyConfig) {
|
|||
eleventyConfig.addPassthroughCopy("authors/**/*.jpeg");
|
||||
eleventyConfig.addPassthroughCopy("assets");
|
||||
|
||||
eleventyConfig.addCollection("projects", function(collection) {
|
||||
return collection.getFilteredByGlob("./projects/**/*.md");
|
||||
});
|
||||
|
||||
|
||||
eleventyConfig.addCollection('searchIndex', (collectionApi) => {
|
||||
const result = collectionApi.getAll().map(item => {
|
||||
return {
|
||||
|
|
|
|||
28
index.html
28
index.html
|
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
layout: "base.njk"
|
||||
---
|
||||
|
||||
<script src="/assets/featured.js" defer></script>
|
||||
<h1>Welcome.</h1>
|
||||
<p>This is a project that aims to preserve Minecraft Beta mods and plugins through archives of documentation and JARs and showcase new plugins for beta.</p>
|
||||
<div id="featured"><h2>featured projects</h2>
|
||||
<div id="featuredHelper">
|
||||
<!-- <div class="featuredProject">
|
||||
<a href="project.html?id=aboukkit">
|
||||
<img src="images/projects/aboukkit.png">
|
||||
<p>Aboukkit</p>
|
||||
<p>by tenkuma</p>
|
||||
</a>
|
||||
</div>
|
||||
<div class="featuredProject">
|
||||
<img src="images/projects/ghostsandstuff.png">
|
||||
<p>Ghosts 'n Stuff</p>
|
||||
<p>by tenkuma</p>
|
||||
</div>
|
||||
<div class="featuredProject">
|
||||
<img src="images/projects/hats.png">
|
||||
<p>Hats</p>
|
||||
<p>by AleksandarHaralanov</p>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
11
index.njk
Normal file
11
index.njk
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
layout: "base.njk"
|
||||
---
|
||||
|
||||
{% import "featured.njk" as featured %}
|
||||
|
||||
<h1>Welcome.</h1>
|
||||
<p>This is a project that aims to preserve Minecraft Beta mods and plugins through archives of documentation and JARs and showcase new plugins for beta.</p>
|
||||
<h2>Featured projects</h2>
|
||||
|
||||
{{ featured.projectShowcase(["aboukkit", "tenkumalib", "hangglidere", "devilwithin", "timekeeper", "tefreezer"], collections.projects) }}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: "Console HUD"
|
||||
subtitle: "A simple way to add custom commands with custom responses to your server."
|
||||
author: "LO6AN"
|
||||
downloadLink: "https://archive.org/details/console-hud-v-1.1/12548478.png"
|
||||
tags: mod
|
||||
---
|
||||
## Description
|
||||
This mod is made to replicate the HUD given to you by the console version of the game. It shifts the hotbar upwards and reorients the way lighting is shown on the blocks to make it better match. The controls are not displayed on the bottom, nor are any other interface elements tweaked. This mod does not allow you to play with a controller, for that I recommend using AntiMicro.
|
||||
|
||||
## Classes Edited
|
||||
- ```uq.class``` (GuiIngame.java)
|
||||
|
||||
## Installation
|
||||
- Add files to Minecraft.jar
|
||||
|
||||
For MultiMC, this means creating a Beta 1.7.3 Instance, clicking the "Add to Minecraft.jar" button within the Version Window, and selecting the zip for this mod
|
||||
|
||||
For the Vanilla launcher, this means cramming the edited class files from this mod into your Beta 1.7.3 Jar.
|
||||
Loading…
Add table
Add a link
Reference in a new issue