Read HTML from a file instead of .tmpl
This commit is contained in:
parent
f2f1a08687
commit
c185d463e6
18 changed files with 369 additions and 591 deletions
|
|
@ -1,17 +0,0 @@
|
|||
{{ define "content" }}
|
||||
<span style="text-align: center;">
|
||||
<h2>404 - Page not found</h2>
|
||||
<p>Sorry, the page you are looking for does not exist.</p>
|
||||
</span>
|
||||
<p>
|
||||
Extra information:
|
||||
<ul>
|
||||
<li>Host: {{ .Request.Host }}</li>
|
||||
<li>Method: {{ .Request.Method }}</li>
|
||||
<li>Proto: {{ .Request.Proto }}</li>
|
||||
<li>RemoteAddr: {{ .Request.RemoteAddr }}</li>
|
||||
<li>RequestURI: {{ .Request.RequestURI }}</li>
|
||||
<li>URL: {{ .Request.URL }}</li>
|
||||
<li>UserAgent: {{ .Request.UserAgent }}</li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{{ define "content" }}
|
||||
<span style="text-align: center;">
|
||||
<h2>405 - Method Not Allowed</h2>
|
||||
<p>The method ({{ .Request.Method }}) is not allowed for the requested URL.</p>
|
||||
</span>
|
||||
|
||||
<p>
|
||||
Extra information:
|
||||
<ul>
|
||||
<li>Host: {{ .Request.Host }}</li>
|
||||
<li>Method: {{ .Request.Method }}</li>
|
||||
<li>Proto: {{ .Request.Proto }}</li>
|
||||
<li>RemoteAddr: {{ .Request.RemoteAddr }}</li>
|
||||
<li>RequestURI: {{ .Request.RequestURI }}</li>
|
||||
<li>URL: {{ .Request.URL }}</li>
|
||||
<li>UserAgent: {{ .Request.UserAgent }}</li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{{ define "content" }}
|
||||
<h2>API documentation</h2>
|
||||
<p>Here be dragons.</p>
|
||||
{{ end }}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
{{ define "base" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{{ if .Description }}<meta name="description" content="{{ .Description }}">{{ end }}
|
||||
{{ if .Keywords }}<meta name="keywords" content="{{ .Keywords }}">{{ end }}
|
||||
{{ if .Author }}<meta name="author" content="{{ .Author }}">{{ end }}
|
||||
{{ if .CanonicalURL }}<link rel="canonical" href="{{ .CanonicalURL }}">{{ end }}
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
{{ if .ParseErrors }}
|
||||
<h2>Results</h2>
|
||||
<ul>
|
||||
{{ range .ParseErrors }}
|
||||
<li class="{{ if .IsError }}error{{ else }}success{{ end }}"><a href="{{ .FeedURL }}">{{ .FeedURL }}</a> - {{ .Msg }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
|
||||
<span class="title">
|
||||
<h1>
|
||||
<a href="/">FeedVault</a>
|
||||
</h1>
|
||||
</span>
|
||||
<div class="leftright">
|
||||
<div class="left">
|
||||
<small>Archive of <a href="https://en.wikipedia.org/wiki/Web_feed">web feeds</a>. {{ .FeedCount }} feeds. ~{{ .DatabaseSize }}</small>
|
||||
</div>
|
||||
<div class="right">
|
||||
<!-- Search -->
|
||||
<form action="#" method="get">
|
||||
<input type="text" name="q" placeholder="Search">
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<nav>
|
||||
<small>
|
||||
<div class="leftright">
|
||||
<div class="left">
|
||||
<a href="/feeds">Feeds</a> | <a href="/api">API</a> | <a href="https://github.com/TheLovinator1/FeedVault">GitHub</a> | <a href="/donate">Donate</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="">Register</a> | <a href="">Login</a>
|
||||
</div>
|
||||
</div>
|
||||
</small>
|
||||
</nav>
|
||||
<hr>
|
||||
{{ block "content" . }}{{ end }}
|
||||
<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@feedvault.se</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="/terms">Terms of Service</a> | <a href="/privacy">Privacy Policy</a>
|
||||
</div>
|
||||
</div>
|
||||
</small>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
{{ define "content" }}
|
||||
<h2>Donate</h2>
|
||||
<p>
|
||||
tl;dr: <a href="https://github.com/sponsors/TheLovinator1">GitHub Sponsors</a>
|
||||
</p>
|
||||
<p>
|
||||
FeedVault is a free service, and will always be free. However, if you wish to support the project, you can do so by donating to the developer.
|
||||
</p>
|
||||
<h3>What will the money be used for?</h3>
|
||||
<p>
|
||||
The money will be used to pay for the server costs, domain name, and other expenses related to running the service.
|
||||
</p>
|
||||
<h3>How much does it cost to run FeedVault?</h3>
|
||||
<p>Domain name: 12 € / 13 $ / 10 £ per year</p>
|
||||
<h3>How can I donate?</h3>
|
||||
<p>
|
||||
The preferred method of donating is through <a href="https://github.com/sponsors/TheLovinator1">GitHub Sponsors</a> due to no fees being taken. However, you can also donate through <a href="https://www.paypal.com/donate/?hosted_button_id=9EU45BXAEUGFC">PayPal</a>.
|
||||
</p>
|
||||
<h3>Crypto</h3>
|
||||
<p>
|
||||
You can also donate through cryptocurrency. The addresses are listed below. If you wish to donate through a cryptocurrency not listed below, please <a href="mailto:hello@feedvault.se">contact me</a>.
|
||||
</p>
|
||||
<h4>Bitcoin</h4>
|
||||
<p>
|
||||
<a href="bitcoin:bc1qdgm09zzxllzh4m2edyyx7khwhw5mjrwe0d2dws?message=FeedVault">bc1qdgm09zzxllzh4m2edyyx7khwhw5mjrwe0d2dws</a>
|
||||
</p>
|
||||
<h4>Monero</h4>
|
||||
<p>
|
||||
<a href="monero:83Hft9zJKPNgMrLAZQ7hhTBeJ6v9bJFJ7P7xfWLRDCiyg4QDwstnjc79Fdn5Y8uY5Hfddj52ok9JF8uisU9UXDJjT4Msevx">83Hft9zJKPNgMrLAZQ7hhTBeJ6v9bJFJ7P7xfWLRDCiyg4QDwstnjc79Fdn5Y8uY5Hfddj52ok9JF8uisU9UXDJjT4Msevx</a>
|
||||
</p>
|
||||
<h3>Thank you!</h3>
|
||||
<p>Thank you for supporting FeedVault!</p>
|
||||
{{ end }}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{{ define "content" }}
|
||||
Feeds
|
||||
{{ end }}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
{{ define "content" }}
|
||||
<h2>Feeds to archive</h2>
|
||||
<p>
|
||||
Input the URLs of the feeds you wish to archive below. You can add as many as needed, and access them through the website or API. Alternatively, include links to .opml files, and the feeds within will be archived.
|
||||
</p>
|
||||
<form action="/add" method="post">
|
||||
<textarea id="urls" name="urls" rows="5" cols="50" required></textarea>
|
||||
<button type="submit">Add feeds</button>
|
||||
</form>
|
||||
<br>
|
||||
<p>You can also upload .opml files containing the feeds you wish to archive:</p>
|
||||
<form enctype="multipart/form-data" method="post" action="/upload_opml">
|
||||
<input type="file" name="file" id="file" accept=".opml" required>
|
||||
<button type="submit">Upload OPML</button>
|
||||
</form>
|
||||
|
||||
<h2>FAQ</h2>
|
||||
<details>
|
||||
<summary>What are web feeds?</summary>
|
||||
<p>
|
||||
Web feeds are a way to distribute content on the web. They allow users to access updates from websites without having to visit them directly. Feeds are typically used for news websites, blogs, and other sites that frequently update content.
|
||||
<br>
|
||||
You can read more about web feeds on <a href="https://en.wikipedia.org/wiki/Web_feed">Wikipedia</a>.
|
||||
</p>
|
||||
<hr>
|
||||
</details>
|
||||
<details>
|
||||
<summary>What is FeedVault?</summary>
|
||||
<p>
|
||||
FeedVault is a service that archives web feeds. It allows users to access and search for historical content from various websites. The service is designed to preserve the history of the web and provide a reliable source for accessing content that may no longer be available on the original websites.
|
||||
</p>
|
||||
<hr>
|
||||
</details>
|
||||
<details>
|
||||
<summary>Why archive feeds?</summary>
|
||||
<p>
|
||||
Web feeds are a valuable source of information, and archiving them ensures that the content is preserved for future reference. By archiving feeds, we can ensure that historical content is available for research, analysis, and other purposes. Additionally, archiving feeds can help prevent the loss of valuable information due to website changes, outages, or other issues.
|
||||
</p>
|
||||
<hr>
|
||||
</details>
|
||||
<details>
|
||||
<summary>How does it work?</summary>
|
||||
<p>
|
||||
FeedVault is written in Go and uses the <a href="https://github.com/mmcdole/gofeed">gofeed</a> library to parse feeds. The service periodically checks for new content in the feeds and stores it in a database. Users can access the archived feeds through the website or API.
|
||||
<hr>
|
||||
</details>
|
||||
<details>
|
||||
<summary>How can I access the archived feeds?</summary>
|
||||
<p>
|
||||
You can access the archived feeds through the website or API. The website provides a user interface for searching and browsing the feeds, while the API allows you to access the feeds programmatically. You can also download the feeds in various formats, such as JSON, XML, or RSS.
|
||||
</p>
|
||||
</details>
|
||||
{{ end }}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
{{ define "content" }}
|
||||
<article>
|
||||
<header>
|
||||
<h1>Privacy Policy</h1>
|
||||
</header>
|
||||
<p>
|
||||
Last Updated:
|
||||
<time datetime="2024-02-04">
|
||||
February 4, 2024
|
||||
</time>
|
||||
</p>
|
||||
<section>
|
||||
<h2>Information Collection</h2>
|
||||
<p>We gather the following data:</p>
|
||||
<ul>
|
||||
<li><strong>Log Files:</strong> These files contain details about your IP address, browser, and operating system.</li>
|
||||
<ul>
|
||||
<li>This information is collected for debugging purposes and to enhance website performance.</li>
|
||||
<li>Log files are automatically removed after a specific timeframe.</li>
|
||||
<li>They are not linked to any personal information, shared with third parties, or used for marketing purposes.</li>
|
||||
<li>Furthermore, log files are not utilized to track your activity on other websites.</li>
|
||||
</ul>
|
||||
<li><strong>Cloudflare:</strong> We use Cloudflare to secure and optimize our website.</li>
|
||||
<ul>
|
||||
<li>Cloudflare may collect your IP address, cookies, and other data.</li>
|
||||
<li>For more information, please review Cloudflare's <a href="https://www.cloudflare.com/privacypolicy/">privacy policy</a>.</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h2>User Rights</h2>
|
||||
<p>
|
||||
You have the right to access, correct, or delete your information. Any privacy-related inquiries can be directed to us using the contact information provided at the end of this document.
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Changes to the Privacy Policy</h2>
|
||||
<p>
|
||||
This privacy policy may be revised. You can review the revision history of this document on our GitHub repository <a href="https://github.com/TheLovinator1/FeedVault/blob/master/templates/privacy.tmpl">here</a>.
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Contact Information</h2>
|
||||
<p>
|
||||
For privacy concerns or questions, you can reach us via email at <a href="mailto:hello@feedvault.se">hello@feedvault.se</a> or by creating an issue on our <a href="https://github.com/TheLovinator1/FeedVault/issues">GitHub repository</a>.
|
||||
</p>
|
||||
<p>Cloudflare's contact information can be found <a href="https://www.cloudflare.com/privacypolicy/">here</a>.</p>
|
||||
</section>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
{{ define "content" }}
|
||||
<article>
|
||||
<header>
|
||||
<h1>Terms of Service</h1>
|
||||
</header>
|
||||
<p>
|
||||
Last Updated:
|
||||
<time datetime="2024-02-04">
|
||||
February 4, 2024
|
||||
</time>
|
||||
</p>
|
||||
<section>
|
||||
<h2>Content Policy</h2>
|
||||
<p>
|
||||
Users are prohibited from uploading any content that is illegal under Swedish law. Any such content found on our platform will be removed. If this happens repeatedly, the user will be banned from using our platform.
|
||||
<br>
|
||||
<br>
|
||||
You can report any content that you believe violates our content policy by sending an email to <a href="mailto:hello@feedvault.se">hello@feedvault.se</a>. Please include the URL of the content in question and a brief description of why you believe it violates our content policy.
|
||||
</p>
|
||||
<h2>Copyright Policy</h2>
|
||||
<p>
|
||||
We will remove URLs that are used to share copyrightable information without the necessary permissions or licenses.
|
||||
</p>
|
||||
<h2>Web Scraping</h2>
|
||||
<p>
|
||||
Web scraping is permitted on our platform. We currently do not impose a rate limit on requests.
|
||||
</p>
|
||||
<h2>API Usage</h2>
|
||||
<p>
|
||||
Our API is free to use. We do not impose any rate limits on requests.
|
||||
</p>
|
||||
</section>
|
||||
</article>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue