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

jumblr

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jumblr

Jade Tubmlr Mixins

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Jumblr

Jade Tumblr Mixins

Installation

  • npm: npm i jumblr
  • tarball: see latest releases

Usage

include the jumblr.jade at the top of your main jade file:

include node_modules/jumblr/lib/jumblr

Mixins

+jumblr(type) - Standard Tumblr block

+jumblr('Video')
  li(class="post video")
    {Video-500}
    +jumblr('Caption')
      div(class="caption") {Caption}

//- output
{block:Video}
<li class="post video">{Video-500}{block:Caption}
  <div class="caption">{Caption}</div>{/block:Caption}
</li>{/block:Video}

+jumblrStr(type, content) - Standard Tumblr block as string (Great for nesting tags)

+jumblrStr('IndexPage', 'optional-class ')
section(class= jumblrStr)

//- output
<section class="{block:IndexPage}optional-class {/block:IndexPage}"></section>

+jumblrStrList({type: content, type: content}) - Standard Tumblr block list as string (Great for concatenating tags)

+jumblrStr("NoSearchResults", "no-results ")
+jumblrStrList({"TagPage": "tag ", "SearchPage": "search "+jumblrStr})
+jumblrStrList({"IndexPage": "index "+jumblrStrList, "PermalinkPage": "permalink "})

body(class= jumblrStrList)

//- output
<body class="{block:IndexPage}index {block:TagPage}tag {/block:TagPage}{block:SearchPage}search {block:NoSearchResults}no-results {/block:NoSearchResults}{/block:SearchPage}{/block:IndexPage}{block:PermalinkPage}permalink {/block:PermalinkPage}"></body>

+jumblrVar(type, preWhitespace) - Standard Tumblr variable (Great for removing "missing space" error)

p
  +jumblrVar('Scallywag')
  | : Oh
  +jumblrVar('Caption', true)
    |  my Captain

//- output
<p>{Scallywag}: Oh {Caption} my Captain</p>

License

MIT

FAQs

Package last updated on 08 May 2015

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