change copy, add about page

This commit is contained in:
Ondrej Synacek 2019-10-23 22:29:01 +02:00
parent 889de553f9
commit 610ad61097
4 changed files with 65 additions and 6 deletions

View File

@ -44,6 +44,10 @@ app.get('/error', (req, res) => {
.render('error', { error })
})
app.get('/about', (req, res) => {
res.render('about')
})
// NOTE: Capture all unkown URLs
app.get('*', (req, res) => {
res.status(400).render('404')

View File

@ -1,4 +1,4 @@
// Worker v3
// Worker v4
self.addEventListener('install', (event) => {
event.waitUntil(
@ -8,6 +8,7 @@ self.addEventListener('install', (event) => {
'/favicon.ico',
'/scripts.js?3',
'/style.css?3',
'/about?1',
])
})
)

54
lib/views/about.ejs Normal file
View File

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="/style.css?3">
<link rel="manifest" href="/manifest.json">
<link rel="apple-touch-icon" sizes="180x180" href="/icon-180.png">
<title>Facebook Events to iCal Converter | about</title>
</head>
<body>
<h2>About the project</h2>
<p>
Not too long ago I deactivated my Facebook account. While I do not miss the social network very much, plenty of local events are only announced on Facebook.
</p>
<p>
To my surprise, I found out that the company discontinued the ability to expor events to <em>iCal</em> files. This app aims at enabling you to do just that. <strong>It only works with public events</strong>. Unfortunately I haven't had the time to enable you to export your own events (but it's definitely possible).
</p>
<h3>How it works?</h3>
<p>
The backend service <strong>does not use Facebook API</strong> which means that I'm basically scraping the page source. This means:
<ul>
<li>You might not get consistent results</li>
<li>The data retrieved might not be correct</li>
<li>The service might get blocked due to traffic</li>
</ul>
</p>
<h3>Works offline</h3>
<p>
The site is actually <em>Progressive Web App</em> which means it can run offline. You still need connection to download <em>*.ics</em> files but you'll be able to see list of already downloaded files. The use case for this is to have a place where you might want to store the events separately (you might not want to put them to your calendar). The downloaded data is local-only which means it does not sync in any way. I do not plan on adding user accounts as I want to keep the app very simple.
</p>
<h3>No JavaScript</h3>
<p>
This is not a feature really, just a stupid switch because I wanted to see how the app would behave without JS. I just left it there because why not ;)
</p>
<h3>Bugs & Features</h3>
<p>
If you want to let me know about any problems or improvements, you can contact me via my website, or even better create an issue on Github (link are on the main page in the footer).
</p>
<a href="/">Go back</a>
</body>
</html>

View File

@ -17,10 +17,9 @@
<article id="main">
<p>
Insert Facebook event URL into the form. When you submit it
you will get <a href="https://en.wikipedia.org/wiki/ICalendar"><code>ics</code></a>
file that you can import
into your calendar.
Insert Facebook event URL / event number into the form.
When you submit it you will get <a href="https://en.wikipedia.org/wiki/ICalendar"><code>ics</code></a>
file that you can import into your calendar. <strong>Only public events are supported.</strong>
</p>
<form action='/download' method='POST' id="form">
@ -75,7 +74,8 @@
<footer>
Created by <a href="https://ondrejsynacek.com">Ondrej Synacek</a> ◆
<a href="#" title="Source code coming soon">Source</a>
<a href="#" title="Source code coming soon">Source</a> ◆
<a href="/about" target="_blank" title="About the project">About</about>
</footer>
<script src="/scripts.js?3"></script>