Шаблон Nano ASP.NET для SaaS
Учетные данные администратора (для всех арендаторов): admin@email.com / Password123!
Пример данных обнуляется каждый час
Контакты
Шаблон Nano ASP.NET для SaaS
Общие сведения
.Решение на платформе .NET
Vue UI
Пользовательский интерфейс React
Страницы Razor
Страницы Razor

Тема и оформление

Nano’s Razor Pages UI uses Bootstrap 5 for its base styles and a custom SCSS theme for colors, spacing, typography, and component styling. The theme files are located in wwwroot/assets/scss, with nanite-theme.scss serving as the main stylesheet.

You can customize the theme by editing the SCSS files and running the project’s stylesheet watcher to compile your changes into CSS.

To edit the theme, install the frontend dependencies and start the SCSS watcher.

  1. Open a terminal and navigate to the wwwroot folder.
  2. Install the dependencies:npm install
  3. Start the stylesheet watcher:npm run watchscss

Once the watcher is running, changes to watched .scss files should trigger CSS recompilation. Reload the browser to see the updated styles.

The watcher and its output are defined by the project’s npm scripts and build configuration. If compilation fails, check that the required Sass compiler and dependencies are installed.

Этот _variables.scss file contains global theme variables that customize Bootstrap defaults, including colors, sizes, and spacing. Updating these variables is a convenient way to change the application’s appearance consistently without overriding individual components one by one.

The main stylesheet, nanite-theme.scss, builds on the base Bootstrap 5 styles provided by the project’s npm dependencies.

Bootstrap’s theming system determines how variables and styles are applied, so the order of imports matters. Custom variables generally need to be defined before the Bootstrap styles that use them are compiled.

For more information, see the Bootstrap 5 theming documentation.

Styles that are not part of the global theme are organized under the custom directory. The main categories include:

  • Components — styles for reusable UI components.
  • Страницы — styles specific to individual pages.
  • Structure — styles for the application’s overall layout.
  • Fonts — font definitions and related styling.
  • Icons — icon-related styles.
  • Plugins — styles for third-party libraries and UI components.

When customizing the application, prefer updating existing variables or component styles where possible. Use page-specific styles for isolated changes and global styles for rules that should apply throughout the application.

Nano’s theme JavaScript files are located in wwwroot/assets/js. The main files include:

  • Nanite-core.js — initializes UI components and configures validation-related behavior.
  • Nanite-layout.js — manages theme color mode and sidebar state.
  • Nanite-helpers.js — provides shared utility functions.

When adding or modifying frontend components, check whether they depend on these shared scripts or require additional JavaScript and CSS assets.

You’ve now covered the main styling features of Nano’s Razor Pages UI. Explore the Vue setup guide и React setup guide, or continue to the Руководство по Web API в ASP.NET Core to learn about the backend architecture.