Giter Club home page Giter Club logo

meteor-fittext's Introduction

FitText - Meteor Smart Package

FitText packaged for Meteor. FitText is a jQuery plugin that makes font-sizes scalable and fluid when using responsive layouts (like Bootstrap).

See the FitText Docs for more info.

How to install?

  1. Install meteorite
  2. mrt add fittext

How to use FitText:

// app.less

.my-container {
	width: 90%;
	height: 100%;
	margin-top: 20px;
	font-size: 100%;
}

.my-container h1 {
	width: 100%;
	color: #fff;
	font-family: 'Lobster', serif;
	font-size: 220px; /* set a fall-back size */
	line-height: 1;
	font-weight:bold;
	display: inline-block;
	margin: 0 auto; 
}

// app.js

Template.your_template.rendered = function () {
	$('h1').fitText(0.59); // you can play with this number or omit it all together to get your size just right
};

// app.html

// Don't forget to include you web-fonts... This needs to be done before your template loads, but should really be done in <head>
// <link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>

<template name="your_template">
	<div class="container my-container">
		<h1>My Giant Text!</h1>
	</div>
</template>

meteor-fittext's People

Contributors

dknell avatar

Stargazers

Kris Haamer avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.