the next step is... bootstrap by omar qunsul

28
Bootstrap .. is the next step Omar Qunsul honeytracks.com

Upload: rails-girls-muc

Post on 22-May-2015

377 views

Category:

Technology


1 download

DESCRIPTION

The next step is... Bootstrap

TRANSCRIPT

Page 1: The next step is... Bootstrap by Omar Qunsul

Bootstrap .. is the next step

Omar Qunsulhoneytracks.com

Page 2: The next step is... Bootstrap by Omar Qunsul

So you built a website .... ?

Page 3: The next step is... Bootstrap by Omar Qunsul
Page 4: The next step is... Bootstrap by Omar Qunsul
Page 5: The next step is... Bootstrap by Omar Qunsul

RailsGirls Munich 2012“So what is the next step ?”

Page 6: The next step is... Bootstrap by Omar Qunsul
Page 7: The next step is... Bootstrap by Omar Qunsul

But what about CSS ?

Page 8: The next step is... Bootstrap by Omar Qunsul

But what about CSS ?

Page 9: The next step is... Bootstrap by Omar Qunsul

But what about CSS ?

Page 10: The next step is... Bootstrap by Omar Qunsul

But what about CSS ?

Page 11: The next step is... Bootstrap by Omar Qunsul

BootstrapCSS and JS Framework

Page 12: The next step is... Bootstrap by Omar Qunsul

<head> <title>Railsgirls</title> <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet"> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= csrf_meta_tags %></head>

app/views/layouts/application.html.erb

First include Bootstrap 3 in your application

Page 13: The next step is... Bootstrap by Omar Qunsul

<body>

<div class="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div class="container"> <div class="navbar-header"> <a class="navbar-brand" href="/">Project</a> </div> <div class="navbar-collapse collapse"> <a class="navbar-brand" href="/ideas">Ideas</a> </div> </div></div>

<div class="container"> <%= yield %></div>

app/views/layouts/application.html.erb

Navigation

Page 14: The next step is... Bootstrap by Omar Qunsul

IS THAT NICE !?

Page 15: The next step is... Bootstrap by Omar Qunsul
Page 16: The next step is... Bootstrap by Omar Qunsul

<h1>Listing ideas</h1>

<table class="table table-striped"> <thead> <tr> <th>Name</th> <th>Description</th> <th>Picture</th>

app/views/ideas/index.html.erb

Tables should be AWESOME !

Page 17: The next step is... Bootstrap by Omar Qunsul
Page 18: The next step is... Bootstrap by Omar Qunsul

But still this looks odd

Page 19: The next step is... Bootstrap by Omar Qunsul

<%= link_to 'New Idea', new_idea_path, :class => "btn btn-primary btn-lg" %>

app/views/ideas/index.html.erb

Buttons should look like ........well buttons !

Page 20: The next step is... Bootstrap by Omar Qunsul

Cool ! But let’s click that button !

Page 21: The next step is... Bootstrap by Omar Qunsul
Page 22: The next step is... Bootstrap by Omar Qunsul

<%= form_for(@idea, :html => {:class =>"form-horizontal", :role =>"form"}) do |f| %>

app/views/ideas/_form.html.erb

Forms !

Page 23: The next step is... Bootstrap by Omar Qunsul

<div class="field form-group"> <%= f.label :name, :class => "control-label col-sm-2" %> <div class="col-sm-10"> <%= f.text_field :name , :class => "form-control", :placeholder => "Write the idea name" %> </div> </div>

app/views/ideas/_form.html.erb

Each form element

Page 24: The next step is... Bootstrap by Omar Qunsul
Page 25: The next step is... Bootstrap by Omar Qunsul

See getbootstrap.comfor more details and info, about Boostrap 3.

There are many css components!

Page 26: The next step is... Bootstrap by Omar Qunsul
Page 27: The next step is... Bootstrap by Omar Qunsul

<head> <title>Railsgirls</title> <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap-theme.min.css"> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= csrf_meta_tags %></head>

app/views/layouts/application.html.erb

Themes

Page 28: The next step is... Bootstrap by Omar Qunsul

</presentation>

Thanx !

@OmarQunsul