GithubHelp home page GithubHelp logo

cube.theme's Introduction

LaxarJS Cube Theme

A LaxarJS theme, for use by LaxarJS tools and demo applications.

Installation

Install the laxar-cube.theme and the required webpack SCSS support into your application using npm:

$ npm install --save laxar-cube.theme
$ npm install --save-dev node-sass sass-loader

Then, activate the theme in your application configuration (usually init.js):

// load themed artifacts:
import artifacts from 'laxar-loader/artifacts?flow=main&theme=cube';

// have the runtime select the theme:
const configuration = { theme: 'cube', /* ... */ };

create( [ /* adapters */ ], artifacts, configuration )
   // if enabling tooling, you should also go for the theme:
   .tooling( require( 'laxar-loader/debug-info?flow=main&theme=cube' ) )
   // .flow( ... )
   // .bootstrap( ... )

For webpack, this can be simplified by using the theme-provided options for the sass-loader:

module.exports = {
   // ...
   resolve: [
      // ...
      alias: {
         // ...
         'cube.theme': 'laxar-cube.theme'
      }
   ],
   module: {
      rules: [
         // ...,
         {
            test: /[/](laxar-)?cube[.]theme[/].*[.]s[ac]ss$/,
            loader: 'sass-loader',
            options: require( 'laxar-cube.theme/sass-options' )
         }
      ]
   }
};

The cube.theme is now used in the application. To create theme-specific styles for layouts, widgets and controls, add a cube.theme folder right next an artifacts default.theme folder, and define CSS/HTML there.

cube.theme's People

Contributors

jpommerening avatar x1b avatar

Stargazers

 avatar

Watchers

 avatar  avatar Alex avatar James Cloos avatar Markus Kemmann avatar  avatar Jonas Küttner avatar Ligia Bildea avatar

cube.theme's Issues

improve README.md

The README should have better installation instructions (NPM instead of git submodule), and explain usage of sass-options.

Set `$fa-font-path`

Depending on the webpack setup, us not setting $fa-font-path can lead to font loading problems.

provide logo/flower classes for images, add theme.json

To load the SCSS version of the theme, a theme.json must be added. This should also allow correctly using the theme if the file system folder does not match its directory name (e.g. when installing the theme under a different name from NPM.

Also, CSS classes should be added so that logo images (flower pot, top-left logo) are loaded from the theme.

Add two necessary steps to install instruction

  • add alias to webpack configuration:
resolve: {
...
   alias: {
      'default.theme': 'laxar-uikit/themes/default.theme',
      'cube.theme': 'laxar-cube.theme'
   }
},
  • install
npm install --save-dev node-sass

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.