Small fixes and touches.

This commit is contained in:
oitsjustjose 2020-11-02 11:05:43 -06:00
commit 14fe0267c7
15 changed files with 1167 additions and 534 deletions

View file

@ -3,111 +3,126 @@ import { faLink, faBook } from '@fortawesome/free-solid-svg-icons';
import React from 'react';
import { CSSTransition } from 'react-transition-group';
export default () => (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white geolosys masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1 style={{ fontSize: `${4}rem` }} className="mc-font">Geolosys</h1>
</div>
</div>
export default () => {
return (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white geolosys masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1 style={{ fontSize: `${4}rem` }} className="mc-font">Geolosys</h1>
</div>
</div>
<div className="fluid container">
<h2>
About
</h2>
<div className="fluid container">
<h2>
About
</h2>
<h5>Geolosys is a TerraFirmaCraft-inspired, dynamic ores and stones mod.</h5>
<p>
This means that ores come in HUGE plutons, but they&apos;re spread out all over the world.
I know a lot of people are discouraged by this concept, but Geolosys offers a handful of
in-game documentation and tools that will aid in your discovery of new plutons throughout
the world.
</p>
<p>
Geolosys has been written to be as intermod-compatible as possible. You can configure
nearly every aspect of it to make the best ore excavating experience for your pack!
</p>
<hr />
</div>
<h5>Geolosys is a TerraFirmaCraft-inspired, dynamic ores and stones mod.</h5>
<div className="fluid container">
<h2>
Getting Started
</h2>
<p>
This means that ores come in HUGE plutons, but they're spread out all over the world.
I know a lot of people are discouraged by this concept, but Geolosys offers a handful
of in-game documentation and tools that will aid in your discovery of new plutons throughout the world.
</p>
<h5>As you begin your quest into Geolosys deposit hunting, this guide might be of help.</h5>
<p>
The first thing you&apos;ll want to do is see how the mod pack author has configured
Geolosys&apos;s ores. They are all configurable (and custom ones can even be added!) so I
{' '}
<i>strongly</i>
{' '}
suggest you consult the Field Manual, crafted like so:
</p>
<img className="rounded d-block m-auto mw-100 mb-3" src="/img/geolosys/field_manual.png" alt="Field Manual Recipe" />
<p>
Once you&apos;ve obtained one, you&apos;ll want to read up about Geolosys from within that
manual. It&apos;ll tell you all about the types of deposits in the game and where to find
them. In order to do so, it&apos;ll be easiest if you craft yourself a prospectors pick
using the iron you get from
{' '}
<b>
Hematite Samples
</b>
{' '}
on the surface of your world. This pick will allow you to right-click it and see info
about the deposits in your vacinity. If you are above sea level (indicated by the overlay
while holding the pro-pick in your main or off-hand), right-clicking will display deposits
that are in the chunk you are standing in. If you are below sea level, right-clicking will
display deposits in the vacinity of the direction you are facing (the radius for which is
also configurable).
</p>
<h6>
At this point, with some tunneling and exploring you should hopefully find your first
pluton!
</h6>
<hr />
</div>
<p>
Geolosys has been written to be as intermod-compatible as possible. You can configure nearly every aspect
of it to make the best ore excavating experience for your pack!
</p>
<hr />
</div>
<div className="fluid container">
<h2>
Geolosys JSON Config
</h2>
<p>
Geolosys has a very robust config for creating, modifying and deleting the ores that it
generates. You can find the file in your game directory at
{' '}
<code>config/geolosys.json</code>
{' '}
, and once opened you can make any tweaks or changes you see fit.
</p>
<p className="text-center">
<FontAwesomeIcon icon={faBook} />
&nbsp;
<b>
Visit the
{' '}
<a href="https://docs.geolosys.com" rel="noopener noreferrer" target="_blank">ReadTheDocs page</a>
{' '}
for
full documentation on the config file
</b>
</p>
<p>
Once you open the config file, you may be overwhelmed (reasonably so) by the syntax of
JSON or the overall sheer amount of configs available in the default JSON. Don&apos;t
worry, because I&apos;ve recently developed a tool just for that:
</p>
<h5>
<a rel="noopener noreferrer" href="https://config.geolosys.com" target="_blank">
<FontAwesomeIcon icon={faLink} />
&nbsp;JSON Config Generator
</a>
</h5>
<div className="fluid container">
<h2>
Getting Started
</h2>
<p>
In lieu of the overwhelming size and amount of configuration that can be done to Geolosys,
I have developed a web tool which adds a graphical interface to the configuration process.
You can register for an account to save your configurations for later download, and it
supports 1.12 and 1.14/1.15+ JSON versions.
</p>
</div>
<h5>As you begin your quest into Geolosys deposit hunting, this guide might be of help.</h5>
<p>
The first thing you'll want to do is see how the mod pack author has configured Geolosys's ores.
They are all configurable (and custom ones can even be added!) so I <i>strongly</i> suggest you
consult the Field Manual, crafted like so:
</p>
<img className="rounded d-block m-auto mw-100 mb-3" src="/img/geolosys/field_manual.png" alt="Field Manual Recipe" />
<p>
Once you've obtained one, you'll want to read up about Geolosys from within that manual. It'll tell
you all about the types of deposits in the game and where to find them. In order to do so, it'll be
easiest if you craft yourself a prospectors pick using the iron you get from <b>
Hematite Samples</b> on the surface of your world. This pick will allow you to
right-click it and see info about the deposits in your vacinity. If you are above sea level (indicated
by the overlay while holding the pro-pick in your main or off-hand), right-clicking will display deposits
that are in the chunk you are standing in. If you are below sea level, right-clicking will display
deposits in the vacinity of the direction you are facing (the radius for which is also configurable).
</p>
<h6>
At this point, with some tunneling and exploring you should hopefully find your first pluton!
</h6>
<hr />
</div>
<div className="fluid container">
<h2>
Geolosys JSON Config
</h2>
<p>
Geolosys has a very robust config for creating, modifying and deleting the ores that it generates. You can
find the file in your game directory at <code>config/geolosys.json</code>, and once opened you can make any
tweaks or changes you see fit.
</p>
<p className="text-center">
<FontAwesomeIcon icon={faBook} />&nbsp;
<b>
Visit the <a href="https://docs.geolosys.com" rel="noopener noreferrer" target="_blank">ReadTheDocs page</a> for
full documentation on the config file
</b>
</p>
<p>
Once you open the config file, you may be overwhelmed (reasonably so) by the syntax of JSON
or the overall sheer amount of configs available in the default JSON. Don't worry, because I've recently developed
a tool just for that:
</p>
<h5>
<a rel="noopener noreferrer" href="https://config.geolosys.com" target="_blank">
<FontAwesomeIcon icon={faLink} />&nbsp;JSON Config Generator
</a>
</h5>
<p>
In lieu of the overwhelming size and amount of configuration that can be done to Geolosys, I have developed a web tool
which adds a graphical interface to the configuration process. You can register for an account to save your configurations
for later download, and it supports 1.12 and 1.14/1.15+ JSON versions.
</p>
</div>
<div className="fluid container">
<h3>
<a rel="noopener noreferrer" href="https://www.curseforge.com/minecraft/mc-mods/geolosys" target="_blank">
<FontAwesomeIcon icon={faLink} />&nbsp;Download from CurseForge
</a>
</h3>
</div>
</div>
</CSSTransition >
);
};
<div className="fluid container">
<h3>
<a rel="noopener noreferrer" href="https://www.curseforge.com/minecraft/mc-mods/geolosys" target="_blank">
<FontAwesomeIcon icon={faLink} />
&nbsp;Download from CurseForge
</a>
</h3>
</div>
</div>
</CSSTransition>
);

View file

@ -3,50 +3,65 @@ import { CSSTransition } from 'react-transition-group';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faYoutube } from '@fortawesome/free-brands-svg-icons';
export default () => {
return (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white np masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1 style={{ fontSize: `${2}rem` }} className="mc-font">Natural Progression</h1>
</div>
</div>
export default () => (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white np masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1 style={{ fontSize: `${2}rem` }} className="mc-font">Natural Progression</h1>
</div>
</div>
<div className="fluid container">
<h2>About</h2>
<h5>Natural Progression is a mod which enhances early game mechanics of Minecraft with more realistic mechanics.</h5>
<p>It does so through a few mechanics which become self-evident as you play with the mod, but just a few of these are:</p>
<ul>
<li>No punching wood</li>
<li>No wooden / stone tools (configurable)</li>
<li>Realistic plank crafting</li>
<li>Bone and Flint materials for only specific tools</li>
</ul>
<img className="d-block m-auto" src="/img/natpro/Advancements.png" width="66%" alt="" />
<hr />
</div>
<div className="fluid container">
<h2>About</h2>
<h5>
Natural Progression is a mod which enhances early game mechanics of Minecraft
with more realistic mechanics.
</h5>
<p>
It does so through a few mechanics which become self-evident as you play with the mod,
but just a few of these are:
</p>
<ul>
<li>No punching wood</li>
<li>No wooden / stone tools (configurable)</li>
<li>Realistic plank crafting</li>
<li>Bone and Flint materials for only specific tools</li>
</ul>
<img className="d-block m-auto" src="/img/natpro/Advancements.png" width="66%" alt="" />
<hr />
</div>
<div className="fluid container">
<h2>Things to Know..</h2>
<ol>
<li>Pebbles aren't placed randomly! A pebble on the surface reflects what you'll find below; a diorite pebble indicates diorite below, sandstone pebble → sandstone, etc.</li>
<li>Twigs will now randomly spawn as well, providing an easier source of sticks.</li>
<li>Twigs and pebbles can be found under water!</li>
<li>You can right-click any of the pebbles or twigs to break them.</li>
<li>Bones can be obtained by killing mobs other than skeletons, if enabled in the config.</li>
<li>All sawing recipes are Datapack-based! If you want to add support for more recipes, just use the vanilla Datapack method!</li>
</ol>
<hr/>
</div>
<div className="fluid container">
<h2>Things to Know..</h2>
<ol>
<li>
Pebbles aren&apos;t placed randomly! A pebble on the surface reflects what you&apos;ll
find below; a diorite pebble indicates diorite below, sandstone pebble → sandstone, etc.
</li>
<li>Twigs will now randomly spawn as well, providing an easier source of sticks.</li>
<li>Twigs and pebbles can be found under water!</li>
<li>You can right-click any of the pebbles or twigs to break them.</li>
<li>
Bones can be obtained by killing mobs other than skeletons, if enabled in the config.
</li>
<li>
All sawing recipes are Datapack-based! If you want to add support for more recipes,
just use the vanilla Datapack method!
</li>
</ol>
<hr />
</div>
<div className="fluid container">
<h2><FontAwesomeIcon icon={faYoutube} />&nbsp;Reviews</h2>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/-X1y9IJnXCk?start=134&end=144" title="YouTube video" allowfullscreen></iframe>
</div>
</div>
</div>
</CSSTransition>
);
};
<div className="fluid container">
<h2>
<FontAwesomeIcon icon={faYoutube} />
&nbsp;Reviews
</h2>
<div className="embed-responsive embed-responsive-16by9">
<iframe className="embed-responsive-item" src="https://www.youtube.com/embed/-X1y9IJnXCk?start=134&end=144" title="YouTube video" allowFullScreen />
</div>
</div>
</div>
</CSSTransition>
);

View file

@ -1,47 +1,56 @@
import React from 'react';
import { CSSTransition } from 'react-transition-group';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faYoutube } from '@fortawesome/free-brands-svg-icons';
export default () => {
return (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white pb masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1 style={{ fontSize: `${2}rem` }} className="mc-font">Persistent Bits</h1>
</div>
</div>
export default () => (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white pb masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1 style={{ fontSize: `${2}rem` }} className="mc-font">Persistent Bits</h1>
</div>
</div>
<div className="fluid container">
<h2>About</h2>
<h5>Persistent Bits is a simple, vanilla-like chunk loading mod.</h5>
<p>This mod's loaders do not require any fuels, and work using two different mechanics depending on the game version:</p>
<hr />
</div>
<div className="fluid container">
<h2>About</h2>
<h5>Persistent Bits is a simple, vanilla-like chunk loading mod.</h5>
<p>
This mod&apos;s loaders do not require any fuels, and work using two different
mechanics depending on the game version:
</p>
<hr />
</div>
<div className="fluid container">
<h2>Chunk-Loading Mechanics</h2>
<h3>1.14+</h3>
<p>
{' '}
In 1.14 and newer, Persistent Bits uses the vanilla
<code>/forceload</code>
{' '}
mechanic to chunk load. This mechanic doesn&apos;t tick blocks such as crops,
but still keeps things loaded for functionality&apos;s sake. Keep this in mind when
you use it for automation -- in the future, block ticking may be implemented.
</p>
<h3>1.12 and Below</h3>
<p>
In 1.12 and older, Persistent Bits uses Forge&apos;s Ticket-based Chunk Loading system,
which keeps the entire chunk and all blocks within loaded and ticking.
</p>
<hr />
</div>
<div className="fluid container">
<h2>Chunk-Loading Mechanics</h2>
<h3>1.14+</h3>
<p> In 1.14 and newer, Persistent Bits uses the vanilla <code>/forceload</code> mechanic to chunk load. This mechanic doesn't tick blocks such as crops,
but still keeps things loaded for functionality's sake. Keep this in mind when you use it for automation -- in the future, block ticking may be implemented.
</p>
<h3>1.12 and Below</h3>
<p>
In 1.12 and older, Persistent Bits uses Forge's Ticket-based Chunk Loading system, which keeps the entire chunk and all blocks within loaded and ticking.
</p>
<hr />
</div>
<div className="fluid container">
<h2><FontAwesomeIcon icon={faYoutube} />&nbsp;Reviews</h2>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/tqnH56iCigg" title="YouTube video" allowfullscreen></iframe>
</div>
</div>
</div>
</CSSTransition>
);
};
<div className="fluid container">
<h2>
<FontAwesomeIcon icon={faYoutube} />
&nbsp;Reviews
</h2>
<div className="embed-responsive embed-responsive-16by9">
<iframe className="embed-responsive-item" src="https://www.youtube.com/embed/tqnH56iCigg" title="YouTube video" allowFullScreen />
</div>
</div>
</div>
</CSSTransition>
);

View file

@ -1,34 +1,49 @@
import React from 'react';
import { CSSTransition } from 'react-transition-group';
export default () => {
return (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white generic masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1
style={{ fontSize: `${2}rem` }}
className="mc-font mb-3"
>
Pulver
</h1>
<img src="/img/pulver/dust.png" alt="" className="d-block mx-auto" width="128px"/>
</div>
</div>
export default () => (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white generic masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1
style={{ fontSize: `${2}rem` }}
className="mc-font mb-3"
>
Pulver
</h1>
<img src="/img/pulver/dust.png" alt="" className="d-block mx-auto" width="128px" />
</div>
</div>
<div className="fluid container">
<h2>About</h2>
<h5>Pulver adds Dusts that don't already exist for ores that have a corresponding Ingot.</h5>
<p>It does this solely using the Ore Dictionary. It checks to see if there exists some ore (for example, let's use copper), such as <code>copperOre</code>. Then it checks to see if an ingot (<code>copperIngot</code>) exists and makes sure that a dust (<code>copperDust</code>) does not exist. If an item satisfies these conditions, then Pulver will create a new dust and use the center pixel value of the first ingot it finds as an overlay color.</p>
<hr/>
</div>
<div className="fluid container">
<h2>About</h2>
<h5>
Pulver adds Dusts that don&apos;t already exist for ores that have a corresponding Ingot.
</h5>
<p>
It does this solely using the Ore Dictionary. It checks to see if there exists some ore
(for example, let&apos;s use copper), such as
<code>copperOre</code>
. Then it checks to see if an ingot (
<code>copperIngot</code>
) exists and makes sure that a dust (
<code>copperDust</code>
) does not exist. If an item satisfies these conditions, then Pulver will create a new
dust and use the center pixel value of the first ingot it finds as an overlay color.
</p>
<hr />
</div>
<div className="fluid container">
<h2>How That's Helpful</h2>
<p>Many Ore Processors (for example Extra Utils' crusher) use the ore dictionary to automatically add recipes - so this will bridge that gap. If you add your own processing recipe via XML / CraftTweaker / Other, then you'll already have a dust item generated with the correct textures, OreDict names and more.</p>
</div>
</div>
</CSSTransition>
);
};
<div className="fluid container">
<h2>How That&apos;s Helpful</h2>
<p>
Many Ore Processors (for example Extra Utils&apos; crusher) use the ore dictionary to
automatically add recipes - so this will bridge that gap. If you add your own processing
recipe via XML / CraftTweaker / Other, then you&apos;ll already have a dust item generated
with the correct textures, OreDict names and more.
</p>
</div>
</div>
</CSSTransition>
);

View file

@ -1,48 +1,60 @@
import React from 'react';
import { CSSTransition } from 'react-transition-group';
export default () => (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white generic masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1
style={{ fontSize: `${2}rem` }}
className="mc-font mb-3"
>
Tinkers Addons
</h1>
</div>
</div>
export default () => {
return (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div className="mb-3">
<div className="d-flex text-center text-white generic masthead mb-5" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<h1
style={{ fontSize: `${2}rem` }}
className="mc-font mb-3"
>
Tinkers Addons
</h1>
</div>
</div>
<div className="fluid container">
<h2>About</h2>
<h5>
Tinkers Addons brings back the old Tinkers Constructs upgrade and repair mechanisms that
were dropped after Minecraft 1.7.10.
</h5>
<p>
These features have the same effects but are implemented in a different way from the
original!
</p>
<hr />
</div>
<div className="fluid container">
<h2>About</h2>
<h5>Tinkers Addons brings back the old Tinkers Constructs upgrade and repair mechanisms that were dropped after Minecraft 1.7.10.</h5>
<p>These features have the same effects but are implemented in a different way from the original!</p>
<hr />
</div>
<div className="fluid container">
<h2 className="d-flex align-items-center">
Ameloriation Books&nbsp;
<img src="/img/tinkersaddons/amelioration_book_item.png" height="32px" alt="" />
</h2>
<p>
The amelioration book offers a means to bring back the old &quot;auto-repair&quot;
mechanic to modern Tinkers&apos;. It works just like the old Auto Repair did, repairing
faster in the nether, rain, etc.. Amelioration is levelable up to Level V, just like the
original.
</p>
<hr />
</div>
<div className="fluid container">
<h2 className="d-flex align-items-center">
Ameloriation Books&nbsp;
<img src="/img/tinkersaddons/amelioration_book_item.png" height="32px" alt="" />
</h2>
<p>The amelioration book offers a means to bring back the old "auto-repair" mechanic to modern Tinkers'. It works just like the old Auto Repair did, repairing faster in the nether, rain, etc.. Amelioration is levelable up to Level V, just like the original.</p>
<hr />
</div>
<div className="fluid container">
<h2 className="d-flex align-items-center">
Upgrade Toolkits&nbsp;
<img src="/img/tinkersaddons/fake_tier.png" height="32px" alt="" />
</h2>
<p>Offers (and exceeds) the original "get an extra modifier" mechanic from older Tinkers' Construct, allowing you to add up to 4 extra modifiers to a tool. There are no tiers and they can be applied in any order, but they can only be applied once and progressively increase in difficulty.</p>
<img className="d-block m-auto" src="/img/tinkersaddons/all_tiers.gif" width="40%" alt=""/>
</div>
</div>
</CSSTransition>
);
};
<div className="fluid container">
<h2 className="d-flex align-items-center">
Upgrade Toolkits&nbsp;
<img src="/img/tinkersaddons/fake_tier.png" height="32px" alt="" />
</h2>
<p>
Offers (and exceeds) the original &quot;get an extra modifier&quot; mechanic from older
Tinkers&apos; Construct, allowing you to add up to 4 extra modifiers to a tool. There
are no tiers and they can be applied in any order, but they can only be applied once
and progressively increase in difficulty.
</p>
<img className="d-block m-auto" src="/img/tinkersaddons/all_tiers.gif" width="40%" alt="" />
</div>
</div>
</CSSTransition>
);

View file

@ -1,192 +1,218 @@
import React, { Component } from 'react';
import React, { useState, useEffect } from 'react';
import { CSSTransition } from 'react-transition-group';
import semver from 'semver';
import Components from '../../vt-components.json';
const searchFeatureByName = (query) => {
const q = query.toLowerCase();
for (const component of Components.all) {
for (const feature of component.features) {
if (feature.name.toLowerCase().includes(q)) {
return feature;
}
}
}
return null;
const searchFeaturesByName = (query) => {
const results = Components.all.map(
(component) => component.features.filter(
(feature) => feature.name.toLowerCase().includes(query.toLowerCase()),
),
).flat();
return results.length ? results : [];
};
const getAllUniqueVersions = () => {
const versions = new Set();
const versions = new Set();
for (const component of Components.all) {
for (const feature of component.features) {
for (const version of feature.versions) {
versions.add(version);
}
}
}
return semver.sort(Array.from(versions));
// return SemverSort();
Components.all.forEach((component) => {
component.features.forEach((feature) => {
feature.versions.map((x) => versions.add(x));
});
});
return semver.sort(Array.from(versions));
};
export default class VTweaks extends Component {
export default () => {
const [state, setState] = useState({
searching: false,
searchFeatures: null,
versionFilter: null,
});
constructor() {
super();
this.onSearch = this.onSearch.bind(this);
this.onVersionSet = this.onVersionSet.bind(this);
this.state = {
searching: false,
searchFeature: null,
versionFilter: null
};
const [initBtn, setInitBtn] = useState(null);
useEffect(() => {
if (initBtn) {
initBtn.click();
}
return () => {};
}, [initBtn]);
const onSearch = (evt) => {
const val = evt.target.value;
if (!val) {
setState({
...state,
searching: false,
searchFeatures: null,
});
return;
}
componentDidMount() {
const id = `${Components.all[0].name.toLowerCase().replace(/ /g, '-')}-tab`;
document.getElementById(id).click();
}
const features = searchFeaturesByName(val);
setState({
...state,
searching: true,
searchFeatures: features,
});
};
onSearch(evt) {
const val = evt.target.value;
const onVersionSet = (evt) => {
setState({
...state,
versionFilter: evt.target.value || null,
});
};
if (val) {
const feature = searchFeatureByName(val);
this.setState({
searching: true,
searchFeature: feature
});
} else {
this.setState({
searching: false,
searchFeature: null
});
}
}
return (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div>
<div className="d-flex text-center text-white vtweaks masthead mb-1" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<p style={{ fontSize: `${3}rem` }} className="mc-font">V-Tweaks</p>
</div>
</div>
onVersionSet(evt) {
this.setState({
searching: this.state.searching,
searchFeature: this.state.searchFeature,
versionFilter: this.state.versionFilter === evt.target.value ? null : evt.target.value
});
}
<div className="container-fluid my-3" style={{ maxWidth: `${767}px`, width: `${100}vw` }}>
<input
className="form-control"
type="text"
placeholder="Search..."
aria-label="Search for Features"
onChange={onSearch}
/>
</div>
render() {
return (
<CSSTransition classNames="react-router" appear in timeout={300}>
<div>
<div className="d-flex text-center text-white vtweaks masthead mb-1" style={{ height: `${50}vh` }}>
<div className="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column align-items-center justify-content-center">
<p style={{ fontSize: `${3}rem` }} className="mc-font">V-Tweaks</p>
</div>
<div className="text-center my-3">
<div className="btn-group flex-wrap mx-2" role="group" aria-label="Basic example">
{
getAllUniqueVersions().map((version) => (
<button
type="button"
className={`btn ${state.versionFilter === version ? 'btn-primary' : 'btn-secondary'}`}
value={version}
onClick={onVersionSet}
>
{version}
</button>
))
}
</div>
</div>
{state.searching && (
<div className="container-fluid my-3">
<h2 className="text-center">
Search Results
</h2>
<div className="row row-cols-1 row-cols-xl-3 g-4">
{state.searchFeatures.map((feature) => (
<div className={`col ${(state.versionFilter == null || feature.versions.includes(state.versionFilter)) ? '' : 'd-none'}`}>
<div className="card h-100">
<img src={feature.img} alt="" className="card-img-top" />
<div className="card-body">
<h5 className="text-center card-title">
{feature.name}
</h5>
<p className="card-text mb-1">
{feature.desc}
</p>
</div>
<div className="container-fluid my-3" style={{ maxWidth: `${767}px`, width: `${100}vw` }}>
<input
className="form-control"
type="text"
placeholder="Search..."
aria-label="Search for Features"
onChange={this.onSearch}
/>
</div>
<div className="text-center my-3">
<div className="btn-group flex-wrap mx-2" role="group" aria-label="Basic example">
{
getAllUniqueVersions().map((version) => (
<button
type="button"
className={`btn ${this.state.versionFilter === version ? 'btn-primary' : 'btn-secondary'}`}
value={version}
onClick={this.onVersionSet}
>
{version}
</button>
))
}
</div>
</div>
<div id="searchResults" className={`container w-100 h-100 justify-content-center align-items-center ${this.state.searching ? 'd-flex' : 'd-none'}`}>
<div className="card h-100 pb-4">
<img src={this.state.searchFeature?.img} alt="" className="card-img-top" />
<div className="card-body">
<h5 className="text-center card-title">
{this.state.searchFeature?.name}
</h5>
<p className="card-text mb-1">
{this.state.searchFeature?.desc}
</p>
<pre className="text-center game-version">
{this.state.searchFeature?.versions.join(", ")}
</pre>
</div>
</div>
</div>
<ul className={`nav nav-tabs nav-fill ${this.state.searching ? 'd-none' : ''}`} role="tablist" style={{ cursor: "pointer" }} id="nav-tab">
{
Components.all.map((comp) => (
<li className="nav-item" role="presentation">
<div className="nav-link"
href={`#${comp.name.toLowerCase().replace(/ /g, '-')}`}
id={`${comp.name.toLowerCase().replace(/ /g, '-')}-tab`}
aria-controls={`${comp.name.toLowerCase().replace(/ /g, '-')}`}
data-toggle="tab"
>
{comp.name}
</div>
</li>
))
}
</ul>
<div className={`tab-content ${this.state.searching ? 'd-none' : ''}`} role="presentation">
{
Components.all.map((comp) => (
<div className="tab-pane fade"
id={`${comp.name.toLowerCase().replace(/ /g, '-')}`}
aria-labelledby={`${comp.name.toLowerCase().replace(/ /g, '-')}-tab`}
role="tabpanel"
>
<div className="container-fluid my-3">
<h2 className="text-center">
{comp.name}
</h2>
<div className="row row-cols-1 row-cols-xl-3 g-4">
{comp.features.map((feature) => (
<div className={
`col ${(this.state.versionFilter == null || feature.versions.includes(this.state.versionFilter)) ? '' : 'd-none'}`
}>
<div className="card h-100">
<img src={feature.img} alt="" className="card-img-top" />
<div className="card-body">
<h5 className="text-center card-title">
{feature.name}
</h5>
<p className="card-text mb-1">
{feature.desc}
</p>
</div>
<div className="card-footer">
<code className="text-center">
{feature.versions.join(", ")}
</code>
</div>
</div>
</div>
))}
</div>
</div>
</div>
))
}
<div className="card-footer">
<code className="text-center">
{feature.versions.join(', ')}
</code>
</div>
</div>
</div>
</CSSTransition>
);
}
}
))}
</div>
</div>
)}
{/* <div id="searchResults" className={`container w-100 h-100 justify-content-center align-items-center ${state.searching ? 'd-flex' : 'd-none'}`}>
{state.searchFeatures && state.searchFeatures.map((feature) => (
<div className="card h-100 pb-4">
<img src={feature.img} alt="" className="card-img-top" />
<div className="card-body">
<h5 className="text-center card-title">
{feature.name}
</h5>
<p className="card-text mb-1">
{feature.desc}
</p>
<pre className="text-center game-version">
{feature.versions.join(', ')}
</pre>
</div>
</div>
))}
</div> */}
<ul className={`nav nav-tabs nav-fill ${state.searching ? 'd-none' : ''}`} role="tablist" style={{ cursor: 'pointer' }} id="nav-tab">
{
Components.all.map((comp, idx) => (
<li className="nav-item" role="presentation">
<div
className="nav-link"
href={`#${comp.name.toLowerCase().replace(/ /g, '-')}`}
id={`${comp.name.toLowerCase().replace(/ /g, '-')}-tab`}
aria-controls={`${comp.name.toLowerCase().replace(/ /g, '-')}`}
data-toggle="tab"
ref={(ref) => idx === 0 && setInitBtn(ref)}
>
{comp.name}
</div>
</li>
))
}
</ul>
<div className={`tab-content ${state.searching ? 'd-none' : ''}`} role="presentation">
{
Components.all.map((comp) => (
<div
className="tab-pane fade"
id={`${comp.name.toLowerCase().replace(/ /g, '-')}`}
aria-labelledby={`${comp.name.toLowerCase().replace(/ /g, '-')}-tab`}
role="tabpanel"
>
<div className="container-fluid my-3">
<h2 className="text-center">
{comp.name}
</h2>
<div className="row row-cols-1 row-cols-xl-3 g-4">
{comp.features.map((feature) => (
<div className={`col ${(state.versionFilter == null || feature.versions.includes(state.versionFilter)) ? '' : 'd-none'}`}>
<div className="card h-100">
<img src={feature.img} alt="" className="card-img-top" />
<div className="card-body">
<h5 className="text-center card-title">
{feature.name}
</h5>
<p className="card-text mb-1">
{feature.desc}
</p>
</div>
<div className="card-footer">
<code className="text-center">
{feature.versions.join(', ')}
</code>
</div>
</div>
</div>
))}
</div>
</div>
</div>
))
}
</div>
</div>
</CSSTransition>
);
};

View file

@ -2,18 +2,16 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React from 'react';
import { NavLink } from 'react-router-dom';
export default class NavItem extends React.Component {
render() {
return (
<li className="nav-item">
<NavLink exact className="nav-link" activeClassName="nav-link active" to={this.props.to}>
<span>
{this.props.icon == null ? '' : <FontAwesomeIcon icon={this.props.icon} /> }
&nbsp;
{this.props.name}
</span>
</NavLink>
</li>
);
}
}
export default ({
icon, name, to,
}) => (
<li className="nav-item">
<NavLink exact className="nav-link" activeClassName="nav-link active" to={to}>
<span>
{icon == null ? '' : <FontAwesomeIcon icon={icon} /> }
&nbsp;
{name}
</span>
</NavLink>
</li>
);

View file

@ -1,31 +1,36 @@
import { } from 'bootstrap/dist/css/bootstrap.css';
import React from 'react';
import NavItem from './NavItem';
import { faHome } from '@fortawesome/free-solid-svg-icons';
import NavItem from './NavItem';
export default () => {
return (
<nav className="navbar navbar-expand-xl fixed-top navbar-dark bg-dark">
<div className="container-fluid mw-100">
<a href="/" className="navbar-brand">
<img src="/me.png" width="30" height="30" alt="" loading="lazy" />
</a>
<button className="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span className="navbar-toggler-icon" />
</button>
<div className="collapse navbar-collapse" id="navbarSupportedContent">
<ul className="navbar-nav mr-auto mb-2 mb-lg-0">
<NavItem to="/" name="Home" icon={faHome} />
<NavItem to="/Geolosys/" name="Geolosys" icon={null} />
<NavItem to="/V-Tweaks/" name="V-Tweaks" icon={null} />
<NavItem to="/PersistentBits/" name="Persistent Bits" icon={null} />
<NavItem to="/NaturalProgressions/" name="Natural Progressions" icon={null} />
<NavItem to="/TinkersAddons/" name="Tinkers' Addons" icon={null} />
<NavItem to="/Pulver/" name="Pulver" icon={null} />
</ul>
</div>
</div>
</nav>
);
};
export default () => (
<nav className="navbar navbar-expand-xl fixed-top navbar-dark bg-dark">
<div className="container-fluid mw-100">
<a href="/" className="navbar-brand">
<img src="/me.png" width="30" height="30" alt="" loading="lazy" />
</a>
<button
className="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span className="navbar-toggler-icon" />
</button>
<div className="collapse navbar-collapse" id="navbarSupportedContent">
<ul className="navbar-nav mr-auto mb-2 mb-lg-0">
<NavItem to="/" name="Home" icon={faHome} />
<NavItem to="/Geolosys/" name="Geolosys" icon={null} />
<NavItem to="/V-Tweaks/" name="V-Tweaks" icon={null} />
<NavItem to="/PersistentBits/" name="Persistent Bits" icon={null} />
<NavItem to="/NaturalProgressions/" name="Natural Progressions" icon={null} />
<NavItem to="/TinkersAddons/" name="Tinkers' Addons" icon={null} />
<NavItem to="/Pulver/" name="Pulver" icon={null} />
</ul>
</div>
</div>
</nav>
);