Browse Source

Initial commit

The website is done in English.
There are some placeholder things for nl and fr as well, but the language header on the en page is commented out
There are no links in the README.md to the actual repo, only mentions to it

I wanted everything set up and done before changing those things
stable
ilja 3 years ago
commit
d4e96a4c0b
  1. 57
      README.md
  2. 19
      conf/nginx.conf
  3. 42
      manifest.json
  4. 2
      scripts/_common.sh
  5. 87
      scripts/install
  6. 41
      scripts/remove
  7. 50
      scripts/upgrade
  8. 50
      sources/index_en.html
  9. 50
      sources/index_fr.html
  10. 50
      sources/index_nl.html
  11. 62
      sources/static/css/style.css
  12. 4
      sources/static/css/toolkit.min.css

57
README.md

@ -0,0 +1,57 @@
# Overview
* This package contains the main page for <https://parley.be>
* The package is based on <https://git.domainepublic.net/Neutrinet/neutrinet_ynh>
# Installation
```shell
yunohost app install <package-url>
```
# Upgrading
```shell
yunohost app upgrade parley_mainpage_ynh -u <package-url>
```
# For contributers
## Translations
### Adding a new translation to the site
1. Copy [sources/index_en.html](sources/index_en.html) and change the name so it has the correct two letter language code. The name should be of the form `index_<langcode>.html`
2. Translate it
3. Add a new block to the nginx config file [conf/nginx.conf](conf/nginx.conf)
4. Add the new language to the language-menu of the other pages in the [sources](sources) folder. E.g. for French `-<a href="../fr/">fr</a>`
Example of such block, change <langcode> to the two-letter language-code:
```
location PATHTOCHANGE/<langcode> {
alias ALIASTOCHANGE;
index index_<langcode>.html;
}
```
Example of language-menu with languages nl and fr
```html
<div class='section language-menu'><a href="../nl/">nl</a>-<a href="../fr/">fr</a></div>
```
### Improving existing translations
* Make the changes directly to the relevant index page. E.g. for English [sources/index_en.html](sources/index_en.html)
## Adding things to the page
Make the changes to as many language pages as you can. The English page is considered the 'main' page, so please try to add it there as well.
## Upstreaming
* Bugs, feature requests and other issues can be logged on the issue tracker
* Merge requests can be done to the `stable` branch directly
## Publish a new version of the app
* Updating will remove the folders and put the new version in place. As long as no big changes to the folder structure were done, you don't have to edit the [upgrade](scripts/upgrade) script.
* Technically we should edit the [manifest](manifest.json) file to bump the version, but having a verion system like this for a simple website seems overkill and updating will work regardless
* stable is the default branch, so no need to merge to another branch

19
conf/nginx.conf

@ -0,0 +1,19 @@
location PATHTOCHANGE {
return 302 PATHTOCHANGE/en;
}
location PATHTOCHANGE/en {
alias ALIASTOCHANGE;
index index_en.html;
}
location PATHTOCHANGE/nl {
alias ALIASTOCHANGE;
index index_nl.html;
}
location PATHTOCHANGE/fr {
alias ALIASTOCHANGE;
index index_fr.html;
}

42
manifest.json

@ -0,0 +1,42 @@
{
"name": "Main Page",
"id": "parley_mainpage_ynh",
"description": {
"en": "Mainpage for parley.be"
},
"version": "1.0.0~ynh1",
"license": "GPL-3+",
"maintainer": {
"name": "ilja",
"email": "ilja@w-vl.pirateparty.be",
"url": "https://ilja.space/ilja"
},
"requirements": {
"yunohost": ">= 3.6.5"
},
"multi_instance": "true",
"services": [
"nginx"
],
"arguments": {
"install" : [
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain for the main page. Note that you have to make this app the default app manually."
},
"example": "domain.org"
},
{
"name": "path_url",
"type": "path",
"ask": {
"en": "Choose a path for the main page"
},
"example": "/info",
"default": "/info"
}
]
}
}

2
scripts/_common.sh

@ -0,0 +1,2 @@
#!/bin/bash

87
scripts/install

@ -0,0 +1,87 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
source _common.sh
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
ynh_abort_if_errors
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH_URL
app=$YNH_APP_INSTANCE_NAME
app_user=$app
#==================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#==================================================
www_path=/var/www/$app
if [[ -e $www_path ]]
then
ynh_die "The path $www_path already contains a folder"
fi
# Normalize the url path syntax
path_url=$(ynh_normalize_url_path $path_url)
# Trim trailing slashes
path_url=$(sed 's@*/$@@' <<< $path_url)
# Check web path availability
if ! ynh_webpath_available $domain $path_url
then
ynh_die "$domain$path_url is not available"
fi
# Register (book) web path
ynh_webpath_register $app $domain $path_url
#=================================================
# STORE SETTINGS
#=================================================
ynh_app_setting_set $app domain $domain
ynh_app_setting_set $app path_url $path_url
ynh_app_setting_set $app app_user $app_user
ynh_app_setting_set $app www_path $www_path
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_print_info "Creating app's user…"
mkdir -p $www_path
ynh_system_user_create $app_user $www_path
#=================================================
# INSTALL STATIC FILE
#=================================================
ynh_print_info "Installing static site…"
cp -a ../sources/. $www_path
chown -R $app_user: $www_path
sed -i "s@PATHTOCHANGE@$path_url@g" ../conf/nginx.conf
sed -i "s@ALIASTOCHANGE@$www_path@g" ../conf/nginx.conf
cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
nginx -tq
service nginx reload

41
scripts/remove

@ -0,0 +1,41 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
source _common.sh
#=================================================
# LOAD SETTINGS
#=================================================
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
path_url=$(ynh_app_setting_get $app path_url)
app_user=$(ynh_app_setting_get $app app_user)
www_path=$(ynh_app_setting_get $app www_path)
#=================================================
# STANDARD REMOVE
#=================================================
ynh_print_info "Removing static site..."
rm -rf $www_path
rm -f /etc/nginx/conf.d/$domain.d/$app.conf
nginx -t > /dev/null
service nginx reload
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_print_info "Removing system user..."
ynh_system_user_delete $app_user

50
scripts/upgrade

@ -0,0 +1,50 @@
#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source /usr/share/yunohost/helpers
source _common.sh
#=================================================
# LOAD SETTINGS
#=================================================
app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get $app domain)
path_url=$(ynh_app_setting_get $app path_url)
app_user=$(ynh_app_setting_get $app app_user)
www_path=$(ynh_app_setting_get $app www_path)
#=================================================
# ACTIVE TRAP
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# REINSTALL STATIC FILES
#=================================================
ynh_print_info "Installing static site..."
rm -rf $www_path
mkdir -p $www_path
cp -r ../sources/. $www_path
chown -R $app_user: $www_path
sed -i "s@PATHTOCHANGE@$path_url@g" ../conf/nginx.conf
sed -i "s@ALIASTOCHANGE@$www_path@g" ../conf/nginx.conf
cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf
nginx -tq
service nginx reload

50
sources/index_en.html

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<link href='static/css/toolkit.min.css' rel='stylesheet' />
<link href='static/css/style.css' rel='stylesheet' />
<meta charset="UTF-8">
<title>Welcome to Parley</title>
</head>
<body>
<!-- <div class='section language-menu'><a href="../nl/">nl</a>-<a href="../fr/">fr</a></div> -->
<div class='body'>
<div class='section'>
<h1 class='main-title'>
Welcome to Parley
</h1>
</div>
<div class='section'>
<h3>About Parley</h3>
<p>Parley provides online services without gathering personal data. It is meant as a more human and more ethical alternative to the tools often proposed by big data companies. Parley grew out of the Belgian Pirateparty ITSquad, but is meant to be politically neutral. At the moment none of the parley-tools require a login. All of the tools are <a href="https://www.gnu.org/philosophy/free-sw.en.html">free software</a>.</p>
<h3>Tools</h3>
<h4>Poll</h4>
<p><a href="https://poll.parley.be/">Polls</a> can be used to create simple polls. There are two types of polls availale, a datetime picker and a simple poll. </p>
<h4>Share</h4>
<p><a href="https://share.parley.be/">Share</a> can be used to share files. Simply drag and drop a file and choose how long the file should be available. The file will then be uploaded and you'll be given a link to the file that you can then freely share. </p>
<h4>Hextris</h4>
<p><a href="https://hextris.parley.be/">Hextris</a> is a fast paced puzzle game. Because a bit of procrastination every now and then is healthy </p>
<h4>Pads</h4>
<p><a href="https://pad.parley.be/">Pads</a> are a simple word-processor and a good tool for online collaboration. Type the name of the pad you want, if a pad with this name doesn't exist yet a new one will be created, otherwise you go to the existing pad of that name.</p>
<h3>Other Tools</h3>
<p>There are other tools freely available from other organisations who also oppose the big-data business model and use and promote free software. Naming them all would be impossible, but we'd like to give a short list of alternatives that may also be interesting.</p>
<h4>Fedi.be</h4>
<p><a href="https://fedi.be/">Fedi.be</a> is a federated social network platform. It's meant to be a politically neutral instance mainly aimed towards people from Belgium and is hosted and maintained by a small community. Because of the nature of federation you are connected through this platform with thousands of other people who can be on their own separate platform. This whole network is called the fediverse. If you don't know where to set up your account on the fediverse, or you don't know where to send people to, fedi.be is a good place to start.</p>
<h4>PPBE Mastodon</h4>
<p><a href="https://mastodon.pirateparty.be/">Mastodon.pirateparty.be</a> is a federated microblogging social network hosted by the Belgian PirateParty, but open to everyone who feels they share the pirate-values and ideas. It is part of the same fediverse as fedi.be, which means that you can follow and interact with people on fedi.be from this platform as if they where part of the ppbe mastodon instance.</p>
<h4>Searx</h4>
<p><a href="https://searx.be/">Searx.be</a> is a metasearch engine, aggregating the results of other search engines while not storing information about its users. When you enter a search query and press enter, it will send the query to several search-engines. It will however strip away as much personal data as possible without compromising results. You can see and change the search-enginges being used in the preferences.</p>
</div>
</div>
</body>
</html>

50
sources/index_fr.html

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<link href='static/css/toolkit.min.css' rel='stylesheet' />
<link href='static/css/style.css' rel='stylesheet' />
<meta charset="UTF-8">
<title>Welcome to Parley</title>
</head>
<body>
<!-- <div class='section language-menu'><a href="../nl/">nl</a>-<a href="../fr/">fr</a></div> -->
<div class='body'>
<div class='section'>
<h1 class='main-title'>
Welcome to Parley
</h1>
</div>
<div class='section'>
<h3>About Parley</h3>
<p>Parley provides online services without gathering personal data. It is meant as a more human and more ethical alternative to the tools often proposed by big data companies. Parley grew out of the Belgian Pirateparty ITSquad, but is meant to be politically neutral. At the moment none of the parley-tools require a login. All of the tools are <a href="https://www.gnu.org/philosophy/free-sw.en.html">free software</a>.</p>
<h3>Tools</h3>
<h4>Poll</h4>
<p><a href="https://poll.parley.be/">Polls</a> can be used to create simple polls. There are two types of polls availale, a datetime picker and a simple poll. </p>
<h4>Share</h4>
<p><a href="https://share.parley.be/">Share</a> can be used to share files. Simply drag and drop a file and choose how long the file should be available. The file will then be uploaded and you'll be given a link to the file that you can then freely share. </p>
<h4>Hextris</h4>
<p><a href="https://hextris.parley.be/">Hextris</a> is a fast paced puzzle game. Because a bit of procrastination every now and then is healthy </p>
<h4>Pads</h4>
<p><a href="https://pad.parley.be/">Pads</a> are a simple word-processor and a good tool for online collaboration. Type the name of the pad you want, if a pad with this name doesn't exist yet a new one will be created, otherwise you go to the existing pad of that name.</p>
<h3>Other Tools</h3>
<p>There are other tools freely available from other organisations who also oppose the big-data business model and use and promote free software. Naming them all would be impossible, but we'd like to give a short list of alternatives that may also be interesting.</p>
<h4>Fedi.be</h4>
<p><a href="https://fedi.be/">Fedi.be</a> is a federated social network platform. It's meant to be a politically neutral instance mainly aimed towards people from Belgium and is hosted and maintained by a small community. Because of the nature of federation you are connected through this platform with thousands of other people who can be on their own separate platform. This whole network is called the fediverse. If you don't know where to set up your account on the fediverse, or you don't know where to send people to, fedi.be is a good place to start.</p>
<h4>PPBE Mastodon</h4>
<p><a href="https://mastodon.pirateparty.be/">Mastodon.pirateparty.be</a> is a federated microblogging social network hosted by the Belgian PirateParty, but open to everyone who feels they share the pirate-values and ideas. It is part of the same fediverse as fedi.be, which means that you can follow and interact with people on fedi.be from this platform as if they where part of the ppbe mastodon instance.</p>
<h4>Searx</h4>
<p><a href="https://searx.be/">Searx.be</a> is a metasearch engine, aggregating the results of other search engines while not storing information about its users. When you enter a search query and press enter, it will send the query to several search-engines. It will however strip away as much personal data as possible without compromising results. You can see and change the search-enginges being used in the preferences.</p>
</div>
</div>
</body>
</html>

50
sources/index_nl.html

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<link href='static/css/toolkit.min.css' rel='stylesheet' />
<link href='static/css/style.css' rel='stylesheet' />
<meta charset="UTF-8">
<title>Welcome to Parley</title>
</head>
<body>
<!-- <div class='section language-menu'><a href="../nl/">nl</a>-<a href="../fr/">fr</a></div> -->
<div class='body'>
<div class='section'>
<h1 class='main-title'>
Welcome to Parley
</h1>
</div>
<div class='section'>
<h3>About Parley</h3>
<p>Parley provides online services without gathering personal data. It is meant as a more human and more ethical alternative to the tools often proposed by big data companies. Parley grew out of the Belgian Pirateparty ITSquad, but is meant to be politically neutral. At the moment none of the parley-tools require a login. All of the tools are <a href="https://www.gnu.org/philosophy/free-sw.en.html">free software</a>.</p>
<h3>Tools</h3>
<h4>Poll</h4>
<p><a href="https://poll.parley.be/">Polls</a> can be used to create simple polls. There are two types of polls availale, a datetime picker and a simple poll. </p>
<h4>Share</h4>
<p><a href="https://share.parley.be/">Share</a> can be used to share files. Simply drag and drop a file and choose how long the file should be available. The file will then be uploaded and you'll be given a link to the file that you can then freely share. </p>
<h4>Hextris</h4>
<p><a href="https://hextris.parley.be/">Hextris</a> is a fast paced puzzle game. Because a bit of procrastination every now and then is healthy </p>
<h4>Pads</h4>
<p><a href="https://pad.parley.be/">Pads</a> are a simple word-processor and a good tool for online collaboration. Type the name of the pad you want, if a pad with this name doesn't exist yet a new one will be created, otherwise you go to the existing pad of that name.</p>
<h3>Other Tools</h3>
<p>There are other tools freely available from other organisations who also oppose the big-data business model and use and promote free software. Naming them all would be impossible, but we'd like to give a short list of alternatives that may also be interesting.</p>
<h4>Fedi.be</h4>
<p><a href="https://fedi.be/">Fedi.be</a> is a federated social network platform. It's meant to be a politically neutral instance mainly aimed towards people from Belgium and is hosted and maintained by a small community. Because of the nature of federation you are connected through this platform with thousands of other people who can be on their own separate platform. This whole network is called the fediverse. If you don't know where to set up your account on the fediverse, or you don't know where to send people to, fedi.be is a good place to start.</p>
<h4>PPBE Mastodon</h4>
<p><a href="https://mastodon.pirateparty.be/">Mastodon.pirateparty.be</a> is a federated microblogging social network hosted by the Belgian PirateParty, but open to everyone who feels they share the pirate-values and ideas. It is part of the same fediverse as fedi.be, which means that you can follow and interact with people on fedi.be from this platform as if they where part of the ppbe mastodon instance.</p>
<h4>Searx</h4>
<p><a href="https://searx.be/">Searx.be</a> is a metasearch engine, aggregating the results of other search engines while not storing information about its users. When you enter a search query and press enter, it will send the query to several search-engines. It will however strip away as much personal data as possible without compromising results. You can see and change the search-enginges being used in the preferences.</p>
</div>
</div>
</body>
</html>

62
sources/static/css/style.css

@ -0,0 +1,62 @@
.body {
margin-left: 20%;
margin-right: 20%;
margin-top: 100px;
margin-bottom: 100px;
color: #242424;
}
.section {
border: 1px solid #DDD;
padding: 16px;
border-radius: 6px;
}
.language-menu {
text-align: right;
}
p {
margin: 0px;
}
* + p {
margin: 1.25em 0px 0px;
}
.help {
color: #444444;
font-size: 16px;
text-align: justify;
text-justify: inter-word;
font-style: italic;
text-indent: 15px;
}
.no-border {
border: none;
}
.section + .section {
margin-top: 15px;
}
.main-title {
background: transparent url("../img/logo.png") no-repeat left / 54px;
text-indent: 64px;
}
.section h3 {
border-bottom: solid 1px #ddd;
padding-bottom: 4px;
}
a {
color: black;
font-family: arial;
text-decoration: underline;
}
.loader {
margin: 1.60em 0px 0px;
}

4
sources/static/css/toolkit.min.css
File diff suppressed because it is too large
View File