Giter VIP home page Giter VIP logo

showcar-ui's Introduction

npm version BrowserStack Status

showcar-ui

showcar-ui is the pattern library that is used to build the frontend of AutoScout24. It provides CSS classes, custom elements and components.

Installation:

To install showcar-ui within your project use npm.

npm install showcar-ui --save

How to build:

We are using node 10.16.0 version for build. Make sure you have it installed. If you are using nvm simply run

nvm use

and follow the instructions

For building on your local machine install all npm packages first. Then you can use the gulp command to run the build:

yarn
gulp build

How to run locally:

You can use the gulp default command to run the build locally:

gulp

How to run tests locally:

You can run tests locally in Chrome:

gulp test:fast

Interacting w/ local changes

You can preview/interact with the local changes by running yarn run docs:serve. This will generate the docs & launch a server where you can look at them, running the local version of showcar-ui

How to include:

You can either include showcar-ui as a fragment or directly include the JS, CSS and inline HTML on your page. The library provides some HTML content that needs to be inlined on your page. Use the index.html in the dist folder as a template in order to include the inline HTML, CSS and JS on your page.

<link rel="stylesheet" href="@@ASSET_PATH/showcar-ui.css">
<script src="@@ASSET_PATH/showcar-ui.js"></script>

Make sure to replace the @@ASSET_PATH string with the path to the JS/CSS file.

How to test:

You can check development state of the library on home, list and detail page with a parameter ?toguru=sc_develop%3dtrue.

How to test fragments with toggles

You can check any branch of the library on your page with parameter ?toguru=sc_develop%3dtest-branch where test-branch is the name of the desired branch.

Locally run

docker-compose up

and check localhost:8080/test/showcar-ui-toggled-fragment.html?toguru=sc_develop%3dtest-branch where test-branch is the name of the branch to test

Additional information

The showcar-ui library includes some libraries and polyfills:

Libraries

Polyfills

showcar-storage

You can access the Stroage API via the global Storage object. For further information see the documentation under https://github.com/Scout24/showcar-storage

showcar-icons

You can use all the icons defined by showcar-icons with the custom <as24-icon> tag. For further information see the documentation under https://github.com/Scout24/showcar-icons

Zepto

Showcar-ui includes Zepto, which is a lightweight replacement for jQuery. You can access Zepto via the global variables $ and Zepto. For a detailed usage guide, have a look at http://zeptojs.com/

How to use:

for the use of the library have a look at the documentation.

How to contribute:

See CONTRIBUTING.md

License

See LICENSE.md

Z-indexes table

Published 13.03.2017

ShowcarUI notes
lightbox overlay 140 useful
modal window 139 useful
spy-navigation wrapper 2/21(if sticky) useful
tooltip 2 useful
input group focus 2 useful
ad 110 useful
custom dropdown 1 useful
sticky 2 useful Could have bigger z-index but lower than overlay
navigation ::before li 100 useful Can be 10
notification 120 useful
Contentservice
header 130 useful
notification 9999 remove!

Optimizely (to be continued)

window.optimizelyReady.then(() => {
  const state = window.optimizely.get('state');
  const variationMap = state.getVariationMap();

  const experiment = variationMap['11184022659'];
  console.log(experiment.name);
  console.log(experiment.index);
});

window.optimizely.push({
  type: 'event',
  eventName: 'favoritesAdd',
});

showcar-ui's People

Contributors

dzubovaautoscout24 avatar rowantower avatar meckert avatar m-idler avatar passij avatar pommespanzer avatar gvand avatar springer-mayflower avatar bdadam avatar domenicofalco avatar ctoutountzidis avatar lakhanamdhari avatar yifan9916 avatar andythedandy avatar anders0l avatar massi-scout24 avatar nawnaw7 avatar alexlawrence avatar gthuller avatar maximilian-lindsey avatar vgrigoruk avatar dependabot[bot] avatar pvoznenko avatar orlandina avatar dnicolson avatar kraus-as24 avatar amaly289 avatar kseniia-panasiuk avatar omakoleg avatar storrestw avatar

Watchers

James Cloos avatar

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.