how to add img to the lit template, as well as styles from google fonts? For some reason this doesn’t work for me, (in html), images from the Internet work, but local ones don’t, I don’t know how to specify the path correctly, I tried to do it in every way
You need to put local images in the correct place (/src/main/resources/META-INF/resources
for Spring Boot) to have them served.
thanks, I specified the path relative to “this” folder and it worked
can tell me anything about google fonts styles? how to connect them
The recommended way to load styles is through /frontend/themes/[themename]/styles.css
. Alternatively, you can load the CSS file with @StyleSheet
.
PS: I’m moving this discussion to the Flow category.
I understand that, but how to connect font styles? here are the lines of code that connect other fonts for standard html, but how to connect this in vaadin?
You can add the google fonts in your frontend/index.html
that should be generated when you start your application.
You can also do it in Java, but I don’t think it’s better in your case.
okay I will try. qqqqqqqq
I have another question about styles, I noticed that my text is not too dark because lumo styles are used for LitTemplate (I found out through Chrome dev), I don’t want to use them specifically for this template (I override them in @Theme I don’t want to because for each page I can have special styles and I don’t need lumo, I’ll do everything myself)
Specifically for my case, everything becomes as it should when this property is disabled