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

geonorge-shared-partials

Package Overview
Dependencies
Maintainers
3
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.67
  • Source
  • npm
  • Socket score

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

Geonorge.SharedPartials

NPM version

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

Prerequisites

npm, gulp

Install

$ npm install geonorge-shared-partials

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

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

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

Basic Usage

Build js and css

$ gulp

Add stylesheets:

<link rel="stylesheet" href="/dist/vendor.css" />
<link rel="stylesheet" href="/dist/main.css" />

Use the html files in your root layout

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

Include javascripts:

<script type="text/javascript" src="/dist/vendor.js" ></script>
<script type="text/javascript" src="/dist/main.js" ></script>

and include this js somewhere on your site

var applicationEnvironment = "local"; // "prod", "test", "dev" or "local" 
var orderItems = $.cookie('orderitems'); // Update "shopping cart" icon
if (orderItems && orderItems > 0) {
    $('.downloads__count').show();
    $('.downloads__count').text(orderItems);
}

FAQs

Package last updated on 26 Apr 2019

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