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

@startinblox/component-newsfeed

v2.0.10

Published

Newsfeed component for Startinblox

Downloads

5

Readme

Solid-newsfeed

<solid-newsfeed> displays news feed and allows you to post new articles (title at least, content and picture), to edit and delete them.

<solid-newsfeed data-src="[url]" url-upload="[url-upload]"></solid-newsfeed>

Installation

The compenent allows you to upload a picture for each article, so a package to upload picture is needed. For example: pip install djangoldp_uploader

The compenent allows you to upload a picture for each article.

How to use

You need to import the module to use the component, and also the modules to use other sib components, such as solid-display, solid-form and solid-router.

<html>
  <head>
    <!-- import the necessary modules in the head of the page -->
    <script
      type="module"
      src="https://unpkg.com/@startinblox/[email protected]"
    ></script>
    <script
      type="module"
      src="https://unpkg.com/@startinblox/[email protected]"
    ></script>
    <script
      type="module"
      src="https://unpkg.com/@startinblox/router@latest"
    ></script>

    <script data-default-context type="application/ld+json">
      {
        "avatar": "foaf:depiction"
      }
    </script>

    <script type="module" src="solid-newsfeed.js"></script>
  </head>

  <body>
    <!-- use the component -->
    <solid-newsfeed
      data-src="http://localhost:8000/articles/"
      url-upload="http://localhost:8000/upload/"
    >
    </solid-newsfeed>
  </body>
</html>

Parameters

| Name | Default | Description | | ----------------------------- | -------------------- | ------------------------------------------------------------- | | data-src | undefined | URL of the LDP articles (news) to display | | url-upload | undefined | URL of the picture to upload | | continue-reading-label-text | "Continue reading" | Button text to read all the article | | edit-article-label-text | "Edit the article" | Button text to access to the edit form of the current article | | add-article-button-text | "Publish" | Submit button text form to add a new article | | edit-article-button- text | "Edit" | Submit button text form to modify the current article | | delete-article-button-text | "Delete the article" | Button text to delete the current article |

Design

To customize the component, all the colors are editable, by setting the following css variables anywhere in your stylesheet to the color desired :

| Variable name | Description/attribute | | ------------------------------------ | --------------------------------------------------- | | --solid-newsfeed-font | Font color (content of articles, titles of pages) | | --solid-newsfeed-header-font | Header text color of the component | | --solid-newsfeed-header-background | Header background color | | --solid-newsfeed-title-font | Titles color of articles | | --solid-newsfeed-author-details | Author details color (author name, publishing date) | | --solid-newsfeed-border | Border color of inputs in forms | | --solid-newsfeed-button-main | Main color of buttons | | --solid-newsfeed-button-reverse | Reverse color of buttons | | --solid-newsfeed-delete-main | Main color of delete button | | --solid-newsfeed-delete-reverse | Reverse color of delete button |

Output

  • In the top in the header, the routes to navigate between the main page displaying articles and the page with the form to create an article
  • The main page displays all the articles ranked from newest to oldest, eachone with a link to access to the entire content.
  • On the page of each article, a button allows to access to the edit form and a delete button.
  • The add form and the edit form must have at least a title.

Notes

Compatible with the version [email protected].

Maintener : [email protected]