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

zeycookie

v0.1.1

Published

Verstile Cookie Bar ===================

Downloads

156

Readme

Verstile Cookie Bar

Build library

yarn install
yarn build:lib

Standalone

please note that library uses page default font

<link rel="stylesheet" href="./cookieconsent.css">
<script src="./cookieconsent.umd.min.js"></script>
cookieconsent.default({
  content: {
    header: 'CookieConsent.header',
    message: 'CookieConsent.message',
  },
  services: [{
    key: 'required',
    required: true,
    label: 'CookieConsent.required',
    items: [{
      label: 'Cookie Consent',
      description: 'CookieConsent.servicesDescription.cookieconsent'
    },{
      label: 'Sentry',
      description: 'CookieConsent.servicesDescription.sentry'
    }],
  }, {
    key: 'analytics',
    label: 'CookieConsent.analytics',
    items: [{
      label: 'Google Analytics',
      description: 'CookieConsent.servicesDescription.googleAnalytics'
    },{
      label: 'YouTube',
      description: 'CookieConsent.servicesDescription.youtube'
    }],
  }],
  locale: 'de',
  locales: {
    en: {
      img: '/img/en.svg',
      Lang: {
        en: 'English',
        de: 'German',
      },
      CookieConsent: {
        header: 'We value your privacy.',
        message: 'This website uses cookies to ensure you get the best possible experience on our website. Intergrated third-party services may consolidate this information with further data. Cookies may contain personal data unless explicitly specified otherwise. By clicking "Select all and close", you agree to the use of these cookies and save your settings for the specified storage period. Alternatively, you can select which specific cookies you\'d like to enable and save your settings by clicking "confirm selection". You can find further information as well as the possibility of regulatory objections in our <a href="=/privacy-policy/">Privacy Policy</a>.',
        dismiss: 'Got it!',
        allow: 'Allow cookies',
        deny: 'Decline',
        link: 'Learn more',
        policy: 'Cookie Policy',
        acceptSelection: 'Confirm selection',
        acceptAll: 'Select all and close',
        analytics: 'Analytics (stored for 2 years)',
        required: 'Required (stored indefinitely)',
        services: 'Services',
        servicesDescription: {
          cookieconsent: 'Stores the user’s cookie consent state for the current domain (no personal data)',
          sentry: 'Provided by sentry.io for error reporting',
          googleAnalytics: 'General usage statistics',
          youtube: 'Usage statistics when viewing embedded videos'
        }
      },
    },
    de: {
      img: '/img/de.svg',
      Lang: {
        en: 'English',
        de: 'German',
      },
      CookieConsent: {
        header: 'Wir respektieren Ihre Privatsphäre',
        message: 'Diese Website verwendet Cookies, um Ihnen die bestmögliche Erfahrung zu gewährleisten. Integrierte Drittanbieter können diese Informationen mit weiteren Daten zusammenführen. Sofern nicht anders angegeben, enthalten die Cookies personenbezogene Daten. Durch Klicken auf "Alle wählen und schließen" erklären Sie sich mit der Verwendung dieser Cookies einverstanden und speichern Ihre Einstellungen. Alternativ können Sie auswählen, welche spezifischen Cookies Sie zulassen möchten und Ihre Einstellungen durch Klicken auf "Auswahl bestätigen" speichern. Weitere Informationen sowie die Widerspruchsmöglichkeit finden Sie in unseren <a href="/datenschutzerklaerung/">Datenschutzhinweisen</a>.',
        dismiss: 'Verstanden!',
        allow: 'Cookies zulassen',
        deny: 'Ablehnen',
        link: 'Erfahren Sie mehr',
        policy: 'Cookie-Richtlinie',
        acceptSelection: 'Auswahl bestätigen',
        acceptAll: 'Alle wählen und schließen',
        analytics: 'Analytics (2 Jahre Speicherdauer)',
        required: 'Notwendig (unbegrenzte Speicherdauer)',
        services: 'Dienste',
        servicesDescription: {
          cookieconsent: 'Speichert die Einwilligung des Nutzers zu Cookies für diese Webseite (keine personenbezogenen Daten)',
          sentry: 'Bereitgestellt von sentry.io zur Fehleranalyse',
          googleAnalytics: 'Speichert allgemeine Nutzungsstatistiken',
          youtube: 'Speichert Nutzungsstatistiken beim Ansehen von eingebetteten Videos'
        }
      },
    }
  },

  onchange: function (value) {
    if (value.indexOf('analytics')) {
      // enable GA
    } 
  }
})

Component

<template>
  <cookie-notification
      :content="$root.content"
      :services="$root.services"
      @change="$root.onchange"
  >
    <template slot="header-right-block">
      <short-lang-picker class="form-control" @change="changeLocale"/>
    </template>
  </cookie-notification>
</template>

<script>
import CookieNotification from './src/CookieNotification';
import ShortLangPicker from './src/ShortLangPicker';

export default {
  name: 'App',
  components: {
    CookieNotification,
    ShortLangPicker,
  },
  methods:{
    changeLocale(locale) {
      this.$i18n.locale = locale;
    }
  }
}
</script>

<style scoped type="text/css">
.form-control {
  display: block;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
</style>