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

@posten-hedwig/footer

v4.1.2

Published

Provides footer in Posten and Bring style

Downloads

8

Readme

Footer

The footer is placed at the bottom of every page of the website and comes in two varieties: Footer and SlimFooter

The footer contains the logo, links and button links to often used services, as well as links to our social media platforms.

Usage

1 Install

npm install @posten-hedwig/footer

2 Icons auth token in environment

Hedwig is using icons from Font Awesome Pro wich requires a licence. The auth token from your licence will need to be added to an environment variable. For Posten and Bring developers, please contact the Hedwig contributors for this token. For other users, a licence can be obtained here

3 Import

import { Footer } from '@posten-hedwig/footer'

4 Render

<Footer
    logo='posten'
    logoHref='#'
    logoTitle='Posten Logo'
    sections={...}
    importantLinks={...}
    copyright='Posten Norge AS'
    some={...}
/>

Footer API

Footer logo

This prop specifies which logo to use for the navbar. 'posten' and 'bring' are available

Footer logoHref

This prop is the link to where the logo is leading to

Footer logoTitle

This prop specifies the alt text for the logo.

Footer sections

This prop specifies the sections for the Footer. Each section consists of a title and an array of links. Can be either links with href, React Router Links or Hedwig Links.

import { Footer } from '@posten-hedwig/footer'
import { Link } from '@posten-hedwig/link'
/*…*/
<Footer
    /*…*/
    sections={[
        {
            title: 'Send',
            links: [
                <Link href='#'>Parcels abroad</Link>,
                <Link href='#'>Parcels in Norway</Link>,
                <Link href='#'>Letters in Norway</Link>,
                <Link href='#'>Return</Link>,
                <Link href='#'>Letters abroad</Link>,
                <Link href='#'>Addressing and wrapping</Link>,
                <Link href='#'>Customs when sending abroad</Link>
            ]
        },
        {
            title: 'Receive',
            links: [
                <Link href='#'>On what days does my mail arrive?</Link>,
                <Link href='#'>Home delivery</Link>,
                <Link href='#'>Pick up yourself</Link>,
                <Link href='#'>Customs when receiving</Link>
            ]
        }
    ]}
/>

Footer importantLinks

This prop specifies important links in the Footer. The links can be for cookie information and privacy policy for example

import { Footer } from '@posten-hedwig/footer'
import { Link } from '@posten-hedwig/link'
/*…*/
<Footer
    /*…*/
    importantLinks={
        [
            <Link href='#'>Cookies</Link>,
            <Link href='#'>Privacy policy</Link>
        ]
    }
/>

Footer buttons

This prop specifies Links or buttons for special items in the footer. Will be styled as buttons.

import { Footer } from '@posten-hedwig/footer'
import { Link } from '@posten-hedwig/link'
/*…*/
<Footer
    /*…*/
    buttons={
        [
            <button onClick={() => alert('You clicked Cookies')}>Cookies</button>,
            <Link href='#'>Privacy policy</Link>
        ]
    }
/>

Footer copyright

This prop specifies the name for copyright on this site. Default value "Posten Norge AS"

Footer some

This prop specifies links and brands for social media. Specification: An array of objects looking like this:

{
    brand: String,
    href: String,
    ariaLabel: String,
}

or

{
    brand: String,
    onclick: function,
    ariaLabel: String,
}

Example

import { Footer } from '@posten-hedwig/footer'
/*…*/
<Footer
    /*…*/
    some: [
        {
            brand: 'facebook',
            href: '#',
            ariaLabel: 'Check out our Facebook page'
        },
        {
            brand: 'instagram',
            onclick: () => {
                alert('You clicked Instagram')
            },
            ariaLabel: 'Check out our Instagram page'
        },
        {
            brand: 'mail',
            href: 'mailto:[email protected]'
            ariaLabel: 'Send us email'
        }
    ]
/>

List of Social Media Brands supported