Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4990057
Update Font API URL
exoRift Jun 20, 2022
32aecf4
Add constant navbar height
exoRift Jun 20, 2022
b800339
Add skeleton for glossary index
exoRift Jun 20, 2022
356ae3d
Add blowup skeleton
exoRift Jun 21, 2022
1d361f3
Implement vanilla item fetching
exoRift Jun 21, 2022
ca9af35
Complete crafting table grid for recipes
exoRift Jun 22, 2022
273cb65
Glossary mobile support
exoRift Jun 22, 2022
0aa482f
Better mobile support and navigation systems
exoRift Jun 22, 2022
964eb6d
Implement search bar to glossary and hint at mobile index
exoRift Jun 22, 2022
7cd307d
Implement furnace crafting GUI for glossary
exoRift Jun 23, 2022
af382ee
Add shuffling for shapeless crafting
exoRift Jun 23, 2022
3bdaf33
Add kettle GUI to glossary
exoRift Jun 23, 2022
349f081
Redesign kettle GUI in glossary
exoRift Jun 23, 2022
8df4331
Change site version and add support for multiple recipes per item
exoRift Jun 23, 2022
7747113
Add support for stack sizes
exoRift Jun 23, 2022
854c52f
Add spinning wheel GUI
exoRift Jun 24, 2022
7d4603a
Split entries and recipes and support multiple products
exoRift Jun 26, 2022
ded0d3f
Add Witches' Oven GUI
exoRift Jun 26, 2022
d94b18e
Support uncertain products
exoRift Jun 26, 2022
0836c5e
Add distillery GUI
exoRift Jun 26, 2022
b42321c
Minor changes
exoRift Jun 26, 2022
46a6078
Add compendium page and its index
exoRift Jun 30, 2022
7a04424
Adjust navbar to be more stable on mobile
exoRift Jun 30, 2022
45e3a1b
Trim and polish root HTML file and manifest
exoRift Jul 5, 2022
3df0964
Use Google's material icons as opposed to a local library
exoRift Aug 14, 2022
c581d1f
Syntactic changes
exoRift Aug 14, 2022
cab12d1
Update home backvid to not scale with page resizing
exoRift Aug 16, 2022
84d9efe
Stop IntersectionObserver on Navbar unmount
exoRift Aug 16, 2022
58a34ef
Add implicit Discord authorization to version upload
exoRift Oct 16, 2022
bc1071e
Fix glossary scrolling
exoRift Nov 21, 2022
a8864c2
Fix crafting grid tooltips
exoRift Nov 21, 2022
23270ad
Switch from CRA to Vite
exoRift Nov 21, 2022
9a2aa11
Add autoprefixer to Vite config
exoRift Nov 21, 2022
1f1f2b5
Switch Vite export dir from dist to build
exoRift Nov 21, 2022
2f695d0
Trim dependencies
exoRift Nov 28, 2022
4eab21e
Merge
MsRandom Jan 10, 2023
2069b9d
Fix conflicts
MsRandom Jan 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions WitcheryResurrectedWeb/ClientApp/src/client/Glossary.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import React from 'react'

import postFetch from './util/postFetch.js'

import './styles/Glossary.css'

// TEMP
import icon from '../assets/TEMP/attuned_stone.png'
const categories = [
'Items',
'Blocks',
'Mobs',
'Brew Effects',
'Rites',
'Spells'
]
// TEMP

class Glossary extends React.Component {
state = {
entries: { // TEMP
items: new Array(50).fill({
id: 'witchery:attuned_stone',
name: 'Attuned Stone',
icon: icon
})
},
category: 'Items', // NOTE: AUTOMATICALLY SET CATEGORY TO FIRST CATEGORY WHEN FETCHED
blowup: null
}

render () {
return (
<div className='page glossary'>
<div className='content'>
<div className='index frosted'>
<div className='categories'>
{categories.map((c) =>
<div className={'category' + (this.state.category === c ? ' selected' : '')} key={c} onClick={() => this.switchCategory(c)}>{c}</div>
)}
</div>

<div className='entries'>
{this.state.category === 'Items' // TODO: REMOVE === 'Items'
? this.state.entries[this.state.category.toLowerCase()].map((e) => (
<div className='entry' key={e.name} onClick={() => this.switchBlowup(e)}>
<img alt={e.name} src={e.icon}/>

<span className='caption'>{e.name}</span>
</div>
))
: null}
</div>
</div>

<div className='blowup'>
{this.state.blowup
? null
: null}
</div>
</div>
</div>
)
}

switchCategory (category) {
this.setState({
category
})
}

switchBlowup (item) {
this.setState({
blowup: item
})
}
}

export default Glossary

/*
// TODO: MAKE DYNAMIC VARIABLES
Category determination
Items
Item properties
Icons
*/
96 changes: 96 additions & 0 deletions WitcheryResurrectedWeb/ClientApp/src/client/styles/Glossary.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
.page.glossary .content {
display: flex;
}

.page.glossary .content .index {
flex: 1;
height: calc(100vh - var(--navbar-height));
padding: 0.3% 0;
}

.page.glossary .content .blowup {
flex: 2;
}

.page.glossary .index .categories {
display: flex;
justify-content: center;
flex-wrap: wrap;
}

.page.glossary .index .categories .category {
transition: 0.2s;
background: var(--accent);
padding: 0.5% 2%;
margin: 1.5%;
clip-path: polygon(0.5vw 0%, calc(100% - 0.5vw) 0%, 100% 50%, calc(100% - 0.5vw) 100%, 0.5vw 100%, 0% 50%);
cursor: pointer;
white-space: nowrap;
}
.page.glossary .index .categories .category::before,
.page.glossary .index .categories .category::after {
content: '\25C6';
color: rgb(50, 50, 50);
opacity: 0.2;
}
.page.glossary .index .categories .category::before {
margin-left: -0.5rem;
}

.page.glossary .index .categories .category::after {
margin-right: -0.5rem;
}
.page.glossary .index .categories .category:hover {
background: var(--main);
}
.page.glossary .index .categories .category.selected {
background: var(--complement);
}
.page.glossary .index .categories .category.selected:hover {
background: var(--complement-accent);
}

.page.glossary .index .entries {
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
height: 100%;
padding-bottom: 10%;
overflow: auto;
}

.page.glossary .index .entries .entry {
transition: 0.2s;
position: relative;
width: 7vw;
margin: 1%;
cursor: pointer;
}
.page.glossary .index .entries .entry::before {
transition: 0.2s;
content: '';
display: block;
position: absolute;
width: 100%;
height: 85%;
background: rgba(255, 255, 255, 0.3);
border-radius: 25px;
clip-path: polygon(0 0, 0% 30%, 40% 0);
}
.page.glossary .index .entries .entry:hover {
transform: scale(1.05);
}
.page.glossary .index .entries .entry:hover::before {
clip-path: polygon(0 0, 0% 70%, 80% 0);
background: rgba(255, 255, 255, 0.6);
}
.page.glossary .index .entries .entry img {
width: 100%;
image-rendering: pixelated;
border: 1px solid gray;
border-radius: 25px;
}
.page.glossary .index .entries .entry .caption {
display: block;
text-align: center;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url('https://fonts.sandbox.google.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20,400,0,0');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20,400,0,0');

#navbar {
transition: 0.7s;
Expand All @@ -7,6 +7,7 @@
align-items: center;
top: -1px;
width: 100%;
height: var(--navbar-height);
padding-left: 0.8vh;
padding-bottom: 0.2rem;
background: var(--bs-dark);
Expand Down
2 changes: 2 additions & 0 deletions WitcheryResurrectedWeb/ClientApp/src/client/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
--link: #5969d4;
--link-hover: #4653a1;
--bs-darker: #292929;

--navbar-height: 64px;
}

#root {
Expand Down
6 changes: 6 additions & 0 deletions WitcheryResurrectedWeb/ClientApp/src/client/util/routes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Home from '../Home.jsx'
import Downloads from '../Downloads.jsx'
import Glossary from '../Glossary.jsx'

const routes = [
{
Expand All @@ -12,6 +13,11 @@ const routes = [
path: '/downloads',
name: 'Downloads',
Component: Downloads
},
{
path: '/glossary',
name: 'Glossary',
Component: Glossary
}
]

Expand Down