GithubHelp home page GithubHelp logo

website's Introduction

WebSite

A framework extension for Perl CGI

Overview

WebSite is a collection of Perl Modules to provide object oriented extensions to Perl CGI when using a framework such as bootstrap. It is extensible to more features of the framework as well to other frameworks.

Example

If you would like to use a bootstrap "panel" in your HTML, you would use this HTML code:

<div id="Panel_Test" class="panel panel-default">
  <div class="panel-heading">
    <span class="h4 panel-title">My Panel Title<span>
  </div>
  <div class="panel-body">
    My Content
  </div>
  <div class="panel-footer text-left">
    My Footer
  </div>
</div>

Instead of this, with the WebSite framework extension you could write:

print Panel->new({
  ID      => 'Test',
  Head    => 'My Panel Title',
  Content => 'My Content',
  Footer  => 'My Footer',
  Solo    => 1,
});

or, put the HTML content into a variable for later use or manipulation:

my $Panel = Panel->new({ OPTIONS });
$Panel->setContent('My Content');

Supported Frameworks

So far, only bootstrap is supported and not all elements are implemented yet. The idea is to support more frameworks with the same interfaces which would make it easy to change them without major modifications of your code.

For example, to define a navigation panel entry with bootstrap you could write:

use WebSite::Framework::Bootstrap;

my $Start = NavBar->new({'ID' => 'start','Order' => 0,'Title' => 'Startseite'});
$Start->setPane($CGI->div({-class => 'row'},$CGI->div({-class => 'col-xs-12'},$CGI->h2({-class => 'text-center'},'Some Text') . $DateString)));

and it should be possible to switch the framework only with the use statement.

website's People

Contributors

adspectus avatar

Watchers

 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.