WIP: Mega Menu

My current project is to create a Multi-Course menu, which will allow students to switch between their courses. This is the desktop version of new IINLC menu. Next step is to make this menu responsive. Stay tuned…

White Board: Wire-frame (Rough)

menu-rough-wireframe

Working with product owner to create a quick wire-frame

Photoshop: Mock-up

menu3

After initial wire-frame and gathering requirements created high fidelity PS mock-up

Starting Responsive

1st Break Point: 1040px or 65em

Menu-Close

Menu-Open

On Github

Turned mock-up into working HTML, CSS and JavaScript. Mega Menu

See in Action

Go…

Arc Graph

On Github

https://github.com/SalmanMunawar/graph

Code


/**
 * Created by Salman Munawar on 1/4/2015.
 */
(function () {

    "use strict";

    var draw = {

        circle: function (params) {

            //Canvas Api:
            //arc(cx, y, radius, startAngle, endAngle, direction)

            /*
             Circle Function API
             draw.circle({

                     canvas: DOM Element,
                     size: Canvas size,
                     radius: Circle Size,
                     color: Circle color
             });
             */

            if (params.canvas) {

                var
                    canvas = params.canvas,
                    size = parseInt(params.size, 10) || 128,
                    radius = parseInt(params.radius, 10) || 64,
                    color = params.color || "#eeeeee",

                    xCoord = size / 2,
                    yCoord = size / 2,

                    ctx = canvas.getContext("2d");

                ctx.beginPath();
                ctx.arc(xCoord, yCoord, radius, 0, Math.PI * 2);
                ctx.fillStyle = color;
                ctx.fill();
                ctx.closePath();

            } else {

                console.error("Please select canvas");

            }

        },
        arc: function (params) {

            //Canvas Api:
            //arc(cx, y, radius, startAngle, endAngle, direction)

            /*
             Arc Function API
             draw.arc({
                     canvas: DOM element,
                     size: Canvas size,
                     radius: Arc Size,
                     color: Arc color,
                     percentage: Arc percentage,
                     width: Thickness of arc
             });
             */

            if (params.canvas) {

                var
                    canvas = params.canvas,
                    size = parseInt(params.size, 10) || 128,
                    radius = parseInt(params.radius, 10) || 64,
                    color = params.color || "#eeeeee",
                    width= params.width || 8,
                    percentage = params.percentage ? Math.PI * 2 * parseInt(params.percentage, 10) / 100 : 75,

                    xCoord = size / 2,
                    yCoord = size / 2,

                    ctx = canvas.getContext("2d");

                ctx.rotate(-Math.PI / 2);

                ctx.beginPath();
                ctx.arc(-xCoord, yCoord, radius, 0, percentage);
                ctx.strokeStyle = color;
                ctx.lineWidth = width;
                ctx.stroke();
                ctx.closePath();

            } else {

                console.error("Please select canvas");

            }//End if

        },
        score: function (element) {
            /*
             Score Function API

            Usage:
             JS
                draw.score(DOM Element);
             */

            if (element) {

                var paper = document.querySelector(element),
                    graphSize = parseInt(paper.width, 10),
                    radius = graphSize / 2;

                //Draw graph background
                this.circle({
                    canvas: paper,
                    size: graphSize,
                    radius: radius,
                    color: paper.getAttribute('data-background-color')
                });

                //Draw inner circle
                this.circle({
                    canvas: paper,
                    size: graphSize,
                    radius: radius * .75,
                    color: paper.getAttribute('data-core-color')
                });

                ////Draw arc
                this.arc({

                    canvas: paper,
                    size: graphSize,
                    percentage: paper.getAttribute('data-percentage'),
                    radius: (graphSize / 2) * .875,
                    width: (graphSize / 2) * .25,
                    color: paper.getAttribute('data-arc-color')

                });

            } else {

                console.error("Please select canvas");

            }//End if

        }//End Score

    }; //End Draw

    //Call draw.score function which will draw.circle twice and draw.arc once
    draw.score(".score");

}());

So many screen resolutions

So many screen resolutions. I have spent a good amount of time looking for device resolutions but can never seem to remember that one website where I found that information last time. Well here is another one but hopefully you will remember this tip.

* Open Chrome -> inspect element and click the smart phone icon and choose from a large variety of devices.

Very helpful for designing and developing responsive website and apps.

Using Meta and Link Tags for OS Integration

Key Meta and links can help Integrate your application or website into any OS. Which gives a professional prospective to your product. It makes it easier for the client to access your application/site as would access any native app.

Below are some tags I use to create “Add to Homescreen” icons. These meta and links are easy to implement but high impact on a product.

Windows 8

<meta name="application-name" content="iWebDraft"/>
<meta name="msapplication-tooltip" content="Salman Munawar / Web Design / Development" />
<meta name="msapplication-TileColor" content="#0f5cbf"/>
<meta name="msapplication-wide310x150logo" content="img/win-logo.jpg"/>
<meta name="msapplication-square150x150logo" content="img/ie150x150.jpg">
<meta name="msapplication-square70x70logo" content="img/ie70x70.jpg">

For more comprehensive list for windows 8 please visit: Pinned Sites

Andriod

For Android little more work is required. In addition to link tags you have to create a manifest file listing a supported size and application name.

<link rel="shortcut icon" sizes="196x196" href="img/touch-icon-196x196.jpg">
<link rel="manifest" href="manifest.json">

For more details please visit: Add to Homescreen

IOS

<link rel="apple-touch-startup-image" href="img/splash.jpg" sizes="640x1096">
<link href="img/ico/apple-touch-icon-57-precomposed.png" sizes="57x57" rel="apple-touch-icon">
<link href="img/ico/apple-touch-icon-114-precomposed.png" sizes="114x114" rel="apple-touch-icon">
<link href="img/ico/apple-touch-icon-72-precomposed.png" sizes="72x72" rel="apple-touch-icon">
<link href="img/ico/apple-touch-icon-144-precomposed.png" sizes="144x144" rel="apple-touch-icon">

For more details please visit: Add to Homescreen

A little about me – Frontend / Design Ninja

I am a Senior Web Developer and Designer at Institute for Integrative Nutrition. I am very passionate about design and code. I love to design something and see it action and live with code. I have been doing web design and development since 2007 and have come a long away.

As I continue to learn and become a better designer and developer. I feel very excited about emerging Front-end technologies like AngularJs. Which is quickly becoming my to go framework for web apps and website. Even this website is made with AngularJs. I have used AngularJs to built the Front-end for IIN Learning Center (LMS) which is a online education platform for IIN students.


    function ninjafy(newbie) { 
        return newbie + " am a Frontend / Design Ninja";
    }

    var master = ninjafy("I");