Templates

This commit is contained in:
Ryan Prather 2024-05-13 21:07:38 -04:00
parent 3374ec2691
commit 4b0d327ab4
10 changed files with 509 additions and 0 deletions

22
templates/base.html.twig Normal file
View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<!--
Editorial by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}
{% endblock %}
</head>
<body class='is-preload' onload='setHeight()' onresize='setHeight()'>
{% block body %}{% endblock %}
{% block javascripts %}
{% block importmap %}{{ importmap('app') }}{% endblock %}
{% endblock %}
</body>
</html>

View File

@ -0,0 +1,125 @@
{% extends 'base.html.twig' %}
{% block title %}Sermon Notes{% endblock %}
{% block stylesheets %}
<link href="/theme/assets/css/main.css" rel="stylesheet" />
<link href='/css/style.css' rel='stylesheet' />
{% endblock %}
{% block javascripts %}
<script src='/js/data.js'></script>
<script src='/js/script.js'></script>
<script src="/theme/assets/js/jquery.min.js"></script>
<script src="/theme/assets/js/browser.min.js"></script>
<script src="/theme/assets/js/breakpoints.min.js"></script>
<script src="/theme/assets/js/util.js"></script>
<script src="/theme/assets/js/main.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.2/markdown-it.min.js" integrity="sha512-ohlWmsCxOu0bph1om5eDL0jm/83eH09fvqLDhiEdiqfDeJbEvz4FSbeY0gLJSVJwQAp0laRhTXbUQG+ZUuifUQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
{% endblock %}
{% block body %}
<div id='wrapper'>
<div id='main'>
<div class='inner' style='padding-left:0;'>
<section class='ref-tab'>
<ul id='ref-list'>
</ul>
</section>
<section class='ref'>
<h2 style='display:inline-block'>Reference</h2>
<div style='display:inline-block'>
<button onclick='increaseFont()'><i class='fa fa-plus'></i></button>&nbsp;
<button onclick='decreaseFont()'><i class='fa fa-minus'></i></button>
</div>
<div id="ref" style='font-size:12pt'></div>
<div id='note-list'>
<table>
<thead>
<tr>
<th>Title</th>
<th>Speaker</th>
<th>Passage</th>
<th>Date</th>
</tr>
</thead>
<tbody>
{% for n in app.user.notes %}
{{ n.toTableRow() | raw }}<br />
{% endfor %}
</tbody>
</table>
</div>
</section>
<section class="notes">
<div id='note-header-left'>
<h2>Notes</h2>
<i id='save-check' class='fa fa-check' style='opacity:0;'></i>
</div>
<div id='note-header-right'>
<select id='template' onchange="retrieveTemplate('template','notes')">
<option value=0>-- Template --</option>
{% for t in app.user.templates %}
<option value="{{ t.id }}">{{ t.name }}</option>
{% endfor %}
</select>&nbsp;
<input type="button" id="previewBtn" class='button' value="Preview" onclick='previewNote()' />&nbsp;
<input type='button' id='show-hide-btn' class='button' value='Show' onclick='toggleFields()' />
</div>
<div id='fields-container'>
<input type="hidden" id="noteId" value="{{ id }}" />
<input type="text" id="noteTitle" placeholder="Title..." />
<input type='date' id='noteDate' onchange='textDirty=true;saved=false;' />
<input type='text' id='newSpeaker' placeholder='Name...' onkeyup='saveSpeaker(event)' style='display:none;' />
<select id="speaker" onchange='newSpeaker()'>
<option value=0>-- Speaker --</option>
<option value='new'>New Speaker</option>
{% for s in app.user.speakers %}
<option value='{{ s.id }}'>{{ s.name }}</option>
{% endfor %}
</select>
<input type='text' id='newSeries' placeholder='Series...' onkeyup='saveSeries(event)' style='display:none;' />
<select id="series" onchange='newSeries()'>
<option value=0>-- Series --</option>
<option value='new'>New Series</option>
{% for s in app.user.series %}
<option value='{{ s.id }}'>{{ s.name }}</option>
{% endfor %}
</select>
<input type='text' id='passage' placeholder='Passage...' onchange='saved=false;textDirty=true;' />
</div>
<textarea id="notes" wrap="hard"></textarea>
<div id='notePreview'></div>
</section>
</div>
</div>
{% include('default/sidebar.html.twig') %}
</div>
<div id="refQuery">
<select id='referenceType' onchange='retrieveBooks()'>
<option>-- Select --</option>
<option value='bible'>Bible</option>
<option value='creed'>Creed</option>
<option value='bc'>Belgic</option>
<option value='hc'>Heidelberg</option>
<option value='cd'>Canons of Dort</option>
<option value='wcf'>Westminster CF</option>
<option value='wsc'>Shorter Catechism</option>
<option value='wlc'>Larger Catechism</option>
</select>
<select id='referenceBook' style='display:none;'>
</select><br/>
<input type="text" id="search" placeholder="Search"><br />
<button id="searchBtn" onclick="queryRef()">Search</button>
</div>
<div id='passage-popup'>
</div>
{% endblock %}

View File

@ -0,0 +1,54 @@
{% extends 'base.html.twig' %}
{% block title %}Sermon Notes{% endblock %}
{% block stylesheets %}
<link href="/theme/assets/css/main.css" rel="stylesheet" />
<link href='/css/style.css' rel='stylesheet' />
{% endblock %}
{% block javascripts %}
<script src="/theme/assets/js/jquery.min.js"></script>
<script src="/theme/assets/js/browser.min.js"></script>
<script src="/theme/assets/js/breakpoints.min.js"></script>
<script src="/theme/assets/js/util.js"></script>
<script src="/theme/assets/js/main.js"></script>
<!-- <script src="https://kit.fontawesome.com/f15a79324f.js" crossorigin="anonymous"></script> -->
{% endblock %}
{% block body %}
<div id='wrapper'>
<div id='main'>
<div class='inner'>
<header id="header">
{% if app.user %}
<a href='/index.php/home' class='logo'>
<img src='/theme/images/vecteezy_notes-icon-in-trendy-flat-style-isolated-on-white_29722382.jpg' style='width:60px;'/>
</a>
{% else %}
<a href="/index.php/" class="logo">
<img src='/theme/images/vecteezy_notes-icon-in-trendy-flat-style-isolated-on-white_29722382.jpg' style='width:60px;'/>
</a>
{% endif %}
</header>
<!-- Banner -->
<section id="banner">
<div class="content">
<header>
<h1>Sermon Notes</h1>
<p>A free note taking app for sermons</p>
</header>
</div>
<span class="image object">
<img src="/theme/images/lined-paper-template-01.png" alt="" />
</span>
</section>
</div>
</div>
{% include('default/sidebar.html.twig') %}
</div>
{% endblock %}

View File

@ -0,0 +1,74 @@
<!-- Sidebar -->
<div id="sidebar">
<div class="inner">
<!-- Search -->
{% if app.user %}
<section id="search" class="alt">
<form method="post" action="#">
<input type="text" name="query" id="query" placeholder="Search" />
</form>
</section>
{% endif %}
<!-- Menu -->
<nav id="menu">
<header class="major">
<h2>Menu</h2>
{% if app.user %}
<h3>Welcome {{ app.user.name }}</h3>
<ul>
<li><a href='/index.php/logout'>Logout</a>
</ul>
{% endif %}
</header>
<ul>
{% if app.user %}
<li><a href='/index.php/home'>Home</a></li>
<li><a href="#" onclick='newNote()'>New Note</a></li>
<li><a href='#' onclick='openNote()'>Open Note</a></li>
<li><a href="#" onclick="saveNote()">Save Note</a></li>
<li><a href='#' onclick='discardNote()'>Delete Note</a></li>
{% if isAdmin %}
<li><a href='/index.php/reference-editor'>Reference Editor</a></li>
{% endif %}
<li><a href='#' onclick="openRef()">Open Reference</a></li>
<li><a href='/index.php/template-editor'>Template Editor</a></li>
{% else %}
<li><a href="/index.php/">Home</a></li>
<li><a href='/index.php/register'>Register</a></li>
<li><a href='/index.php/login'>Login</a></li>
{% endif %}
</ul>
</nav>
{% if app.user %}
<!-- Section -->
<section>
<header class="major">
<h2>Recent Notes</h2>
</header>
<div class="mini-posts">
{% for n in app.user.notes %}
<article>
<a href="#">{{ n.title }}</a>
<p>{{ n.passage }}</p>
</article>
{% endfor %}
</div>
</section>
{% endif %}
<!-- Section -->
<section>
<header class="major">
<h2>Get in touch</h2>
</header>
<ul class="contact">
<li class="icon solid fa-envelope">
<a href="mailto:ryan@rkprather.com">ryan@rkprather.com</a>
</li>
</ul>
</section>
</div>
</div>

View File

@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>
<head>
<title>Reference Editor</title>
</head>
<body>
<select id='references' onchange='retrieveReference(this)'>
<option value=''>-- Select Reference --</option>
<optgroup id='creeds' label='Creeds'>
{% for c in creeds %}
<option type='creed'>{{ c }}</option>
{% endfor %}
</optgroup>
<optgroup id='belgic' label='Belgic Confession'>
{% for c in belgic %}
<option type='bc'>{{ c }}</option>
{% endfor %}
</optgroup>
<optgroup id='heidelberg' label='Heidelberg Catechism'>
{% for c in heidelberg %}
<option type='hc'>{{ c }}</option>
{% endfor %}
</optgroup>
<optgroup id='dort' label='Canons of Dort'>
{% for c in dort %}
<option type='cd'>{{ c }}</option>
{% endfor %}
</optgroup>
<optgroup id='wcf' label='Westminster Confession of Faith'>
{% for c in wcf %}
<option type='wcf'>{{ c }}</option>
{% endfor %}
</optgroup>
<optgroup id='wsc' label='Westminster Short Catechism'>
{% for c in wsc %}
<option type='wsc'>{{ c }}</option>
{% endfor %}
</optgroup>
<optgroup id='wlc' label='Westminster Larger Catechism'>
{% for c in wlc %}
<option type='wlc'>{{ c }}</option>
{% endfor %}
</optgroup>
</select>
<button id='save' name='save' onclick='saveReference()'>Save</button>
<a href='/index.php/home'>Back</a><br />
<textarea id='reference' name='reference' rows=45 cols=100></textarea>
<script src='/js/script.js'></script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Series Editor</title>
</head>
<body>
<select id='series' onchange='retrieveSeries()'>
<option value='0'>-- Series --</option>
{% for s in series %}
<option value='{{ s.id }}'>{{ s.name }}</option>
{% endfor %}
</select>&nbsp;&nbsp;
<input type='text' name='series_name' id='series_name' />&nbsp;&nbsp;
<input type='button' name='save' value='Save' onclick='saveSeries()' />&nbsp;&nbsp;
<a href='/index.php/'>Back</a>
<script src='/js/script.js'></script>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Speaker Editor</title>
</head>
<body>
<select name='speaker_id' id='speaker_id' onchange='retrieveSpeaker()'>
<option value='0'>-- Speaker --</option>
{% for s in speakers %}
<option value='{{ s.id }}'>{{ s.name }}</option>
{% endfor %}
</select>&nbsp;&nbsp;
<input type='text' name='speaker_name' id='speaker_name' />&nbsp;&nbsp;
<input type='button' name='save' value='Save' onclick='saveSpeaker()' />&nbsp;&nbsp;
<a href='/index.php/'>Back</a>
<script src='/js/script.js'></script>
</body>
</html>

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<title>Template Editor</title>
</head>
<body>
<form>
<select id='template_id' name='template_id' onchange="retrieveTemplate('template_id','template_value')">
<option value='0'>-- Templates --</option>
{% for t in app.user.templates %}
<option value='{{ t.id }}'>{{ t.name }}</option>
{% endfor %}
</select>&nbsp;&nbsp;
<input type='text' name='name' id='template_name' />&nbsp;&nbsp;
<input type='button' name='submit' value='Save' onclick='saveTemplate()' />&nbsp;&nbsp;
<a href='/index.php/home'>Back</a>
<br />
<textarea id='template_value' name='template' wrap='hard' cols=100 rows=45></textarea>
</form>
<script src='/js/script.js'></script>
</body>
</html>

View File

@ -0,0 +1,67 @@
{% extends 'base.html.twig' %}
{% block title %}Register{% endblock %}
{% block stylesheets %}
<link href='/theme/assets/css/register.css' rel='stylesheet'/>
<link href="/theme/assets/css/main.css" rel="stylesheet" />
{% endblock %}
{% block javascripts %}
<script src="/theme/assets/js/register.js"></script>
<script src="/theme/assets/js/jquery.min.js"></script>
<script src="/theme/assets/js/browser.min.js"></script>
<script src="/theme/assets/js/breakpoints.min.js"></script>
<script src="/theme/assets/js/util.js"></script>
<script src="/theme/assets/js/main.js"></script>
{% endblock %}
{% block body %}
<div class="container">
{% include('default/sidebar.html.twig') %}
<header>
<h1>Registration</h1>
</header>
{{ form_errors(registrationForm) }}
{{ form_start(registrationForm) }}
{{ form_row(registrationForm.name) }}
{{ form_row(registrationForm.email) }}
{{ form_row(registrationForm.plainPassword, {
label: 'Password'
}) }}
<button type='submit' class='btn'>Register</button>
{{ form_end(registrationForm) }}
<!--
<form action="/index.php/register" method="post" id='registration-form'>
<input type="hidden" name="_csrf_token" id="csrfToken"
value="{{ csrf_token('authenticate') }}"
>
<fieldset>
<legend>Login Information</legend>
<div class="input-container">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
</div>
<div class="input-container">
<label for="emailAddress">Email Address:</label>
<input type="email" id="emailAddress" name="email" required>
</div>
<div class="input-container">
<label for="password">Password:</label>
<input type="password" id="password" name="plainPassword" required>
</div>
<div class="input-container">
<label for="confirmPassword">Confirm Password:</label>
<input type="password" id="confirmPassword" name="confirmPassword" required>
</div>
</fieldset>
<button id='register-btn'>Register</button>
<input type="submit" value="Register" />
</form>-->
</div>
{% endblock %}

View File

@ -0,0 +1,50 @@
{% extends 'base.html.twig' %}
{% block title %}Login{% endblock %}
{% block stylesheets %}
<link href='/theme/assets/css/login.css' rel='stylesheet'/>
<link href="/theme/assets/css/main.css" rel="stylesheet" />
{% endblock %}
{% block javascripts %}
<script src="/theme/assets/js/login.js"></script>
<script src="/theme/assets/js/jquery.min.js"></script>
<script src="/theme/assets/js/browser.min.js"></script>
<script src="/theme/assets/js/breakpoints.min.js"></script>
<script src="/theme/assets/js/util.js"></script>
<script src="/theme/assets/js/main.js"></script>
{% endblock %}
{% block body %}
<div class="container">
{% include('default/sidebar.html.twig') %}
<header>
<h1>Login</h1>
</header>
<form method="post">
{% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
{% if app.user %}
<div class="mb-3">
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
</div>
{% endif %}
<fieldset>
<label for="username">Email:</label>
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control" autocomplete="email" required autofocus>
<label for="password">Password:</label>
<input type="password" name="_password" id="password" class="form-control" autocomplete="current-password" required>
<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}"
>
<button class="btn btn-lg btn-primary" type="submit">Sign in</button>
</fieldset>
</form>
</div>
{% endblock %}