Cannot implement my custom theme

User
You
I created a custom theme based on bootstrap5, but i did not change anything. I then downloaded and renamed the files to bootstrap5_ems. I then created a folder under wwwroot called styles and copied all the files from the zip to that folder. Then in _host.csahtml i change this line <link rel='nofollow' href="_content/Syncfusion.Blazor/styles/bootstrap5_ems.css" rel="stylesheet" /> @* Theme *@ When i run it the site looks totally fucked up, even if i did no changes in theme studio. What am I doing wrong?

15 Replies

SK Subathra Kaliamoorthy Syncfusion Team March 22, 2024 02:28 PM UTC

Hi Jens,


Greetings from Syncfusion Support!


Based on the provided details, it appears that you have created a custom theme based on Bootstrap 5. Following this, you renamed the files and included them under the "~/wwwroot/styles" path. To ensure proper referencing of these files in _Host.cshtml, you should structure the link as follows for clarity and ease of understanding:


<head>

 //…

 

<link rel='nofollow' href="~/styles/bootstrap5_ems.css" rel="stylesheet" />

 

 //…

</head>

 

Please get back to us if you have any other concerns.


Note: We request you to use professional language while posting forum updates with our support.


Regards,

Subathra K



JC Jens Chr. Thomsen April 3, 2024 05:53 AM UTC

I used the theme studio and open theme bootstrap5.

then i changes the primary and font color on the appbar and left everything as is.


I then created a folder called styles under wwwroot

I then copied the css and scss files to the styles folder and renamed them to bootstrap5-ems

I then copied the folder individual-scss folder to styles


And inserted this in my _hostcshtml file

<link rel='nofollow' href="~/styles/bootstrap5_ems.css" rel="stylesheet" />


When I start my project the appbar has changed color, but it is still off, 
The grid on the page is looking very wrong and so on.

I thought that if I based my own theme on bootstrap5 and only changed one thing the rest would look at it allways did.

What did I do wrong.



SK Subathra Kaliamoorthy Syncfusion Team April 3, 2024 01:27 PM UTC

Hi Jens,


We've customized the styling by referencing the Bootstrap 5 theme from the theme studio, adjusting the primary and font colors of the AppBar as per your instructions. Next, we renamed the folder names as 'bootstrap5-ems' and placed them under the 'styles' directory within the '~/wwwroot' path."


Furthermore, we've made sure to comment out the Syncfusion Blazor styles references to prevent any conflicts or inconsistencies.


_Host.cshtml


<head>

 //…

 

@*  <link rel='nofollow' href="_content/Syncfusion.Blazor.Themes/bootstrap5.css" rel="stylesheet" /> *@

<link rel='stylesheet' rel='nofollow' href="~/styles/bootstrap5-ems.css" />

 

 //…

</head>


Please check the attached sample for your reference and get back to us if you have any other concerns.

Regards,

Subathra K


Attachment: BlazorServerApp_3e4f3732.zip


JC Jens Chr. Thomsen April 4, 2024 05:41 AM UTC

I trried your code example and used the files from my changed theme
The appbar did change colors but the grid below it looks totally different.

And I did not change anything on the grid.


I just changed the appbar backcolor to green and the appbar text color to red.

Downloaded the zip file and copied the .css,scss files to the styles folder


It just dont work here for me. :(



SK Subathra Kaliamoorthy Syncfusion Team April 4, 2024 12:01 PM UTC

Hi Jens,


Based on the details provided, we suspect that when customizing and downloading styles from the theme studio, you might have only selected styles for the AppBar component and missed to include the Grid component. So that the downloaded styles in your project, the Grid component may not appear styled.


Could you please ensure whether do you downloaded both Appbar and Grid Components CSS from Blazor ThemeStudio?






If the issue still persists, kindly provide us with a detailed error log, and if possible, share a sample for further investigation.


Regards,

Subathra K



JC Jens Chr. Thomsen April 4, 2024 12:23 PM UTC

Yes I only selected AppBar in filter.
So the download function only downloads the selected components in the filter or what?

I will try to select them all and try again.



JC Jens Chr. Thomsen April 4, 2024 12:29 PM UTC

Well it seems to help if I select all components and download.


So I guess I could just select thecomponents I uses in my project and download to get it to work.



JC Jens Chr. Thomsen April 4, 2024 12:35 PM UTC

But if I in the Theme Editor tries to import the settings.json file I just created/downloaded i get this error.
settings.json1.0 KBFile failed to upload WHy isd



SK Subathra Kaliamoorthy Syncfusion Team April 5, 2024 02:33 PM UTC

Hi Jens,


Thank you for bringing this issue to our attention. We have replicated the issue while importing the "settings.json" file in Blazor Theme Studio at our end.


Root Cause: uploader API used the older services.


Now we have updated this to latest API service and resolved the issue. We apologize for any inconvenience this may have caused.


Blazor ThemeStudio


Please get back to us if you have any other concerns.


Regards,

Subathra K



JC Jens Chr. Thomsen April 8, 2024 05:25 AM UTC

That did help with the error I got.

But if I try to import my json file Theme Studio just hangs with the waiting wheel turning.
I even tried on another browser but it allso just hangs.


I even tried to restart my computer but it still hangs.




SK Subathra Kaliamoorthy Syncfusion Team April 8, 2024 10:07 AM UTC

Hi Jens,


Based on the details provided, we tried to replicate the issue while importing the "settings.json" file in Blazor Theme Studio just hangs with the waiting wheel turning. We have thoroughly tested across various browsers and have attached videos for your reference.


If the issue persists, please provide the below details.


  1. Could you please try once again after clearing the browser’s cache?
  2. Do you have any console errors after imported the ‘settings.json’? if so, share the error details.
  3. Details about browser in which you experience the issue.
  4. If possible, share that ‘settings.json’ file.


This will help us further investigate and resolve the issue effectively.


Regards,

Subathra K.


Attachment: BlazorThemeStudio_317e49ba.zip


JC Jens Chr. Thomsen April 9, 2024 06:35 AM UTC

Now I have it to work on Edge, Chrome and Firefox, thanks!



SK Subathra Kaliamoorthy Syncfusion Team April 10, 2024 01:12 PM UTC

Hi Jens,


Please check and get back to us if you need any further assistance.


Regards,

Subathra K.



JC Jens Chr. Thomsen April 11, 2024 04:51 AM UTC

As I said, everything is fine now. Thanks!



SK Subathra Kaliamoorthy Syncfusion Team April 15, 2024 07:26 AM UTC

Thanks for the update, Jens.


Loader.
Up arrow icon