Coder Social home page Coder Social logo

lloyddavid / tictail-theme-builder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from javve/tictail-theme-builder

0.0 1.0 0.0 436 KB

This project basically enables you to build your theme locally on your own computer with your favorite editor, as you normally make websites.

Ruby 71.84% CSS 16.33% HTML 11.82%

tictail-theme-builder's Introduction

The unofficial Tictail Theme Builder for local developmet

We all love Tictail, right? But the ones of us how've built a store theme knows that using the online editor sometimes could be a bit limiting. I'm pretty sure that their team is working hard on solving this problem. But in the meantime, maybe this project can help.

I was asked to build a official theme for Tictail and ended up spending most of the time making this project instead.

What is it?

This project basically enables you to build your theme locally on your own computer with your favorite editor, as you normally make websites.

With the CSS in one file and one file for each Mustache template. Great success!

# The important files:
lib/
static/
  dropkick.css
  style.css
templates/
  about_page.mustache
  layout.mustache
  list_page.mustache
  product_page.mustache
views/

How it works?

Your Tictail data is downloaded to your local computer, then I've made a small Sinatra app that mimics the official Tictail stores with same routes, templates, etc.

Requirements

  • Ruby
  • Bundler

Usage

  1. Downlod this project
  2. Open the terminal, go to the project and install dependencies.
$ cd tictail-theme-builder
$ bundle
  1. Fetch your Tictail store data into store.json by this command:
$ ruby lib/fetcher.rb <email> <password>

# ex: ruby lib/fetcher [email protected] supersecret
  1. Spin up a server with Rack.
$ rackup config.ru
[2013-08-09 12:29:48] INFO  WEBrick 1.3.1
[2013-08-09 12:29:48] INFO  ruby 1.9.3 (2012-02-16) [x86_64-darwin12.2.0]
[2013-08-09 12:29:48] INFO  WEBrick::HTTPServer#start: pid=7101 port=9292
  1. Build you theme by changing the files in /templates
  2. When you are ready to test your theme at Tictail.com just write this command in the terminal:
$ ruby lib/printer.rb

Your theme is now saved to both you clipboad and to theme.mustache.
Great success! Just paste it into the Tictail.com-editor

Warning

I've implemented many (the ones I needed for my own template), but not all of the tags in the Tictail documentation. Feel free to contribute.

As stated above, this is an unofficial project. I can't say how long it will work or promis that it'll stay up to date with Tictail.

All backend code is really, really ugly. Yes, I mean, really ugly. But it get's the job done, hehe ;)

Things that differ in the local development vs Tictail.com

These are converted by lib/printer.rb.

{{search}} --> {{{serach}}}
{{social_buttons}} --> {{{social_buttons}}}
{{price_with_currency}} --> {{{price_with_currency}}}
{{children?}}{{/children}} --> {{#has_children?}}{{/has_children}}
{{store_description}}--> {{{store_description}}}
{{description}}--> {{{description}}}

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.