summaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2023-11-15 20:34:41 -0700
committerNavan Chauhan <navanchauhan@gmail.com>2023-11-15 20:34:41 -0700
commit3743f7056dcdbe1a16a00418ea10ebef2669cf61 (patch)
tree298657931ead09efbcf53ccb08bfc3ee501623c1 /app/templates
parent81834656747ead193334a36d8f49045cc214b53e (diff)
initial structureHEADmain
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/auth/login.html61
-rw-r--r--app/templates/auth/signup.html65
-rw-r--r--app/templates/base.html70
-rw-r--r--app/templates/index.html50
-rw-r--r--app/templates/main/dashboard.html19
5 files changed, 265 insertions, 0 deletions
diff --git a/app/templates/auth/login.html b/app/templates/auth/login.html
new file mode 100644
index 0000000..aa9f7d6
--- /dev/null
+++ b/app/templates/auth/login.html
@@ -0,0 +1,61 @@
+{% extends 'base.html' %}
+
+{% block content %}
+ <!--{% block title %} Login {% endblock %}-->
+{% with messages = get_flashed_messages() %}
+ {% if messages %}
+ <div class="rounded-md bg-red-50 p-4">
+ <div class="flex">
+ <div class="flex-shrink-0">
+ <svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
+ <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z" clip-rule="evenodd" />
+ </svg>
+ </div>
+ <div class="ml-3">
+ <h3 class="text-sm font-medium text-red-800">{{ messages[0] }}</h3>
+ </div>
+ </div>
+</div>
+ {% endif %}
+{% endwith %}
+<div class="flex min-h-full flex-col justify-center px-6 py-12 lg:px-8">
+ <div class="sm:mx-auto sm:w-full sm:max-w-sm">
+ <img class="mx-auto h-10 w-auto" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600" alt="Your Company">
+ <h2 class="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900">Sign in to your account</h2>
+ </div>
+
+ <div class="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
+ <form class="space-y-6" action="/login" method="POST">
+ <div>
+ <label for="email" class="block text-sm font-medium leading-6 text-gray-900">Email address</label>
+ <div class="mt-2">
+ <input id="email" name="email" type="email" autocomplete="email" required class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">
+ </div>
+ </div>
+
+ <div>
+ <div class="flex items-center justify-between">
+ <label for="password" class="block text-sm font-medium leading-6 text-gray-900">Password</label>
+ <!--
+ <div class="text-sm">
+ <a href="#" class="font-semibold text-indigo-600 hover:text-indigo-500">Forgot password?</a>
+ </div>-->
+ </div>
+ <div class="mt-2">
+ <input id="password" name="password" type="password" autocomplete="current-password" required class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">
+ </div>
+ </div>
+ <div class="field">
+ <label class="checkbox">
+ <input type="checkbox" name="remember">
+ Remember me
+ </label>
+ </div>
+ <div>
+ <button type="submit" class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Sign in</button>
+ </div>
+ </form>
+ </div>
+</div>
+{% endblock %}
+
diff --git a/app/templates/auth/signup.html b/app/templates/auth/signup.html
new file mode 100644
index 0000000..666bdeb
--- /dev/null
+++ b/app/templates/auth/signup.html
@@ -0,0 +1,65 @@
+{% extends 'base.html' %}
+
+{% block content %}
+ <!--<span class="title"><h1>{% block title %} Sign Up{% endblock %}</h1></span>-->
+{% with messages = get_flashed_messages() %}
+ {% if messages %}
+ <div class="rounded-md bg-red-50 p-4">
+ <div class="flex">
+ <div class="flex-shrink-0">
+ <svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
+ <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z" clip-rule="evenodd" />
+ </svg>
+ </div>
+ <div class="ml-3">
+ <h3 class="text-sm font-medium text-red-800">{{ messages[0] }}</h3>
+ </div>
+ </div>
+</div>
+ {% endif %}
+{% endwith %}
+
+
+<div class="flex min-h-full flex-col justify-center px-6 py-12 lg:px-8">
+ <div class="sm:mx-auto sm:w-full sm:max-w-sm">
+ <img class="mx-auto h-10 w-auto" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600" alt="Your Company">
+ <h2 class="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900">Register for an Account</h2>
+ </div>
+
+ <div class="mt-10 sm:mx-auto sm:w-full sm:max-w-sm">
+ <form class="space-y-6" action="/signup" method="POST">
+ <div>
+ <label for="email" class="block text-sm font-medium leading-6 text-gray-900">Email address</label>
+ <div class="mt-2">
+ <input id="email" name="email" type="email" autocomplete="email" required class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">
+ </div>
+ </div>
+
+ <div>
+ <label for="name" class="block text-sm font-medium leading-6 text-gray-900">Name</label>
+ <div class="mt-2">
+ <input id="name" name="name" type="text" required class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">
+ </div>
+ </div>
+
+ <div>
+ <div class="flex items-center justify-between">
+ <label for="password" class="block text-sm font-medium leading-6 text-gray-900">Password</label>
+ <!--
+ <div class="text-sm">
+ <a href="#" class="font-semibold text-indigo-600 hover:text-indigo-500">Forgot password?</a>
+ </div>-->
+ </div>
+ <div class="mt-2">
+ <input id="password" name="password" type="password" autocomplete="current-password" required class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6">
+ </div>
+ </div>
+ <div>
+ <button type="submit" class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">Sign up</button>
+ </div>
+ </form>
+ </div>
+</div>
+{% endblock %}
+
+
diff --git a/app/templates/base.html b/app/templates/base.html
new file mode 100644
index 0000000..dfe0b87
--- /dev/null
+++ b/app/templates/base.html
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>{% block title %} {% endblock %} - Flask-App</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link href="{{url_for('static',filename='css/output.css')}}" rel="stylesheet">
+ </head>
+ <body>
+<nav class="bg-gray-800">
+ <div class="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8">
+ <div class="relative flex h-16 items-center justify-between">
+ <div class="absolute inset-y-0 left-0 flex items-center sm:hidden">
+ <!-- Mobile menu button-->
+ <button type="button" class="relative inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white" aria-controls="mobile-menu" aria-expanded="false">
+ <span class="absolute -inset-0.5"></span>
+ <span class="sr-only">Open main menu</span>
+ <!--
+ Icon when menu is closed.
+
+ Menu open: "hidden", Menu closed: "block"
+ -->
+ <svg class="block h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
+ <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
+ </svg>
+ <!--
+ Icon when menu is open.
+
+ Menu open: "block", Menu closed: "hidden"
+ -->
+ <svg class="hidden h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true">
+ <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
+ </svg>
+ </button>
+ </div>
+ <div class="flex flex-1 items-center justify-center sm:items-stretch sm:justify-start">
+ <div class="hidden sm:ml-6 sm:block">
+ <div class="flex space-x-4">
+ <!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
+ <a href="{{ url_for('main.index')}}" class="text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium">Home</a>
+ {% if not current_user.is_authenticated %}
+ <a href="{{ url_for('auth.login')}}" class="text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium">Login</a>
+ <a href="{{ url_for('auth.signup')}}" class="text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium">Register</a>
+ {% endif %}
+ {% if current_user.is_authenticated %}
+ <a href="{{ url_for('main.dashboard')}}" class="text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium" aria-current="page">Dashboard</a>
+ <a href="{{ url_for('auth.logout')}}" class="text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium">Logout</a>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- Mobile menu, show/hide based on menu state. -->
+ <div class="sm:hidden" id="mobile-menu">
+ <div class="space-y-1 px-2 pb-3 pt-2">
+ <!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
+ <a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block rounded-md px-3 py-2 text-base font-medium">Home</a>
+ <a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block rounded-md px-3 py-2 text-base font-medium">Dashboard</a>
+ <a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block rounded-md px-3 py-2 text-base font-medium">Log Out</a>
+ <a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block rounded-md px-3 py-2 text-base font-medium">Login</a>
+ <a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block rounded-md px-3 py-2 text-base font-medium">Register</a>
+ </div>
+ </div>
+</nav>
+ {% block content %}{% endblock %}
+ </body>
+</html>
+
diff --git a/app/templates/index.html b/app/templates/index.html
new file mode 100644
index 0000000..5ea3220
--- /dev/null
+++ b/app/templates/index.html
@@ -0,0 +1,50 @@
+{% extends 'base.html' %}
+
+{% block content %}
+ <!--{% block title %} The Home Page of FlaskApp {% endblock %}-->
+<div class="relative isolate overflow-hidden bg-gray-900">
+ <svg class="absolute inset-0 -z-10 h-full w-full stroke-white/10 [mask-image:radial-gradient(100%_100%_at_top_right,white,transparent)]" aria-hidden="true">
+ <defs>
+ <pattern id="983e3e4c-de6d-4c3f-8d64-b9761d1534cc" width="200" height="200" x="50%" y="-1" patternUnits="userSpaceOnUse">
+ <path d="M.5 200V.5H200" fill="none" />
+ </pattern>
+ </defs>
+ <svg x="50%" y="-1" class="overflow-visible fill-gray-800/20">
+ <path d="M-200 0h201v201h-201Z M600 0h201v201h-201Z M-400 600h201v201h-201Z M200 800h201v201h-201Z" stroke-width="0" />
+ </svg>
+ <rect width="100%" height="100%" stroke-width="0" fill="url(#983e3e4c-de6d-4c3f-8d64-b9761d1534cc)" />
+ </svg>
+ <div class="absolute left-[calc(50%-4rem)] top-10 -z-10 transform-gpu blur-3xl sm:left-[calc(50%-18rem)] lg:left-48 lg:top-[calc(50%-30rem)] xl:left-[calc(50%-24rem)]" aria-hidden="true">
+ <div class="aspect-[1108/632] w-[69.25rem] bg-gradient-to-r from-[#80caff] to-[#4f46e5] opacity-20" style="clip-path: polygon(73.6% 51.7%, 91.7% 11.8%, 100% 46.4%, 97.4% 82.2%, 92.5% 84.9%, 75.7% 64%, 55.3% 47.5%, 46.5% 49.4%, 45% 62.9%, 50.3% 87.2%, 21.3% 64.1%, 0.1% 100%, 5.4% 51.1%, 21.4% 63.9%, 58.9% 0.2%, 73.6% 51.7%)"></div>
+ </div>
+ <div class="mx-auto max-w-7xl px-6 pb-24 pt-10 sm:pb-32 lg:flex lg:px-8 lg:py-40">
+ <div class="mx-auto max-w-2xl flex-shrink-0 lg:mx-0 lg:max-w-xl lg:pt-8">
+ <img class="h-11" src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500" alt="Your Company">
+ <div class="mt-24 sm:mt-32 lg:mt-16">
+ <a href="#" class="inline-flex space-x-6">
+ <span class="rounded-full bg-indigo-500/10 px-3 py-1 text-sm font-semibold leading-6 text-indigo-400 ring-1 ring-inset ring-indigo-500/20">What's new</span>
+ <span class="inline-flex items-center space-x-2 text-sm font-medium leading-6 text-gray-300">
+ <span>Just shipped v1.0</span>
+ <svg class="h-5 w-5 text-gray-500" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
+ <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
+ </svg>
+ </span>
+ </a>
+ </div>
+ <h1 class="mt-10 text-4xl font-bold tracking-tight text-white sm:text-6xl">RSS Anything</h1>
+ <p class="mt-6 text-lg leading-8 text-gray-300">Anim aute id magna aliqua ad ad non deserunt sunt. Qui irure qui lorem cupidatat commodo. Elit sunt amet fugiat veniam occaecat fugiat aliqua.</p>
+ <div class="mt-10 flex items-center gap-x-6">
+ <a href="{{url_for('auth.signup')}}" class="rounded-md bg-indigo-500 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-400 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-400">Get started</a>
+ <a href="#" class="text-sm font-semibold leading-6 text-white">Learn more <span aria-hidden="true">→</span></a>
+ </div>
+ </div>
+ <div class="mx-auto mt-16 flex max-w-2xl sm:mt-24 lg:ml-10 lg:mr-0 lg:mt-0 lg:max-w-none lg:flex-none xl:ml-32">
+ <div class="max-w-3xl flex-none sm:max-w-5xl lg:max-w-none">
+ <img src="https://tailwindui.com/img/component-images/dark-project-app-screenshot.png" alt="App screenshot" width="2432" height="1442" class="w-[76rem] rounded-md bg-white/5 shadow-2xl ring-1 ring-white/10">
+ </div>
+ </div>
+ </div>
+</div>
+
+
+{% endblock %}
diff --git a/app/templates/main/dashboard.html b/app/templates/main/dashboard.html
new file mode 100644
index 0000000..d2022c5
--- /dev/null
+++ b/app/templates/main/dashboard.html
@@ -0,0 +1,19 @@
+{% extends 'base.html' %}
+
+{% block content %}
+ <div class="min-h-full">
+ <div class="py-10">
+ <header>
+ <div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
+ <h1 class="text-3xl font-bold leading-tight tracking-tight text-gray-900">{% block title %}Dashboard{% endblock %}</h1>
+ <h2>Hi {{name}}
+ </div>
+ </header>
+ <main>
+ <div class="mx-auto max-w-7xl sm:px-6 lg:px-8">
+ <!-- Your content -->
+ </div>
+ </main>
+ </div>
+</div>
+{% endblock %}