udata customizations for data.gouv.fr
Project description
udata-gouvfr
udata customizations for Etalab / Data.gouv.fr.
Note: This is a udata extension, you should read the udata documentation first.
Compatibility
udata-gouvfr requires Python 3.7+ and udata.
Installation
Install udata.
Remain in the same Python virtual environment and install udata-gouvfr:
pip install udata-gouvfr
Create a local configuration file udata.cfg
in your udata directory
(or where your UDATA_SETTINGS point out) or modify an existing one as following:
PLUGINS = ['gouvfr']
THEME = 'gouvfr'
Development
Prepare a udata development environment.
It is recommended to have a workspace with the following layout:
$WORKSPACE
├── fs
├── udata
│ ├── ...
│ └── setup.py
├── udata-gouvfr
│ ├── ...
│ └── setup.py
└── udata.cfg
The following steps use the same Python virtual environment
and the same version of npm (for JS) as udata
.
Clone the udata-gouvfr
repository into your workspace
and install it in development mode:
git clone https://github.com/etalab/udata-gouvfr.git
pip install -e udata-gouvfr
Modify your local udata.cfg
configuration file as following:
PLUGINS = ['gouvfr']
THEME = 'gouvfr'
You can execute udata-gouvfr
specific tasks from the udata-gouvfr
directory.
ex: Build the assets:
cd udata-gouvfr
npm install
inv assets-build
You can list available development commands with:
inv -l
Theme
The front-end theme for the public facing website, is split into two parts :
- The Jinja templates are located inside
udata_gouvfr/theme/templates
. - The Less & other sourcefiles for the are located in
theme
.
In addition we have a nice litle set of CSS Utilities to quickly build front end components, inspired by bootstrap, most of its documentation
lives in the css located in theme/less/
and is built using Stylemark, you can read the live documentation
in udata_gouvfr/theme/stylemark/
after building it using npm run build-stylemark
.
When building pages, here are a few templates to look out for in udata_gouvfr/theme/templates
:
home.html
: well, duh.header.html
andfooter.html
: same idea.raw.html
: contains the general html structure exposing abody
block where we can write our page's body.base.html
: contains some extra html structure exposing acontent
block for our page's content.subnav-large.html
,publish-action-modal.html
andcarousel.html
: TODO
Here are our reusable components :
dataset
: datasets listings used in many pages.reuse
: cards for displaying dataset reused in the real world.participez
: is the large blue callout seen on multiple pages.macros
: TODOsvg
: contains SVG assets to be included in our pages.
TODO
Front docs todo :
- Parcel 2 architecture
- Static copy
- Stylemark build
- VueJS compiler mode
- VanillaJS IIFE architecture
- Vue 3 architecture
- Modals
- I18n
- Config plugin
- Components Back docs todo :
- CSS/JS file inclusion
- Static route for UI-Kit
Whenever a components needs some special styling, you can find their corresponding definitions inside theme/less/specific/<component>
,
it's best if we can avoid having too much specific styling, but sometimes you just really need it.
Finally, we have a bunch of commands to make your life a tad easier, that you can run through npm run
.
build
: Builds the final CSS/JS files and the UI-Kit Documentation. You should probably use this one.build:app
: Builds the final CSS/JS files without the UI-Kitbuild:stylemark
: Builds the UI-Kit files and also the CSS/JS files but unminifed (do not use those static files in production)i18n:report
: Generates a report of the i18n missing and unused keysi18n:extract
: Same as above, but also automatically adds missing keys to translation filesclean
: Cleans Parcel cache. Use this if you stumble upon weird bugs to start anew.start
: Get to coding with live reload and things
Changelog
Current (in progress)
2.5.1 (2021-01-26)
- New Crowdin translations #511
2.5.0 (2021-01-25)
- Add Inventory cards on homepage #514
- Add documentation's dropdown menu with links to technical documentation and open data guides #516
2.3.0 (2020-11-30)
- Read Only Mode modifications on theme #509:
- Will display a warning banner on the frontend view.
- Hides the contribute's home's modal.
- Hides the Reuse's creation card and community resource's creation card on dataset view.
- Newsletter's subscription banner #512:
- Override alert section in posts list template to display newsletter's subscription banner.
- Add settings
POST_BANNER_ACTIVATED
to toggle banner's activation. - Add settings
POST_BANNER_LINK
andPOST_BANNER_MESSAGE
to configure subscription's link and message.
2.2.3 (2020-11-09)
- Add news link to posts list #504
2.2.2 (2020-10-16)
- Pinned udata version to fix transitive requests dependencies #500
2.2.1 (2020-10-16)
- Banner is now generic and configurable #499
- Fix links in static pages
2.2.0 (2020-08-25)
- Show api.gouv.fr APIs on dataset page #493
2.1.5 (2020-08-05)
2.1.4 (2020-06-29)
- Add static /pages/* from md in github repo #483
2.1.3 (2020-06-16)
- Fix packaging
2.1.1 (2020-06-11)
- Adding banner with setting inherited from udata's settings #480
2.1.0 (2020-05-13)
- Remove public services metrics #472
2.0.2 (2020-04-22)
- Ajout du flag "recherche" pour activer le widget d'experimentation de recherche #466
2.0.1 (2020-03-24)
- Add covid-19 badge for datasets and reuses #473
2.0.0 (2020-03-11)
- Migrate to python3 🐍 #453
1.6.13 (2019-12-13)
- Ajout de l'identifiant SPDX pour la licence Ouverte 2.0 #437
- Lien vers la doc d'API externe dans le footer #438
- Mise à jour de l'URL de Geo SIRENE #446
1.6.12 (2019-09-11)
1.6.11 (2019-07-11)
- New social logo (
og:image
) #419
1.6.10 (2019-06-26)
- Data catalog: id as ref instead of slug #415
- Add cache for topic display page #414
- Fix card size on dataset page #418
1.6.9 (2019-06-07)
- Switch removal of related tags in a topic page to a proper
related
jinja tag #408 - Add the homologation of IGN licenses #412
1.6.8 (2019-05-29)
1.6.7 (2019-05-23)
1.6.6 (2019-05-20)
1.6.5 (2019-05-10)
- Home blog post extraction improvements. Supports both Atom and RSS 2.0, more image tag formats,
media:thumbnail
and enclosures. #385 - Pin version of
requests
#397 - Improve header menu legibility #388
1.6.4 (2019-03-27)
- Updates topic entry page #382
1.6.3 (2019-03-06)
- Remove "compte des collectivités" from territories #376
- Push discussion under reuses and community resources 378
1.6.2 (2018-11-17)
- Konami code 🥚 #362 NB: this is not a release worth installing except on data.gouv.fr.
1.6.1 (2018-11-05)
1.6.0 (2018-10-02)
- Make use of assets manifest for long term caching #328
- Discussion add card style coherence #339
- Remove a duplicate rule on
.dataset-container h3
1.4.4 (2018-08-27)
- Fix the multisearch labels position #330
1.4.3 (2018-08-08)
- Fix the navbar toggle button position 🎊 #327
1.4.2 (2018-07-30)
- Add a reference on the page about SPD #318
1.4.1 (2018-06-06)
- Fix packaging
1.4.0 (2018-06-06)
- Typed resources related styles #265
- Enforce a domain whitelist when resource.filetype is file (migration) #292
- Use new pypi.org links #295
- Ensure active users have a confirmed_at date (migration) #298
- Remove credits page #306
- Fix
modal-lg
width #311 - Add tracking and privacy page #310
1.3.2 (2018-03-28)
- Limit number of forum topics #284
- Use new OEmbed cards in datasets recommandations #285
- Fix the RSS popover not being clickable #287
- Drop the custom style for non-certified datasets #288
1.3.1 (2018-03-15)
- Fix some cards positionning
1.3.0 (2018-03-13)
- Make use of udata pytest plugin #254
- Expose new entrypoints. Plugins and theme translations are now splitted #263
- Align card components design #252 #272
- Discourse timeout and response parse error catch #267
- Add tracking on home page call to action #271
- Add tracking on carousel elements #268
- Temporary carousel layout #274
- Add tracking of dataset recommendations #277
1.2.5 (2018-02-05)
- Small fixes on search facets related to opendatateam/udata#1410 #255
1.2.4 (2018-01-24)
- Licenses: Update SHOM attachment + fix BAN URL #249
1.2.3 (2018-01-17)
- Add the homologation of CC-BY-SA for SHOM #244
- Dataset recommendations #243
- Move some discussions style into
udata
core #251
1.2.2 (2017-12-14)
- Export CSS dropdown behavior to
udata
#234 - Remove internal FAQ and switch to doc.data.gouv.fr #236
1.2.1 (2017-12-06)
- Export community resource avatar style to udata #233
- Drop the
terms.html
template. Terms and conditions are now externalized and use the udata core template. (See udata#1285) #232
1.2.0 (2017-10-20)
- Use new search blueprint from uData #224
1.1.2 (2017-09-04)
- Fixes some spacing issues on dataset and reuses page buttons #209
- Fix some wrong spatial coverages #213
- Fix translations collision on contact #211 #212
- Updated some translations
1.1.1 (2017-07-31)
- Updated translations
1.1.0 (2017-07-05)
- Use the new entrypoint-based theme management #164
- Adjust the dataset reuses title overflow for proper display #172
- Drop glyphicons, remove some useless classes and upgrade to bootstrap 3.3.7 #177
- Use the core publish action modal #178
- Fix the deuil header not being an SVG #180
- Integrating latest versions of GeoZones and GeoLogos for territories. Especially using history of towns, counties and regions from GeoHisto. #499
- Add the missing placeholders #194
- Use the
udata.harvesters
entrypoint #195 - Revamp actionnable tabs #189
- Remove
.btn-more
class #191
1.0.9 (2017-06-28)
- Nothing yet
1.0.8 (2017-06-21)
- Fixed a typo #182
1.0.7 (2017-06-20)
- Added a Licences page #181
1.0.6 (2017-04-18)
- Fixed numbering in system integrator FAQ (thanks to Bruno Cornec) #174
- Added a footer link to the SPD page #176
1.0.5 (2017-04-06)
- Added a missing translation
- Alphabetical ordering on SPD datasets
1.0.4 (2017-04-05)
- Introduce SPD page and badge
1.0.3 (2017-02-27)
- Translations update
- Switch
udata-js
link tometaclic
#161
1.0.2 (2017-02-21)
1.0.1 (2017-02-20)
- Ensure missing FAQ sections raises a 404 #156
- Provide deep PyPI versions links into the footer #155
- Provide proper cache versionning for theme assets #155
1.0.0 (2017-02-16)
- Remove some main menu entries (events, CADA, Etalab)
- Use a new SVG logo
- Apply changes from uData 1.0.0
0.9.1 (2017-01-10)
- First published release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file udata_gouvfr-3.0.0.dev4301-py2.py3-none-any.whl
.
File metadata
- Download URL: udata_gouvfr-3.0.0.dev4301-py2.py3-none-any.whl
- Upload date:
- Size: 7.3 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d57bded7b725a319f30e5faeb9ba8bdd00242b5b9fa16e50e89e3e776d58e834 |
|
MD5 | c1902c2d8ab47e2f4e0f13eaa2a05883 |
|
BLAKE2b-256 | 59fbe7fd6a1b3f05856c32abb19caf46bc861d556e17be43ed80cd7cb660c510 |