GithubHelp home page GithubHelp logo

nlthijs48 / gocraftwebsite Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 2.96 MB

Website of the Go-Craft Minecraft server

TypeScript 84.07% JavaScript 5.57% HTML 10.36%
babel minecraft react tslint typescript webpack website

gocraftwebsite's People

Contributors

nlthijs48 avatar

Watchers

 avatar  avatar

gocraftwebsite's Issues

Setup shop page

Render categories and items using data from the API:

  • URL: https://www.minecraftmarket.com/api/1.5/c9d4d60b31d404df124b1021c5731dce
  • Endpoints (currently known, might be more):
    • /gui: get available items and their categories
    • /recentdonor: recent donations
    • /pending: commands that need to be executed
    • /expiry: command that need to be executed to expire ranks
    • /executed/<number>: mark command as done
  • After clicking item, redirect to actual shop using the provided link, which should immediately put it into the cart.

(emailed MinecraftMarket to ask for proper documentation, but the above is already enough for now)

Move install/update script into the repository

  • Move update script into the repository
  • Add commands to let it function as install script (setup forever and other required packages)
  • Ensure it updates itself, and executes the update functionality after that
  • Use rsync for deployment?
    • More efficient (only copy/delete changed files)
    • Prevents missing files during deployment
    • Might still cause a mix of old and new deployment to get loaded by users
  • Setup deployment directory with git to make rolling back to a previous version easier?

Introduce Row and Column components for easy layout

Add some components for easily setting up flexbox containers, and also one to flex. Things to take into account:

  • min-width: 0 for flexing containers with text to force them to shrink
  • Horizontal and vertical alignment properties
  • Reverse property
  • Style property, which will get extended
  • Pass all other props to div
  • Use max-width: 100% and max-height: 100% probably

Improve readme

  • Add production build instructions
  • Add information about used plugins in WordPress
  • Add information about used functions.php in WordPress template (and move the template to the repo)
  • Explain used file organisation and use of javascript libraries

Cache data in localstorage to make second visit quicker

Save (part of) the data from the Redux store into localstorage and restore it on the next visit (based on https://egghead.io/lessons/javascript-redux-persisting-the-state-to-the-local-storage). This would make the second visit show the website very quickly.

Some data does not need to be stored, like the fetching state and drawer state, but news items, servers, pages and menu information should get stored. It should still fetch new data when starting up, but while that is happening it can show the restored data.

HTTP/2

Everything has been setup for it, but it looks like the openssl version of Ubuntu 14 does not allow browsers like Chrome to use it. Could try testing the dist-upgrade from 14 to 16, but it is quite scary to run that on the Go-Craft VM.

Player pages

Include:

  • Big avatar/skin image
  • Now online on
  • Vote info:
    • Votes all time
    • Votes this month
    • Vote history graph?
  • Rank
  • Bans/warnings/kicks
  • Kills/deaths in Kit-PVP/Factions of all time and this month
  • GoldRush stats

Link to player page from:

  • Online players list of server page
  • Vote top 10
  • Author of news items

Setup voting page on the website

  • Add custom content type in WordPress to represent a vote website with the following attributes:
    • Name
    • Vote url
    • Allow ordering
  • Add the vote sites currently listed on our website
  • Render the vote sites as tabs in the website (like the maps page), tabs should scroll if they do not fit.

Improve homepage

  • Load more news when scrolling down
  • Add large header/logo
  • Add trailer
  • Show servers summary/general information at the top

Add commands from `/help` to server pages

Could get these from the server using the websocket, or move the rules to the WordPress interface and let the server get them from WordPress instead?

  • Rules marked as general or server-specific
  • Allow linking multiple servers in case server-specific is selected
  • Add punishments to rules as well?

Cleanup connect() and class usage to style of ServersMenuItemInfo

All type parameters of connect() can be skipped if the mapStateToProps and mapDispatchToProps functions are inlined, and the component is also inlined. This has the following positive effects:

  • No need to declare an interface for mapStateToProps, it is completely inferred if the state argument has the AppState type declared.
  • No need to declare an interface for mapDispatchToProps, also completely inferred if the state argument has the AppState type declared.
  • Display components rarely have state, so these can be changed to functions, which are less verbose.
  • Putting the render function directly in connect()() will let TypeScript infer the props perfectly, meaning and interface like AllProps or merging the state, dispatch, router and own props is not necessary anymore.
  • Function shortened to arrow function, which saves the function keyword and the name of the function.

Might need to define an alternative function for connect with only a type argument for the component props, because that is still not possible without specifying all type arguments. Another helper is probably necessary for withRouter().

This seems to break hot reloading, maybe there is something that can be done to fix it

Scroll restore on certain pages

Remember scroll position on the news page, restore it when coming back. Could be hard to get working if multiple pages of news items have been loaded previously (somehow store this page state as well?).

Fix scrolling performance

  • Add transform: translate3d(0,0,0); and will-change: transform to all scroll containers.
  • Use requestAnimationFrame for animating hero image (and throttle it to one per frame).
  • Round pixel value used for hero image position.
  • Don't change position of server page hero image when outside of the viewport.

Shown on which page you are in the header

The title of the page is not shown yet, probably want to put this in the header and move the logo to the left? Or add it in the content area as a subheader of some sort.

Also needs to go in the page title.

Lazy-load images

Not a huge concern currently, but for could be nice to implement/test

Add infinite caching to all assets and the app bundle

  • Add a hash to the app bundle reference in index.html to break the cache
  • Ensure index.html is always updated, except if there is no network
  • Setup infinite caching for images fonts and javascript bundles in .htaccess
  • Setup serviceworker or web manifest to let the website work offline.
  • Ensure infinite caching of images from WordPress.

Move subdomain sites to sub folder?

Sub sites like multicraft.go-craft.com are now located at /var/www/html/multicraft, but if the website would have a page multicraft one of them will not work. Rewriting subdomains to for example SUB/multicraft and moving sub sites into that folder should solve it.

Server side rendering

  • Should improve SEO
  • Better first page load (second page load is already super quick because of service workers)
  • Could be hard to setup and maintain

Setup https

  • Create certificate with LetsEncrypt
  • Ensure all applications running in apache still work
  • Test new website and ensure https is used properly (and local development should still work)
  • Setup proxies to things like BungeeStatus and Multicraft to server them with https

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.