diff --git a/app/assets/javascripts/app.js.erb b/app/assets/javascripts/app.js.erb index 6d87c37c8..8a9e14be1 100644 --- a/app/assets/javascripts/app.js.erb +++ b/app/assets/javascripts/app.js.erb @@ -20,7 +20,7 @@ angular.module('application', ['ngCookies', 'ngResource', 'ngSanitize', 'ngAnima 'ui.select', 'ui.calendar', 'angularMoment', 'Devise', 'DeviseModal', 'angular-growl', 'xeditable', 'checklist-model', 'unsavedChanges', 'angular-loading-bar', 'ngTouch', 'angular-google-analytics', 'angularUtils.directives.dirDisqus', 'summernote', 'elasticsearch', 'angular-medium-editor', 'naif.base64', - 'minicolors', 'pascalprecht.translate']). + 'minicolors', 'pascalprecht.translate', 'ngFitText']). config(['$httpProvider', 'AuthProvider', "growlProvider", "unsavedWarningsConfigProvider", "AnalyticsProvider", "uibDatepickerPopupConfig", "$provide", "$translateProvider", function($httpProvider, AuthProvider, growlProvider, unsavedWarningsConfigProvider, AnalyticsProvider, uibDatepickerPopupConfig, $provide, $translateProvider) { diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 55ab68983..cbeb714a9 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -67,6 +67,7 @@ //= require angular-translate-loader-partial/angular-translate-loader-partial //= require messageformat/messageformat //= require angular-translate-interpolation-messageformat/angular-translate-interpolation-messageformat +//= require ngFitText/dist/ng-FitText.min //= require_tree ./controllers //= require_tree ./services //= require_tree ./directives diff --git a/app/assets/stylesheets/app.components.scss b/app/assets/stylesheets/app.components.scss index abcf2e9f2..d504d954a 100644 --- a/app/assets/stylesheets/app.components.scss +++ b/app/assets/stylesheets/app.components.scss @@ -220,13 +220,13 @@ .amount { padding-top: 16px; font-weight: bold; - font-size: 1vw; + font-size: rem-calc(20); color: white; } .period { position: relative; top: -6px; - font-size: 0.75vw; + font-size: rem-calc(14); color: white; } } diff --git a/app/assets/templates/plans/index.html.erb b/app/assets/templates/plans/index.html.erb index aaa1d3c61..29c43907e 100644 --- a/app/assets/templates/plans/index.html.erb +++ b/app/assets/templates/plans/index.html.erb @@ -35,7 +35,7 @@
-
{{plan.amount | currency}}
+
{{plan.amount | currency}}
{{ plan.interval | planIntervalFilter: plan.interval_count }}
diff --git a/bower.json b/bower.json index 9aeb8c634..e60a3e1a9 100644 --- a/bower.json +++ b/bower.json @@ -52,7 +52,8 @@ "angular-translate-loader-partial": "~2.8.1", "angular-translate-interpolation-messageformat": "~2.8.1", "messageformat": "=0.1.8", - "moment-timezone": "~0.5.0" + "moment-timezone": "~0.5.0", + "ngFitText": "~4.1.1" }, "resolutions": { "jquery": ">=1.10.2", diff --git a/vendor/assets/components/ngFitText/.bower.json b/vendor/assets/components/ngFitText/.bower.json new file mode 100644 index 000000000..2bbed55dc --- /dev/null +++ b/vendor/assets/components/ngFitText/.bower.json @@ -0,0 +1,37 @@ +{ + "name": "ngFitText", + "version": "4.1.1", + "main": [ + "dist/ng-FitText.min.js" + ], + "keywords": [ + "angular", + "javascript", + "typography" + ], + "ignore": [ + "demo", + "lib", + "node_modules", + "src", + "test", + ".bowerrc", + "gulpfile.js", + "package.json", + "index.html" + ], + "dependencies": { + "angular": "1.x" + }, + "homepage": "https://github.com/patrickmarabeas/ng-FitText.js", + "_release": "4.1.1", + "_resolution": { + "type": "version", + "tag": "v4.1.1", + "commit": "0af12af4b129c9b9b9bac119e8dfbf105a8f4ade" + }, + "_source": "git://github.com/patrickmarabeas/ng-FitText.js.git", + "_target": "~4.1.1", + "_originalSource": "ngFitText", + "_direct": true +} \ No newline at end of file diff --git a/vendor/assets/components/ngFitText/.gitignore b/vendor/assets/components/ngFitText/.gitignore new file mode 100644 index 000000000..f51886490 --- /dev/null +++ b/vendor/assets/components/ngFitText/.gitignore @@ -0,0 +1,3 @@ +.idea +lib/ +node_modules/ \ No newline at end of file diff --git a/vendor/assets/components/ngFitText/.npmignore b/vendor/assets/components/ngFitText/.npmignore new file mode 100644 index 000000000..bcd0556f2 --- /dev/null +++ b/vendor/assets/components/ngFitText/.npmignore @@ -0,0 +1,8 @@ +demo +lib +node_modules +test +.bowerrc +bower.json +gulpfile.js +index.html \ No newline at end of file diff --git a/vendor/assets/components/ngFitText/LICENSE b/vendor/assets/components/ngFitText/LICENSE new file mode 100644 index 000000000..1a02d2499 --- /dev/null +++ b/vendor/assets/components/ngFitText/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Patrick Marabeas + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/assets/components/ngFitText/README.md b/vendor/assets/components/ngFitText/README.md new file mode 100644 index 000000000..147bfaaf7 --- /dev/null +++ b/vendor/assets/components/ngFitText/README.md @@ -0,0 +1,108 @@ +# ng-FitText.js + +### ng-FitText.js makes font-sizes flexible. Use this AngularJS directive in your fluid or responsive layout to achieve scalable headlines that fill the width of a parent element. + +This is a rework of the original jQuery plugin which can be found here: https://github.com/davatron5000/FitText.js. + +### Install and Inclusion + +Grab it with Bower: `bower install ngFitText` + +Include it in your AngularJS application + +```javascript +var myApp = angular.module('myApp', ['ngFitText']); +``` + +### Implementation + +```html + +

FitText

+ + +

+ + +

FitText

+ + +

FitText

+ + +

FitText

+ + +

FitText

+ + +

FitText

+

FitText

+

FitText

+ + +
+
Short line
+
Font size of this element will be used
+
Short
+
+ + + + Single + line of text + spans 100% width + + + +

Custom font

+ + +

Custom font

+``` + +### FitText Config Provider + +Because MODULARIZATION, this module doesn't come with debounce functionality included. Instead you will need to specify the functionality in the `fitTextConfigProvider`: + +```javascript +module.config(['fitTextConfigProvider', function(fitTextConfigProvider) { + fitTextConfigProvider.config = { + debounce: _.debounce, // include a vender function like underscore or lodash + debounce: function(a,b,c) { // specify your own function + var d;return function(){var e=this,f=arguments;clearTimeout(d),d=setTimeout(function(){d=null,c||a.apply(e,f)},b),c&&!d&&a.apply(e,f)} + }, + delay: 1000, // debounce delay + loadDelay: 10, // global default delay before initial calculation + compressor: 1, // global default calculation multiplier + min: 0, // global default min + max: Number.POSITIVE_INFINITY // global default max + }; +}]); +``` + +### Changelog + +#### [v4.1.0](https://github.com/patrickmarabeas/ng-FitText.js/releases/tag/v4.1.0) ++ Replace `'initial'` value with more semantic `'inherit'` ++ Both `data-fittext-min` and `data-fittext-max` can use the inherited CSS value by using `'inherit'` + +#### [v4.0.0](https://github.com/patrickmarabeas/ng-FitText.js/releases/tag/v4.0.0) ++ `data-fittext-max` can now take `'initial'` as a value to use inherited CSS value. This allows for PX, EM or REM to be used. ++ Line heights are preserved ++ Display property is now preserved ++ New lines no longer need to be specified with an attribute ++ `ng-model` was mistakenly used for `ng-bind` - No longer need to use both `ng-model` and `{{}}` for dynamic values ++ Minified version now delivered via Bower ++ Config provider namespaced to avoid conflicts + +#### [v3.0.0](https://github.com/patrickmarabeas/ng-FitText.js/releases/tag/v3.0.0) ++ Element now defaults to 100% width ++ Compressor now fine tunes from this point ++ Debounce functionality now needs to be passed in via fitTextConfigProvider + +#### < v2.4.0 ++ Specifying a value for data-fittext allows you to fine tune the text size. Defaults to 1. Increasing this number (ie 1.5) will resize the text more aggressively. Decreasing this number (ie 0.5) will reduce the aggressiveness of resize. data-fittext-min and data-fittext-max allow you to set upper and lower limits. ++ The element needs to either be a block element or an inline-block element with a width specified (% or px). ++ Font sizes can be limited with `data-fittext-max` and `data-fittext-max` ++ Debouncing addded diff --git a/vendor/assets/components/ngFitText/bower.json b/vendor/assets/components/ngFitText/bower.json new file mode 100644 index 000000000..372b7e2f2 --- /dev/null +++ b/vendor/assets/components/ngFitText/bower.json @@ -0,0 +1,26 @@ +{ + "name": "ngFitText", + "version": "4.1.1", + "main": [ + "dist/ng-FitText.min.js" + ], + "keywords": [ + "angular", + "javascript", + "typography" + ], + "ignore": [ + "demo", + "lib", + "node_modules", + "src", + "test", + ".bowerrc", + "gulpfile.js", + "package.json", + "index.html" + ], + "dependencies": { + "angular": "1.x" + } +} diff --git a/vendor/assets/components/ngFitText/dist/ng-FitText.min.js b/vendor/assets/components/ngFitText/dist/ng-FitText.min.js new file mode 100644 index 000000000..384548f63 --- /dev/null +++ b/vendor/assets/components/ngFitText/dist/ng-FitText.min.js @@ -0,0 +1 @@ +!function(t,e,i,n){"use strict";i.module("ngFitText",[]).value("fitTextDefaultConfig",{debounce:!1,delay:250,loadDelay:10,compressor:1,min:0,max:Number.POSITIVE_INFINITY}).directive("fittext",["$timeout","fitTextDefaultConfig","fitTextConfig",function(e,n,o){return{restrict:"A",scope:!0,link:function(f,a,l){function r(){var t=T*h/s.offsetWidth/h;return Math.max(Math.min((c[0].offsetWidth-6)*t*p,parseFloat(y)),parseFloat(m))}function u(){s.offsetHeight*s.offsetWidth!==0&&(d.fontSize=T+"px",d.lineHeight="1",d.display="inline-block",d.fontSize=r()+"px",d.lineHeight=b,d.display=v)}i.extend(n,o.config);var c=a.parent(),s=a[0],d=s.style,x=t.getComputedStyle(a[0],null),h=a.children().length||1,g=l.fittextLoadDelay||n.loadDelay,p=l.fittext||n.compressor,m=("inherit"===l.fittextMin?x["font-size"]:l.fittextMin)||n.min,y=("inherit"===l.fittextMax?x["font-size"]:l.fittextMax)||n.max,b=x["line-height"],v=x.display,T=10;e(function(){u()},g),f.$watch(l.ngBind,function(){u()}),n.debounce?i.element(t).bind("resize",n.debounce(function(){f.$apply(u)},n.delay)):i.element(t).bind("resize",function(){f.$apply(u)})}}}]).provider("fitTextConfig",function(){var t=this;return this.config={},this.$get=function(){var e={};return e.config=t.config,e},this})}(window,document,angular); \ No newline at end of file