Hello, guys. This is a topic already covered in older posts but I am opening a new one to see if I can put things more clearly. I also believe this is the kind of thing many others would like to use more in their applications, so it is a nice discussion to start.
I have an Vaadin 7 app created through the maven-archetype-application. It generates a custom theme called mytheme, that I am using to (try to) work with custom layouts. This is the structure right now (image attached too):
- /webapp/VAADIN/themes/mytheme
- /webapp/VAADIN/themes/mytheme/styles.css (I am NOT using SASS, only plain CSS)
- /webapp/VAADIN/themes/mytheme/img: some images used in the CSS rules
- /webapp/VAADIN/themes/mytheme/js: 2 javascript files
- /webapp/VAADIN/themes/mytheme/layouts: two files, index.xml and inner_page.xml
In the CSS, references to images are done like this:
./img/image.png
, since the CSS file is in the same level as the img folder. In the HTML templates, references are made like this:
…/js/script.js
and
…/styles.css
, which to me sounds OK. Like:
[code]
[/code]In the CSS, I am doing like this:
@charset "utf-8";
@import "../reindeer/legacy-styles.css";
And then the rules come. Regular CSS rules. Like:
[code]
html {
font-size: 62.5%;
}
body {
font-size: 1.6em;
line-height: 1;
text-align: center;
}
[/code]I am compiling the project in Eclipse using Run As > Maven install and compilation runs OK. Then I run in a Tomcat bundle using Run As > Run on Server. And I get a result like in the
image2.png
attached, which is far distant from the page I was expecting. It doesn’t work … do you have any idea of the appropriate structure to follow in order to use custom layouts in Vaadin 7? What am I doing wrong?
Thanks so much in advance!
Regards,
Pedro