Coder Social home page Coder Social logo

tomhodgins / template-factory Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 3.0 85 KB

The Template Factory is a small website template written simply in PHP, HTML, CSS and JavaScript. Powered by EQCSS for element queries, plus lightweight plugins for tooltips, modals, notifications, and more!

Home Page: http://staticresource.com/template/

PHP 40.00% CSS 54.06% JavaScript 5.94%
eqcss template plugin component layout theme style child lightweight-plugin template-factory

template-factory's Introduction

The Template Factory

The Template Factory is a small PHP-based website template written simply in PHP, HTML, CSS and JavaScript. Powered by EQCSS for element queries, plus lightweight plugins for tooltips, modals, notifications, and more!

What does it do?

The Template Factory is home to a few different things that are being developed, first there are a number of basic CSS styles being developed and tested so they can be quickly applied to new sites or new content on existing sites without having to worry about creating default styles. These themes can be tested with dummy content using their theme pages below:

Themes

Included themes from basic.css are:

And via additional stylesheets there are also:

The second type of thing being developed at the Template Factory are CSS and JavaScript plugins that are intended to be used across multiple sites. What better environment to test these plugins than in a multi-themed website. These plugins are all located inside their own folders in the plugins/ folder, often with their own documentation labelled as index.php.

Plugins

Included plugins are:

How to build a website with the Template Factory

  • Clone this repository
  • change the $site URL at the top of inc/header.php to the address where you host this repository

To create new pages

  • create new .php files in the main folder
  • set the $template, $template_title, and $template_theme variables at the top of the page
  • include header and footer partials
  • add your content.

All in all, a new empty template file might look like:

<?php
  $template = 'single';
  $template_title = 'The Template Factory';
  $template_theme = 'dark';
?>
<?php include("inc/header.php"); ?>
<h1><?php echo $template_title; ?></h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
<?php include("inc/footer.php"); ?>

To define a new modal

  • Create a new .php file in inc/modals with your desired content
  • set the $modal variable to the same name as the filename for your modal content. inc/modals/example.php would be $modal = "example";
  • include the modal plugin on your page with <?php include("plugins/modals/modal.php"); ?>
  • launch the modal by name with the JavaScript spawnModal('') and supply the same name as the file, e.g. spawnModal('example')
<input onclick=spawnModal('demo')>
<?php $modal = "demo"; include("plugins/modals/modal.php"); ?>

template-factory's People

Contributors

tomhodgins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.