+ {{ markdown_html|safe }} +
diff --git a/MANIFEST.in b/MANIFEST.in index 0a726ee..12c7925 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ recursive-include vreader/api *.py recursive-include vreader/templates * +recursive-include vreader/static * diff --git a/Makefile b/Makefile index b96e2c1..20230e8 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,18 @@ -docker_build_local: +docker_build_local: build_tailwind docker build -t vreader:latest . -docker_build_release_dev: +docker_build_release_dev: build_tailwind docker buildx build \ --platform linux/amd64,linux/arm64 \ -t gitea.va.reichard.io/evan/vreader:dev \ --push . -docker_build_release_latest: +docker_build_release_latest: build_tailwind docker buildx build \ --platform linux/amd64,linux/arm64 \ -t gitea.va.reichard.io/evan/vreader:latest \ -t gitea.va.reichard.io/evan/vreader:`git describe --tags` \ --push . + +build_tailwind: + tailwind build -o ./vreader/static/tailwind.css --minify diff --git a/README.md b/README.md index da18e24..48e8e9d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ -# VReader +
-Turn YouTube videos into articles! I banged this one out in a couple of hours, so it's a bit scrappy. Will slowly improve it. ++ + + +
+ +--- + +VReader allows you to take videos from YouTube and convert them into articles! ## Running Server diff --git a/banner.png b/banner.png new file mode 100644 index 0000000..3528a85 Binary files /dev/null and b/banner.png differ diff --git a/banner.xcf b/banner.xcf new file mode 100644 index 0000000..5f5362d Binary files /dev/null and b/banner.xcf differ diff --git a/shell.nix b/shell.nix index 8e4c91c..4afd529 100644 --- a/shell.nix +++ b/shell.nix @@ -2,6 +2,7 @@ pkgs.mkShell { packages = with pkgs; [ + nodePackages.tailwindcss python311 ]; } diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..3f14a8e --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,16 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["./vreader/templates/**/*.html", "./vreader/assets/**/*.{html,js}"], + theme: { + extend: { + colors: { + primary: "var(--color-primary)", + secondary: "var(--color-secondary)", + tertiary: "var(--color-tertiary)", + ptext: "var(--color-primary-text)", + stext: "var(--color-secondary-text)", + }, + }, + }, + plugins: [], +}; diff --git a/vreader/api/common.py b/vreader/api/common.py index 29e2fa2..586f021 100644 --- a/vreader/api/common.py +++ b/vreader/api/common.py @@ -1,13 +1,25 @@ from flask import Blueprint -from flask import make_response, render_template +from flask import make_response, render_template, send_from_directory from html_sanitizer import Sanitizer from markdown import markdown from vreader.config import Config import os + bp = Blueprint("common", __name__) sanitizer = Sanitizer() + +@bp.route("/static/