diff --git a/deployment/ansible/conf/judgels-client.js.j2 b/deployment/ansible/conf/judgels-client.js.j2 index 8f8a95ce7..bf114e1da 100644 --- a/deployment/ansible/conf/judgels-client.js.j2 +++ b/deployment/ansible/conf/judgels-client.js.j2 @@ -7,6 +7,9 @@ window.conf = { title: '{{ app_title }}', description: '{{ app_description }}', }, +{% if app_footer is defined %} + footer: '{{ app_footer }}', +{% endif %} {% if googleAnalytics_trackingId is defined %} googleAnalytics: { trackingId: '{{ googleAnalytics_trackingId }}', diff --git a/deployment/ansible/env-example/vars.yml b/deployment/ansible/env-example/vars.yml index ccbd5950d..7e84f118f 100644 --- a/deployment/ansible/env-example/vars.yml +++ b/deployment/ansible/env-example/vars.yml @@ -3,6 +3,7 @@ app_name: Judgels app_slogan: Programming Contest System app_title: <h1>Welcome to Judgels</h1> app_description: <h2>This is a programming contest system.</h2> +app_footer: © Ikatan Alumni TOKI nginx_domain_judgels_client: judgels.com nginx_domain_judgels_server_api: api.judgels.com diff --git a/judgels-client/public/var/conf/judgels-client.js.example b/judgels-client/public/var/conf/judgels-client.js.example index f78c3c5ab..e905cbedc 100644 --- a/judgels-client/public/var/conf/judgels-client.js.example +++ b/judgels-client/public/var/conf/judgels-client.js.example @@ -8,4 +8,5 @@ window.conf = { description: '<h2>This is a programming contest system.</h2>', }, + footer: '© Ikatan Alumni TOKI', }; diff --git a/judgels-client/src/components/Footer/Footer.jsx b/judgels-client/src/components/Footer/Footer.jsx index 20282a046..751c17f6a 100644 --- a/judgels-client/src/components/Footer/Footer.jsx +++ b/judgels-client/src/components/Footer/Footer.jsx @@ -1,11 +1,17 @@ +import HTMLReactParser from 'html-react-parser'; + +import { APP_CONFIG } from '../../conf'; + import './Footer.scss'; export function Footer() { + const footer = APP_CONFIG.footer || '© Ikatan Alumni TOKI'; + return ( <div className="footer"> <hr /> <small className="footer__text"> - <div className="float-left">© Ikatan Alumni TOKI</div> + <div className="float-left">{HTMLReactParser(footer)}</div> <div className="float-right"> Powered by <a href="https://github.com/ia-toki/judgels">Judgels</a> </div>