Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit 3a0f5af

Browse files
Merge branch 'master' into Legal
2 parents 572c7fc + a3c30d0 commit 3a0f5af

File tree

16 files changed

+2408
-55
lines changed

16 files changed

+2408
-55
lines changed

LICENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Dewilde Alexandre, Dubois Brieuc and Technicguy Theo
3+
Copyright (c) 2020 Dewilde Alexandre, Dubois Brieuc and Fischer Nicolas
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

imgs/codeTogether.png

14.7 KB
Loading

imgs/codewe.png

53.6 KB
Loading

imgs/ex.gif

8.87 MB
Loading

package-lock.json

Lines changed: 2229 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "codewe",
3+
"version": "1.0.0",
4+
"description": "CodeWe is an open-source live code-sharing website developed in python with flask.",
5+
"main": "server.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/allEyezOnCode/CodeWe.git"
12+
},
13+
"author": "",
14+
"license": "MIT",
15+
"bugs": {
16+
"url": "https://github.com/allEyezOnCode/CodeWe/issues"
17+
},
18+
"homepage": "https://github.com/allEyezOnCode/CodeWe#readme",
19+
"dependencies": {
20+
"compression": "^1.7.4",
21+
"debug": "^4.2.0",
22+
"express": "^4.17.1",
23+
"express-force-https": "^1.0.0",
24+
"express-minify": "^1.0.0",
25+
"express-prom-bundle": "^6.2.0",
26+
"less": "^3.12.2",
27+
"mongodb": "^3.6.3",
28+
"morgan": "^1.10.0",
29+
"mysql": "^2.18.1",
30+
"nunjucks": "^3.2.2",
31+
"prom-client": "^12.0.0",
32+
"prometheus-api-metrics": "^3.1.0",
33+
"webhook-discord": "^3.7.7",
34+
"ws": "^7.4.0"
35+
},
36+
"devDependencies": {
37+
"webpack": "^5.4.0",
38+
"webpack-cli": "^4.2.0"
39+
}
40+
}

src/publics/css/legal.less

Lines changed: 68 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,70 @@
11
section{
2-
width: 50%;
3-
min-width: 700px;
4-
margin: auto;
5-
color: rgb(193, 187, 177);
6-
line-height: 1.7;
7-
word-wrap: break-word;
8-
text-align: justify;
9-
font-family: helvetica neue,Helvetica,Arial,sans-serif;
10-
font-size: 1.125rem;
11-
12-
h1{
13-
font-size: 2.125rem;
14-
margin-top: 25px;
15-
line-height: 1.4;
16-
}
17-
18-
p{
19-
font-size: 1rem;
20-
margin-bottom: 10px;
21-
}
22-
23-
a{
24-
color: inherit;
25-
text-decoration: none;
26-
transition: color ease-in-out 0.2s;
27-
}
28-
29-
a:hover{
30-
color: #ddd;
31-
}
32-
33-
ul{
34-
margin-left: 20px;
35-
}
2+
width: 50%;
3+
min-width: 700px;
4+
margin: auto;
5+
color: rgb(193, 187, 177);
6+
line-height: 1.7;
7+
word-wrap: break-word;
8+
text-align: justify;
9+
font-family: helvetica neue, Helvetica, Arial, sans-serif;
10+
font-size: 1.125rem;
11+
12+
h1{
13+
font-size: 2.125rem;
14+
margin-top: 25px;
15+
line-height: 1.4;
16+
}
17+
18+
p{
19+
font-size: 1rem;
20+
margin-bottom: 10px;
21+
}
22+
23+
a{
24+
color: inherit;
25+
text-decoration: none;
26+
transition: color ease-in-out 0.2s;
27+
}
28+
29+
a:hover{
30+
color: #ddd;
31+
}
32+
33+
ul{
34+
margin-left: 20px;
35+
}
36+
}
37+
38+
39+
table {
40+
width: 100%
41+
}
42+
43+
td.align-right {
44+
text-align: right;
45+
}
46+
47+
#not-valid {
48+
width: 100%;
49+
background-color: red;
50+
text-align: center;
51+
font-size: 38px;
52+
color: white;
53+
}
54+
#redirect {
55+
width: 100%;
56+
background-color: darkred;
57+
text-align: center;
58+
font-size: 18px;
59+
color: white;
60+
}
61+
62+
#redirect:hover {
63+
background-color: maroon;
64+
transition: 0.2s ease-in-out;
65+
}
66+
67+
div.revision {
68+
border: 1px darkcyan solid;
69+
padding: 5px;
3670
}

src/routes/legal.js

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @date 16/11/2020
66
* @version 1.0.0
77
* @requires express
8-
*
8+
*
99
*/
1010

1111
/**
@@ -22,14 +22,33 @@ const config = require('../config/config');
2222
const router = express.Router();
2323

2424
/**
25-
* Route serving termsofservice
25+
* Route serving termsofservice
26+
* @name get/termsofservice
27+
* @function
28+
* @memberof modules:routes/legal
29+
* @inner
30+
*/
31+
router.get(['/tos', '/tac', '/termsofservice', '/terms-of-service'], (req, res) => {
32+
res.render('legal/tos.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
33+
});
34+
35+
/**
36+
* Route serving termsofservice archive
2637
* @name get/termsofservice
2738
* @function
2839
* @memberof modules:routes/legal
2940
* @inner
3041
*/
31-
router.get(['/tos', '/tac', '/termsofservice', '/terms-of-service'], (req, res) => {
32-
res.render('legal/tos.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
42+
router.get([
43+
'/tos/archive/:date',
44+
'/tac/archive/:date',
45+
'/termsofservice/archive/:date',
46+
'/terms-of-service/archive/:date'
47+
], (req, res) => {
48+
res.render(`legal/archive/tos-${req.params.date}.html`, {
49+
production: config.PRODUCTION,
50+
client_versobe: config.CLIENT_VERBOSE
51+
});
3352
});
3453

3554
/**
@@ -43,6 +62,17 @@ router.get(['/privacy', '/privacy-policy', '/privacypolicy'], (req, res) => {
4362
res.render('legal/privacy.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
4463
});
4564

65+
/**
66+
* Route serving privacy policy archive
67+
* @name get/privacy
68+
* @function
69+
* @memberof modules:routes/legal
70+
* @inner
71+
*/
72+
router.get(['/privacy/archive/:date', '/privacy-policy/archive/:date', '/privacypolicy/archive/:date'], (req, res) => {
73+
res.render(`legal/archive/privacy-${req.params.date}.html`, {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
74+
});
75+
4676
/**
4777
* Route serving licence
4878
* @name get/licence
@@ -54,4 +84,4 @@ router.get('/license', (req, res) => {
5484
res.render('legal/licence.html', {production: config.PRODUCTION, client_versobe: config.CLIENT_VERBOSE});
5585
});
5686

57-
module.exports = router;
87+
module.exports = router;

src/views/legal/archive/privacy-20201117.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
{% block title %}CodeWe{% endblock %}
44

55
{% block head %}
6-
<link rel="stylesheet" type="text/css" href="/css/legal.less">
6+
<link rel="stylesheet" type="text/css" href="/css/legal.less">
77
{% endblock %}
88

99
{% block corps %}
1010
<section>
1111
<h1>Privacy Policy for CodeWe</h1>
1212
<p id="not-valid">THESE POLICIES ARE NO LONGER VALID!</p>
13-
<a href="/privacy"><p id="redirect">The current and valid version can be found here.</p></a>
13+
<a href="/legal/privacy"><p id="redirect">The current and valid version can be found here.</p></a>
1414
<p>At CodeWe, accessible from https://codewe.bhasher.com, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by CodeWe and how we use it.</p>
1515

1616
<p>If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us.</p>

src/views/legal/archive/privacy-20201120.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Privacy Policy</h1>
2323
</table>
2424

2525
<p id="not-valid">THESE POLICIES ARE NO LONGER VALID!</p>
26-
<a href="/privacy"><p id="redirect">The current and valid version can be found here.</p></a>
26+
<a href="/legal/privacy"><p id="redirect">The current and valid version can be found here.</p></a>
2727

2828
<p>
2929
<i>

0 commit comments

Comments
 (0)