Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 17, 2017 12:00 pm

Building Your Startup With PHP: Bootstrap Your Home Page

Final product image
What You'll Be Creating

This tutorial is part of the Building Your Startup With PHP series on Envato Tuts+. In this series, I'm guiding you through launching a startup from concept to reality using my Meeting Planner app as a real-life example. Every step along the way, I'll release the Meeting Planner code as open-source examples you can learn from. I'll also address startup-related business issues as they arise.

Improving the Home Page

A web service's home page has many roles. Functionally, it must make it easy for people to sign up and get started with the application. But it must also aesthetically touch visitors and give them a professional impression that your service delivers what the home page tells them it does.

Since I've been so focused to this point building the scheduling functionality for Meeting Planner, I haven't had time to focus on polishing the home page—and frankly it was falling short, leaving first-time visitors unimpressed.

While I am a program and product manager, a bit of a UX designer and a web developer, I'm not a skilled graphic designer or HTML/CSS guru. Neither am I yet investing external resources in the project, so I needed to improve this myself.

In today's episode, I'll walk you through how I strengthened the home page and what aspects of Bootstrap and CSS I exploited to provide a more professional appearance. There's a lot you can do with Bootstrap on your own if you dive a bit deeper.

If you haven't tried out Meeting Planner or Simple Planner yet, go ahead and schedule your first meeting. I do participate in the comment threads below, so tell me what you think! You can also reach me on Twitter @reifman. I'm especially interested if you want to suggest new features or topics for future tutorials.

As a reminder, all of the code for Meeting Planner is written in the Yii2 Framework for PHP. If you'd like to learn more about Yii2, check out our parallel series Programming With Yii2.

The Current Home Pages

Building Your Startup - Side by side looks at Simple Planner vs Meeting Planner home page

In the last episode, I mentioned launching Simple Planner alongside Meeting Planner with different color schemes and images. They didn't look bad, but the product lead and signup buttons were below the fold. First-time visitors would arrive and primarily see the photograph.

Here's a closer look:

Building Your Startup Bootstrap Current Home Page

Planning the Improvements

Building Your Startup Bootstrap Improved Home Page

Above, you can see the final version I created. Essentially, I wanted to migrate the lead and the login and signup options above the fold, while not completely obstructing the home page background image.

Essentially, I needed to do four things:


  1. Ensure that the background image was responsive and had the capacity to apply opacity (transparency).

  2. Create a left column with a transparent panel to display the lead.

  3. Create a right-hand column to display panels with signup, login and launch notification form with some transparency.

  4. Ensure that the video carousel positioned itself below the background image.

Let's look at each challenge.

Restructuring the Background Image

To make the background more reliably responsive, I rewrote the code to place it as a background image on the body element of the page.

First, I created a new home.css stylesheet which would be configured in the HomeAsset.php file:

The asset file determines which CSS, JavaScript and dependent libraries are loaded for each layout.

Here's the top of home.css defining the body element:

In order to rotate the background image dynamically, I added a style tag to the layout file, Home.php (CSS can't do that):

This applied the chosen background image defined in the last episode by SiteHelper.php:

The Left-Hand Side of the Grid

Building Your Startup Bootstrap Lefthand Panel

Next, I created a Bootstrap grid layout to display the left-hand content panel:

I used a one-unit offset, col-md-offset-1, and a six-unit column, col-md-6. And there are a few other aspects integrated here.

The home-top class in the row allowed me to integrate a vertical margin for these panels. I found that 16% worked well for me, from home.css:

By giving the panels on the home page some opacity, opacity: 0.9;, the background image still showed through a bit, which was aesthetically pleasing:

Also I was able to give the left-hand panel a black background color but with opacity using rgba, background-color: rgba(0,0,0,0.3);.

RGBA color values are an extension of RGB color values with an alpha channel - which specifies the opacity of the object. An RGBA color value is specified with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). (W3 Schools)

And I created round borders using border-radius:5px;.

The result allows the background image to show through while promoting the white lead text.

The Right-Hand Panels and Forms

Building Your Startup Bootstrap Righthand side Panels and Forms

To create the right-hand side, I created a three-unit column, col-md-3. Then, I created two Bootstrap panels inheriting the same 0.9 opacity:

The AuthClient widget in the top panel displays the Facebook, Google and LinkedIn icons which I covered in this earlier tutorial

Vertical Margin for the Video Carousel

Building Your Startup Bootstrap Video Carousel Vertical Top Margin

Finally, I just needed to make sure the video carousel below the fold had enough vertical margin so as not to overlay the background image. I used the video-top class for this:

The 23% margin worked well for desktop and mobile. And here's the HTML:

The Improved Mobile Home Pages

Here's what the improved bootstrap pages look like on mobile:

Building Your Startup Bootstrap Improved Mobile Home Pages side by side

They are much more effective. Now, when users arrive on mobile, they see content right away and not just the lead image.

What's Next?

Building Your Startup Multiple Domains - SimplePlannerio Home Page with Social Image

Certainly, there are a lot of ways to polish and improve the home page experience. But I hope you've seen today that you can quickly leverage common elements in Bootstrap to provide an aesthetically professional experience for your visitors. I was able to do all of this without resorting to hiring an outside designer and CSS coder, so far. I hope to do that at some point when the project is funded.

Over the next couple of weeks, I'll monitor the ratio of visitors to signups and see if improvements are realized.

Looking ahead, I'll be building features to improve Meeting Planner such as activity planning, more SMS, and enabling the development of a mobile app. There's still lots to do. I hope you stay with us.

In the meantime, please check out Meeting Planner and share it with your business associates, family, and friends.

I'm also getting closer to launching the experiment with WeFunder based on the implementation of the SEC's new crowdfunding rules. You can follow our profile there if you'd like. I will also write more about this in a future tutorial.

Have your own thoughts? Ideas? Feedback? You can always reach me on Twitter @reifman directly. Watch for upcoming tutorials here in the Building Your Startup With PHP series.

Related Links


Original Link:

Share this article:    Share on Facebook
No Article Link

TutsPlus - Code

Tuts+ is a site aimed at web developers and designers offering tutorials and articles on technologies, skills and techniques to improve how you design and build websites.

More About this Source Visit TutsPlus - Code