Update Exploring Near Earth Objects project and add Meme Generator project

This commit is contained in:
2026-01-03 21:55:24 -08:00
parent 9a4c3f7854
commit 155f0c9c6d
36 changed files with 754 additions and 65 deletions

View File

@@ -0,0 +1,37 @@
<!doctype html>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<style>
body {
display: flex;
flex-direction: column;
height: 100vh;
justify-content: center;
align-items: center;
width: 100%;
background: #F5FCFE;
}
.nav {
display: inline;
padding: 60px;
}
img {
border: 1px solid rgba(0,0,0,.125);
border-radius: .25rem;
}
</style>
</head>
<body>
{% block body %}{% endblock %}
<div class="nav">
<a class="btn btn-primary" href="{{url_for('meme_rand')}}">Random</a>
<a class="btn btn-outline-primary" href="{{url_for('meme_form')}}">Creator</a>
</div>
</body>
</html>

View File

@@ -0,0 +1,5 @@
{% extends "base.html" %}
{% block title %}Meme Generator{% endblock %}
{% block body %}
<img src="{{ path }}" />
{% endblock %}

View File

@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block title %}Meme Generator{% endblock %}
{% block body %}
<div class="card" style="width: 500px; max-width: 100%;">
<div class="card-body">
<form action="{{url_for('meme_post')}}" method="POST">
<div class="form-group">
<label for="image_url">Image URL</label>
<input type="url" class="form-control" id="image_url" aria-describedby="image url" placeholder="Enter a url for an image" name="image_url">
</div>
<div class="form-group">
<label for="body">Quote Body</label>
<input type="text" class="form-control" id="body" aria-describedby="Quote Body" placeholder="To be or not to be" name="body">
</div>
<div class="form-group">
<label for="author">Quote Author</label>
<input type="text" class="form-control" id="author" aria-describedby="Quote Author" placeholder="Shakespeare" name="author">
</div>
<button type="submit" class="btn btn-primary">Create Meme!</button>
</form>
</div>
</div>
{% endblock %}