Layout Configuration

The provided configuration defines the structure for customizing the logo and theme settings in your application. You can use the LibConfig interface and LIB_LAYOUT_CONFIG injection token to set up and manage these configurations globally.

To further customize your application, you should modify the themeConfig and logoConfig properties within the configuration object. Adjust the availableThemes array to include additional themes by specifying their name and extension. Set a preferred theme as the defaultTheme to ensure it loads on startup:

app.config.ts
import { AppSharedModule, LIB_LAYOUT_CONFIG } from '@tradinos/cms-frontend-layout';

{
  provide: LIB_LAYOUT_CONFIG,
  useValue: {
    themeConfig: {
      availableThemes: [
        {
          name:'lara-light',
          extension: 'css',

        },
        {
          name: 'lara-dark',
          extension: 'css',
        },
      ],
      defaultTheme: {
        name: 'lara-light',
        extension: 'css',
      },
 
    },
    logoConfig: {
      darkLogoPath: 'assets/images/dark-logo.png',
      lightLogoPath: 'assets/images/light-logo.png',
    },
  },
},
importProvidersFrom([
  AppSharedModule,
]),

And you need to update your angular.json file to apply the style in your app :

Do not forget to add prime theme in your index.html file:

The themeConfig to applay the style for the light and dark mode , if you have more pritty colors for your app , we ofcourse support the artist inside you 😎, you can override the tailwind theme by adding those to the main style file:

For example:

if you want to know more about prime themes options you can visit this link to explore more themes https://v17.primeng.org/theming#builtinthemesarrow-up-right

In the following sections, we will explore modifying these settings to tailor the appearance and functionality of your application.

⚠️ Important: Required Imports in styles.scss

Please ensure that the following imports are present in your src/styles.scss file:

@import "primeicons/primeicons.css"; @import "@tradinos/cms-frontend-layout/themes/theme.css";These imports are required for the layout configuration to work correctly:

  • @import "primeicons/primeicons.css"; - Required for PrimeIcons to display correctly

  • @import "@tradinos/cms-frontend-layout/themes/theme.css"; - Required for layout theme styles and theme switching functionality

Example from Codebase:

File: src/styles.scss

@import "primeicons/primeicons.css"; Required for icons @import "../node_modules/quill/dist/quill.core.css"; @import "../node_modules/quill/dist/quill.snow.css"; @import "@tradinos/cms-frontend-layout/themes/theme.css"; // Line 12: Required for themeWithout these imports, theme switching and layout styling may not work as expected.

arrow-up-right

Last updated