Add Django project

This commit is contained in:
Joakim Hellsén 2024-01-30 02:30:43 +01:00
commit a70ccca169
21 changed files with 3691 additions and 1 deletions

54
templates/base.html Normal file
View file

@ -0,0 +1,54 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description"
content="{% block description %}FeedVault - A feed archive{% endblock %}">
<meta name="keywords"
content="{% block keywords %}RSS, Atom, Feed, Archive{% endblock %}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block title %}<title>FeedVault</title>{% endblock %}
<link rel="stylesheet" href="{% static 'style.css' %}">
{% if canonical_url %}<link rel="canonical" href="{{ canonical_url }}">{% endif %}
</head>
<body>
<span class="title">
<h1>FeedVault</h1>
</span>
<small>An archive of <a href="https://en.wikipedia.org/wiki/Web_feed">web feeds</a>. Currently archiving {{ feed_count }} feeds. ~{{ database_size|floatformat:2 }} MB of data.</small>
<nav>
<small>
<div class="leftright">
<div class="left">
<a href="">Feeds</a> | <a href="">About</a> | <a href="">API</a> | <a href="">Stats</a> | <a href="">GitHub</a> | <a href="">Donate</a>
</div>
<div class="right">
<a href="">Login</a>
</div>
</div>
</small>
</nav>
<hr>
{% block content %}<!-- default content -->{% endblock %}
<hr>
<footer>
<small>
<div class="leftright">
<div class="left">
Made by <a href="">Joakim Hellsén</a>.
</div>
<div class="right">No rights reserved.</div>
</div>
<div class="leftright">
<div class="left">
<a href="mailto:hello@feedvault.se">hello@localhost</a>
</div>
<div class="right">
<a href="">Terms of Service</a> | <a href="">Privacy Policy</a>
</div>
</div>
</small>
</footer>
</body>
</html>

60
templates/index.html Normal file
View file

@ -0,0 +1,60 @@
{% extends "base.html" %}
{% block title %}<title>FeedVault</title>{% endblock %}
{% block description %}FeedVault{% endblock %}
{% block keywords %}RSS, Atom, Feed, Archive{% endblock %}
{% block content %}
<h2>Feeds to archive</h2>
<p>
Enter the URLs of the feeds you want to archive below. You can enter as many as you want. The feeds will be added to the archive and you will be able to access them through the website or the API.
</p>
<form action="/add" method="post">
{% csrf_token %}
<textarea id="urls" name="urls" rows="5" cols="50" required></textarea>
<button type="submit">Add feeds</button>
</form>
<br>
<br>
<details>
<summary>What is RSS and Atom?</summary>
<p>
RSS and Atom are two different formats for <a href="https://en.wikipedia.org/wiki/Web_feed">web feeds</a>. They are used to publish frequently updated content such as blog posts, news articles, etc.
</p>
<hr>
</details>
<details>
<summary>Why archive feeds?</summary>
<p>
<h3>Preserving Content History</h3>
<p>
The web is constantly changing. Websites are redesigned, articles are deleted, and content is lost. By archiving feeds, we can preserve the history of the web.
</p>
<h3>Research and Reference</h3>
<p>
Researchers, journalists, or individuals conducting studies may find value in archiving RSS feeds to create a reference library. This can aid in analyzing trends, tracking changes in information, or referencing past data for various purposes.
</p>
<h3>Long-Term Availability</h3>
<p>
Websites and feeds may change or disappear over time due to various reasons. Archiving ensures that users have a reliable and persistent source for accessing content even if the original sources are no longer available.
</p>
<h3>Content Analysis and Statistics</h3>
<p>
Archiving feeds can facilitate content analysis and statistical insights. Users may want to track the frequency of updates, analyze the popularity of certain topics, or gather data for research purposes.
</p>
</p>
<hr>
</details>
<details>
<summary>How does it work?</summary>
<p>
FeedVault uses <a href="https://github.com/kurtmckee/feedparser">feedparser</a> to parse the feeds. The parsed feeds are then stored in a database. The feeds are updated every 30 minutes.
</p>
<hr>
</details>
<details>
<summary>How can I access the archived feeds?</summary>
<p>
You can find feeds by using the search bar at the top of the page. You can also use the <a href="/api">API</a> to access the feeds.
</p>
<hr>
</details>
{% endblock %}