From c7d348b27dc491285774e2c2eec0a679e3cf7b1e Mon Sep 17 00:00:00 2001 From: Evert Date: Thu, 3 Aug 2017 18:49:31 +0300 Subject: [PATCH] some documents --- documents/privacy-policy.html | 21 ++++++ documents/terms-of-service.html | 33 +++++++++ server/routes/index.js | 32 ++++++++- src/style/main.styl | 78 ++++++++++++++++++++- static/image/Discord-Logo-White.svg | 1 + static/image/sign-in-with-twitter-link.png | Bin 2683 -> 0 bytes views/document.pug | 5 ++ views/includes/external.pug | 7 +- views/layout.pug | 15 +++- views/register.pug | 1 + 10 files changed, 185 insertions(+), 8 deletions(-) create mode 100644 documents/privacy-policy.html create mode 100644 documents/terms-of-service.html create mode 100644 static/image/Discord-Logo-White.svg delete mode 100644 static/image/sign-in-with-twitter-link.png create mode 100644 views/document.pug 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 @@ + \ No newline at end of file diff --git a/static/image/sign-in-with-twitter-link.png b/static/image/sign-in-with-twitter-link.png deleted file mode 100644 index 7dd94c76e4cf75b94b9eb74ac40c3084befe5910..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2683 zcmV->3WW8EP)n z+3N1S>pme)MD@;@NJipXNklHegxHA9Y|;?p;A{8yyx5?6`*aev>B@akLnh@XA&hGO z$4RWj^%JXUaMS&q=N|%&Dz7|PTX*{Mqn2q^eU&twB=2)Ljmt3jXSUHJL8 zL?qHM5}A^S#Ev{0@nWnERX-1Y3ku&pG_Y9wuGwskPD)BDIe75k>Dt;_|Gd1sH@mvJ zQUN$w+1c4@y<3^3iWO^MIuC<_`U_wB%ef#!Sq5dHuAwgQL zHZ?3PY8AX#H$Bk}e1b$jsO!H8qU#l>ks-x7SjeED()wD%7W5C2T1Qr*Ei zjYjj>wtISd#`pB}EVgTw3iUFme>~81=nM(1)~;8?o<0VPbc#DmSp?#iV4Kyl$sn0R zSeAXbr`1BN0|uQVz@W(G@;N%4j@-U|yBqCZvSf*D#flZ4w{G2vwApO>($Z3&{{H?9 zi9|90@9PAoBAe1`4x~&Aw(tS_K6Uo6mpKcza*|DZtsIbi1odVU8 zKhLj0Mn*;yf@apNSs&--=3bzzolX0fQ2R3}vz61jXx>J!-5{`io55fR7wFBeBcb(J zmqtT{d^#qfW9ESC(%}K8^Oe)J(XxA%gw?o8T>H#~aYyz*H^j)?39C>+@+Pd*4V;+h zAyC+?R^rK6TAZN~jQ%I)*RNmCfr;B8y$>hGb@l4iMTLchU;6m?`1SSmC3<;zO`}~< zq3r3?r(a4)NH_ybwVR%Zczj9oRH;<@YkcqR?cGX^%(9;w$HcL54m|mE!Sm;NV~))ITvXQ4jfd*dQ=4P>W@L%#MzZ zSM26J>%f)c=G??&u~@7Wd_8>K!i5Wws#29o%`XNtscX#K23XGJF<%oy~Mrix| z`STyZdKu^(&1q?AM$Eae1M2x_hG7sS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BlONWNnx)XTJDNs9Y1{J*6H1(=|LM9@R~YsZxY4 zq}lFdbNSk}YtzAhmSKPfW8yq9aC;H0Teof_#6gvle|#oJ?0zFCo$b>wrlFgTfvGo5 z_JR@rJxE<64fF)=fLC5#Q&Y17uH4BGKMeZ#_!xn5s{!$NvU?}D_eTNEBMD=(+5Vqw pkWu<26rkTv1W+gC$>cu*3;^L$m|Q2jrEUNK002ovPDHLkV1i5RFoFO8 diff --git a/views/document.pug b/views/document.pug new file mode 100644 index 0000000..a0e4d26 --- /dev/null +++ b/views/document.pug @@ -0,0 +1,5 @@ +extends layout.pug + +block body + .document + .content !{doc} diff --git a/views/includes/external.pug b/views/includes/external.pug index a8683f0..a749588 100644 --- a/views/includes/external.pug +++ b/views/includes/external.pug @@ -22,4 +22,9 @@ fb:login-button(scope="public_profile,email", onlogin="checkLoginState();" data-max-rows="1", data-size="large", data-button-type="login_with", data-show-faces="false", data-auto-logout-link="false", data-use-continue-as="false") if twitter_auth a.twitterLogin(href="/api/external/twitter/login") - img(src="/static/image/sign-in-with-twitter-link.png") + i.fa.fa-fw.fa-twitter + span Log in With Twitter + if discord_auth + a.discordLogin(href="/api/external/discord/login") + img(src="/static/image/Discord-Logo-White.svg") + span Log in With Discord diff --git a/views/layout.pug b/views/layout.pug index ac2b0f6..2fea1a1 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -44,6 +44,15 @@ html block body block footer footer - span.copyright © 2017 - Icy Network - Some Rights Reserved - span.copyright Designed by - a(href="https://lunasqu.ee") LunaSquee + img.squeebot(src="/static/image/squeebot.svg") + span.copyright + .logo.small + .part1 Icy + .part2 Network + br + span © 2017 - Icy Network - Some Rights Reserved + br + span + a(href="/docs/terms-of-service") Terms of Service + span.divider | + a(href="/docs/privacy-policy") Privacy Policy diff --git a/views/register.pug b/views/register.pug index a16eede..175a216 100644 --- a/views/register.pug +++ b/views/register.pug @@ -31,3 +31,4 @@ block body a#create(href="/login") Log in with an existing account .right h3 More options + include includes/external.pug