npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-nrg-ui

v4.8.3

Published

Opinionated UI addon based on how KUB scaffolds web applications

Downloads

109

Readme

ember-nrg-ui

NPM

Ember NRG UI

Compatibility

  • Ember.js v3.28 or above
  • Ember CLI v3.28 or above
  • Node.js v14 or above

Logo

Ember NRG UI is an opinionated UI addon based on how KUB scaffolds web applications. The addon provides the skeleton of an Ember app so that a developer can immediately start solving a business problem. It includes an application shell with sidebar navigation and typical UI components to get you started.

What it does

  • Overwrites application.hbs to use nrg-application component
  • Converts the application to use Sass
  • Adds route 404 Not Found
  • Modifies config/environment.js
  • Modifies ember-cli-build.js
  • Installs ember-cli-mirage and ember-cli-sass
  • Uninstalls ember-welcome-page
  • Adds public/.htaccess file
  • Adds app/styles/_nrg-override.scss for theming

Example App

Ember NRG UI comes with a dummy app that implements all of the components. Check out that dummy app for reference. To start it, run

git clone [email protected]:knoxville-utilities-board/ember-nrg-ui.git
cd ember-nrg-ui
pnpm install && ember serve

and go to http://localhost:4200.

Installation

Installing the library is as easy as:

ember install ember-nrg-ui

See the Contributing guide for details.

Getting Started

Once the addon is installed, create a new index route and template:

<!-- app/index/template.hbs -->

<div class='ui segment basic'>
  <NrgHomeCards as |view|>
    <view.home-card
      @label='Hello World'
      @icon='globe'
      @route='index'
      @meta='obligatory'
    />
  </NrgHomeCards>
</div>

Theming

Use the _nrg-override.scss file to override base colors and Logo

// app/styles/_nrg-override.scss

$primary: #6200ee;
$primaryVariant: #3700b3;

.nrg-application.nrg-application.nrg-application,
.ui.modal.side-by-side--takeover.side-by-side--takeover.side-by-side--takeover {
  .main.menu.menu {
    background-color: rgba($primary, 0.98);
  }
}

.nrg-list.nrg-list.nrg-list .items > .item.active.active {
  background-color: $primary;
  & .description,
  & .description > a,
  & .header,
  & .meta,
  & > .icon {
    color: #fff;
  }
}

.home-card.home-card.home-card.home-card .image.icon {
  background-color: $primaryVariant;
}

Import the override file into the main app.scss

// app/styles/app.scss

@import 'nrg-override';

Displaying Environment In App Bar

By default, every environment will be displayed in the App Bar except for prod. To change this, add an array property called productionEnvironments to the ENV variable in the config/environment.js file for your app. For example, if your production environments are prd and prod the environment.js file would look something like this:

module.exports = function(/* environment, appConfig */) {
  const ENV = {
    ...
    'ember-nrg-ui': {
      productionEnvironments: ['prd', 'prod'] // <- Look Here
    }
    ...
  }
  return ENV;
};