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

@dlr-eoc/core-ui

v15.0.0-next.1

Published

This project includes schematics to add the base UKIS-Layout to an angular application. The Layout is based on Clarity so [add this first](https://clarity.design/get-started/developing/angular)!

Downloads

91

Readme

@dlr-eoc/core-ui (Schematics for UKIS core-ui)

This project includes some schematics to add the base UKIS-Layout to an angular application. The Layout is based on Clarity so add this first!

What the ng-add command is doing?

ng add @dlr-eoc/core-ui

options:

--project=string // the project in the angular workspace (default 'defaultProject')

--routing=boolean // sets up angular routing (default false)

--addClr=boolean // run's @clr/angular:ng-add (default false) // does not work anymore, we need to remove this

The following are not implemented right now!

--addMap=boolean // adds a map component (default false)

--auth=boolean // default false, adjusts the app for authentication and user login

layout structure of the core-ui

The UKIS core-ui (created by the the schematics) is based on the Clarity Application Layout.

It uses the angular components from Clarity to get a responsive navigation.

For an application with routes:

Use a basic layout like the following, containing the router-outlet which then shows route components as the Clarity content-container.

<clr-main-container>
  @if(ui.alert){
    <ukis-global-alert [(alert)]="ui.alert"></ukis-global-alert>
  }
  @if(ui.progress){
    <ukis-global-progress [(progress)]="ui.progress"></ukis-global-progress>
  }
  <ukis-header [ukis-title]="title">
    ...
  </ukis-header>
  <router-outlet></router-outlet>
</clr-main-container>

For an application without routes:

Replace the router-outlet with a view component which also adds the Clarity content-container class as HostBinding.

<clr-main-container>
  @if(ui.alert){
    <ukis-global-alert [(alert)]="ui.alert"></ukis-global-alert>
  }
  @if(ui.progress){
    <ukis-global-progress [(progress)]="ui.progress"></ukis-global-progress>
  }
  <ukis-header [ukis-title]="title">
  ...
  </ukis-header>
  <app-example-view></app-example-view>
</clr-main-container>
  • A css class floating on the content-container (which is mostly placed in your route components) makes the Clarity Vertical Nav floating above the content-container so it takes less space. For this, however, you have to worry about the placement of the elements in the content-container if the vertical-nav is expanded.
  • The global-alert and global-progress can be activated with their responsible services which you can inject in your components.
  • For more doku about the ukis-header see the header README

Always check that yout layout structure is like following (with direct childs):

main-container
  content-container
    content-area

and keep in mind that the router is placing the routes outside of the router-outlet (so they are not children)

main-container
  router-outlet
  route-component
  ...

due to this you must add the class content-container as HostBinding to each 'route-component'.

Layout of a route or view component

The basic layout of a route or view component (see below) is the same so you can easily change it if you decide later to switch between routing or not.

<main class="content-area">
  <p>This is the content-area</p>
</main>

<clr-vertical-nav class="right">
</clr-vertical-nav>

<nav class="sidenav">
  <a href="">Test link</a>
</nav>

<section class="footer ukis-footer">

</section>
  • The route or view component uses the content-container class like described before, so you should normally be able to put everything in there which is shown in the documentation of Clarity Application Layout.

  • The content-area is the place where we put the map normally. If you like to do this ad the class map-view (content-area map-view) to remove the padding from the content-area.

  • As Aside we mostly use the vertical-nav. The default placement is on the left side like in the Clarity Layout, but with the class right the navigation will stick to the right side. There are also some styles for the layer-control inside a vertical-nav, so this is the place where we put the layer-control.

  • A section with the class footer will get you a footer element independent for each route. If it should be the same for all routes, you can add it in the main-container. For an example with the footer see the demo-maps route 'route-example-layout'.

  • Use the sidenav if you don't want the navigation collapsible, but we have no style for a layer-control inside it.

  • All our styles (ukis-theme) are in the styles folder and get imported in the main styles.scss. For app over all styles you can use the styles.scss, otherwise use the style files of your components to write custom styles.