Skip to content

Conversation

@billyjbryant
Copy link

Description

This change enhances the layout and appearance of the default information page and adds the ability to link to a Discord Guild for Private CrewLink Servers.

Changes

src/index.ts

  • Added requirement for the axios module
  • Added new Environment Variable GUILD which is intended to capture the Guild ID of a Discord Guild
  • If GUILD, a GET request is made via axios to the Discord API to get the Guild Information
  • If Discord API returns JSON Blob, this is returned via the rendered page for calls to /
  • Added support for the Page Title and Header to be set via the NAME EnvVar passed via the name variable
  • Expanded the console output on server launch to be more informative.

views/index.pug

  • Enhanced the overall layout of the page
  • Set Page Title & H1 Header via name variable
  • If Discord Guild information is provided via the discord variable, the Guild Name and Guild Invite Link rendered
  • Added link to download the CrewLink Desktop application
  • Added footer with Dynamic Copyright, Attribution link and License

@billyjbryant billyjbryant changed the title Feature/enhanced default layout+discord Feature/enhanced default layout + added discord support Dec 30, 2020
@billyjbryant billyjbryant changed the title Feature/enhanced default layout + added discord support Enhance default page layout and add Discord support Dec 30, 2020
@billyjbryant
Copy link
Author

Can anyone review this for me please, let me know if there should be any changes?

@billyjbryant
Copy link
Author

@ottomated can this be merged or is there any change you would like to see me make?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants