serenity-is / Serenity

Business Apps Made Simple with Asp.Net Core MVC / TypeScript
https://serenity.is
MIT License
2.6k stars 802 forks source link

How to set the default theme? #3216

Closed gyygyy32 closed 6 years ago

gyygyy32 commented 6 years ago

Like the purple theme

mahmudie commented 6 years ago

fine _layout.cshtml under view and change "blue" to "purple" in this line

 themeCookie.Value.IsEmptyOrNull() ? themeCookie.Value : "blue";
GreenUtil commented 6 years ago

Another possible solution (if you want a permanent theme) :

  1. go to /Scripts/adminlte/pages/dashboard.js :

insert

 if (!$('#s-DashboardPage').length)
      return;

  //make skin-blue-light the default
  $('#s-DashboardPage').addClass("skin-blue-light");
  1. go to /Scripts/adminlte/app.js :

insert

//Fix for IE page transitions
  $("body").removeClass("hold-transition");

  //make skin-blue-light the default
  $("body").addClass("skin-blue-light");  
minhhungit commented 6 years ago
volkanceylan commented 6 years ago

Thanks on behalf of @gyygyy32