mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-06-17 03:45:25 +02:00
Basic dashboard support for Authenticated users
This commit is contained in:
32
titanembeds/templates/dashboard.html.jinja2
Normal file
32
titanembeds/templates/dashboard.html.jinja2
Normal file
@ -0,0 +1,32 @@
|
||||
{% extends 'site_layout.html.jinja2' %}
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>User Dashboard</h1>
|
||||
<p class="flow-text">Select a server to configure Titan Embeds.</p>
|
||||
<p>*List missing some servers? It's because you must have either <strong>Manage Server</strong>, <strong>Kick Members</strong>, or <strong>Ban Members</strong> permissions to modify embed settings.</p>
|
||||
<div class="row">
|
||||
{% for server in servers %}
|
||||
<div class="col s6">
|
||||
<div class="card-panel grey lighten-5 z-depth-1">
|
||||
<div class="row valign-wrapper">
|
||||
<div class="col s2">
|
||||
{% if server.icon %}
|
||||
<img src="{{ icon_generate(server.id, server.icon) }}" alt="" class="circle responsive-img">
|
||||
{% else %}
|
||||
<span class="black-text">No icon :(</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col s10">
|
||||
<span class="black-text">
|
||||
<p class="flow-text">{{ server.name }}</p>
|
||||
<br>
|
||||
<a class="waves-effect waves-light btn" href="{{url_for('user.administrate_guild', guild_id=server['id'])}}">Modify</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
17
titanembeds/templates/index.html.jinja2
Normal file
17
titanembeds/templates/index.html.jinja2
Normal file
@ -0,0 +1,17 @@
|
||||
{% extends 'site_layout.html.jinja2' %}
|
||||
{% block title %}Index{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1 class="center-align">Embed Discord like a<br><strong>true Titan</strong></h1>
|
||||
<p class="flow-text center-align">Add <strong>Titan</strong> to your discord server to create your own personalized chat embed!</p>
|
||||
<a class="waves-effect waves-light btn btn-large center_content" href="{{ url_for('user.dashboard') }}">Start here!</a>
|
||||
<br /><br />
|
||||
<div style="display: flex;align-items: center;">
|
||||
<video preload="true" loop="" style="width:100%; border-radius: 10px;">
|
||||
<source src="http://mee6.xyz/static/mee6.mp4" type="video/mp4">
|
||||
<source src="http://mee6.xyz/static/mee6.webm" type="video/webm; codecs=vp8, vorbis">
|
||||
<source type="video/ogg; codecs=theora, vorbis" src="http://mee6.xyz/static/mee6.ogg">
|
||||
Your browser does not support the video tag.
|
||||
</video> <!-- TODO: Fix video and add autoplay -->
|
||||
</div>
|
||||
{% endblock %}
|
55
titanembeds/templates/site_layout.html.jinja2
Normal file
55
titanembeds/templates/site_layout.html.jinja2
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--Import Google Icon Font-->
|
||||
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<!--Import materialize.css-->
|
||||
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/css/materialize.min.css" integrity="sha256-6DQKO56c9MZL0LAc7QNtxqJyqSa3rS9Gq5FVcIhtA+w=" crossorigin="anonymous" media="screen,projection"/>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
|
||||
<!--Let browser know website is optimized for mobile-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
|
||||
<title>{% block title %}{% endblock %} - Titan Embeds for Discord</title>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
{% if session['unauthenticated'] is defined and not session['unauthenticated'] %}
|
||||
<ul id="menu_dropdown" class="dropdown-content">
|
||||
<li><a href="{{ url_for('user.dashboard') }}">Dashboard</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="{{ url_for('user.logout') }}">Logout</a></li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
<nav>
|
||||
<div class="nav-wrapper container">
|
||||
<a href="/" class="brand-logo"><b>Titan</b>Embeds</a>
|
||||
<ul id="nav-mobile" class="right">
|
||||
<li><a href="#" class="waves-effect btn z-depth-3">Visit Us!</a></li> <!-- TODO: Add discord guild invite -->
|
||||
{% if session['unauthenticated'] is defined and not session['unauthenticated'] %}
|
||||
<li><a id="menu_drop" data-activates="menu_dropdown" class="waves-effect btn z-depth-3 btn-floating dropdown-button avatar_menu" style='background-image: url(" {{ session['avatar'] }} ")'></a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ url_for('user.login_authenticated') }}" class="waves-effect btn z-depth-3">Login</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
<footer class="page-footer">
|
||||
<div class="footer-copyright">
|
||||
<div class="container">
|
||||
A project by EndenDragon
|
||||
<a class="grey-text text-lighten-4 right" href="https://github.com/EndenDragon/Titan">GitHub Repo</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!--Import jQuery before materialize.js-->
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.1/js/materialize.min.js" integrity="sha256-ToPQhpo/E89yaCd7+V8LUCjobNRkjilRXfho6x3twLU=" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user