All Projects → dollarshaveclub → Reframe.js

dollarshaveclub / Reframe.js

Licence: mit
🖼 Reframe unresponsive elements responsively.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Reframe.js

postcss
No description or website provided.
Stars: ✭ 59 (-96.36%)
Mutual labels:  scale, ratio
Zoid
Cross domain components
Stars: ✭ 1,672 (+3.08%)
Mutual labels:  iframes
Collectionviewpaginglayout
a simple but highly customizable paging layout for UICollectionView.
Stars: ✭ 947 (-41.62%)
Mutual labels:  scale
D3 Iconarray
A D3 module for making grids of icons
Stars: ✭ 79 (-95.13%)
Mutual labels:  scale
Snappydata
Project SnappyData - memory optimized analytics database, based on Apache Spark™ and Apache Geode™. Stream, Transact, Analyze, Predict in one cluster
Stars: ✭ 995 (-38.66%)
Mutual labels:  scale
React Fit To Viewport
Stars: ✭ 92 (-94.33%)
Mutual labels:  scale
Subsampling Scale Image View
Copyright 2018 David Morrissey, and licensed under the Apache License, Version 2.0. No attribution is necessary but it's very much appreciated. Star this project if you like it!
Stars: ✭ 7,137 (+340.01%)
Mutual labels:  scale
Ucrop
Image Cropping Library for Android
Stars: ✭ 11,003 (+578.36%)
Mutual labels:  scale
Brighter
Command Dispatcher, Processor, and Distributed Task Queue
Stars: ✭ 1,393 (-14.12%)
Mutual labels:  scale
Drawingboard
手绘板
Stars: ✭ 77 (-95.25%)
Mutual labels:  scale
Smoothrefreshlayout
一款支持上下拉刷新、越界回弹、二级刷新、横向刷新、拉伸回弹、平滑滚动、嵌套滚动的多功能刷新控件
Stars: ✭ 1,166 (-28.11%)
Mutual labels:  scale
Terraform Aws Jenkins Ha Agents
A terraform module for a highly available Jenkins deployment.
Stars: ✭ 41 (-97.47%)
Mutual labels:  scale
Scale
Processing framework for containerized algorithms
Stars: ✭ 100 (-93.83%)
Mutual labels:  scale
Php Image Resize
PHP library to resize, scale and crop images. Cloud solution available at:
Stars: ✭ 955 (-41.12%)
Mutual labels:  scale
Tokencaps
A middleware framework and persistence layer to aggregate and normalize crypto-currency data.
Stars: ✭ 118 (-92.73%)
Mutual labels:  scale
Yunmai Data Extract
Extract your data from the Yunmai weighing scales cloud API so you can use it elsewhere
Stars: ✭ 21 (-98.71%)
Mutual labels:  scale
Rumble
⛈️ Rumble 1.11.0 "Banyan Tree"🌳 for Apache Spark | Run queries on your large-scale, messy JSON-like data (JSON, text, CSV, Parquet, ROOT, AVRO, SVM...) | No install required (just a jar to download) | Declarative Machine Learning and more
Stars: ✭ 58 (-96.42%)
Mutual labels:  scale
Flyte
Accelerate your ML and Data workflows to production. Flyte is a production grade orchestration system for your Data and ML workloads. It has been battle tested at Lyft, Spotify, freenome and others and truly open-source.
Stars: ✭ 1,242 (-23.43%)
Mutual labels:  scale
Ivozprovider
IVOZ Provider - Multitenant solution for VoIP telephony providers
Stars: ✭ 127 (-92.17%)
Mutual labels:  scale
Dynamometer
A tool for scale and performance testing of HDFS with a specific focus on the NameNode.
Stars: ✭ 122 (-92.48%)
Mutual labels:  scale

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

This software is maintained under a new repository located at yowainwright/reframe.js

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️


Reframe.js, reframe your content responsively

npm version 0.3.6 unpkg Greenkeeper Build Status Share


🖼 Reframe.js

Reframe.js is a javascript plugin that makes elements scale at a fixed ratio.

This is particularly awesome for making embedded stuff, like videos or playlists, scale appropriately within a content area. This can done by hand but it's difficult to maintain, especially with CMS's and multiple editors. Reframe.js solves this issue—perfectly!

Alternatively, noframe.js is provided. Noframe.js scales selected elements at a fixed ratio but does not manipulate the dom's element structure at all! This keeps things like analytic events that run on embedded content intact!

Installing

NPM

npm i reframe.js --save

Yarn

yarn add reframe.js

Setup

  1. Add dist/reframe.js
  2. reframe the element you'd like to re-frame.

Examples

reframe('iframe'); // Wrap all iFrames in the page
reframe(document.getElementById('my-frame')); // Pass a DOM element
reframe(document.querySelectorAll('.my-targets')) // Pass a live node list

Elements that have been wrapped with reframe will not be wrapped twice.

How?

Reframe.js wraps a specified element in a div that is an intrinsic ratio of the original element. This plugin is great for embedded content like iframes or videos.

Why Reframe.js?

Reframe.js is inspired by FitVids and does what FitVids does but without the need for jQuery. This makes the plugin highly valuable when including it in a module that has to be very small and with minimal dependencies. Here's a basic codepen example.

This plugin is small - ~1.3kb unminified and is meant to do 1 thing - wrap elements that aren't responsive and make them responsive. 💪

Options

If you'd like to not use the classname 'js-reframe', just use your own.

reframe('iframe', 'my-classname');

jQuery

Reframe.js works with jQuery or Zepto. As of version 2.0.0, use jquery.reframe.js for jQuery or Zepto.

$('iframe').reframe();

// While using a custom class name
$('iframe').reframe('my-classname');

🌐 Noframe.js

Noframe.js makes the same ratio as Reframe.js using css calc.

Noframe.js's doesn't wrap the element you'd like to be responsive. It, instead, does a calculation based on its or a parent element's max-width. Here's a basic codepen example.

Noframe.js Notes

  • The reframed element requires a parent element with a max width to scale above the selected elements intial size otherwise the reframed element will only scale below its initial size. 👍

Setup

  1. Add dist/noframe.js
  2. noframe the element you'd like to re-frame.

Examples

noframe('iframe');
noframe('iframe', 'parent');

jQuery

Noframe.js works with jQuery or Zepto. As of version 2.0.0, use jquery.noframe.js for jQuery or Zepto.

$('iframe').noframe();
$('iframe').noframe('parent');

Reframe.js or Noframe.js?

Reframe.js offers the simplest solution to making elements scale at an intrinsic ratio.

Noframe.js doesn't wrap the selected element to make it scale at an intrinsic ratio. Noframe.js is the ideal solution when various events, like tracking events, could be affected when an element is wrapped. It does require a width or max-width which can involve a bit more setup awareness.


Created and maintained by Jeff Wainwright with Dollar Shave Club Engineering.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].