Commit 7ba8a6c3 authored by rgaudin's avatar rgaudin
Browse files

Added shortcuts for KAlite ES

parent efac2711
......@@ -40,6 +40,11 @@ server {
return 200 "<html><head><title>KA Lite en français</title></head><body><p>Veuillez patienter…</p><iframe style='display: none;' src='/api/i18n/set_default_language/?lang=fr' onload=\"window.location = '/';\"><p><a href='/'>Cliquez ici</a> pour accèder à Khan Academy</p></iframe></body></html>";
}
location /go/es {
add_header Content-Type "text/html; charset=UTF-8";
return 200 "<html><head><title>KA Lite en español</title></head><body><p>Por favor espera…</p><iframe style='display: none;' src='/api/i18n/set_default_language/?lang=es' onload=\"window.location = '/';\"><p><a href='/'>Haga clic aquí</a> para acceder a la Khan Academy</p></iframe></body></html>";
}
location /go/en {
add_header Content-Type "text/html; charset=UTF-8";
return 200 "<html><head><title>KA Lite in english</title></head><body><p>please wait…</p><iframe style='display: none;' src='/api/i18n/set_default_language/?lang=fr' onload=\"window.location = '/';\"><p><a href='/'>Click here</a> to access Khan Academy</p></iframe></body></html>";
......
......@@ -104,12 +104,14 @@ def generate_homepage(logger, options):
if options["language"] == "fr":
description = "Appentissage social/finance pour les enfants et les jeunes"
category = "Apprendre"
url = "http://{}/go/fr".format(aflatoun_fqdn)
else:
description = "Social and Financial Education for Children and Young People"
category = "Learn"
url = "http://{}".format(aflatoun_fqdn)
cards.append(
{
"url": "http://{}/go/{}".format(aflatoun_fqdn, options["language"]),
"url": url,
"css_class": "",
"category_class": "learn",
"category": category,
......@@ -132,6 +134,17 @@ def generate_homepage(logger, options):
"description": "Apprendre via des vidéos et des exercices.",
}
)
if "es" in options["kalite_languages"]:
cards.append(
{
"url": "http://{}/go/es".format(kalite_fqdn),
"css_class": "khanacademy",
"category_class": "learn",
"category": "Aprender",
"title": "Khan Academy",
"description": "Aprende con videos y ejercicios.",
}
)
if "en" in options["kalite_languages"]:
cards.append(
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment