npm.io
0.0.7 • Published 7 years ago

@frontkom/cw-latest-news

Licence
MIT
Version
0.0.7
Deps
2
Size
1.7 MB
Vulns
0
Weekly
6

Built With Stencil

Using this component

Install from NPM

$ npm install --save @frontkom/cw-latest-news

Put a script tag similar to this in the head of your index.html

<script src="/node_modules/@frontkom/cw-latest-news/dist/cw-latest-news.js"></script>

Then you can use the element anywhere in your template, JSX, html, etc.

<cw-latest-news ... ></cw-latest-news>

Parameters

  • solr (required) - the url of the SOLR instance
  • solr-proxy - the url of a proxy to override CORS limitations
  • rows - the number of results to show (defaults to 5)
  • start - the number of results to skip (defaults to 0)
  • tag - load articles from a specific tag
Example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>CW Latest News Widget</title>
  <script src="./node_modules/@frontkom/cw-latest-news/dist/cw-latest-news.js"></script>
</head>
<body>
  <h1>CW Latest News Widget</h1>
  <cw-latest-news
    solr="https://solrproxy.devz.no/solr/newsfront-computerworld"
    tag="business-intelligence"
    rows="6"
  ></cw-latest-news>
</body>
</html>