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

responsize

v0.0.7

Published

Display websites on different screen sizes in the browser. Useful to visualize how a website looks on desktop while browsing on mobile, or on big screen while browsing on a laptop.

Downloads

16

Readme

About Responsize

Display websites on different screen sizes in the browser. Useful to visualize how a website looks on desktop while browsing on mobile, or on big screen while browsing on a laptop.

Responsize can be used as an online tool, like the Responsize app hosted by Silex Labs. See the instructions bellow to host an instance on your servers.

Responsize can be used as a library, providing app developers with the individual components used in Responsize, such as the resizeable Stage component.

Copyright Silex Labs 2014. Licensed under the MIT license.

Use as a library

Install with bower

$ bower install responsize

Link the js and css files in your app


<!-- somewhere in your head tag -->
<script src="bower_components/responsize/dist/responsize.js">
<link rel="bower_components/resonsize/dist/responsize.css" rel="stylesheet">

<!-- somewhere in your body tag -->
<div id="stage">
  <iframe></iframe>
</div>

Use Responsize components in your app

var stage = new rsz.Stage(element.querySelector('#stage'));

// load a website in the stage, beware of the cross site scripting,
// security has to be met here
// or you can load the HTML content with an ajax call
// and then use stage.setHtml() to set the iframe HTML content
// (note: use the HTML <base> tag if needed to make sure the relative paths are loaded correctly)
stage.setUrl('http://www.silexlabs.org').then(function(doc){
  // here, the website is loaded,
  // and the param `doc` is set to the iframe's document

  // if you use the Wysiwyg class along with the Stage class
  // you need to update the container to which to appy the Wysiwyg feature
  wysiwyg.setDocument(doc);
});

// set the stage size to 1920x1024
// if your screen is smaller than that,
// Resonsize will load it with the desired size
// and then scale it using css3 transform, to fit the #stage element.
// you could simply let the stage auto size to loaded content: do not call Stage::setSize
// or set stage.autoSize to true before calling stage.setUrl
stage.setSize(1920, 1024);

// add WYSIWYG feature (optional)
var wysiwyg = new Wysiwyg();

// skin the selection marker and more
wysiwyg.addTempStyle(window.location.href + '/css/wysiwyg-skin.css');

// activate the mode where the user clicks are used to select elements
wysiwyg.setSelectionMode(true);

// optional: you can provide a function
// to determine if the element can be selected by the user
wysiwyg.setSelectFilter(function(element) {
  return element.classList.has('my-selectable-css-class');
});

// provide a callback in order to be notified when the user has selected an element
wysiwyg.setOnSelect(function() {
  // retrieve the selected elements
  var selection = wysiwyg.getSelected();
  console.log('Selected elements: ', selection);
});

To remove the useless css classes and elements used during edition, use wysiwyg.getCleanHtml();

Installation of the online tool

Requirements

$ npm install
$ bower install
$ grunt build
$ npm start

Develop

$ npm start
$ grunt watch

Then open a browser at http://0.0.0.0:6969

Philosophy

Responsize has a goal: allow web designers to be more efficient at handling responsiveness.

The user opens an HTML page and manage bootstrap css classes or [Simple Grid ones](https://github.com/ThisIsDallas/Simple-Grid] for example. And also hides or shows elements depending on the window size, or goup them into a hamburger menu.

ResponSize is an amazing tool that enables the user to generate a responsive style sheet for a website. ResponSize can help you to have an optimal viewing experience for your website!

Unlike bootstrap builders, Responsize does not let the user add elements or edit content. But it goes along with other free tools: