Commit a728e600ae83ff73abc6e3eb4c77934b7039c4e5

Authored by Antoine Goutenoir
1 parent e34a06a0
Exists in master

Allow configuration of the displayed distances on the home plot.

Showing 2 changed files with 18 additions and 5 deletions   Show diff stats
content.yml
... ... @@ -254,6 +254,23 @@ models:
254 254 - [ 25000.0, 1033.0117495994948 ]
255 255  
256 256  
  257 +# The grouped barchart displayed on the home page.
  258 +laws_plot:
  259 + distances:
  260 + - 200.0
  261 + - 350.0
  262 + - 500.0
  263 + - 1000.0
  264 + - 1500.0
  265 + - 2500.0
  266 + - 3000.0
  267 + - 4500.0
  268 + - 5000.0
  269 + - 8000.0
  270 + - 10000.0
  271 + - 12000.0
  272 +
  273 +
257 274 # The content is Markdown. HTML is also allowed.
258 275 # If you also want Markdown in the titles, just ask.
259 276 home:
... ... @@ -275,7 +292,6 @@ home:
275 292 <span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
276 293 [didier.barret@gmail.com](mailto:didier.barret@gmail.com)
277 294  
278   -
279 295 sections:
280 296 # Add as many sections as you want.
281 297 # Three blocks per section ; if you want another amount, it can be done, please ask.
... ...
flaskr/controllers/main_controller.py
... ... @@ -471,10 +471,7 @@ def consult_estimation(public_id, extension):
471 471  
472 472 @main.route("/scaling_laws.csv")
473 473 def get_scaling_laws_csv():
474   - distances = [
475   - 500., 1000., 1500., 2500., 3000., 4500.,
476   - 5000., 8000., 10000., 12000.,
477   - ]
  474 + distances = content.laws_plot.distances
478 475 models = get_emission_models()
479 476  
480 477 si = StringIO()
... ...