Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

geonorge-shared-partials

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

geonorge-shared-partials

Header for *.geonorge.no sites

  • 0.0.21
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
2
Weekly downloads
 
Created
Source

Geonorge.SharedPartials

NPM version

Contains frontend for header used on Geonorge.no, including menu and search.

Prerequisites

npm

Install

$ npm install geonorge-shared-partials

Create the following gulpfile.js in the root of your project

var gulp = require("gulp"),
bundleTask = require('./node_modules/geonorge-shared-partials/gulp-tasks/bundle')(gulp),
config = {
  url: './node_modules/geonorge-shared-partials/bundle.config.js',
  distFolder: 'dist'
};

gulp.task("default", function(){bundleTask(config)});
gulp.task("test", function(){bundleTask(config,"test")});
gulp.task("prod", function(){bundleTask(config,"prod")});

Basic Usage

Build js and css

// Dev environment
$ gulp
// Test environment
$ gulp test
// Prod environment
$ gulp prod

Use the html files in your root layout

// C# example
@Html.Raw(File.ReadAllText(Server.MapPath("~/dist/partials/Header.html")))

and include this js somewhere on your site to update the "shopping cart" icon

var orderItems = $.cookie('orderitems');
if (orderItems && orderItems > 0) {
    $('.downloads__count').show();
    $('.downloads__count').text(orderItems);
}

FAQs

Package last updated on 21 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc