Untitled
unknown
python
3 years ago
1.4 kB
3
Indexable
from fastapi import FastAPI from deta import Deta # Create the FastAPI app and Deta client app = FastAPI() client = Deta() # Set up the navbar navbar_items = [ {'text': 'Home', 'href': '/'}, {'text': 'About', 'href': '/about'}, ] # Set up the Discord invite link discord_invite_link = "https://discord.gg/abc123" # Set up the homepage @app.get("/") async def home(): return { 'template': 'home.html', 'context': { 'navbar_items': navbar_items, 'description': "Welcome to RogueHub! We're a community of gamers and streamers who love to play and talk about all kinds of games. Join our Discord server to meet new friends and get involved in the community!", 'discord_invite_link': discord_invite_link, } } # Set up the about page @app.get("/about") async def about(): return { 'template': 'about.html', 'context': { 'navbar_items': navbar_items, 'description': "RogueHub is a community of gamers and streamers who love to play and talk about all kinds of games. We have a variety of channels and activities in our Discord server, including voice chats, game nights, and tournaments. We also have a strong focus on helping new streamers grow and succeed on the platform. Join us today to get involved in the community!", } }
Editor is loading...