Git Product home page Git Product logo

ionic-contrib-frosted-glass's Introduction

Ionic Frosted Glass

An optional frosted-glass effect for iOS 7 styled Ionic apps.

Demo here

To use, include ionic.contrib.frostedGlass.css and ionic.contrib.frostedGlass.js in your app.

Then, apply the frosted-bar attribute directive to a <header-bar> or <nav-bar> to get the frosted effect. Note: you must also have a <content> directive on the page which is where the content will be taken from for the blur. Also, feel free to use the extra class bar-frosted for header bars that comes with the CSS, which gives you a light grey header bar much like iMessage:

<body>
  <pane ng-controller="PageCtrl">
    <header-bar frosted-bar title="'Title'" type="bar-frosted"></header-bar>

    <content has-header="true" has-footer="true" padding="true">
      <ol class="messages">
        <li ng-repeat="message in messages" ng-bind-html="message.content">
        </li>
      </ol>
    </content>
  </pane>
</body>

Unfortunately, it's not feasible to auto blur the content if it changes. To notify the frosted glass system to redraw itself, you can use the $ionicFrostedDelegate service:

controller('MyCtrl', function($scope, $ionicFrostedDelegate, $ionicScrollDelegate) {
  $scope.addNew = function() {
    // Add new data
    
    // Resize the scroll area
    $ionicScrollDelegate.resize();

    // Update the frosted glass system
    $ionicFrostedDelegate.update();

    // If you wish, scroll to the bottom of the scroll box to show the new content
    $timeout(function() {
      $ionicScrollDelegate.scrollBottom(true);
    }, 1);
  }
});

ionic-contrib-frosted-glass's People

Contributors

ajoslin avatar igmt avatar mlynch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-contrib-frosted-glass's Issues

Disables header buttons

The ionic-contrib-blur div is appended on top of any buttons appearing in the ion-header-bar, resulting in the buttons being unaccessible.

Adding pointer-events: none; to the ionic-contrib-blur class fixes this problem for me, but I'm sure I'm not the only one who expects this to just work out of the box.

Header/NavBar Disappears & Scrolling Issues

img_1038

Similar issues had been addressed before. Once the keyboard appears

  • Navigation bar is pushed up
  • Not able to scroll through messages

There have been issues with ionic keyboard and inputs

  1. ionic-team/ionic-framework#932

I followed the instructions from the above but was not able to get it working with ionic-frosted-glass. Any pointers to fix this up ?
I am using the cordova ionic keyboard plugin.

Plugin "com.ionic.keyboard" already installed on ios.

This repo might be obsolete => use -webkit-backdrop-filter

We can now use -webkit-backdrop-filter in current iOS 9
So I think there is no need for javascript anymore.

.bar-frosted {
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter:blur(20px);
    border-bottom:1px solid #dddddd;
}

new messages aren't blurred

if you use the add message button several times so some of the new messages manages to reach the top of the view, it is not blurred correctly, instead it is completely hidden when under the header

effect in nav-bar doesn't work

Hi.

I'm trying to put the effect in a nav-bar tag, but this doesn't works....

<ion-header-bar frosted-bar class="bar-positive" title="'Blurred...man!'" type="bar-frosted">
</ion-header-bar>

<ion-nav-view name="mainContent">
</ion-nav-view>

This code works, but this not:

<ion-nav-bar frosted-bar class="bar-positive" type="bar-frosted">
    <ion-nav-back-button class="button-clear"><i class="icon ion-ios7-arrow-back"></i> Atrás</ion-nav-back-button>
</ion-nav-bar>

<ion-nav-view name="mainContent">   
</ion-nav-view>

Anybody can help me? Thanks

Start chat bubble from bottom to top

Hi,
I have urgent requirement , I want to add chat bubble start from bottom to top like given on slack website and its app , is there any thing that ca do it as soon as possible or have to add some css.

Regards
Shivam

inconsistent behavior

Hi, I managed to get this working... kind of :) and it's not working always, which is weird.

I use ion-nav-bar and the first thing is that the bar isn't grey, it stays white. Sometimes I get it to work, especially in a new browser session. When it does work, the bar's title is lost.

I also get this error, I think it might be related:
TypeError: Object [object global] has no method 'rAF'
at http://127.0.0.1:9000/vendor/ionic.contrib.frostedGlass.js:64:16

I run ionic through connect, but when I just open local files, i get the same error.

I load ionic 0.9.25 through bower, angular is version 1.2.12

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.