Nano ASP.NET SaaS 模板
管理员凭据(所有租户):admin@email.com / Password123!
样本数据每小时重置一次
Nano ASP.NET SaaS 模板
概述
.NET 解决方案
Vue UI
React 用户界面
Razor Pages
Razor Pages

主题与风格

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, ,与 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.

主样式表,, 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 配置指南, ,或继续前往 ASP.NET Core Web API 指南 了解后端架构。.