Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom app logo #478

Open
9 tasks
fushar opened this issue Jul 29, 2023 · 0 comments
Open
9 tasks

Support custom app logo #478

fushar opened this issue Jul 29, 2023 · 0 comments

Comments

@fushar
Copy link
Member

fushar commented Jul 29, 2023

Description

Support custom app logo in both admin and client interfaces.

Admin Client
image image

(Possible) Implementation Details

  • Add optional config logo in JudgelsAppConfiguration.

    public interface JudgelsAppConfiguration {
        String getName();
        Optional<String> getLogo();      <-- new config
    
  • Add the logo config to judgels-server.yml.example (commented out by default):

    judgels:
      baseDataDir: var/data
    
      app:
        name: Judgels
        # logo: var/conf/logo.png      <-- new config
    

Specific for admin interface

  • Implement a new GET /logo endpoint in Michael's IndexResource.
  • Point the logo image URL in admin interface to the above new endpoint.

Specific for client interface

  • Implement a new GET /api/v2/web/logo endpoint in Jophiel. Create a new web.WebResource resource, and implement the endpoint there. Implementation is similar to Michael's endpoint above.
  • Point the logo image URL in client interface AND favico to the above new endpoint (apiUrl + /logo)
  • Remove all existing images in judgels-client, because now we fetch the image from the server.

For deployment

  • Add optional app_logo: config in env-example/vars.yml (commented out by default).

    app_version: xxx
    app_name: xxx
    app_slogan: xxx
    app_title: xxx
    app_description: xxx
    # app_logo: var/conf/logo.png       <-- new config
    
  • Modify the ansible playbook so that if the config exists, it:

    • copies the file env/logo.png to var/conf/
    • adds the logo config to judgels-server.yml as explained above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants