Wednesday, March 1, 2017

Meetup

Meetup

'Meetup' is a free One Page HTML template suited for promoting an event. Sections include intro overview, speakers, multi price options, event schedule (with day switcher), a contact form and a Twitter feed. You'd have to integrate those Buy buttons into something like PayPal, Gumroad or Shopify. The design is fairly basic - I actually quite like speaker section - but a great starting point to announcing your event on low budget.

by Rob Hope via One Page Love

How to Choose the Best Fonts for Your Next Project with Fontcloud

You find yourself staring at the Photoshop loading screen. Again.

Another day where you feel it’s taking a few extra seconds. You start thinking what could be the cause. Maybe it was the latest font bundle with 30 new fonts I installed? Again.

Fonts have never been more accessible. On a daily basis hundreds are released all over the web. And it’s not only foundries anymore. Indie designers are on the rise and are taking the market by storm.

For designers, this is a great time to be alive. Never before where there so many fonts to choose from and never have they been more affordable.

But how do you manage all these fonts? How do you know which ones you snagged up for free and which ones you purchased?

Finding the right font for your project can be difficult. Not only remembering how they look, but also keeping track of the ones you are legally allowed to use.

Luckily there is a new free online tool to help you manage and select the right fonts.

What is Fontcloud?

Fontcloud is an easy to use font manager created to help you keep an overview. It allows you to access all your installed fonts via the browser for easy pickings.

Getting started

Fontcloud runs completely in the browser. It doesn’t require you to install any software and you don’t need an account for viewing your fonts.

Your browser does need to support flash. Unfortunately flash is still the only way to view what fonts you have installed.

Searching for the right font

To get started, you simply type the text you would like to preview and hit enter. Your installed fonts will automatically show up with your text, allowing you to browse through them.

There are a couple of controls that can help you narrow down your font list.

Font controls

  1. Background color: See if the text fits multiple backgrounds
  2. Manage capitalization: Check how to font works capitilaized or lowercase.
  3. Font size: Test how eligible your fonts are.
  4. Filter selection: Create a selection of your top picks.

Make a selection

Sharing a selection

If you need some quick feedback on your selection – for example from your client – you can simply click “Share selection” and you will get a private share URL.

Your selection will be converted to an image, which means that the recipient won’t need to have your fonts installed in order to view your preview. This makes for easy collaboration.

Managing licenses

Another useful feature is the option to assign licenses to your installed fonts. As the licenses are stored on the server side, you do need a (free) account for this.

Simply click the gavel icon underneath a font and select the license.

Assigning a license to a font

By default you have 2 licenses available (commercial & personal use). You can manage your licenses by adding new ones or removing existing ones.

You can easily load a list to view all fonts that fall under a specific license. This way you can make sure you are legally in the clear.

Viewing PUA encoded characters

When you don’t have a glyphs panel available like the default one in Illustrator it can be a real pain to access the Private Use Area glyphs. Working with Windows Character Map is horrific.

Continue reading %How to Choose the Best Fonts for Your Next Project with Fontcloud%


by Roemie Hillenaar via SitePoint

Swift: Probably The Best Full-Stack Language in the World

Ever since its release in 2014, Swift went through multiple iterations in order to become a great full-stack development language. Indeed: iOS, macOS, tvOS, watchOS apps, and their backend can now be written in the same language.

Backends can be written in many other languages – but let us argue why Swift is probably the best full-stack language in the world for mobile developers.

Safety. An essential advantage of Swift as a perfect back-end programming language is the safety built into the language. Swift does away with entire classes of errors and crashes. Remember null pointer exceptions? Those that cause crashes when objects you expect not to be nil are accidentally nil. Swift’s optionals let you know in advance if an object may be nil, and if so, force you to adequately handle the nil case. Safe initialization prevents you from ever initialising an object such that it ends up being nil. Remember unrecognized selector sent to instance crashes? Swift is type-safe meaning that if you’re calling a function on an object that doesn’t respond to it, the error will be caught by the compiler and not at runtime. Yet Swift was explicitly designed to be familiar and practical, rather than to adhere to some particular programming dogma. That said, as Chris Lattner puts it, “the defaults encourage safety and predictability”.

Continue reading %Swift: Probably The Best Full-Stack Language in the World%


by Ariel Elkin via SitePoint

Alessandro Scarpellini

Beautifully minimal One Page portfolio redesign for Italian designer, Alessandro Scarpellini.

by Rob Hope via One Page Love

OneBigTweet

OneBigTweet

Parallax scrolling One Pager with slick load transitions for non-profit campaign #OneBigTweet.

by Rob Hope via One Page Love

This Week in Mobile Web Development (#147)

Read this on the Web

Mobile Web Weekly March 1, 2017   #147
Peter Cooper recommends
Progressive Web App Libraries in Production “In 2017, if you aren’t taking advantage of Service Workers, you’re leaving performance wins for returning users on the table.”
Addy Osmani
Holly Schinsky recommends
Touch Devices Should Not Be Judged By Their Size — Media queries aren’t always enough when designing for touch screens, but a new Interaction Media spec can help by detecting pointing device and hover capabilities.
Andres Galante
Brian Rinaldi recommends
Google's Accelerated Mobile Pages Now Accounts for 7% of Traffic to Big US Publishers — According to data released by Adobe Analytics, Accelerated Mobile Pages (AMP) now accounts for a significant and growing portion of traffic to major publishers.
Rich McCormick
Sponsored
Learn to develop your next web or mobile application with ReactJS — Register for Rangle’s free React online course for developers on March 31. The second of a three-part series, this course is designed for developers interested in diving into the React library.
Rangle.io

Holly Schinsky recommends
How to Build Your Own Progressive Image Loader — A handy technique for progressive image loading to provide the best performance in your hybrid mobile apps.
Craig Buckler
Brian Rinaldi recommends
Why I Love Element Queries and You Should Too — What makes element queries powerful and how you can get started using them with the EQCSS plugin.
Tommy Hodgins
Chris Brandrick recommends
Nokia’s 3310 Returns to Life As A Modern Classic — Basic web use is achieved via the bundled Opera Mini browser, running over a 2.5G connection.
Tom Warren
Peter Cooper recommends
How to Build an Ionic 2 App with Native Plugin Integrations
Coding Sans
Brian Rinaldi recommends
Great Alternatives to Hamburger Menus — How to make your navigation obvious and keep people engaged.
Mobiscroll
Chris Brandrick recommends
Sneak Preview of NativeScript 3.0 — Georgi Atanasov gives us a sneak preview of NativeScript 3.0, due out in mid-April.
NativeScript
Peter Cooper recommends
How to Make Your App a PWA
Mirosław Ciastek
Holly Schinsky recommends
Increasing Performance with Efficient DOM Writes in Ionic 2
Josh Morony
Brian Rinaldi recommends
Introduction to Ionic 2 — A look at what’s new and changed between Ionic 1 and 2 and whether you should choose Ionic 2 for your project.
Wernher-Bel Ancheta
Holly Schinsky recommends
Ionic Split Panel Component — An in-depth look at the split panel component recently released by Ionic.
Chris Griffith
Holly Schinsky recommends
How to Install 3rd Party Libraries in Ionic 2
Joshua Morony
Brian Rinaldi recommends
CSS Grid: Learning New Layout - Responsive — A quick comparison of the code necessary to create a grid with and without CSS Grid support.
Susan Robertson
Holly Schinsky recommends
A Roundup of Vue.js-Supporting Mobile Hybrid App Frameworks — A roundup of hybrid mobile frameworks supporting Vue.js 2.0.
Alligator.io
Holly Schinsky recommends
Testing on Multiple Form factors — Maya-kai mirrors gestures and user interactions in React Native applications, making it useful for testing apps on devices with different screen sizes at the same time.
Parashuram N
Peter Cooper recommends
Design a Perfect Search Box — How this element can be improved in order to save the user time in going where they want.
Nick Babich
Brian Rinaldi recommends
spacegrid: A Basic, Responsive Grid Layout
Jonathan Speek
Curated by Brian Rinaldi and Holly Schinsky for Cooperpress.
Cooperpress is located at Office 30, Fairfield Enterprise Centre, Louth, LN11 0LS, UK
Update your email address
or stop receiving MWW here


by via Mobile Web Weekly

Authorization With Pundit

Pundit is a tool that allows you to restrict certain parts of your Rails application to authorized users. It does this by providing you with certain helpers.

In this tutorial, you will build a blog that restricts parts such as creating, updating and deleting articles to authorized users only.

Getting Started

Start by generating a new Rails application.

The -T flag tells Rails to generate the new application without the default test suite. Running the command will generate your Rails application and install the default gems.

Go ahead and add the following gems to your Gemfile. You will be using bootstrap-sass for the layout of your application, and Devise will handle user authentication.

Run the command to install the gem.

Now rename app/assets/stylesheets/application.css to app/assets/stylesheets/application.scss. Add the following lines of code to import bootstrap.

Create a partial named _navigation.html.erb to hold your navigation code; the partial should be located in app/views/layouts directory. Make the partial look like what I have below.

For the navigation to be used, you need to render it in your application layout. Tweak your application layout to look like what I have below.

Generate the User Model

Run the command to install Devise.

Now generate your User model.

Migrate your database.

Generate Article Resources

Run the command to generate your Article resources.

This will generate your ArticlesController and Article Model. It will also generate the views needed.

Now migrate your database by running:

Open up app/views/articles/_form.html.erb and make it look like what I have below.

For your index file, it should look like this.

The above code arranges the articles on the index page into a table format to make it look presentable.

Open up your routes file and add the route for articles resources.

Integrate Pundit

Add the Pundit gem to your Gemfile.

Run the command to install.

Integrate Pundit to your application by adding the following line to your ApplicationController.

Run Pundit's generator.

This will generate an app/policies folder which contains a base class with policies. Each policy is a basic Ruby class.

This is how the base class policy looks.

Create the Article Policy

Now you need to write your own policy. For this tutorial, you want to allow only registered users to create new articles. In addition to that, only creators of an article should be able to edit and delete the article.

To achieve this, your article policy will look like this.

In the above, you are permitting everyone (registered and non-registered users) to see the index page. To create a new article, a user has to be registered. You use user.present? to find out if the user trying to perform the action is registered.

For updating and deleting, you want to make sure that only the user who created the article is able to perform these actions.

At this point, you need to establish a relationship between your Article and User model.

You do so by generating a new migration.

Next, migrate your database by running the command:

Open the User model and add the line that seals the relationship.

Your Article model should have this.

Now you need to update your ArticlesController so it is in sync with what you have done so far.

At this point in your application, you have successfully implemented the policies that restrict certain parts of your application to selected users.

You want to add a standard error message that shows whenever a non-authorized user tries to access a restricted page. To do so, add the following to your ApplicationController.

This code simply renders a basic text that tells the user s/he is not authorized to perform the action.

Run:

To start your Rails server, point your browser to http://localhost:3000 to see what you have.

Conclusion

In this tutorial, you learned how to work with both Devise and Pundit. You were able to create policies that allowed only authorized users to view certain parts of the application. You also created a basic error text that shows when a non-authorized user tries to access a restricted part of the application.

You can learn more about Pundit by checking the GitHub page.


by Kingsley Silas Chijioke via Envato Tuts+ Code