new /texts page lets a user manage their own texts (list +
create form linking to /texts/{id}); /texts/{id} reuses
text.js for the node tree, with a back link to /texts. home
gains a 'My texts' link in the header. the admin texts page
now sources its cross-user list from /api/texts/all.
38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Daily Goals - My Texts</title>
|
|
<link rel="stylesheet" href="/css/app.css">
|
|
</head>
|
|
<body>
|
|
<header class="site-header">
|
|
<div class="site-header-inner">
|
|
<h1>My Texts</h1>
|
|
<div class="cluster">
|
|
<a class="btn btn-secondary" href="/home" id="back">
|
|
Back to Home
|
|
</a>
|
|
<button id="logout" class="btn btn-danger">Logout</button>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<main class="container stack-lg">
|
|
<ul id="texts-list" class="list-cards"></ul>
|
|
<form id="texts-form" action="/api/texts" method="POST"
|
|
class="card stack">
|
|
<label>New text name
|
|
<input id="newTextName" name="name" type="text" />
|
|
</label>
|
|
<div class="cluster cluster-end">
|
|
<button id="submit" class="btn btn-primary" type="submit">
|
|
Add text
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</main>
|
|
<script src="/js/auth.js"></script>
|
|
<script src="/js/userTexts.js"></script>
|
|
</body>
|
|
</html>
|