diff --git a/documents/privacy-policy.html b/documents/privacy-policy.html
new file mode 100644
index 0000000..4f70628
--- /dev/null
+++ b/documents/privacy-policy.html
@@ -0,0 +1,21 @@
+
+
Privacy Policy
+
By using Services of Icy Network, you acknowledge and agree to these policies.
+
Information We Collect and Use
+
Icy Network may collect and save some information about our users.
+
Basic Account Information
+
Icy Network uses your username to identify you in our system. Please only enter Usernames which you are comfortable with other people seeing.
+
Your email addess is used to send you updates and important information about our Services and the status of your account. You may unsubscribe from update emails at any time. We will never provide, sell, or leak your email address to Third-Party sites nor send you malicious or spam emails. Please always verify that the sender is an IcyNet.eu email address before clicking on any links on emails claiming to be from us. We will never ask you for your personal information or passwords via email.
+
Additional Information
+
We use your IP Address to track our visitor traffic in order for us to better allocate resources to the Services which are used the most. Your IP address is not available publicly and is only used internally within our systems.
+
Cookies
+
Like many websites, we use Cookies in our Services. A Cookie is a small file saved onto your computer by your web browser which contains a bit of information about your presence on Icy Network websites. Icy Network uses temporary session cookies in order to save log-in sessions, which means that you won't have to log in every time you visit our website.
+
External Logins
+
By logging in from external websites, you agree to these Policies.
+
Twitter
+
By logging in with Twitter, we will only ask you for your Screen Name, Public Profile Name and Email Address for the above-mentioned purposes. We will never Tweet on your behalf nor see your Tweets.
+
Facebook
+
By logging in with Facebook, we will only ask you for your Public Profile and Email Address. We will use your Name as your Display Name, which can be changed from your Account Settings after logging in. Your profile picture may be downloaded onto our servers and used as your network-wide profile image. You may change your profile picture from your Account Settings at any time. Your Email Address will only be used to send you updates, which you can opt-out of. We can not and will not post on your behalf.
+
Discord
+
By logging in with Discord, we will only ask you for your Username and Email Address for the above-mentioned purposes. We do not ask you for any other information and we will not know which Discord Servers you're on.
+
diff --git a/documents/terms-of-service.html b/documents/terms-of-service.html
new file mode 100644
index 0000000..574f6b1
--- /dev/null
+++ b/documents/terms-of-service.html
@@ -0,0 +1,33 @@
+
+
Terms of Service
+
Please read the following Terms and Conditions carefully. By using Icy Network services, you signify that you have read, understood and agreed to be bound by these Terms and Conditions. Icy Network reserves the right to modify, replace or remove any of the Terms and Conditions written in this document at any given time without restrictions. We will try to notify you of any such amendments. If you do not agree to these Terms and Conditions, you may not use any of the services provided by Icy Network.
+
Separate entities owned by Icy Network may have their own Terms and Conditions which you must read and comply with.
+
Who May Use the Services
+
You may use our Services only if you have not been previously unauthorized of doing so and that you are above the legal age of 13. Our Services may contain inappropriate language or images not suitable for minors.
+
Privacy
+
Icy Network requires you to sign up for an account or log in using another external website. Please read our Privacy Policies before entering any information into our Services to understand what information we may collect and what it's used for.
+
Content on the Services
+
You are responsible for your use of the Services and the Content you provide to our Services, including complicance with laws, rules and regulations. You should only provide Content you are comfortable sharing with others.
+
Icy Network is not responsible for any Content provided by our Users which may appear as offensive or otherwise inappropriate. Icy Network reserves the right to remove any inappropriate Content provided by our Users at will.
+
Third-Party Content
+
Icy Network websites may contain Logos or Images not owned by Icy Network. Any Third-Party Content not owned by Icy Network, but is provided on any Icy Network website, is the property of their respective owners.
+
Credits
+
Google Play and the Google Play logo are trademarks of Google Inc.
+
Apple and the Apple logo are trademarks of Apple Inc., registered in the U.S. and other countries. App Store is a service mark of Apple Inc., registered in the U.S. and other countries.
+
Icy Network Software License
+
Icy Network Primary Web Application - Authentication and News
+Copyright (C) 2017 Icy Network - Evert Prants <evert@lunasqu.ee>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <
http://www.gnu.org/licenses/>.
+
diff --git a/server/routes/index.js b/server/routes/index.js
index 6d8bceb..34fb300 100644
--- a/server/routes/index.js
+++ b/server/routes/index.js
@@ -1,3 +1,5 @@
+import fs from 'fs'
+import path from 'path'
import express from 'express'
import parseurl from 'parseurl'
import config from '../../scripts/load-config'
@@ -44,6 +46,10 @@ router.get('/login', wrap(async (req, res) => {
res.locals.twitter_auth = true
}
+ if (config.discord && config.discord.api) {
+ res.locals.discord_auth = true
+ }
+
if (config.facebook && config.facebook.client) {
res.locals.facebook_auth = config.facebook.client
}
@@ -66,6 +72,10 @@ router.get('/register', wrap(async (req, res) => {
res.locals.twitter_auth = true
}
+ if (config.discord && config.discord.api) {
+ res.locals.discord_auth = true
+ }
+
if (config.facebook && config.facebook.client) {
res.locals.facebook_auth = config.facebook.client
}
@@ -103,10 +113,10 @@ router.get('/login/verify', wrap(async (req, res) => {
=================
*/
-function formError (req, res, error, path) {
+function formError (req, res, error, redirect) {
req.flash('formkeep', req.body || {})
req.flash('message', {error: true, text: error})
- res.redirect(path || parseurl(req).path)
+ res.redirect(redirect || parseurl(req).path)
}
router.post('/user/two-factor', wrap(async (req, res) => {
@@ -295,6 +305,24 @@ router.post('/register', wrap(async (req, res) => {
res.redirect('/login')
}))
+/*
+ =============
+ DOCUMENTS
+ =============
+*/
+
+const docsDir = path.join(__dirname, '../../documents')
+router.get('/docs/:name', wrap(async (req, res) => {
+ let doc = path.join(docsDir, req.params.name + '.html')
+ if (!fs.existsSync(docsDir) || !fs.existsSync(doc)) {
+ return res.status(404).end()
+ }
+
+ doc = fs.readFileSync(doc, {encoding: 'utf8'})
+
+ res.render('document', {doc: doc})
+}))
+
/*
=========
OTHER
diff --git a/src/style/main.styl b/src/style/main.styl
index e7aff6b..f7086b8 100644
--- a/src/style/main.styl
+++ b/src/style/main.styl
@@ -8,6 +8,12 @@ body
height: 100vh;
background-size: 50px 50px;
+a
+ color: green
+ text-decoration: none
+ &:hover
+ text-decoration: underline
+
.logo
font-size: 8vw
font-family: "Open Sans"
@@ -89,14 +95,41 @@ section
footer
padding: 20px
- background-color: #fff
+ background: #e9f6fd
+ background: -moz-linear-gradient(top, #e9f6fd 0%, #d3eefb 100%)
+ background: -webkit-linear-gradient(top, #e9f6fd 0%,#d3eefb 100%)
+ background: linear-gradient(to bottom, #e9f6fd 0%,#d3eefb 100%)
+ border-top: 1px solid #ddd
+ text-align: center
.copyright
- display: block
+ display: inline-block
text-align: center
+ font-size: 90%
+ vertical-align: top
+ margin-top: 50px
+ padding: 15px
+ margin-left: 5vw
+ .squeebot
+ width: 200px
+
.wrapper
overflow: hidden
height: 100vh
+.document
+ overflow: hidden
+ min-height: 100vh;
+ padding: 50px;
+ background-color: #fff;
+
+.tos
+ display: inline-block
+ width: 60%
+ font-size: 120%
+
+code
+ white-space: pre
+
label
display: block
margin-top: 20px
@@ -157,6 +190,39 @@ input[type="submit"]
background-color: #fff
border: 1px solid #ddd
border-radius: 5px
+ text-decoration: none
+ i
+ color: #03A9F4;
+ font-size: 22px;
+ span
+ color: #000;
+ display: inline-block;
+ vertical-align: top;
+ margin-top: 3px;
+ margin-left: 12px;
+
+.discordLogin
+ background-color: #99AAB5;
+ width: 225px;
+ height: 40px;
+ padding: 5px 5px;
+ display: inline-block;
+ border-radius: 5px;
+ text-decoration: none
+ span
+ color: white
+ vertical-align: top
+ margin-top: 11px
+ margin-left: 3px
+ display: inline-block
+ img
+ width: 45px
+ display: inline-block
+
+span.divider
+ color: #ddd
+ margin: 0 5px
+ cursor: default
@media all and (max-width: 800px)
.navigator
@@ -171,6 +237,14 @@ input[type="submit"]
display: inline-block !important
.logo
font-size: 10vw
+ footer
+ .squeebot
+ margin: 0
+ width: 150px
+ margin: auto
+ display: block
+ .copyright
+ margin-left: 0
@media all and (max-width: 500px)
.logo.small
diff --git a/static/image/Discord-Logo-White.svg b/static/image/Discord-Logo-White.svg
new file mode 100644
index 0000000..4613aa9
--- /dev/null
+++ b/static/image/Discord-Logo-White.svg
@@ -0,0 +1 @@
+