songs2slides

A tool that automatically finds song lyrics and creates lyric slideshows
git clone https://git.ashermorgan.net/songs2slides/
Log | Files | Refs | README

commit b9598631ac414c21636b384ca07b7cd0d7d12da9
parent 73c2865f715bbc12ce377bb451e0906717627bdd
Author: ashermorgan <59518073+ashermorgan@users.noreply.github.com>
Date:   Sun, 25 Feb 2024 20:23:13 -0800

Add homepage

Diffstat:
Msongs2slides/routes.py | 6+++---
Asongs2slides/static/global.css | 31+++++++++++++++++++++++++++++++
Asongs2slides/static/home.css | 8++++++++
Asongs2slides/templates/home.html | 10++++++++++
Asongs2slides/templates/layout.html | 19+++++++++++++++++++
5 files changed, 71 insertions(+), 3 deletions(-)

diff --git a/songs2slides/routes.py b/songs2slides/routes.py @@ -1,4 +1,4 @@ -from flask import abort, Blueprint, request, send_file +from flask import abort, Blueprint, render_template, request, send_file import tempfile from songs2slides import core @@ -36,8 +36,8 @@ def parse_form(form): return songs @bp.route('/') -def index(): - return '<p>Hello world</p>' +def home(): + return render_template('home.html') @bp.post('/slides/') def slides(): diff --git a/songs2slides/static/global.css b/songs2slides/static/global.css @@ -0,0 +1,31 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +/* page setup */ +body { + font-family: sans-serif; +} +header, main { + padding: 1rem; +} + +/* page header */ +header { + background: #ffff50; + font-weight: bold; + text-align: center; + font-size: 1.5rem; +} + +/* page content */ +main { + margin: auto; + max-width: 500px; +} +p { + line-height: 1.4; + margin-bottom: 1rem; +} diff --git a/songs2slides/static/home.css b/songs2slides/static/home.css @@ -0,0 +1,8 @@ +main { + text-align: center; + padding: 2rem 0rem; +} +p { + font-size: 2rem; + font-weight: bold; +} diff --git a/songs2slides/templates/home.html b/songs2slides/templates/home.html @@ -0,0 +1,10 @@ +{% extends "layout.html" %} + +{% block head %} +<link rel="stylesheet" href="{{ url_for('static', filename='home.css') }}"/> +{% endblock head %} + +{% block main %} +<p>Create lyric slide shows easily and quickly</p> +<a href="#">Get Started</a> +{% endblock main %} diff --git a/songs2slides/templates/layout.html b/songs2slides/templates/layout.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> + <head> + <title>SongsSlides</title> + <meta name="description" content="Automatically creates lyric slide shows from a list of songs"> + <link rel="stylesheet" href="{{ url_for('static', filename='global.css') }}"/> + + {% block head %}{% endblock %} + </head> + <body> + <header> + Songs2Slides + </header> + + <main> + {% block main %}{% endblock %} + </main> + </body> +</html>