Remove nuxt + 100 other things..
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{% import "__macros__.html" as macros %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="description" content="new note"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>{{ title }} - SimpleNotes</title>
|
||||
{{ macros.stylesheet("styles.css") }}
|
||||
</head>
|
||||
<body class="bg-gray-900 text-white">
|
||||
{% include "components/navbar.html" %}
|
||||
{% block content %}default content{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,5 @@
|
||||
{% macro stylesheet(path) %}
|
||||
{% set path = styles(path) %}
|
||||
<link rel="preload" href="{{ path }}" as="style">
|
||||
<link rel="stylesheet" href="{{ path }}">
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,8 @@
|
||||
{% set title = note.title %} {% extends "__base__.html" %} {% block content %}
|
||||
|
||||
<div class="container mx-auto p-4">
|
||||
<h1 class="text-3xl underline mb-4">{{ note.title }}</h1>
|
||||
<div id="note">{{ note.html | raw }}</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% macro warning(title, warning) %}
|
||||
<div class="bg-red-500 border border-red-400 text-red-200 px-4 py-3 mb-4 rounded relative" role="alert">
|
||||
<strong class="font-bold">{{ title }}</strong>
|
||||
<span class="block sm:inline">{{ warning }}</span>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,27 @@
|
||||
<!-- {id, label, placeholder?, autocomplete?} -->
|
||||
{% macro input(args) %}
|
||||
<div class="mb-4">
|
||||
<label
|
||||
for="{{ args.id }}"
|
||||
class="font-bold text-grey-darker block mb-2"
|
||||
>{{ args.label }}</label>
|
||||
<input
|
||||
id="{{ args.id }}"
|
||||
name="{{ args.id }}"
|
||||
{% if args.autocomplete %}autocomplete="{{ args.autocomplete }}"{% endif %}
|
||||
{% if args.placeholder %}placeholder="{{ args.placeholder }}"{% endif %}
|
||||
class="shadow focus:shadow-outline block appearance-none w-full bg-gray-700 border-gray-500 hover:border-gray-500 px-2 py-2 rounded shadow"
|
||||
/>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro submit(value) %}
|
||||
<div class="flex items-center mt-6">
|
||||
<button
|
||||
type="submit"
|
||||
class="w-full bg-teal-500 hover:bg-teal-400 text-white font-bold py-2 px-4 rounded"
|
||||
>
|
||||
{{ value }}
|
||||
</button>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,21 @@
|
||||
<nav
|
||||
class="nav bg-teal-700 shadow-md flex items-center justify-between px-4"
|
||||
>
|
||||
<a href="/" class="text-2xl text-gray-800 font-bold">SimpleNotes</a>
|
||||
<ul>
|
||||
{% if user %}
|
||||
<li class="inline text-gray-800 ml-2 text-md font-semibold">
|
||||
<a href="/notes">Notes</a>
|
||||
</li>
|
||||
<li class="inline text-gray-800 ml-2 text-md font-semibold bg-green-500 hover:bg-green-700 rounded px-4 py-2">
|
||||
<form class="inline" action="/logout" method="post">
|
||||
<button type="submit">Logout</button>
|
||||
</form>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="inline text-gray-800 pl-2 text-md font-semibold">
|
||||
<a href="/login">Sign In</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -0,0 +1,11 @@
|
||||
{% set title = status %}
|
||||
{% extends "__base__.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="centered container mx-auto flex justify-center items-center">
|
||||
<div class="bg-gray-800 md:w-1/3 w-full rounded-lg m-4 p-6 text-center">
|
||||
<h1 class="text-3xl">Error</h1>
|
||||
<div class="text-red-400">{{ status }}</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,12 @@
|
||||
{% set title = "Notes" %}
|
||||
{% extends "__base__.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="centered container mx-auto flex justify-center items-center">
|
||||
<div class="bg-gray-800 md:w-1/3 w-full rounded-lg m-4 p-6 text-center">
|
||||
<h1 class="text-3xl">SimpleNotes</h1>
|
||||
<div class="text-teal-400">Welcome</div>
|
||||
<div class="text-gray-200">TODO</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,24 @@
|
||||
{% set title = "Notes" %}
|
||||
{% extends "__base__.html" %}
|
||||
{% block content %}
|
||||
<div class="container mx-auto p-4">
|
||||
<div class="flex justify-between">
|
||||
<h1 class="text-2xl underline">Notes</h1>
|
||||
<a
|
||||
href="/notes/new"
|
||||
class="inline text-gray-800 ml-2 text-md font-semibold bg-green-500 hover:bg-green-700 rounded px-4 py-2">New</a>
|
||||
</div>
|
||||
|
||||
{% if notes.size() > 0 -%}
|
||||
<ul>
|
||||
{% for note in notes -%}
|
||||
<li class="text-blue-200 hover:underline">
|
||||
<a href="/notes/{{ note.uuid }}">{{ note.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<span>No notes :c</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,40 @@
|
||||
{% set title = "Sign In" %}
|
||||
{% extends "__base__.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="centered container mx-auto flex justify-center items-center">
|
||||
<div class="w-full md:w-1/2 lg:w-1/3 m-4">
|
||||
<h1 class="font-semibold text-lg mb-6 text-center">Sign In</h1>
|
||||
<div
|
||||
class="bg-gray-800 border-teal-500 p-8 border-t-8 bg-white mb-6 rounded-lg shadow-lg"
|
||||
>
|
||||
|
||||
{%- if error %}
|
||||
{% import "components/alert.html" as alerts %}
|
||||
{{ alerts.warning("Error", error) }}
|
||||
{% endif -%}
|
||||
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
|
||||
{% import "components/forms.html" as forms %}
|
||||
{{ forms.input({
|
||||
"id": "username", "label": "Username",
|
||||
"placeholder": "Your Username", "autocomplete": "username"
|
||||
}) }}
|
||||
{{ forms.input({
|
||||
"id": "password", "label": "Password",
|
||||
"placeholder": "Your Password", "autocomplete": "current-password"
|
||||
}) }}
|
||||
{{ forms.submit("Sign In") }}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="text-gray-200 text-sm">
|
||||
Don't have an account?
|
||||
<a href="/register" class="no-underline text-blue-500 font-bold">Create an Account</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,42 @@
|
||||
{% set title = "Notes" %} {% extends "__base__.html" %} {% block content %}
|
||||
|
||||
<div class="container mx-auto">
|
||||
<h1 class="text-2xl">{{ method }}</h1>
|
||||
|
||||
{%- if error %}
|
||||
{% import "components/alert.html" as alerts %}
|
||||
<div class="mt-4">
|
||||
{{ alerts.warning("Error", error) }}
|
||||
</div>
|
||||
{% endif -%}
|
||||
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<textarea
|
||||
id="markdown"
|
||||
name="markdown"
|
||||
aria-label="markdown input"
|
||||
rows="20"
|
||||
class="w-full bg-gray-800 p-5 outline-none font-mono"
|
||||
spellcheck="false"
|
||||
>
|
||||
{%- if value %}{{ value }}{% else %}
|
||||
---
|
||||
title: ''
|
||||
---
|
||||
|
||||
{% endif -%}</textarea
|
||||
>
|
||||
|
||||
<div class="mt-2">
|
||||
<button
|
||||
class="bg-green-500 hover:bg-green-700 rounded px-4 py-2"
|
||||
type="submit"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p>{{ value }}</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,42 @@
|
||||
{% set title = "Create an Account" %}
|
||||
{% extends "__base__.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="centered container mx-auto flex justify-center items-center">
|
||||
<div class="w-full md:w-1/2 lg:w-1/3 m-4">
|
||||
<h1 class="font-semibold text-lg mb-6 text-center">Create an Account</h1>
|
||||
<div
|
||||
class="bg-gray-800 border-teal-500 p-8 border-t-8 bg-white mb-6 rounded-lg shadow-lg"
|
||||
>
|
||||
|
||||
{%- if error %}
|
||||
{% import "components/alert.html" as alerts %}
|
||||
{% for e in error %}
|
||||
{{ alerts.warning("Error", e) }}
|
||||
{% endfor %}
|
||||
{% endif -%}
|
||||
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
|
||||
{% import "components/forms.html" as forms %}
|
||||
{{ forms.input({
|
||||
"id": "username", "label": "Username",
|
||||
"placeholder": "Your Username", "autocomplete": "username"
|
||||
}) }}
|
||||
{{ forms.input({
|
||||
"id": "password", "label": "Password",
|
||||
"placeholder": "Your Password", "autocomplete": "current-password"
|
||||
}) }}
|
||||
{{ forms.submit("Sign In") }}
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="text-gray-200 text-sm">
|
||||
Already have an account?
|
||||
<a href="/login" class="no-underline text-blue-500 font-bold">Sign In</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user