Coder Social home page Coder Social logo

designsystem's Introduction

Altinn Design System

⚠️⚠️⚠️ DEPRECATED ⚠️⚠️⚠️
The design system v2 (npm) supersedes this project. Consider moving your project to rely on the newer design system instead of this one.


This design system is based on Pattern Lab code and atomic design principles. The repo contains the source code and configuration for building and running the design system locally and for creating distribution files.

You can always test the live version of the latest build, or download the altinn-designsystem npm package.

Dependencies

Make sure that Node.js (version 14 or newer) is installed. The package manager npm will be included.

Setup

git clone https://github.com/Altinn/DesignSystem.git

Navigate to the root of the code and run:

npm install

Run

The design system is divided into three projects: Altinn.no (Infoportal and Portal), Altinn Digital and common.

To run the design system for altinn.no

npm run start:altinn

To run the design system for Altinn Digital

npm run start:altinndigital

To run the design system for components that are common to all projects

npm run start:common

The command will build and run the design system locally on http://127.0.0.1:3000 and automatically rebuild if the source code is changed.

Distribution

The /dist folder contains css, javascript, fonts and images for distribution via the npm package.

To update the /dist folder

npm run dist

GitHub pages

To update the live version of the design system

npm run update:gh-pages

then commit and push the changes to git.

Source code

The source code is structured as follows:

###/_patternlab PatternLab specific files: patterns, meta, data and config.

Each project has its own folder. Common components should only be changed in the /common folder, where they will automatically be copied to all other projects. Changes to common components anywhere else will be automatically overwritten.

###/css Changes to css should be made in the scss files under /css/scss. The css files will be automatically updated.

###/fonts

###/images

###/js JavaScript files are divided into /production and /prototype and bundled automatically. To add new files to a bundle update the config under /scripts/build-config.json

designsystem's People

Contributors

acn-dgopa avatar bjorgdagny avatar bmuenzenmeyer avatar capgeminiknut avatar clarkt avatar daniel-taranger avatar davidemanuelsen avatar dependabot[bot] avatar eimik avatar eirikmikkelsen avatar elsand avatar epiespen avatar geoffp avatar guru77 avatar hannefinnoy avatar itryti avatar ivartryti avatar janickef avatar jonkjetiloye avatar julianhidalgo avatar krehator21 avatar ma31cm avatar magnusnn avatar mariavar avatar matsgm avatar mrosvik avatar sigridangell avatar steriasvendsen avatar thetecharch avatar tormagnus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

designsystem's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency concurrently to v8
  • Update dependency postcss-cli to v11
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @pattern-lab/cli ^5.15.0
  • @pattern-lab/core ^5.15.0
  • @pattern-lab/engine-handlebars ^5.14.3
  • @pattern-lab/starterkit-handlebars-vanilla ^1.4.2
  • @pattern-lab/uikit-workshop ^5.15.0
  • anchor-js ^4.3.1
  • autoprefixer ^10.3.7
  • bootstrap ^4.6.0
  • bootstrap-datepicker ^1.9.0
  • chokidar-cli ^3.0.0
  • clean-css-cli ^5.4.1
  • clipboard ^2.0.8
  • concat-with-sourcemaps ^1.1.0
  • concurrently ^6.3.0
  • decompress-cli ^2.0.0
  • jquery-ui ^1.12.1
  • jquery-validation ^1.19.3
  • jquery-validation-unobtrusive ^3.2.12
  • mark.js ^8.11.1
  • postcss ^8.3.9
  • postcss-cli ^9.0.1
  • sass ^1.42.1
  • shx ^0.3.3
  • slick-carousel ^1.8.1
  • truncate.js ^1.1.2
  • yargs ^17.2.1

  • Check this box to trigger a request for Renovate to run again on this repository

Errors after running `npm run dist`

Using this package for another of Brønnøysunds projects. When installing the npm package, and including style.dist.portal.min.css file to our React app, the CSS file references files that are not in the dist-folder (and one ../../images/brick_pattern.svg file which is supposed to be ../images/brick_pattern.svg).

But it references a Content-folder which is not in the dist-folder. Not in the npm package, or when I have cloned this repo and run npm run dist.

Automatically push to gh-pages

When we push to dev, there should be an automatic push of the content in public-folder to gh-pages (but keep the folders: "dist", "prototype-starteogdrive" and "versjon-altinndagen".

Make it possible to run "npm start" from a chosen project

The different projects are sharing atoms, molecules and organisms, but have their own templates and pages. To make the build go faster, it should be possible to start the build in gulp from a specific project, so it builds all atoms, molecules and organisms, but only the templates and pages from portal / infoportal / altinnett / brreg.

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.