Git Product home page Git Product logo

tedx's Introduction

#Middleman Boilerplate

This includes:

  1. jQuery
  2. Bootstrap
  3. Bootstrap Sass Variables
  4. Font Awesome
  5. Heroku Deployment Config

Getting Started


Clone the repo using the GUI or terminal. To do so in terminal, use the following:

git clone https://github.com/dannyvassallo/middleman-boilerplate.git
cd middleman-boilerplate

From the "middleman-boilerplate" directory, install the gems by running the following:

bundle install

To fire up the server while in the "middleman-boilerplate" directory use this command:

middleman s

If you are having issues with livereload not working fire up the server using:

middleman s --force-polling --verbose

To kill the server use "ctrl+c"

If you find yourself curious as to what directory you are in use the following in terminal:

pwd

It should turn up "middleman-boilerplate"

Deploying

Create a new app on heroku using heroku-cli. Pass in the following:

heroku create YOUR-APP-NAME

To add an existing repository:

heroku git:remote -a YOUR-APP-NAME

To deploy, commit all changes and pass in:

git push heroku master

To deploy a non-master branch use:

git push heroku MY-NEW-BRANCH:master

###Middleman Helper Methods


Create an external link:

<%= link_to 'My Site', 'http://mysite.com' %>

Create an internal link:

<%= link_to 'About', '/about.html' %>

Link / Image tag for image in images folder:

<% link_to 'http://mysite.com' do %>
  <%= image_tag 'mylogo.png' %>
<% end %>

Create a form (example):

<% form_tag '/destroy', :class => 'destroy-form', :method => 'delete' do %>
  <% field_set_tag do %>
    <p>
      <%= label_tag :username, :class => 'first' %>
      <%= text_field_tag :username, :value => params[:username] %>
    </p>
    <p>
      <%= label_tag :password, :class => 'first' %>
      <%= password_field_tag :password, :value => params[:password] %>
    </p>
    <p>
      <%= label_tag :strategy %>
      <%= select_tag :strategy, :options => ['delete', 'destroy'],
          :selected => 'delete' %>
    </p>
    <p>
      <%= check_box_tag :confirm_delete %>
    </p>
  <% end %>
  <% field_set_tag(:class => 'buttons') do %>
    <%= submit_tag "Remove" %>
  <% end %>
<% end %>

Text helpers for dummy info:

USAGE:

<%= lorem.sentences 5 %>

DIFFERENT METHODS:

lorem.sentence      # returns a single sentence
lorem.words 5       # returns 5 individual words
lorem.word
lorem.paragraphs 10 # returns 10 paragraphs 
lorem.paragraph
lorem.date          # accepts a strftime format argument
lorem.name
lorem.first_name
lorem.last_name
lorem.email

Placeholder Images:

USAGE:

<%= lorem.image('300x400') %>

DIFFERENT METHODS:

lorem.image('300x400')
  #=> http://placehold.it/300x400
lorem.image('300x400', :background_color => '333', :color => 'fff')
  #=> http://placehold.it/300x400/333/fff
lorem.image('300x400', :random_color => true)
  #=> http://placehold.it/300x400/f47av7/9fbc34d
lorem.image('300x400', :text => 'blah')
  #=> http://placehold.it/300x400&text=blah

tedx's People

Contributors

dannyvassallo avatar

Stargazers

Ken Leland III avatar

Watchers

James Cloos avatar Ken Leland III avatar  avatar

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.