Skip to content

Commit

Permalink
feat(doc): add import documentation + change sphinx theme style (#3256)
Browse files Browse the repository at this point in the history
* add user documentation for the import module
* change the sphinx theme (book_theme)
* add developer documentation for the import module
* add admin documentation for the import module

---------

Co-authored-by: Camille Monchicourt <[email protected]>
  • Loading branch information
jacquesfize and camillemonchicourt authored Nov 21, 2024
1 parent c7b3950 commit 596899b
Show file tree
Hide file tree
Showing 26 changed files with 794 additions and 376 deletions.
49 changes: 25 additions & 24 deletions docs/admin-manual.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MANUEL ADMINISTRATEUR
Manuel administrateur
=====================

Architecture
Expand Down Expand Up @@ -1216,6 +1216,7 @@ propriété ``label``. Un exemple est disponible ci-dessous.
label = "Mot de passe oublié ?"
url = "https://mon.formulaire.de.motdepasse"
Customiser l'aspect esthétique
""""""""""""""""""""""""""""""

Expand All @@ -1239,28 +1240,28 @@ Autre exemple, il est possible personnaliser les polices ou les couleurs :

.. code-block:: css
/* IMPORT POLICE BEBAS NEUE
* ! Bebas Neue by @Ryoichi Tsunekawa
* License - Open Font License
*/
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
/* Couleurs principales de l'application */
.color-blue {
color:#678BC5!important;
}
.color-orange {
color:#DEC70D!important;
}
.color-teal {
color:#A8DE0D!important;
}
.color-red {
color:#DE280D!important
}
#appName h3{
font-family:Bebas Neue,Arial,sans-serif!important;
font-size: xx-large
}
/* IMPORT POLICE BEBAS NEUE
* ! Bebas Neue by @Ryoichi Tsunekawa
* License - Open Font License
*/
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
/* Couleurs principales de l'application */
.color-blue {
color:#678BC5!important;
}
.color-orange {
color:#DEC70D!important;
}
.color-teal {
color:#A8DE0D!important;
}
.color-red {
color:#DE280D!important
}
#appName h3{
font-family:Bebas Neue,Arial,sans-serif!important;
font-size: xx-large
}
Certains paramètres demandent l'ajout de la mention ``!important`` pour être pris en compte (https://github.com/PnX-SI/GeoNature/issues/2632).

Expand Down Expand Up @@ -2445,4 +2446,4 @@ Les permissions du module TaxHub peuvent être reglées aux trois niveaux (objet
- ATTRIBUTS : permet de voir / créer / modifier / supprimer des attributs de taxons


.. include:: import_doc.rst
.. include:: admin/import_admin.rst
297 changes: 297 additions & 0 deletions docs/admin/import_admin.rst

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/authors.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AUTEURS
Auteurs
=======

Parc national des Écrins
Expand Down
42 changes: 27 additions & 15 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
## AUTOAPI
extensions.append("autoapi.extension")
autoapi_dirs = ["../backend/geonature", "../backend/dependencies"]
autoapi_ignore = ["*migrations*", "*tests*"]
autoapi_ignore = ["*migrations*", "*tests*", "*celery_app.py"]
autoapi_add_toctree_entry = False


Expand All @@ -54,7 +54,11 @@
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = [".rst", ".md"]
source_suffix = {
".rst": "restructuredtext",
".txt": "markdown",
".md": "markdown",
}

# The master toctree document.
master_doc = "index"
Expand Down Expand Up @@ -97,25 +101,33 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
html_theme = "sphinx_book_theme"
html_logo = "./images/LogoGeonature.jpg"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
"canonical_url": "",
"logo_only": False,
"display_version": True,
"prev_next_buttons_location": "bottom",
"style_external_links": False,
"style_nav_header_background": "white",
# Toc options
"collapse_navigation": True,
"sticky_navigation": True,
"navigation_depth": 4,
"includehidden": True,
"titles_only": False,
"use_source_button": True,
"repository_provider": "github",
"repository_url": "https://github.com/PnX-SI/GeoNature",
"path_to_docs": "docs",
"repository_branch": "master",
"use_repository_button": True,
"collapse_navbar": True,
"icon_links": [
{
# Label for this link
"name": "GitHub",
# URL where the link will redirect
"url": "https://github.com/PnX-SI/GeoNature", # required
# Icon class (if "type": "fontawesome"), or path to local image (if "type": "local")
"icon": "fa-brands fa-square-github",
# The type of image to be used (see below for details)
"type": "fontawesome",
}
],
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand All @@ -128,7 +140,7 @@
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {"**": ["globaltoc.html", "relations.html", "sourcelink.html", "searchbox.html"]}
# html_sidebars = {"**": ["globaltoc.html", "relations.html", "sourcelink.html", "searchbox.html"]}
# html_sidebars = {
# '**': [
# 'relations.html', # needs 'show_related': True theme option to display
Expand Down
4 changes: 3 additions & 1 deletion docs/development.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEVELOPPEMENT
Développement
=============

Général
Expand Down Expand Up @@ -1641,6 +1641,8 @@ Bonnes pratiques Frontend

<img src="assets/<gn_module_validation>/afb.png">

.. include:: development/import-dev.rst


Documentation
-------------
Expand Down
Loading

0 comments on commit 596899b

Please sign in to comment.