first commit for v2
This commit is contained in:
parent
e1b7112e43
commit
a489034746
336 changed files with 1951 additions and 40507 deletions
164
.gitignore
vendored
Normal file
164
.gitignore
vendored
Normal 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
|
3
.idea/.gitignore
generated
vendored
3
.idea/.gitignore
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
|
||||
# Default ignored files
|
||||
/workspace.xml
|
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
|
@ -0,0 +1,5 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
13
.idea/dataSources.xml
generated
Normal file
13
.idea/dataSources.xml
generated
Normal 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
.idea/gnousEU.iml
generated
Normal file
31
.idea/gnousEU.iml
generated
Normal 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="<map> <entry> <string>OAUTHLIB_INSECURE_TRANSPORT</string> <string>1</string> </entry> </map>" />
|
||||
<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>
|
9
.idea/gnousdoteu.iml
generated
9
.idea/gnousdoteu.iml
generated
|
@ -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
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
|
@ -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>
|
2
.idea/modules.xml
generated
2
.idea/modules.xml
generated
|
@ -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>
|
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
|
@ -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
.idea/watcherTasks.xml
generated
Normal file
25
.idea/watcherTasks.xml
generated
Normal 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>
|
7
LICENSE
7
LICENSE
|
@ -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.
|
66
README.md
66
README.md
|
@ -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)
|
0
apps/gnous_eu/__init__.py
Normal file
0
apps/gnous_eu/__init__.py
Normal file
23
apps/gnous_eu/admin.py
Normal file
23
apps/gnous_eu/admin.py
Normal 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
apps/gnous_eu/apps.py
Normal file
10
apps/gnous_eu/apps.py
Normal 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
apps/gnous_eu/migrations/0001_initial.py
Normal file
48
apps/gnous_eu/migrations/0001_initial.py
Normal 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
apps/gnous_eu/migrations/__init__.py
Normal file
0
apps/gnous_eu/migrations/__init__.py
Normal file
43
apps/gnous_eu/models.py
Normal file
43
apps/gnous_eu/models.py
Normal 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
apps/gnous_eu/templates/about.html
Normal file
23
apps/gnous_eu/templates/about.html
Normal 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
apps/gnous_eu/templates/index.html
Normal file
27
apps/gnous_eu/templates/index.html
Normal 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
apps/gnous_eu/templates/layouts/base.html
Normal file
54
apps/gnous_eu/templates/layouts/base.html
Normal 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&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
apps/gnous_eu/templates/layouts/footer.html
Normal file
24
apps/gnous_eu/templates/layouts/footer.html
Normal 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
apps/gnous_eu/templates/layouts/head.html
Normal file
22
apps/gnous_eu/templates/layouts/head.html
Normal 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
apps/gnous_eu/templates/layouts/header.html
Normal file
64
apps/gnous_eu/templates/layouts/header.html
Normal 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
apps/gnous_eu/templates/layouts/sidebar.html
Normal file
51
apps/gnous_eu/templates/layouts/sidebar.html
Normal 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
apps/gnous_eu/templates/services.html
Normal file
123
apps/gnous_eu/templates/services.html
Normal 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
apps/gnous_eu/templates/tips.html
Normal file
48
apps/gnous_eu/templates/tips.html
Normal 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
apps/gnous_eu/tests.py
Normal file
3
apps/gnous_eu/tests.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
13
apps/gnous_eu/urls.py
Normal file
13
apps/gnous_eu/urls.py
Normal 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
apps/gnous_eu/views.py
Normal file
37
apps/gnous_eu/views.py
Normal 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},
|
||||
)
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"require": {
|
||||
"smarty/smarty": "^3.1"
|
||||
}
|
||||
}
|
71
composer.lock
generated
71
composer.lock
generated
|
@ -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
gnousEU/__init__.py
Normal file
0
gnousEU/__init__.py
Normal file
16
gnousEU/asgi.py
Normal file
16
gnousEU/asgi.py
Normal 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
gnousEU/settings.py
Normal file
126
gnousEU/settings.py
Normal 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
gnousEU/urls.py
Normal file
25
gnousEU/urls.py
Normal 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
gnousEU/wsgi.py
Normal file
16
gnousEU/wsgi.py
Normal 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()
|
|
@ -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"
|
||||
|
||||
|
||||
}
|
|
@ -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
locale/en/LC_MESSAGES/django.po
Normal file
179
locale/en/LC_MESSAGES/django.po
Normal file