Getting started

This is a tutorial which will give you a simple introduction to customizing the frontend for your own purposes.

Say, you want to change the logo image that rests in the top left corner of every page. You’ll need to do the following:

  1. Add a new image to the frontend source files

  2. Identify the component that displays the logo

  3. Edit the corresponding template and maybe add some styles

  4. Build the frontend

Let’s go through these steps in greater detail.

Add a new image

Static resources like images, icons, and multimedia are found in the /frontend/public folder.

If you look inside the folder, you’ll find a logo.png file in there already. Now you could easily swap it for a different image with the same filename but that’s no fun. Instead, get a new my-logo.png image and drop it into /fontend/public.

Edit template

In Header.vue you’ll find that the logo is found in this line <img class="global-logo" src="/logo.png" alt="">. Change the src attribute of the img element to “/my-logo.png”. Notice that the image src URL considers /frontend/public folder to be the root folder for static files. So the proper way to point to /frontend/public/my-logo.png is to enter /my-logo.png.

Maybe your new logo has some different dimensions so you might want to change the logo’s styles. The img element has class global-logo. Look in the <styles> section of Header.vue to find the CSS rules for .global-logo and change it accordingly. Styles that only apply to a certain component are usually added directly to Vue components like this. Global styles are added in App.vue or in some of the CSS files in /frontend/src/assets/css

Build the frontend

If you are running in development mode, your changes should display in the browser right after you save your changes. For a production build, you’d run the npm run build command and host the built files from /frontend/dist somewhere. Now you’ve customized the frontend :)