Browse Source

first commit for v2

v2
Romain J 2 months ago
parent
commit
a489034746
336 changed files with 1951 additions and 40507 deletions
  1. +164
    -0
      .gitignore
  2. +0
    -3
      .idea/.gitignore
  3. +5
    -0
      .idea/codeStyles/codeStyleConfig.xml
  4. +13
    -0
      .idea/dataSources.xml
  5. +31
    -0
      .idea/gnousEU.iml
  6. +0
    -9
      .idea/gnousdoteu.iml
  7. +6
    -0
      .idea/inspectionProfiles/profiles_settings.xml
  8. +1
    -0
      .idea/misc.xml
  9. +1
    -1
      .idea/modules.xml
  10. +1
    -1
      .idea/vcs.xml
  11. +25
    -0
      .idea/watcherTasks.xml
  12. +0
    -7
      LICENSE
  13. +0
    -66
      README.md
  14. +0
    -0
      apps/__init__.py
  15. +0
    -0
      apps/gnous_eu/__init__.py
  16. +23
    -0
      apps/gnous_eu/admin.py
  17. +10
    -0
      apps/gnous_eu/apps.py
  18. +48
    -0
      apps/gnous_eu/migrations/0001_initial.py
  19. +0
    -0
      apps/gnous_eu/migrations/__init__.py
  20. +43
    -0
      apps/gnous_eu/models.py
  21. +23
    -0
      apps/gnous_eu/templates/about.html
  22. +27
    -0
      apps/gnous_eu/templates/index.html
  23. +54
    -0
      apps/gnous_eu/templates/layouts/base.html
  24. +24
    -0
      apps/gnous_eu/templates/layouts/footer.html
  25. +22
    -0
      apps/gnous_eu/templates/layouts/head.html
  26. +64
    -0
      apps/gnous_eu/templates/layouts/header.html
  27. +51
    -0
      apps/gnous_eu/templates/layouts/sidebar.html
  28. +123
    -0
      apps/gnous_eu/templates/services.html
  29. +48
    -0
      apps/gnous_eu/templates/tips.html
  30. +3
    -0
      apps/gnous_eu/tests.py
  31. +13
    -0
      apps/gnous_eu/urls.py
  32. +37
    -0
      apps/gnous_eu/views.py
  33. +0
    -5
      composer.json
  34. +0
    -71
      composer.lock
  35. +0
    -0
      gnousEU/__init__.py
  36. +16
    -0
      gnousEU/asgi.py
  37. +126
    -0
      gnousEU/settings.py
  38. +25
    -0
      gnousEU/urls.py
  39. +16
    -0
      gnousEU/wsgi.py
  40. +0
    -55
      languages/en.json
  41. +0
    -54
      languages/fr.json
  42. +179
    -0
      locale/en/LC_MESSAGES/django.po
  43. +170
    -0
      locale/fr/LC_MESSAGES/django.po
  44. +21
    -0
      manage.py
  45. +0
    -21
      php/config.php
  46. +0
    -5
      public/.htaccess
  47. +0
    -1
      public/dist/flags.css
  48. +0
    -10
      public/dist/gnous.js
  49. +0
    -24
      public/dist/gnous2019.css
  50. +0
    -2
      public/dist/jquery.min.js
  51. +0
    -1
      public/dist/spectre-exp.min.css
  52. +0
    -1
      public/dist/spectre-icons.min.css
  53. +0
    -1
      public/dist/spectre.min.css
  54. BIN
      public/files/educloud_politique_2020.pdf
  55. BIN
      public/img/gnous.png
  56. +0
    -1
      public/img/gnous.svg
  57. BIN
      public/img/logo.png
  58. BIN
      public/img/screen/discord.png
  59. BIN
      public/img/screen/email.png
  60. BIN
      public/img/screen/git.png
  61. BIN
      public/img/screen/mtx.png
  62. BIN
      public/img/screen/other.jpg
  63. BIN
      public/img/screen/talk.png
  64. BIN
      public/img/screen/toot.png
  65. BIN
      public/img/screen/tube.png
  66. +0
    -84
      public/index.php
  67. +0
    -1
      public/srv.html
  68. +0
    -1
      public/templates_c/.gitignore
  69. +19
    -0
      requirements.txt
  70. +0
    -15
      tpl/404.tpl
  71. +0
    -12
      tpl/about.tpl
  72. +0
    -23
      tpl/donate.tpl
  73. +0
    -14
      tpl/index.tpl
  74. +0
    -7
      tpl/parts/footer.tpl
  75. +0
    -12
      tpl/parts/header.tpl
  76. +0
    -24
      tpl/parts/meta.tpl
  77. +0
    -20
      tpl/parts/nav.tpl
  78. +0
    -176
      tpl/services.tpl
  79. +0
    -7
      vendor/autoload.php
  80. +0
    -445
      vendor/composer/ClassLoader.php
  81. +0
    -21
      vendor/composer/LICENSE
  82. +0
    -9
      vendor/composer/autoload_classmap.php
  83. +0
    -10
      vendor/composer/autoload_files.php
  84. +0
    -9
      vendor/composer/autoload_namespaces.php
  85. +0
    -9
      vendor/composer/autoload_psr4.php
  86. +0
    -70
      vendor/composer/autoload_real.php
  87. +0
    -19
      vendor/composer/autoload_static.php
  88. +0
    -57
      vendor/composer/installed.json
  89. +0
    -31
      vendor/smarty/smarty/COMPOSER_RELEASE_NOTES.txt
  90. +0
    -91
      vendor/smarty/smarty/INHERITANCE_RELEASE_NOTES.txt
  91. +0
    -179
      vendor/smarty/smarty/LICENSE
  92. +0
    -291
      vendor/smarty/smarty/NEW_FEATURES.txt
  93. +0
    -575
      vendor/smarty/smarty/README
  94. +0
    -72
      vendor/smarty/smarty/README.md
  95. +0
    -109
      vendor/smarty/smarty/SMARTY_2_BC_NOTES.txt
  96. +0
    -24
      vendor/smarty/smarty/SMARTY_3.0_BC_NOTES.txt
  97. +0
    -306
      vendor/smarty/smarty/SMARTY_3.1_NOTES.txt
  98. +0
    -3384
      vendor/smarty/smarty/change_log.txt
  99. +0
    -42
      vendor/smarty/smarty/composer.json
  100. +0
    -5
      vendor/smarty/smarty/demo/configs/test.conf

+ 164
- 0
.gitignore View File

@ -0,0 +1,164 @@
# Created by https://www.gitignore.io
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml
# Translations
*.mo
*.pot
# Sphinx documentation
docs/_build/
# PyBuilder
target/
### Django ###
*.log
*.pot
*.pyc
__pycache__/
local_settings.py
static/
media/
.env
db.sqlite3
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

+ 0
- 3
.idea/.gitignore View File

@ -1,3 +0,0 @@
# Default ignored files
/workspace.xml

+ 5
- 0
.idea/codeStyles/codeStyleConfig.xml View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

+ 13
- 0
.idea/dataSources.xml View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="Django default" uuid="cbcc816f-a2e5-4589-8721-cd28417de213">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<imported>true</imported>
<remarks>$PROJECT_DIR$/gnousEU/settings.py</remarks>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://127.0.0.1:3306/tuxbot</jdbc-url>
</data-source>
</component>
</project>

+ 31
- 0
.idea/gnousEU.iml View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="FacetManager">
<facet type="django" name="Django">
<configuration>
<option name="rootFolder" value="$MODULE_DIR$" />
<option name="settingsModule" value="tuxWeb/settings.py" />
<option name="manageScript" value="$MODULE_DIR$/manage.py" />
<option name="environment" value="&lt;map&gt;&#10; &lt;entry&gt;&#10; &lt;string&gt;OAUTHLIB_INSECURE_TRANSPORT&lt;/string&gt;&#10; &lt;string&gt;1&lt;/string&gt;&#10; &lt;/entry&gt;&#10;&lt;/map&gt;" />
<option name="doNotUseTestRunner" value="false" />
<option name="trackFilePattern" value="apps/tuxbot_gnous_eu/migrations" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.8 (gnous-site)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Django" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/apps/gnous_eu/templates" />
<option value="$MODULE_DIR$/apps/tuxbot_gnous_eu/templates" />
</list>
</option>
</component>
</module>

+ 0
- 9
.idea/gnousdoteu.iml View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

+ 6
- 0
.idea/inspectionProfiles/profiles_settings.xml View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

+ 1
- 0
.idea/misc.xml View File

@ -3,4 +3,5 @@
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (gnous-site)" project-jdk-type="Python SDK" />
</project>

+ 1
- 1
.idea/modules.xml View File

@ -2,7 +2,7 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/gnousdoteu.iml" filepath="$PROJECT_DIR$/.idea/gnousdoteu.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/gnousEU.iml" filepath="$PROJECT_DIR$/.idea/gnousEU.iml" />
</modules>
</component>
</project>

+ 1
- 1
.idea/vcs.xml View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

+ 25
- 0
.idea/watcherTasks.xml View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectTasksOptions">
<TaskOptions isEnabled="false">
<option name="arguments" value="$FileName$:../css/$FileNameWithoutExtension$.css" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" />
<option name="exitCodeBehavior" value="ERROR" />
<option name="fileExtension" value="scss" />
<option name="immediateSync" value="true" />
<option name="name" value="SCSS" />
<option name="output" value="../css/$FileNameWithoutExtension$.css:../css/$FileNameWithoutExtension$.css.map" />
<option name="outputFilters">
<array />
</option>
<option name="outputFromStdout" value="false" />
<option name="program" value="sass" />
<option name="runOnExternalChanges" value="true" />
<option name="scopeName" value="Project Files" />
<option name="trackOnlyRoot" value="true" />
<option name="workingDir" value="$FileDir$" />
<envs />
</TaskOptions>
</component>
</project>

+ 0
- 7
LICENSE View File

@ -1,7 +0,0 @@
Copyright 2019 Maël G.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 0
- 66
README.md View File

@ -1,66 +0,0 @@
# Gnous.eu
![https://git.gnous.eu/gnouseu/gnousdoteu/raw/branch/master/public/img/gnous.png](https://git.gnous.eu/gnouseu/gnousdoteu/raw/branch/master/public/img/gnous.png)
[![forthebadge](https://forthebadge.com/images/badges/built-with-love.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/uses-html.svg)](https://forthebadge.com)
Main website of [Gnous.eu](https://gnous.eu/?lang=en), the French speaking community of free software enthusiasts since 2017.
This website use Smarty template engine and Spectre CSS framework.
This project is **stable** and is already in production.
## Deployment
### Requirements :
To deploy this website you need :
1. PHP7+
2. Composer (only for **developpement**)
3. A webserver (NGINX is recommanded)
4. At least 1.5 Gb of hard drive
5. modrewrite and .htaccess enabled (in the case of apache)
6. Git
### Installation :
* Clone the Git repository :
``git clone https://git.gnous.eu/gnouseu/gnousdoteu``
* Make our webserver pointing to ``public`` folder. The main folder should'nt be accessible.
* Allow ``/public/index.php`` to write ``/public/templates_c``.
* Make our webserver serve ``/public/index.php`` for all pages **and conserving args** :
eg for NGINX (in ``server{``) :
```
location / {
try_files $uri $uri/ /index.php?$args;
}
```
* Make our webserver serve it for 404 and 403 too :
eg for NGINX (in ``server{``) :
```
error_page 404 /index.php;
error_page 403 /index.php;
```
* If you use modpagespeed, disable it for ``/img/gnous.svg``:
eg for NGINX-modpagespeed (in ``server{``) :
```
pagespeed Disallow "*/img/gnous.svg";
```
* Reload your webserver and check if all is working
### License :
This project is under [MIT license](LICENSE)

public/qtx6okr.txt → apps/__init__.py View File


+ 0
- 0
apps/gnous_eu/__init__.py View File


+ 23
- 0
apps/gnous_eu/admin.py View File

@ -0,0 +1,23 @@
from django.contrib import admin
from apps.gnous_eu.models import Service
class ServicesAdmin(admin.ModelAdmin):
list_display = (
"id",
"name",
"sources",
"hosted",
"domain_tag",
"image_tag",
"hidden",
)
fieldsets = [
("Global", {"fields": ["name", "domain", "photo", "description"]}),
("Types", {"fields": ["sources", "hosted"]}),
("Misc", {"fields": ["hidden"]}),
]
admin.site.register(Service, ServicesAdmin)

+ 10
- 0
apps/gnous_eu/apps.py View File

@ -0,0 +1,10 @@
from django.apps import AppConfig
from suit.apps import DjangoSuitConfig
class GnousEuConfig(AppConfig):
name = "apps.gnous_eu"
class SuitConfig(DjangoSuitConfig):
layout = "vertical"

+ 48
- 0
apps/gnous_eu/migrations/0001_initial.py View File

@ -0,0 +1,48 @@
# Generated by Django 3.0.2 on 2020-05-15 16:59
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="Service",
fields=[
("id", models.AutoField(primary_key=True, serialize=False)),
("name", models.CharField(max_length=150)),
("description", models.TextField()),
("photo", models.ImageField(upload_to="services")),
(
"sources",
models.CharField(
choices=[
("CLOSED", "Sources closes"),
("OPEN", "Sources ouvertes"),
("UNK", "Inconnu"),
],
default="UNK",
max_length=10,
),
),
(
"hosted",
models.CharField(
choices=[
("FED", "Fédéré"),
("CENT", "Centralisé"),
("UNK", "Inconnu"),
],
default="UNK",
max_length=10,
),
),
("domain", models.CharField(max_length=150)),
("hidden", models.BooleanField(default=False)),
],
),
]

+ 0
- 0
apps/gnous_eu/migrations/__init__.py View File


+ 43
- 0
apps/gnous_eu/models.py View File

@ -0,0 +1,43 @@
from django.db import models
from django.conf import settings
from django.utils.safestring import mark_safe
from django.utils.translation import gettext
class Service(models.Model):
class SourcesType(models.TextChoices):
closed = "CLOSED", gettext("Sources closes")
open = "OPEN", gettext("Sources ouvertes")
unknown = "UNK", gettext("Inconnu")
class HostedType(models.TextChoices):
federated = "FED", gettext("Fédéré")
centralized = "CENT", gettext("Centralisé")
unknown = "UNK", gettext("Inconnu")
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=150)
description = models.TextField()
photo = models.ImageField(upload_to="services")
sources = models.CharField(
max_length=10, choices=SourcesType.choices, default=SourcesType.unknown,
)
hosted = models.CharField(
max_length=10, choices=HostedType.choices, default=HostedType.unknown,
)
domain = models.CharField(max_length=150)
hidden = models.BooleanField(default=False)
def domain_tag(self):
return mark_safe(
f'<a href="http://{self.domain}" target="_blank">{self.domain}</a>'
)
def image_tag(self):
return mark_safe(
f"<img src="
f'"{settings.MEDIA_URL + self.photo.name}"'
f' width="50" height="50">'
)

+ 23
- 0
apps/gnous_eu/templates/about.html View File

@ -0,0 +1,23 @@
{% extends 'layouts/base.html' %}
{% load static %}
{% load i18n %}
{% block content %}
<div class="uk-flex uk-flex-middle top-wrap-height">
<div class="uk-container uk-flex-auto uk-position-relative uk-margin-medium-top">
<div class="uk-grid" data-uk-grid="masonry: true">
<div class="uk-width-1"
data-uk-scrollspy="cls: uk-animation-slide-left-medium; target: > *; delay: 100">
<h1 class="uk-margin-remove-bottom uk-text-bold">{% trans 'À propos' %}</h1>
</div>
<div class="uk-width-1"
data-uk-scrollspy="cls: uk-animation-slide-left-medium; target: > *; delay: 100">
<p>{% trans "GnousEU est une communauté de passionnés du libre ayant débuté en Février 2017 sur la plateforme Discord. Depuis elle s'est diversifiée sur plusieurs plateformes hébergées par elle même en favoirsant les instances déscentralisées. Elle ne cesse de grandir de jour en jour et est ouverte à tous nouveaux membres. Un système de recensemment des membre et d'interconnexion des plateformes est toujours à l'étude pour permettre une meilleure continuité au sein de la communauté. Actuellement la grande majorité de ses membres se trouvent sur le serveur Discord." %}</p>
<p>{% trans "Cette communauté à été créée par Mael G. aka Outout et est administrée par lui même mais aussi par Romain J., Rick Krict, DoomQuakeKeen et Orakle au design." %}</p>
<p>{% trans "GnousEU est hébergé sur l'infrastructure EnPLS.org disposant de serveurs en France, Pays-Bas, Allemagne et Guadeloupe." %}</p>
</div>
</div>
</div>
</div>
{% endblock %}

+ 27
- 0
apps/gnous_eu/templates/index.html View File

@ -0,0 +1,27 @@
{% extends 'layouts/base.html' %}
{% load static %}
{% load i18n %}
{% block content %}
<div class="uk-flex uk-flex-middle top-wrap-height">
<div class="uk-container uk-flex-auto uk-position-relative uk-margin-medium-top">
<div class="uk-grid" data-uk-grid="masonry: true">
<div class="uk-width-1-2@s"
data-uk-scrollspy="cls: uk-animation-slide-left-medium; target: > *; delay: 100">
<h1 class="uk-margin-remove-bottom uk-text-bold">GnousEU</h1>
<p class="uk-margin-remove-bottom subtitle-text uk-text-bold">{% trans "Communauté francophone de passionnés du libre depuis 2017." %}</p>
</div>
<div data-uk-scrollspy="cls: uk-animation-fade" class="uk-width-expand">
<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
data-src="{% static 'images/illustrations/services.svg' %}"
data-uk-img alt="Image">
</div>
<div class="uk-width-1-2@s">
<a class="uk-button uk-margin-small-left" href="{% url 'gnous_eu:services' %}">{% trans "Nos services" %}</a>
<a class="uk-button uk-margin-small-right" href="{% url 'gnous_eu:about' %}">{% trans "À propos" %}</a>
</div>
</div>
</div>
</div>
{% endblock %}

+ 54
- 0
apps/gnous_eu/templates/layouts/base.html View File

@ -0,0 +1,54 @@
{% load static %}
{% load i18n %}
<!DOCTYPE html>
{% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}" data-theme="dark">
{% include 'layouts/head.html' %}
<body>
<div id="app">
<div class="uk-flex uk-flex-column min-height-100vh">
{% include 'layouts/header.html' %}
<div class="uk-flex-1">
{% block content %}
{% endblock %}
</div>
{% include 'layouts/footer.html' %}
</div>
{% include 'layouts/sidebar.html' %}
</div>
{% block javascript %}{% endblock %}
<script src="{% static 'javascripts/uikit/uikit.js' %}"></script>
<script src="{% static 'javascripts/uikit/uikit-icons.js' %}"></script>
<script>
window.theme = document.querySelector('input[name=theme]');
theme.checked = document.documentElement.getAttribute('data-theme') === 'dark';
theme.addEventListener('change', function () {
document.documentElement.setAttribute('data-theme', this.checked ? 'dark' : 'light')
})
</script>
<script>
if (document.cookie.split('cookie-banner=')[1] != 'hidden') {
cookie_notification = UIkit.notification(
'<span data-uk-icon="quote-right"></span> {% trans "Bla bla bla... bannière alakon pour dire qu&amp;on utilise des cookies (pour la langue et cette bannière)" %}',
{pos: 'bottom-center'}
);
UIkit.util.on(document, 'close', function (evt) {
if (evt.detail[0] === cookie_notification) {
document.cookie = 'cookie-banner=hidden'
}
});
}
</script>
</body>
</html>

+ 24
- 0
apps/gnous_eu/templates/layouts/footer.html View File

@ -0,0 +1,24 @@
{% load i18n %}
<footer class="uk-padding-remove-bottom">
<div class="uk-text-center uk-padding uk-padding-remove-bottom uk-flex">
<div class="uk-align-center">
<span class="uk-text-small uk-text-muted">© {% now "Y" %} GnousEU | {% trans "Designé par" %} </span>
<a class="uk-text-small uk-button-link" href="https://git.gnous.eu/mael">Mael G.</a>
<span class="uk-text-small uk-text-muted"> - {% trans "Crée par" %} </span>
<a class="uk-text-small uk-button-link" href="https://git.gnous.eu/Romain">Romain J.</a>
<span class="uk-text-small uk-text-muted"> | {% trans "Fait avec" %} </span>
<a href="http://getuikit.com" target="_blank" class="uk-text-small uk-button-link">
<span data-uk-icon="uikit" class="uk-icon"></span>
</a>
</div>
<div class="uk-float-right">
<label class="uk-switch" for="themeSwitcher">
<input type="checkbox" id="themeSwitcher" name="theme">
<div class="uk-switch-slider"></div>
</label>
</div>
</div>
</footer>

+ 22
- 0
apps/gnous_eu/templates/layouts/head.html View File

@ -0,0 +1,22 @@
{% load static %}
{% load i18n %}
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="turbolinks-cache-control" content="no-preview">
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}" type="image/x-icon">
<title>Gnous.eu
{% if request.resolver_match.url_name == 'index' %} - {% trans "Accueil" %} {% endif %}
{% if request.resolver_match.url_name == 'services' %} - {% trans "Services" %} {% endif %}
{% if request.resolver_match.url_name == 'about' %} - {% trans "À propos" %} {% endif %}
{% if request.resolver_match.url_name == 'tips' %} - {% trans "Dons" %} {% endif %}
</title>
<link rel="stylesheet" href="{% static 'stylesheets/css/index.css' %}">
<script src="{% static 'javascripts/turbolinks.js' %}"></script>
<script src="{% static 'javascripts/main.js' %}" defer></script>
</head>

+ 64
- 0
apps/gnous_eu/templates/layouts/header.html View File

@ -0,0 +1,64 @@
{% load static %}
{% load i18n %}
<div class="nav">
<div class="uk-container">
<nav class="uk-navbar uk-navbar-container uk-navbar-transparent">
<div class="uk-navbar-left">
<div class="uk-navbar-item uk-padding-remove-horizontal">
<a class="uk-logo uk-border-rounded" title="Logo" href="{% url 'gnous_eu:index' %}">
<img src="{% static 'images/gnous.svg' %}" alt="Logo">
</a>
</div>
<ul class="uk-navbar-nav uk-visible@s">
<li>
<a href="{% url 'gnous_eu:index' %}"
class="uk-text-bolder {% if request.resolver_match.url_name == 'index' %} active {% endif %}">
{% trans "Accueil" %}
</a>
</li>
<li>
<a href="{% url 'gnous_eu:services' %}"
class="uk-text-bolder {% if request.resolver_match.url_name == 'services' %} active {% endif %}">
{% trans "Services" %}
</a>
</li>
</ul>
</div>
<div class="uk-navbar-right">
<ul class="uk-navbar-nav uk-visible@s">
<li>
<a href="{% url 'gnous_eu:about' %}"
class="uk-text-bolder {% if request.resolver_match.url_name == 'about' %} active {% endif %}">
{% trans "À propos" %}
</a>
</li>
<li>
<a href="{% url 'gnous_eu:tips' %}"
class="uk-text-bolder {% if request.resolver_match.url_name == 'tips' %} active {% endif %}">
{% trans "Donner" %}
</a>
</li>
</ul>
<div class="uk-navbar-item uk-visible@s">
<form action="{% url 'set_language' %}" method="post" name="languageForm">
{% csrf_token %}
{% get_current_language as LANGUAGE_CODE %}
{% if LANGUAGE_CODE == 'en' %}
<img src="{% static 'images/icons/fr.svg' %}" alt="en" onclick="window.document.languageForm.submit()" width="18vw">
<input type="hidden" name="language" value="fr">
{% else %}
<img src="{% static 'images/icons/en.svg' %}" alt="fr" onclick="window.document.languageForm.submit()" width="18vw">
<input type="hidden" name="language" value="en">
{% endif %}
</form>
</div>
<a class="uk-navbar-toggle uk-navbar-item uk-hidden@s"
data-uk-toggle data-uk-navbar-toggle-icon data-turbolinks="false"
href="#offcanvas-nav">
</a>
</div>
</nav>
</div>
</div>

+ 51
- 0
apps/gnous_eu/templates/layouts/sidebar.html View File

@ -0,0 +1,51 @@
{% load static %}
{% load i18n %}
<div id="offcanvas-nav" data-uk-offcanvas="flip: true; overlay: true;" class="uk-offcanvas">
<div class="uk-offcanvas-bar uk-offcanvas-bar-animation uk-offcanvas-slide">
<button class="uk-offcanvas-close uk-close uk-icon" type="button" data-uk-close=""></button>
<ul class="uk-nav uk-nav-default">
<li>
<a href="{% url 'gnous_eu:index' %}"
class="uk-text-bolder"
{% if request.resolver_match.url_name == 'index' %} style="text-decoration: underline" {% endif %}>
<span class="uk-margin-small-right uk-icon" data-uk-icon="world"></span> {% trans "Accueil" %}
</a>
</li>
<li>
<a href="{% url 'gnous_eu:services' %}"
class="uk-text-bolder"
{% if request.resolver_match.url_name == 'services' %} style="text-decoration: underline" {% endif %}>
<span class="uk-margin-small-right uk-icon" data-uk-icon="grid"></span> {% trans "Services" %}
</a>
</li>
<li>
<a href="{% url 'gnous_eu:about' %}"
class="uk-text-bolder"
{% if request.resolver_match.url_name == 'about' %} style="text-decoration: underline" {% endif %}>
<span class="uk-margin-small-right uk-icon" data-uk-icon="info"></span> {% trans "À propos" %}
</a>
<a href="{% url 'gnous_eu:tips' %}"
class="uk-text-bolder"
{% if request.resolver_match.url_name == 'tips' %} style="text-decoration: underline" {% endif %}>
<span class="uk-margin-small-right uk-icon" data-uk-icon="credit-card"></span> {% trans "Donner" %}
</a>
</li>
<li class="uk-nav-divider"></li>
<li>
<form action="{% url 'set_language' %}" method="post" name="languageForm2">
{% csrf_token %}
{% get_current_language as LANGUAGE_CODE %}
{% if LANGUAGE_CODE == 'en' %}
<img src="{% static 'images/icons/fr.svg' %}" alt="en" onclick="window.document.languageForm2.submit()" width="18vw">
<input type="hidden" name="language" value="fr">
{% else %}
<img src="{% static 'images/icons/en.svg' %}" alt="fr" onclick="window.document.languageForm2.submit()" width="18vw">
<input type="hidden" name="language" value="en">
{% endif %}
</form>
</li>
</ul>
</div>
</div>

+ 123
- 0
apps/gnous_eu/templates/services.html View File

@ -0,0 +1,123 @@
{% extends 'layouts/base.html' %}
{% load static %}
{% load i18n %}
{% block content %}
<div class="uk-margin-medium-top">
<div class="uk-container uk-flex-auto top-container uk-position-relative uk-margin-medium-top">
<div class="uk-width-1-2@l uk-width-1-1 uk-align-center">
<div class="uk-inline uk-width-1-1@l">
<h1 class="uk-text-bold uk-text-center">{% trans 'Nos services' %}</h1>
<p>{% trans "GnousEU propose à tous des services gratuits et libre d'utilisations à tous. Ces services sont majoritairement opensource et ne volent pas vos précieuses données personnelles." %}</p>
</div>
</div>
<div class="uk-width-1-2@l uk-width-1-1 uk-align-center uk-margin-large-bottom">
<form action="{% url 'gnous_eu:services' %}" method="get" id="searchForm">
<div class="uk-inline uk-width-1-1@l">
<button class="uk-form-icon uk-form-icon-flip" data-uk-icon="search" type="submit"></button>
<label for="searchInput">
<input class="uk-input" type="search" id="searchInput" name="search"
placeholder="{% trans 'Rechercher...' %}" {% if search %} value="{{ search }}" {% endif %}>
</label>
</div>
</form>
</div>
{% if services|length >= 1 %}
<ul class="uk-grid uk-grid-margin-medium uk-child-width-1-3@m" data-uk-grid="masonry: true">
{% for service in services %}
<li>
<div class="uk-card uk-card-default">
<div class="uk-card-media-top">
<img src="https://media.giphy.com/media/sSgvbe1m3n93G/giphy.gif"
data-src="{{ service.photo.url }}"
data-uk-img
alt="{{ service.name }}">
</div>
<div class="uk-card-body">
<h3 class="uk-card-title">
{{ service.name }}
<a class="uk-text-small uk-link-muted uk-margin-left" href="https://{{ service.domain }}">{{ service.domain }}</a>
</h3>
<p>{{ service.description }}</p>
</div>
<div class="uk-card-footer">
{% if service.sources == 'CLOSED' %}
<span class="uk-label uk-label-warning">{{ service.get_sources_display }}</span>
{% elif service.sources == 'OPEN' %}
<span class="uk-label uk-label-success">{{ service.get_sources_display }}</span>
{% else %}
<span class="uk-label">{{ service.get_sources_display }}</span>
{% endif %}
{% if service.hosted == 'CENT' %}
<span class="uk-label uk-label-warning">{{ service.get_hosted_display }}</span>
{% elif service.hosted == 'FED' %}
<span class="uk-label uk-label-success">{{ service.get_hosted_display }}</span>
{% else %}
<span class="uk-label">{{ service.get_hosted_display }}</span>
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ul>
<ul class="uk-pagination uk-margin-medium-top">
<li class="uk-width-1-3">
{% if services.has_previous %}
<a {% if search %}
href="?search={{ search }}&page={{ services.previous_page_number }}"
{% else %}
href="?page={{ services.previous_page_number }}"
{% endif %} class="uk-button">
<span class="uk-margin-small-right" data-uk-pagination-previous></span> {% trans "Précédent" %}
</a>
{% endif %}
</li>
<li class="uk-width-1-3">
<span class="uk-button">{{ services.number }}/{{ services.paginator.num_pages }}</span>
</li>
<li class="uk-width-1-3">
{% if services.has_next %}
<a {% if search %}
href="?search={{ search }}&page={{ services.next_page_number }}"
{% else %}
href="?page={{ services.next_page_number }}"
{% endif %} class="uk-button">
{% trans "Suivant" %} <span class="uk-margin-small-left" data-uk-pagination-next></span>
</a>
{% endif %}
</li>
</ul>
{% else %}
<div class="uk-width-2-3@m uk-align-center">
<div class="uk-card">
<div class="uk-card-header">
<div class="uk-grid-small uk-flex-middle uk-grid">
<div class="uk-width-2-3">
<h3 class="uk-card-title uk-text-bold uk-text-danger">{% trans "Aucun service trouvé pour la recheche: " %}</h3>
<p class="uk-margin-large">{{ search }}</p>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}
{% block javascript %}
<script>
window.searchForm = document.getElementById('searchForm');
window.searchInputearch = searchForm.querySelector('input#searchInput');
searchInputearch.addEventListener('keypress', e => {
if (e.which === 13) {
searchForm.submit();
}
});
</script>
{% endblock %}

+ 48
- 0
apps/gnous_eu/templates/tips.html View File

@ -0,0 +1,48 @@
{% extends 'layouts/base.html' %}
{% load static %}
{% load i18n %}
{% block content %}
<div class="uk-flex uk-flex-middle top-wrap-height">
<div class="uk-container uk-flex-auto uk-position-relative uk-margin-medium-top">
<div class="uk-grid" data-uk-grid="masonry: true">
<div class="uk-width-1"
data-uk-scrollspy="cls: uk-animation-slide-left-medium; target: > *; delay: 100">
<h1 class="uk-heading-line uk-margin-remove-bottom uk-text-bold uk-text-center">
<span>{% trans 'Donnez à GnousEU' %}</span>
</h1>
<p class="uk-text-center">{% trans 'Participez au développement de la communauté de GnousEU via un don monétaire via le site Tipeee.' %}</p>
<div class="uk-margin-remove-bottom uk-text-bold uk-text-center">
<a href="https://fr.tipeee.com/gnouseu" class="uk-text-center">
<img src="https://en.tipeee.com/img/pedago/tipeee-tip-btn.png" alt="tipeee logo" width="140">
</a>
</div>
</div>
<div class="uk-width-1 uk-margin-large-top"
data-uk-scrollspy="cls: uk-animation-slide-left-medium; target: > *; delay: 100">
<h2 class="uk-heading-line uk-margin-remove-bottom uk-text-bold uk-text-center">
<span>{% trans 'Vous souhaitez nous donner du materiel ?' %}</span>
</h2>
<p class="uk-text-center">{% trans 'Vous disposez de materiel réseau ou serveur usagé et vous ne savez pas quoi en faire ?' %}</p>
<p class="uk-text-center">
{% trans 'Contactez nous par mail à ' %}
<code><a href="mailto:dons@gnous.eu">dons@gnous.eu</a></code>
</p>
</div>
<div class="uk-width-1 uk-margin-large-top"
data-uk-scrollspy="cls: uk-animation-slide-left-medium; target: > *; delay: 100">
<h2 class="uk-heading-line uk-margin-remove-bottom uk-text-bold uk-text-center">
<span>{% trans 'Vous êtes fournisseur de services ?' %}</span>
</h2>
<p class="uk-text-center">{% trans 'Discutons plus en détails de votre proposition ! Nous sommes ouvert à tout partenariat.' %}</p>
<p class="uk-text-center">
{% trans 'Contactez nous par mail à ' %}
<code><a href="mailto:dons@gnous.eu">mael@gnous.eu</a></code>
</p>
</div>
</div>
</div>
</div>
{% endblock %}

+ 3
- 0
apps/gnous_eu/tests.py View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

+ 13
- 0
apps/gnous_eu/urls.py View File

@ -0,0 +1,13 @@
from django.urls import path, include
from django.views.generic import TemplateView
from .views import ServicesView
app_name = "gnous_eu"
urlpatterns = [
path("", TemplateView.as_view(template_name="index.html"), name="index"),
path("about", TemplateView.as_view(template_name="about.html"), name="about"),
path("tips", TemplateView.as_view(template_name="tips.html"), name="tips"),
path("services", ServicesView.index, name="services"),
]

+ 37
- 0
apps/gnous_eu/views.py View File

@ -0,0 +1,37 @@
from django.http import HttpResponse, HttpResponseNotFound, HttpRequest
from django.shortcuts import render
from django.core.paginator import Paginator
from django.db.models import Q
from apps.gnous_eu.models import Service
TEMPLATE_PATH = "./"
class ServicesView:
@staticmethod
def index(request: HttpRequest, *args, **kwargs) -> HttpResponse:
search: str = request.GET.get("search", False)
if search:
data_services = Service.objects.all().filter(
Q(id__exact=int(search) if search.isdigit() else 0)
| Q(name__icontains=search)
| Q(description__icontains=search)
| Q(sources__icontains=search)
| Q(hosted__icontains=search)
| Q(domain__icontains=search)
| Q(sources__icontains=search)
| Q(hosted__icontains=search)
)
else:
data_services = Service.objects.all().filter(hidden=False)
paginator = Paginator(data_services, 30)
page = request.GET.get("page")
return render(
request,
TEMPLATE_PATH + "services.html",
{"services": paginator.get_page(page), "search": search},
)

+ 0
- 5
composer.json View File

@ -1,5 +0,0 @@
{
"require": {
"smarty/smarty": "^3.1"
}
}

+ 0
- 71
composer.lock View File

@ -1,71 +0,0 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "99bccada065081929698167137529f9f",
"packages": [
{
"name": "smarty/smarty",
"version": "v3.1.33",
"source": {
"type": "git",
"url": "https://github.com/smarty-php/smarty.git",
"reference": "dd55b23121e55a3b4f1af90a707a6c4e5969530f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/dd55b23121e55a3b4f1af90a707a6c4e5969530f",
"reference": "dd55b23121e55a3b4f1af90a707a6c4e5969530f",
"shasum": ""
},
"require": {
"php": ">=5.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1.x-dev"
}
},
"autoload": {
"files": [
"libs/bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"LGPL-3.0"
],
"authors": [
{
"name": "Monte Ohrt",
"email": "monte@ohrt.com"
},
{
"name": "Uwe Tews",
"email": "uwe.tews@googlemail.com"
},
{
"name": "Rodney Rehm",
"email": "rodney.rehm@medialize.de"
}
],
"description": "Smarty - the compiling PHP template engine",
"homepage": "http://www.smarty.net",
"keywords": [
"templating"
],
"time": "2018-09-12T20:54:16+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}

+ 0
- 0
gnousEU/__init__.py View File


+ 16
- 0
gnousEU/asgi.py View File

@ -0,0 +1,16 @@
"""
ASGI config for gnousEU project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gnousEU.settings")
application = get_asgi_application()

+ 126
- 0
gnousEU/settings.py View File

@ -0,0 +1,126 @@
"""
Django settings for gnousEU project.
Generated by 'django-admin startproject' using Django 3.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "*0q64%2cb!f@w(o@b74yyi2#x1d2r#%uul+hc1=gne^8u+*3)k"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ["127.0.0.1", "localhost"]
# Application definition
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"markdownify",
"apps.gnous_eu",
"apps.gnous_eu.apps.SuitConfig",
"django.contrib.admin",
]
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
'django.middleware.locale.LocaleMiddleware',
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
ROOT_URLCONF = "gnousEU.urls"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [os.path.join(BASE_DIR, "apps/gnous_eu/templates")],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
]
WSGI_APPLICATION = "gnousEU.wsgi.application"
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"NAME": "gnouseu",
"USER": "root",
"PASSWORD": "root",
"OPTIONS": {"charset": "utf8mb4"},
}
}
# Password validation
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",},
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",},
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",},
]
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = "fr"
TIME_ZONE = "UTC"
USE_I18N = True
USE_L10N = True
USE_TZ = True
LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),)
LANGUAGES = (
("fr", "FR"),
("en", "EN"),
)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/
STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(BASE_DIR, "static")
MEDIA_URL = "/media/"
MEDIA_ROOT = os.path.join(BASE_DIR, "media")

+ 25
- 0
gnousEU/urls.py View File

@ -0,0 +1,25 @@
"""gnousEU URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path("admin/", admin.site.urls),
path("", include("apps.gnous_eu.urls", namespace="gnous_eu")),
path("i18n/", include("django.conf.urls.i18n")),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

+ 16
- 0
gnousEU/wsgi.py View File

@ -0,0 +1,16 @@
"""
WSGI config for gnousEU project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gnousEU.settings")
application = get_wsgi_application()

+ 0
- 55
languages/en.json View File

@ -1,55 +0,0 @@
{
"nav_item_home": "Home",
"nav_item_services": "Services",
"nav_item_about": "About",
"nav_item_donate": "Donate",
"home_title": "GnousEU",
"home_description": "French speaking community of free software enthusiasts since 2017.",
"home_btn_1": "Join us by discovering our services",
"services_title": "Our services",
"services_description_1": "GnousEU offers all services free and free of uses to all.",
"services_description_2": "These services are mostly open source and don't steal your valuable personal data.",
"services_text_lead": "What are your preferences",
"services_choice_all": "I like everything",
"services_choice_opensource": "I am a pure librist",
"services_btn_closedsource": "Closed source",
"services_btn_centralised": "Censtralised",
"services_btn_opensource": "OpenSource",
"services_btn_federated": "Federated",
"services_btn_unknown": "Unknown",
"services_btn_join": "Join !",
"services_discord_description": "Join the original discord server of GnousEU ! Active since 2017.",
"services_mastodon_description": "Create your account on the Twitter descentralised alternative, Mastodon.",
"services_matrix_description": "Get your Matrix identifier, an descentralised and federated alternative to Slack and Discord.",
"services_git_description": "Publish your git projects on the public Gitea instance of GnousEU !",
"services_mail_description": "Get an @gnous.eu email adress for free now !",
"services_talk_description": "Create videoconference and screenshare freely using GnousTalk. This is an alternative to Skype or MicroSoft Teams.",
"services_tube_description": "Create, watch and comment videos on PeerTube federation from GnousEU's instance ! An alternative to Youtube, Vimeo, ...",
"services_purpose_title": "Submit",
"services_purpose_description" : "You want to see a new service ? Submit it !",
"services_purpose_btn": "Share my idea !",
"about_title": "About",
"about_description_1": "GnousEU is a community of free software enthusiasts who started in February 2017 on the Discord platform. Since then it has diversified on several platforms hosted by itself by supporting decentralized bodies. It keeps growing day by day and is open to new members. A system of census membership and interconnection of platforms is still under study to allow for better continuity within the community. Currently the vast majority of its members are on the Discord server.",
"about_description_2": "This community was created by <code><a href=\"https://outout.xyz/\">Mael G. aka Outout</a></code> and he is administrated by itself with <code>Romain J.</code>, <code><a href=\"https://semapy.xyz\">Rick Krict</a></code> and <code>DoomQuakeKeen</code>.",
"about_description_3": "",
"donate_title": "Donate to GnousEU",
"donate_tipeee": "Participate in the development of the GnousEU community via a monetary donation via the Tipeee.",
"donate_hardware_title": "You want to give us hardware ?",
"donate_hardware_text": "You have network hardware or an old server and you don't know what to do with it ?",
"donate_hardware_mail": "Contact us at <code>dons@gnous.eu</code>",
"donate_services_title": "You're a service provider ?",
"donate_services_text": "Let's discuss your proposal in more detail! We are open to any partnership.",
"donate_services_mail": "Contact us at <code>mael@gnous.eu</code>",
"404_title": "Oups...",
"404_text_1": "Sorry but we can't display this page.",
"404_text_2": "If you think isn't normal please contact an administrator",
"404_btn": "Return to a safe place",
"notfound": "Page not found"
}

+ 0
- 54
languages/fr.json View File

@ -1,54 +0,0 @@
{
"nav_item_home": "Accueil",
"nav_item_services": "Services",
"nav_item_about": "A propos",
"nav_item_donate": "Donner",
"home_title": "GnousEU",
"home_description": "Communauté francophone de passionnés du libre depuis 2017.",
"home_btn_1": "Adhérez en découvrant nos services",
"services_title": "Nos Services",
"services_description_1": "GnousEU propose à tous des services gratuits et libre d'utilisations à tous.",
"services_description_2": "Ces services sont majoritairement opensource et ne volent pas vos précieuses données personnelles.",
"services_text_lead": "Quelles sont vos préférences",
"services_choice_all": "J'aime de tout",
"services_choice_opensource": "Je suis un pur libriste",
"services_btn_closedsource": "Closed source",
"services_btn_centralised": "Centralisé",
"services_btn_opensource": "OpenSource",
"services_btn_federated": "Fédéré",
"services_btn_unknown": "Inconnu",
"services_btn_join": "Rejoindre !",
"services_discord_description": "Rejoignez le serveur discord original de GnousEU ! Présent depuis 2017.",
"services_mastodon_description": "Créez votre compte sur l'alternative à Twitter descentralisée, Mastodon.",
"services_matrix_description": "Obtenez votre identifiant Matrix, une alternative descentralisée à Slack et Discord.",
"services_git_description": "Publiez vos projets Git sur l'instance Gitea publique de GnousEU !",
"services_mail_description": "Obtenez votre compte email en @gnous.eu dès maintenant et gratuitement !",
"services_talk_description": "Effectuez gratuitement des visioconférences et des partages d'écran de façon libre et gratuite ! Alternative à Skype ou M$ Team.",
"services_tube_description": "Partagez, visionnez et commentez des vidéos sur la fédération PeerTube à partir de l'instance de GnousEU ! Alternative à Youtube, Vimeo, ...",
"services_purpose_title": "Proposez",
"services_purpose_description" : "Vous souhaitez voir apparaître un nouveaux service ? Proposez le !",
"services_purpose_btn": "Partager mon idée !",
"about_title": "A propos",
"about_description_1": "GnousEU est une communauté de passionnés du libre ayant débuté en Février 2017 sur la plateforme Discord. Depuis elle s'est diversifiée sur plusieurs plateformes hébergées par elle même en favoirsant les instances déscentralisées. Elle ne cesse de grandir de jour en jour et est ouverte à tous nouveaux membres. Un système de recensemment des membre et d'interconnexion des plateformes est toujours à l'étude pour permettre une meilleure continuité au sein de la communauté. Actuellement la grande majorité de ses membres se trouvent sur le serveur Discord.",
"about_description_2": "Cette communauté à été créée par <code><a href=\"https://enpls.org/\">Mael G. aka Outout</a></code> et est administrée par lui même mais aussi par <code>Romain J.</code>, <code><a href=\"https://semapy.xyz\">Rick Krict</a></code>, <code>DoomQuakeKeen</code> et <code>Orakle</code> au design.",
"about_description_3": "GnousEU est hébergé sur l'infrastructure <a href=\"https://enpls.org/weathermap.png\">EnPLS.org</a> disposant de serveurs en France, Pays-Bas, Allemagne et Guadeloupe.",
"donate_title": "Donnez à GnousEU",
"donate_tipeee": "Participez au développement de la communauté de GnousEU via un don monétaire via le site Tipeee.",
"donate_hardware_title": "Vous souhaitez nous donner du materiel ?",
"donate_hardware_text": "Vous disposez de materiel réseau ou serveur usagé et vous ne savez pas quoi en faire ?",
"donate_hardware_mail": "Contactez nous par mail à <code>dons@gnous.eu</code>",
"donate_services_title": "Vous êtes fournisseur de services ?",
"donate_services_text": "Discutons plus en détails de votre proposition ! Nous sommes ouvert à tout partenariat.",
"donate_services_mail": "Contactez nous par mail à <code>mael@gnous.eu</code>",
"404_title": "Oups...",
"404_text_1": "Désolé mais nous ne sommes pas en mesure d'afficher cette page.",
"404_text_2": "Vous pensez que ce n'est pas normal ? Essayez de rentrer en contact avec un administrateur.",
"404_btn": "Retourner en lieu sûr",
"notfound": "Page introuvable"
}

+ 179
- 0
locale/en/LC_MESSAGES/django.po View File

@ -0,0 +1,179 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-15 21:59+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: apps/gnous_eu/models.py:9
msgid "Sources closes"
msgstr "Closed sources"
#: apps/gnous_eu/models.py:10
msgid "Sources ouvertes"
msgstr "Open sources"
#: apps/gnous_eu/models.py:11 apps/gnous_eu/models.py:16
msgid "Inconnu"
msgstr "Unknown"
#: apps/gnous_eu/models.py:14
msgid "Fédéré"
msgstr "Federated"
#: apps/gnous_eu/models.py:15
msgid "Centralisé"
msgstr "Centralized"
#: apps/gnous_eu/templates/index.html:12
msgid "Communauté francophone de passionnés du libre depuis 2017."
msgstr "French community of free software enthusiasts since 2017."
#: apps/gnous_eu/templates/index.html:21
#: apps/gnous_eu/templates/services.html:10
msgid "Nos services"
msgstr "Our services"
#: apps/gnous_eu/templates/index.html:22
#: apps/gnous_eu/templates/about.html:11
#: apps/gnous_eu/templates/layouts/head.html:13
#: apps/gnous_eu/templates/layouts/header.html:33
#: apps/gnous_eu/templates/layouts/sidebar.html:26
msgid "À propos"
msgstr "About"
#: apps/gnous_eu/templates/about.html:16
msgid ""
"GnousEU est une communauté de passionnés du libre ayant débuté en Février 2017 sur la plateforme Discord."
"Depuis elle s'est diversifiée sur plusieurs plateformes hébergées par elle même en favoirsant les instances déscentralisées."
"Elle ne cesse de grandir de jour en jour et est ouverte à tous nouveaux membres."
"Un système de recensemment des membre et d'interconnexion des plateformes est toujours à l'étude pour permettre une meilleure continuité au sein de la communauté."
"Actuellement la grande majorité de ses membres se trouvent sur le serveur Discord."
msgstr ""
"GnousEU is a community of free software enthusiasts that started in February 2017 on the Discord platform."
"Since then, it has diversified on several platforms hosted by itself, favouring de-centralized instances."
"It continues to grow day by day and is open to all new members."
"A system for identifying members and interconnecting platforms is still under study to allow for better continuity within the community."
"Currently the vast majority of its members are on the Discord server."
#: apps/gnous_eu/templates/about.html:17
msgid ""
"Cette communauté à été créée par Mael G. aka Outout et est administrée par lui même "
"mais aussi par Romain J., Rick Krict, DoomQuakeKeen et Orakle au design."
msgstr ""
"This community was created by <code><a href='https://enpls.org'>Mael G. aka Outout</a></code> and is administered by itself "
"but also by <code><a href='https://git.gnous.eu/Romain'>Romain J.</a></code>, <code><a href='https://semapy.xyz'>Rick Krict</a></code>, <code>DoomQuakeKeen</code> and <code>Orakle</code> in design."
#: apps/gnous_eu/templates/about.html:18
msgid ""
"GnousEU est hébergé sur l'infrastructure EnPLS.org disposant de serveurs en France, Pays-Bas, Allemagne et Guadeloupe."
msgstr "GnousEU est hébergé sur l'infrastructure <a href='https://enpls.org/weathermap.png'>EnPLS.org</a> disposant de serveurs en France, Pays-Bas, Allemagne et Guadeloupe."
#: apps/gnous_eu/templates/layouts/footer.html:6
msgid "Designé par"
msgstr "Designed by"
#: apps/gnous_eu/templates/layouts/footer.html:9
msgid "Crée par"
msgstr "Created by"
#: apps/gnous_eu/templates/layouts/footer.html:12
msgid "Fait avec"
msgstr "Built with"
#: apps/gnous_eu/templates/layouts/head.html:11
#: apps/gnous_eu/templates/layouts/header.html:17
#: apps/gnous_eu/templates/layouts/sidebar.html:12
msgid "Accueil"
msgstr "Home"
#: apps/gnous_eu/templates/layouts/head.html:12
#: apps/gnous_eu/templates/layouts/header.html:23
#: apps/gnous_eu/templates/layouts/sidebar.html:19
msgid "Services"
msgstr "Services"
#: apps/gnous_eu/templates/layouts/head.html:14
msgid "Dons"
msgstr "Tips"
#: apps/gnous_eu/templates/layouts/header.html:39
#: apps/gnous_eu/templates/layouts/sidebar.html:31
msgid "Donner"
msgstr "Tips"
#: apps/gnous_eu/templates/layouts/sidebar.html:37
msgid "Langue"
msgstr "Language"
#: apps/gnous_eu/templates/services.html:11
msgid ""
"GnousEU propose à tous des services gratuits et libre d'utilisations à tous. "
"Ces services sont majoritairement opensource et ne volent pas vos précieuses données personnelles."
msgstr ""
"GnousEU offers free and free to use services to all. "
"These services are mostly open source and do not steal your precious personal data."
#: apps/gnous_eu/templates/services.html:20
msgid "Rechercher..."
msgstr "Search..."
#: apps/gnous_eu/templates/services.html:74
msgid "Précédent"
msgstr "Previous"
#: apps/gnous_eu/templates/services.html:89
msgid "Suivant"
msgstr "Next"
#: apps/gnous_eu/templates/services.html:100
msgid "Aucun service trouvé pour la recheche: "
msgstr "No services found for the search: "
#: apps/gnous_eu/templates/tips.html:12
msgid "Donnez à GnousEU"
msgstr "Give to GnousEU"
#: apps/gnous_eu/templates/tips.html:14
msgid "Participez au développement de la communauté de GnousEU via un don monétaire via le site Tipeee."
msgstr "Participate in the development of the GnousEU community by making a monetary donation via the Tipeee website."
#: apps/gnous_eu/templates/tips.html:25
msgid "Vous souhaitez nous donner du materiel ?"
msgstr "Would you like to give us some material?"
#: apps/gnous_eu/templates/tips.html:27
msgid "Vous disposez de materiel réseau ou serveur usagé et vous ne savez pas quoi en faire ?"
msgstr "You have used network or server hardware and you don't know what to do with it?"
#: apps/gnous_eu/templates/tips.html:29 apps/gnous_eu/templates/tips.html:41
msgid "Contactez nous par mail à "
msgstr "Contact us by mail at "
#: apps/gnous_eu/templates/tips.html:37
msgid "Vous êtes fournisseur de services ?"
msgstr "Are you a service provider?"
#: apps/gnous_eu/templates/tips.html:39
msgid "Discutons plus en détails de votre proposition ! Nous sommes ouvert à tout partenariat."
msgstr "Let's discuss your proposal in more detail! We are open to any partnership."
#: apps/gnous_eu/templates/layouts/base.html:42
msgid "Bla bla bla... bannière alakon pour dire qu&amp;on utilise des cookies (pour la langue et cette bannière)"
msgstr "Bla bla bla... shitty banner to say that we\\'re using cookies (for the language and this banner)"

+ 170
- 0
locale/fr/LC_MESSAGES/django.po View File

@ -0,0 +1,170 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-15 21:59+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: apps/gnous_eu/models.py:9
msgid "Sources closes"
msgstr ""
#: apps/gnous_eu/models.py:10
msgid "Sources ouvertes"
msgstr ""
#: apps/gnous_eu/models.py:11 apps/gnous_eu/models.py:16
msgid "Inconnu"
msgstr ""
#: apps/gnous_eu/models.py:14
msgid "Fédéré"
msgstr ""
#: apps/gnous_eu/models.py:15
msgid "Centralisé"
msgstr ""
#: apps/gnous_eu/templates/index.html:12
msgid "Communauté francophone de passionnés du libre depuis 2017."
msgstr ""
#: apps/gnous_eu/templates/index.html:21
#: apps/gnous_eu/templates/services.html:10
msgid "Nos services"
msgstr ""
#: apps/gnous_eu/templates/index.html:22
#: apps/gnous_eu/templates/about.html:11
#: apps/gnous_eu/templates/layouts/head.html:13
#: apps/gnous_eu/templates/layouts/header.html:33
#: apps/gnous_eu/templates/layouts/sidebar.html:26
msgid "À propos"
msgstr ""
#: apps/gnous_eu/templates/about.html:16
msgid ""
"GnousEU est une communauté de passionnés du libre ayant débuté en Février 2017 sur la plateforme Discord."
"Depuis elle s'est diversifiée sur plusieurs plateformes hébergées par elle même en favoirsant les instances déscentralisées."
"Elle ne cesse de grandir de jour en jour et est ouverte à tous nouveaux membres."
"Un système de recensemment des membre et d'interconnexion des plateformes est toujours à l'étude pour permettre une meilleure continuité au sein de la communauté."
"Actuellement la grande majorité de ses membres se trouvent sur le serveur Discord."
msgstr ""
#: apps/gnous_eu/templates/about.html:17
msgid ""
"Cette communauté à été créée par Mael G. aka Outout et est administrée par lui même "
"mais aussi par Romain J., Rick Krict, DoomQuakeKeen et Orakle au design."
msgstr ""
"Cette communauté à été créée par <code><a href='https://enpls.org'>Mael G. aka Outout</a></code> et est administrée par lui même "
"mais aussi par <code><a href='https://git.gnous.eu/Romain'>Romain J.</a></code>, <code><a href='https://semapy.xyz'>Rick Krict</a></code>, <code>DoomQuakeKeen</code> et <code>Orakle</code> au design."
#: apps/gnous_eu/templates/about.html:18
msgid ""
"GnousEU est hébergé sur l'infrastructure EnPLS.org disposant de serveurs en France, Pays-Bas, Allemagne et Guadeloupe."
msgstr "GnousEU est hébergé sur l'infrastructure <a href='https://enpls.org/weathermap.png'>EnPLS.org</a> disposant de serveurs en France, Pays-Bas, Allemagne et Guadeloupe."
#: apps/gnous_eu/templates/layouts/footer.html:6
msgid "Designé par"
msgstr ""
#: apps/gnous_eu/templates/layouts/footer.html:9
msgid "Crée par"
msgstr ""
#: apps/gnous_eu/templates/layouts/footer.html:12
msgid "Fait avec"
msgstr ""
#: apps/gnous_eu/templates/layouts/head.html:11
#: apps/gnous_eu/templates/layouts/header.html:17
#: apps/gnous_eu/templates/layouts/sidebar.html:12
msgid "Accueil"
msgstr ""
#: apps/gnous_eu/templates/layouts/head.html:12
#: apps/gnous_eu/templates/layouts/header.html:23
#: apps/gnous_eu/templates/layouts/sidebar.html:19
msgid "Services"
msgstr ""
#: apps/gnous_eu/templates/layouts/head.html:14
msgid "Dons"
msgstr ""
#: apps/gnous_eu/templates/layouts/header.html:39
#: apps/gnous_eu/templates/layouts/sidebar.html:31
msgid "Donner"
msgstr ""
#: apps/gnous_eu/templates/layouts/sidebar.html:37
msgid "Langue"
msgstr ""
#: apps/gnous_eu/templates/services.html:11
msgid ""
"GnousEU propose à tous des services gratuits et libre d'utilisations à tous. "
"Ces services sont majoritairement opensource et ne volent pas vos précieuses données personnelles."
msgstr ""
#: apps/gnous_eu/templates/services.html:20
msgid "Rechercher..."
msgstr ""
#: apps/gnous_eu/templates/services.html:74
msgid "Précédent"
msgstr ""
#: apps/gnous_eu/templates/services.html:89
msgid "Suivant"
msgstr ""
#: apps/gnous_eu/templates/services.html:100
msgid "Aucun service trouvé pour la recheche: "
msgstr ""
#: apps/gnous_eu/templates/tips.html:12
msgid "Donnez à GnousEU"
msgstr ""
#: apps/gnous_eu/templates/tips.html:14
msgid "Participez au développement de la communauté de GnousEU via un don monétaire via le site Tipeee."
msgstr ""
#: apps/gnous_eu/templates/tips.html:25
msgid "Vous souhaitez nous donner du materiel ?"
msgstr ""
#: apps/gnous_eu/templates/tips.html:27
msgid "Vous disposez de materiel réseau ou serveur usagé et vous ne savez pas quoi en faire ?"
msgstr ""
#: apps/gnous_eu/templates/tips.html:29 apps/gnous_eu/templates/tips.html:41
msgid "Contactez nous par mail à "