---
# General
application_id: "web-app-littlejs"
entity_name: "{{ application_id | entity_name }}"
domain: "{{ lookup('domain',application_id) }}"
LITTLEJS_HEADLINE: "LittleJS Playground"
LITTLEJS_TITLE: "{{ LITTLEJS_HEADLINE }} β {{ DOMAIN_PRIMARY | upper }}"
LITTLEJS_DESIGN_ENABLED: "{{ lookup('config', application_id, 'services.design.enabled') | bool }}"
LITTLEJS_DESIGN_LOGO_ENABLED: "{{ LITTLEJS_DESIGN_ENABLED | bool and lookup('design', application_id).logo is string }}"
LITTLEJS_DESIGN_TITLE_ENABLED: "{{ LITTLEJS_DESIGN_ENABLED | bool and lookup('design', application_id).title is string }}"
LITTLEJS_DOCUMENT_TITLE: "{{ lookup('design', application_id).title if LITTLEJS_DESIGN_TITLE_ENABLED | bool else LITTLEJS_TITLE }}"
LITTLEJS_RUN_TITLE: "{{ lookup('design', application_id).title if LITTLEJS_DESIGN_TITLE_ENABLED | bool else 'LittleJS Example' }}"
# Clone coordinates β SPOT in meta/services.yml
LITTLEJS_REPOSITORY: "{{ lookup('config', 'web-app-littlejs', 'services.littlejs.repository') }}"
LITTLEJS_REF: "{{ lookup('config', 'web-app-littlejs', 'services.littlejs.ref') }}"
# Human-readable upstream link for nav_bottom.html (strip .git suffix)
LITTLEJS_REPOSITORY_BASE: "{{ LITTLEJS_REPOSITORY | regex_replace('\\.git$', '') }}"
# Relative path where sys-stk-full checks out the repo
LITTLEJS_APP_REL: "services/repository"
LITTLEJS_INDEX_HOST_ABS: "{{ [ lookup('container', application_id, 'directories.volumes'), 'index.html' ] | path_join }}"
LITTLEJS_INDEX_HOST_REL: "volumes/index.html"
# Helper variables
LITTLEJS_CONTAINER: "{{ entity_name }}"
LITTLEJS_SERVICE: "{{ entity_name }}"
LITTLEJS_IMAGE: "{{ lookup('config', application_id, 'services.littlejs.image') }}"
LITTLEJS_VERSION: "{{ lookup('config', application_id, 'services.littlejs.version') }}"
# Runner HTML for non-full examples
LITTLEJS_RUN_HOST_ABS: "{{ [ lookup('container', application_id, 'directories.volumes'), 'run.html' ] | path_join }}"
LITTLEJS_RUN_HOST_REL: "volumes/run.html"