WIP on add/edit feed page (#4)
This commit is contained in:
35
src/public/assets/style.css
Normal file
35
src/public/assets/style.css
Normal file
@@ -0,0 +1,35 @@
|
||||
html {
|
||||
min-height: 100vh;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
header {
|
||||
padding: 0 1rem .5rem 1rem;
|
||||
background: linear-gradient(#000064, #000048, #000032);
|
||||
border-bottom-left-radius: .5rem;
|
||||
border-bottom-right-radius: .5rem;
|
||||
color: white;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
|
||||
.title {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
a:link, a:visited {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
main {
|
||||
padding: 0 .5rem;
|
||||
}
|
||||
30
src/public/feed.php
Normal file
30
src/public/feed.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Add/Edit Feed Page
|
||||
*
|
||||
* Allows users to add or edit RSS feeds
|
||||
*/
|
||||
|
||||
include '../start.php';
|
||||
|
||||
Security::verifyUser();
|
||||
page_head('Feed page');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
// TODO: get feed, add if new, reject if existing but not owned by this user, update otherwise
|
||||
$feed = array();
|
||||
} else {
|
||||
// TODO: Retrieve feed by ID if not new
|
||||
$feed = [ 'id' => $_GET['id'], 'url' => '' ];
|
||||
}
|
||||
?>
|
||||
<h1>Add/Edit Feed</h1>
|
||||
<form method=POST action=/feed hx-post=/feed>
|
||||
<input type=hidden name=id value="<?=$feed['id']?>">
|
||||
<label>
|
||||
Feed URL
|
||||
<input type=url name=url required autofocus value="<?=$feed['url']?>">
|
||||
</label>
|
||||
</form>
|
||||
<?php
|
||||
page_foot();
|
||||
@@ -1,10 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Home Page
|
||||
*
|
||||
* Displays a list of unread feed items for the current user
|
||||
*/
|
||||
|
||||
include '../start.php';
|
||||
|
||||
Security::verifyUser();
|
||||
|
||||
page_head('Welcome');
|
||||
?>
|
||||
<p>User ID <?=$_REQUEST['FRC_USER_ID']?> - e-mail <?=$_REQUEST['FRC_USER_EMAIL']?></p>
|
||||
|
||||
<?php
|
||||
page_foot();
|
||||
|
||||
Reference in New Issue
Block a user