From 8d20bb37e6fa50de07564be3e27fb7fd269a87cb Mon Sep 17 00:00:00 2001 From: John Hess Date: Mon, 14 Mar 2022 17:35:46 -0500 Subject: [PATCH] per-environment copy, analytics --- _data/deployment.yml | 3 ++ _data/deployments/butterbox/deployment.yml | 3 ++ _data/deployments/web/deployment.yml | 3 ++ _data/en/home.yml | 13 +++++++-- _data/es/home.yml | 11 +++++-- _data/home.yml | 13 +++++++-- _layouts/basic.html | 34 +++++++++++----------- index.html | 10 ++++++- 8 files changed, 63 insertions(+), 27 deletions(-) create mode 100644 _data/deployment.yml create mode 100644 _data/deployments/butterbox/deployment.yml create mode 100644 _data/deployments/web/deployment.yml diff --git a/_data/deployment.yml b/_data/deployment.yml new file mode 100644 index 0000000..f83be1f --- /dev/null +++ b/_data/deployment.yml @@ -0,0 +1,3 @@ +# Deployment-specific variables to specify what features to surface. +has_internet: true +show_chat: false \ No newline at end of file diff --git a/_data/deployments/butterbox/deployment.yml b/_data/deployments/butterbox/deployment.yml new file mode 100644 index 0000000..328e313 --- /dev/null +++ b/_data/deployments/butterbox/deployment.yml @@ -0,0 +1,3 @@ +# Deployment-specific variables to specify what features to surface. +has_internet: false +show_chat: true \ No newline at end of file diff --git a/_data/deployments/web/deployment.yml b/_data/deployments/web/deployment.yml new file mode 100644 index 0000000..f83be1f --- /dev/null +++ b/_data/deployments/web/deployment.yml @@ -0,0 +1,3 @@ +# Deployment-specific variables to specify what features to surface. +has_internet: true +show_chat: false \ No newline at end of file diff --git a/_data/en/home.yml b/_data/en/home.yml index 47bb11d..dd7c98e 100644 --- a/_data/en/home.yml +++ b/_data/en/home.yml @@ -1,10 +1,17 @@ site_name: 'Butter' page_logo: ['/assets/images/butter-logo-feature-large.svg', 'Butter App Feature Logo'] title: 'Life without internet made smoother.
Get access to tools that help.' -text: | - This Butter Box offers an Android app store and chat rooms. You can use the app store to discover and download free, ad-free apps or to spread the love and share apps offline. The chat rooms hang on to messages while you're gone and deliver them whenever a device reconnects to the Butter Box. +text: + show_chat: | + This Butter Box offers an Android app store and chat rooms.
+ Download the Butter app to discover and download free, ad-free
+ apps or to spread the love and share apps offline. Or, create a
+ chat room which hangs on to messages while you're gone and
+ delivers them whenever your device reconnects to the Butter Box. + dont_show_chat: | + Butter features a collection of apps to make life without
the internet a little smoother. Use it to discover and download
free, ad-free apps or to spread the love and share offline. fdroid_apps_caption: Just a few of the apps available via Butter. -fdroid_button_text: 'Download Android App Store' +fdroid_button_text: 'Download Android App' chat_button_text: 'Start a chat room instantly' image: ['/assets/images/butter-collection-features-offline-essentials.svg', 'Butter App features collection'] diff --git a/_data/es/home.yml b/_data/es/home.yml index 745e2d0..8bd6531 100644 --- a/_data/es/home.yml +++ b/_data/es/home.yml @@ -1,9 +1,14 @@ site_name: 'Mantequilla' page_logo: ['/assets/images/butter-logo-feature-large.svg', 'Butter App Feature Logo'] -title: 'Para hacer tu vida sin Internet más fácil.
Obtén herramientas que ayudan.' -text: | +title: 'Para hacer tu vida sin Internet más fácil. Obtén herramientas que ayudan.' +text: + show_chat: | + Este Caja de Mantequilla presenta una colección de aplicaciones de Android y salas de chat. Descarga la aplicación Mantequilla para descubrir y descargar aplicaciones gratuitas y sin publicidad o compartir cuando no tienes conexión. O, crea una sala de chat que conserva mensajes cuando no estás aquí y los entrega cuando se vuelve a conectar a la Caja de Mantequilla. + dont_show_chat: | Mantequilla presenta una colección de aplicaciones para ayudarte cuando no tienes acceso a Internet. Úsala para descubrir y descargar aplicaciones gratuitas y sin publicidad o compartir cuando no tienes conexión. -button_text: 'DESCARGA LA APLICACIÓN ANDROID' +fdroid_apps_caption: Unas aplicaciónes disponible de Mantequilla +fdroid_button_text: 'DESCARGA LA APLICACIÓN ANDROID' +chat_button_text: Crea una sala de chat image: ['/assets/images/butter-collection-features-offline-essentials.svg', 'Butter App features collection'] diff --git a/_data/home.yml b/_data/home.yml index 47bb11d..dd7c98e 100644 --- a/_data/home.yml +++ b/_data/home.yml @@ -1,10 +1,17 @@ site_name: 'Butter' page_logo: ['/assets/images/butter-logo-feature-large.svg', 'Butter App Feature Logo'] title: 'Life without internet made smoother.
Get access to tools that help.' -text: | - This Butter Box offers an Android app store and chat rooms. You can use the app store to discover and download free, ad-free apps or to spread the love and share apps offline. The chat rooms hang on to messages while you're gone and deliver them whenever a device reconnects to the Butter Box. +text: + show_chat: | + This Butter Box offers an Android app store and chat rooms.
+ Download the Butter app to discover and download free, ad-free
+ apps or to spread the love and share apps offline. Or, create a
+ chat room which hangs on to messages while you're gone and
+ delivers them whenever your device reconnects to the Butter Box. + dont_show_chat: | + Butter features a collection of apps to make life without
the internet a little smoother. Use it to discover and download
free, ad-free apps or to spread the love and share offline. fdroid_apps_caption: Just a few of the apps available via Butter. -fdroid_button_text: 'Download Android App Store' +fdroid_button_text: 'Download Android App' chat_button_text: 'Start a chat room instantly' image: ['/assets/images/butter-collection-features-offline-essentials.svg', 'Butter App features collection'] diff --git a/_layouts/basic.html b/_layouts/basic.html index ccb02d2..24da5d6 100644 --- a/_layouts/basic.html +++ b/_layouts/basic.html @@ -21,23 +21,23 @@ - - - - - + {% if site.data.deployment.has_internet %} + + + + {% endif %} diff --git a/index.html b/index.html index a40dbbf..4cbaf94 100644 --- a/index.html +++ b/index.html @@ -9,13 +9,21 @@ layout: default
{{ page_data.page_logo[1] }}

{{ page_data.title }}

-

{{ page_data.text }}

+

+ {% if site.data.deployment.show_chat %} + {{ page_data.text.show_chat }} + {% else %} + {{ page_data.text.dont_show_chat }} + {% endif %} +

{{ page_data.image[1] }}

{{ page_data.fdroid_apps_caption }}

{{ page_data.fdroid_button_text | upcase }} + {% if site.data.deployment.show_chat %} {{ page_data.chat_button_text | upcase }} + {% endif %}

{{ page_data.chat_text }}