Clone wiki

NPC Portal / Themes

NPC Portal Themes

NPC Portal supports customizing the look and feel to the utmost extent. Here's how you create a new theme:

  1. Download the source code and open the NPCPortal.sln file in Visual Studio 2013
  2. Customize \Views\Shared\_Layout.cshtml to use the css and scripts that you would like.
  3. Customize any .cshtml files in the \Views folder as you desire. Change the html, css, javascript and C# all you like.
  4. Run the website from Visual Studio 2013 and check to make sure everything is working and beautiful.
  5. Once you are satisfied, navigate to the \Views folder in Windows Explorer
  6. Select all the contents of the \Views folder.
  7. Right-click the selected files and folders and select "Send to..." -> "Compressed (Zipped) Folder"
  8. Change the name of the zip file to what you want the name of your theme to be.
  9. Done! You can upload this zip folder in your NPC Portal Website Admin section and enjoy your awesome theme of awesomeness.
  10. I felt like there should be 10 steps.

Customization considerations:

  • If you know C#, great! If not, be careful as you edit the .cshtml files to not disturb the C# blocks that typically start with an '@' character.
  • If you only want to modify a few things, you don't have to include all of the \Views files in your file. The only required files are Web.config, _ViewStart.cshtml and \Shared\_Layout.cshtml. The other files will use the default views, but with your _Layout.cshtml changes.
  • As of this moment, we do not support modifying the individual views of the Admin section. The Admin section will, however, use your theme's _Layout.cshtml file for general styling.
  • Since NPC Portal's default views are all based on Twitter Bootstrap, you can save yourself a lot of work by using Twitter Bootstrap-based themes for building NPC Portal themes.