Giter VIP home page Giter VIP logo

Blockify 2.0

Blockify requires stable PHP versions >= 5.3


Installing

Manually

Clone this repo into DocumentRoot/blockify and create an index.php for the test code.

A simple directory structure might look like this:

DocumentRoot/
├── blockify/
│   └── ...
├── images/
│   └── logo.png
└── index.php

Now you’re able to load Blockify into your PHP project:

require 'blockify/load.php';

Alternative Method

During the beta only a manual download is available, but in the future we may add an alternative, i.e. Composer.

Environment If the blockify directory cannot be accessed with //127.0.0.1/blockify you need to set the BLOCKIFY_URL constant before loading Blockify:

define('BLOCKIFY_URL', 'http://blockify.co/blockify');
require 'blockify/load.php';

Test Run

Let’s test Blockify by loading the test block with index.php:

<?php require 'blockify/load.php'; ?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Blockify Test</title>

    <!-- Bootstrap -->
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css">
    <!-- CSS from the blocks -->
    <?php blockify_css(); ?>
  </head>
  <body>
    <?php
        // Print the test block
        echo new \Blockify\Block('test');
    ?>
    <!-- jQuery -->
    <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
    <!-- Include all compiled Bootstrap plugins -->
    <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>
    <!-- Holder.js for placeholder images when developing -->
    <script src="//cdnjs.cloudflare.com/ajax/libs/holder/2.3.1/holder.min.js"></script>
    <!-- JavaScript from the blocks -->
    <?php blockify_js(); ?>
  </body>
</html>

That’s it!

You’ve loaded Blockify and a test block.

Now dive into the Using Blocks guide to start the cool stuff.

Blockify's Projects

color-material icon color-material

The colour palette, based on Google's Material Design, for use in your project.

config icon config

The Bower config reader and writer

json icon json

Read block.json files with semantics, normalisation, defaults and validation

rrssb icon rrssb

Ridiculously Responsive Social Sharing Buttons by KNI Labs

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.