Base solution for your next web application
Open Closed

Change front end theme #1674


User avatar
0
vitaly created

Hi Halil,

Please advise the proper approach to change front-end theme from Metronic Corporate to Meronic Onepage.

Regards


4 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Actually, front-end side is the most untouched part of AspNet Zero. It's almost a copy-paste of standard metronic template. So, what you should do is to download one page template (from <a class="postlink" href="http://keenthemes.com/onepage-1-bootstrap-themefreebie-onepage-1-frontend-theme/">http://keenthemes.com/onepage-1-bootstr ... end-theme/</a> or <a class="postlink" href="http://keenthemes.com/freebie-onepage-2-bootstrap-theme/">http://keenthemes.com/freebie-onepage-2 ... rap-theme/</a> which you like), add related files into your solution and edit the front-end layout and pages. You can start from checking source code of downloaded Metronic files to understand it's structure and related css/js files.

  • User Avatar
    0
    vitaly created

    How it works now? Should I change Controllers, FrontEndNavigationProvider, PageNames, FrontEndBundleConfig, _ViewStart.cshtml?

    Regards

  • User Avatar
    0
    hikalkan created
    Support Team

    Current front end page has two pages with two controllers (<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/Controllers/HomeController.cs">https://github.com/aspnetzero/aspnet-ze ... troller.cs</a> and <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/Controllers/AboutController.cs">https://github.com/aspnetzero/aspnet-ze ... troller.cs</a>). As you see they are already empty controllers, it will not be much to change. If you will create one page, probably About controller/view will be needless. So, you can remove them and remove About page from FrontEndNavigationProvider and PageNames.

    So, Frontend bundle config will surely be changed since one page template probably have differen js/css dependencies. I don't think _ViewStart.cshtml change (<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/Views/_ViewStart.cshtml">https://github.com/aspnetzero/aspnet-ze ... art.cshtml</a> - it's already nothing to change). You can start from layout (<a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/blob/dev/src/MyCompanyName.AbpZeroTemplate.Web/Views/Layout/_Layout.cshtml">https://github.com/aspnetzero/aspnet-ze ... out.cshtml</a>). If I was doing it, I start by copying all HTML from the one page template to _Layout and change js/css dependency paths one by one.

  • User Avatar
    0
    vitaly created

    Great! Thank you for explanation.