Giter VIP home page Giter VIP logo

tango's Introduction

Tango

Tango is an experimental WordPress theme that uses the React UI library in conjunction with standard Underscores template files. The goal is to develop a method for adding the magic of JavaScript-based UIs to existing WordPress themes, built in PHP.

Requires the WP API Theming plugin.

Installation

  1. Install and activate the WP REST API plugin . Leave it on the develop branch.
  2. Install and activate the WP API Theming plugin.
  3. Clone the Tango repo into your wp-content/themes/ folder: git clone [email protected]:kwight/tango.git
  4. cd into your new Tango theme, and run npm install.
  5. Run npm run build to create style.css and js/public.js. See Issues below if you get EMFILE errors.
  6. Activate Tango from Appearance > Themes.

Configuration

Tango requires some basic information to be able to properly connect to the API, and generate accurate links. These are set in js/config.js.

  • api: the API's index, eg. http://localhost/wp-json (required)
  • serverRoot: the root folder of your web server, eg. http://localhost (required)
  • subdir: if your WordPress install is in a subfolder of your web server, enter the relative path here, eg. /trunk/src
  • localStorage: whether or not to use localStorage for API results (note: there is currently no handling for stale results)

Development

Run npm run watch instead of npm run build while developing, to have files recompile automatically upon save.

Issues

Make sure you have compiled style.css and js/public.js (with npm run build or npm run watch) before activating Tango; otherwise, you'll get an error because of the missing required stylesheet.

On OS X, there is a known issue with low limits of open files, which can cause Error: EMFILE errors with Browserify (used by npm run build).

Some users report changing system settings with sudo ulimit -n 2560 can solve it. If it does not, or you prefer not to change a system setting in that way, you can run npm run watch instead to generate js/public.js (but it will not be minified).

tango's People

Contributors

obenland avatar ianstewart avatar kwight avatar kovshenin avatar karmatosed avatar sixhours avatar philiparthurmoore avatar iamtakashi avatar emiluzelac avatar grappler avatar thomasguillot avatar davidakennedy avatar michiecat avatar aahan avatar slobodan avatar hugobaeta avatar gatespace avatar ashfame avatar sheabunge avatar michaeldcain avatar mauryaratan avatar mtias avatar taupecat avatar seantoscd avatar mjangda avatar lchski avatar bradp avatar jayj avatar jacklenox avatar joshmcrty 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.