Freya stylesheets are not loading

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
mposhtkouhi
Posts: 5
Joined: 27 Jun 2018, 19:15

18 Feb 2021, 05:08

I have used other PF layouts, and they have worked quite well following the instructions. However, after downloading Freya, unzipping it, and running the following commands:

sass --update src/main/webapp/resources:src/main/webapp/resources --no-source-map
mvn jetty:run

the resource at http://localhost:8080/freya/

does not load the stylesheets, and it looks all messed up. What am I missing here?

Update: Also, when I compile the CSS, one error pops:

Error: Undefined variable.
background-color: $topbarBgColor;
^^^^^^^^^^^^^^


Thank you,

tugce.kucukoglu
Posts: 560
Joined: 23 Oct 2020, 09:28

23 Feb 2021, 08:47

Hi,
@siris Could you please check this issue?

Best regards,

mposhtkouhi
Posts: 5
Joined: 27 Jun 2018, 19:15

26 Feb 2021, 23:30

tugce.kucukoglu wrote:
23 Feb 2021, 08:47
Hi,
@siris Could you please check this issue?

Best regards,
Hi, any updates on this one? The layout is useless at this point. Thanks!

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

01 Mar 2021, 11:59

Hi,

Really sorry for delayed response. I checked multiple times. And i couldn't reproduce your issue. Please check if these variables exists:

src/main/webapp/resources/sass/layout/topbar/themes/_topbar_light.scss line 2:

Code: Select all

    $topbarBgColor: #ffffff;
src/main/webapp/resources/sass/layout/topbar/themes/_topbar_dark.scss line 2:

Code: Select all

    $topbarBgColor: #293241;
If these files and lines exists please clean your browser cache and try again with "mvn clean jetty:run" command. I think you firstly run your theme without sass update command and after then you run sass update. So your browser cached scss issues.

Best Regards,

mposhtkouhi
Posts: 5
Joined: 27 Jun 2018, 19:15

03 Mar 2021, 22:53

Hi,

Thank you for your reply.

I checked for those definitions in both scss files, and they both exist. I had tried clearing my browser's cache in the past, but it did not make any difference. I tried again, but I still face the same problem. I was going to attach screenshots from Chrome and Safari, but attachments are not allowed here. I did not run it without compiling the CSS files, but I still have the issue. I tried to recompile them, but I get the same errors:

sass --update src/main/webapp/resources:src/main/webapp/resources --no-source-map
Error: Undefined variable.
background-color: $topbarBgColor;
^^^^^^^^^^^^^^
src/main/webapp/resources/sass/layout/topbar/_topbar_theme.scss 4:23 @import
src/main/webapp/resources/sass/layout/topbar/themes/_topbar_light.scss 19:13 @import
src/main/webapp/resources/sass/layout/topbar/_topbar.scss 1:9 @import
src/main/webapp/resources/sass/layout/_layout.scss 7:9 @import
src/main/webapp/resources/freya-layout/css/layout-dark.scss 5:9 root stylesheet

Error: Undefined variable.
background-color: $topbarBgColor;
^^^^^^^^^^^^^^
src/main/webapp/resources/sass/layout/topbar/_topbar_theme.scss 4:23 @import
src/main/webapp/resources/sass/layout/topbar/themes/_topbar_light.scss 19:13 @import
src/main/webapp/resources/sass/layout/topbar/_topbar.scss 1:9 @import
src/main/webapp/resources/sass/layout/_layout.scss 7:9 @import
src/main/webapp/resources/freya-layout/css/layout-light.scss 5:9 root stylesheet

Also, I had no problem using the Barcelona layout at all. I had it up and running in less than 2 minutes, but there is something not working here and I am not sure what it is.

Thank you,

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

10 Mar 2021, 09:35

Hi,

Sorry for delayed response! Could you please update the sass compiler and try again. If the problem still persists could you please explain step by step how you run the project? Which files do u use tag or zip etc.?

Best Regards,

mposhtkouhi
Posts: 5
Joined: 27 Jun 2018, 19:15

10 Mar 2021, 21:24

Hi,

I am using the "tag" as the root directory to compile the sass files. I also checked the SaSS compiler on my OS X, and it is up-to-date. I am not sure why this is so complicated. It is supposed to be straightforward. Like I mentioned earlier, I had no problem getting the Barcelona layout up and running. I am at a loss as to how to use this layout. Do you have a version that has compiled sass files?

Thank you,

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

11 Mar 2021, 09:10

Hi,

I am using sass version 1.29.0. What is your sass compiler version?

There may be a problem in the files or ide or editor or sass you used. If you have an opportunity to download the zip on another computer please try it? Or download the zip from the beginning and try the project on your own computer with open as a different project with a different ide or editor if possible.

At the moment https://www.primefaces.org/poseidon/ live demo you can review from the website using same as your tag folder and we didn't make any changes. Zip folder was also tested by different peoples. We have not encountered any problems.

Best Regards,

mposhtkouhi
Posts: 5
Joined: 27 Jun 2018, 19:15

12 Mar 2021, 03:57

Hi,

Thank you again for your feedback. I resolved the issue, and it was the sass version! It would be helpful to outline in the documentation for the template what minimum saas version is required to compile the sass files successfully. I am glad that it is resolved :)

Thank you,

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

04 May 2021, 14:19

Thanks @siris ;)

Post Reply

Return to “Freya - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests