Skip to content

Commit

Permalink
Merge pull request #1 from Veiled-Haven/feat-news
Browse files Browse the repository at this point in the history
minor improvements
  • Loading branch information
KeyboardInterrupt authored Jun 20, 2023
2 parents 74879a0 + 9e2b66d commit 67d96ef
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 53 deletions.
9 changes: 7 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from flask import Flask, render_template, request
from flask import Flask, render_template, request, redirect, url_for
from discord_webhook import DiscordWebhook, DiscordEmbed
from flask_bootstrap import Bootstrap4
from flask_wtf import FlaskForm
Expand Down Expand Up @@ -39,8 +39,13 @@ def home():
webhook.add_embed(embed)
if webhook_url != "":
response = webhook.execute()
return render_template("success.html", form=form)
return redirect(location=url_for("success"),code=302)
else:
return render_template("index.html", form=form,anchor='application')


@app.route("/success")
def success():
return render_template("success.html")

app.run(host='0.0.0.0', port=5000)
Binary file added static/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/poster.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 8 additions & 42 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,12 @@
{% include 'parts/head.html' %}

<!--navigation-->
<section class="smart-scroll">
<div class="container-fluid">
<nav class="navbar navbar-expand-md navbar-dark">
<a class="navbar-brand heading-black" href="#">
<img src="img/vh_logo_small.png">
</a>
<button class="navbar-toggler navbar-toggler-right border-0" type="button" data-toggle="collapse"
data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false"
aria-label="Toggle navigation">
<span data-feather="grid"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link page-scroll" href="#home">Home</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#screenshots">Screenshots</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#faq">FAQ</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#rules">Rules</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#application">Application Form</a>
</li>
</ul>
</div>
</nav>
</div>
</section>
{% include 'parts/navigation.html' %}

<!--hero header-->
<section class="bg-image bg-image-1 py-7 py-md-0 bg-hero" id="home">
<div class="container">
<div class="row vh-md-100">
<div class="col-md-8 col-sm-10 col-12 mx-auto my-auto text-center">
<h1 class="heading-black text-capitalize"><img src="img/vh_logo_small.png"></h1>
<h1 class="heading-black text-capitalize"><img src="{{ url_for('static', filename="img/vh_logo_small.png") }}"></h1>
<p class="lead py-3">Welcome to Veiled Haven, a Minecraft Server Project with a focus on keeping a vanilla gameplay experience and maintaining a mature community!</p>
</div>
</div>
Expand All @@ -58,8 +24,8 @@ <h2 class="heading-black">Screenshots</h2>
<div class="row mt-5">
<div class="col-md-4">
<div class="card">
<a href="img/screenshot-2.jpg">
<img class="card-img-top img-raised" src="img/screenshot-2.jpg" alt="Blog 1">
<a href="{{ url_for('static', filename="img/screenshot-2.jpg") }}">
<img class="card-img-top img-raised" src="{{ url_for('static', filename="img/screenshot-2.jpg") }}" alt="Blog 1">
</a>
<div class="card-body">
<p class="text-muted small-xl mb-2">Apr 18, 2023 - A player build.</p>
Expand All @@ -68,8 +34,8 @@ <h2 class="heading-black">Screenshots</h2>
</div>
<div class="col-md-4">
<div class="card">
<a href="img/screenshot-townsquare.jpg">
<img class="card-img-top img-raised" src="img/screenshot-townsquare.jpg" alt="Blog 1">
<a href="{{ url_for('static', filename="img/screenshot-townsquare.jpg") }}">
<img class="card-img-top img-raised" src="{{ url_for('static', filename="img/screenshot-townsquare.jpg") }}" alt="Blog 1">
</a>
<div class="card-body">
<p class="text-muted small-xl mb-2">Apr 18, 2023 - Townsquare.</p>
Expand All @@ -78,8 +44,8 @@ <h2 class="heading-black">Screenshots</h2>
</div>
<div class="col-md-4">
<div class="card">
<a href="img/screenshot-dragonfight.jpg">
<img class="card-img-top img-raised" src="img/screenshot-dragonfight.jpg" alt="Blog 1">
<a href="{{ url_for('static', filename="img/screenshot-dragonfight.jpg") }}">
<img class="card-img-top img-raised" src="{{ url_for('static', filename="img/screenshot-dragonfight.jpg") }}" alt="Blog 1">
</a>
<div class="card-body">
<p class="text-muted small-xl mb-2">Apr 21, 2023 - Dragonfight.</p>
Expand Down
26 changes: 18 additions & 8 deletions templates/parts/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,26 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Veiled Haven - Vanilla Survival Minecraft</title>
<meta name="description" content=""/>

<!--Inter UI font-->
<meta name="title" content="Veiled Haven - Vanilla Survival Minecraft" />
<meta name="description" content="A Minecraft Server Project with a focus on keeping a vanilla gameplay experience and maintaining a mature community!" />

<!--vendors styles-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css"> -->
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://metatags.io" />
<meta property="og:title" content="Veiled Haven - Vanilla Survival Minecraft" />
<meta property="og:description" content="A Minecraft Server Project with a focus on keeping a vanilla gameplay experience and maintaining a mature community" />
<meta property="og:image" content="{{ url_for('static', filename='img/poster.png') }}" />

<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://metatags.io" />
<meta property="twitter:title" content="Veiled Haven - Vanilla Survival Minecraft" />
<meta property="twitter:description" content="A Minecraft Server Project with a focus on keeping a vanilla gameplay experience and maintaining a mature community" />
<meta property="twitter:image" content="{{ url_for('static', filename='img/poster.png') }}" />

<!-- Bootstrap CSS / Color Scheme -->
<link rel="stylesheet" href="css/default.css" id="theme-color">
<link rel="icon" type="image/png" href="{{ url_for('static', filename='img/favicon.png') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="{{ url_for('static', filename='css/default.css') }}" id="theme-color">
</head>
<body>
36 changes: 36 additions & 0 deletions templates/parts/navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--navigation-->
<section class="smart-scroll">
<div class="container-fluid">
<nav class="navbar navbar-expand-md navbar-dark">
<a class="navbar-brand heading-black" href="/">
<img src="{{ url_for('static', filename="img/vh_logo_small.png") }}">
</a>
<button class="navbar-toggler navbar-toggler-right border-0" type="button" data-toggle="collapse"
data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false"
aria-label="Toggle navigation">
<span data-feather="grid"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
{% if request.endpoint == "home" %}
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link page-scroll" href="#home">Home</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#screenshots">Screenshots</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#faq">FAQ</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#rules">Rules</a>
</li>
<li class="nav-item">
<a class="nav-link page-scroll" href="#application">Application Form</a>
</li>
</ul>
{% endif %}
</div>
</nav>
</div>
</section>
2 changes: 1 addition & 1 deletion templates/parts/tail.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.7.3/feather.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
<script src="js/scripts.js"></script>
<script src="{{ url_for('static', filename='js/scripts.js') }}"></script>
</body>
</html>
1 change: 1 addition & 0 deletions templates/success.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% include 'parts/head.html' %}
{% include 'parts/navigation.html' %}
<!--hero header-->
<section class="bg-image bg-image-3 py-7 py-md-0 bg-hero" id="home">
<div class="container">
Expand Down

0 comments on commit 67d96ef

Please sign in to comment.