Questions tagged [tritium]

A transformation language for XML-friendly files.

Tritium is a simple transformation language used for data manipulations. Tritium fundamentally changes the way sites are delivered to multiple devices by focusing development effort on front-end programming that creates amazing experiences. The result is super fast programming and rapid iteration on critical mobile projects. Most developers and designers familiar with CSS or JQuery learn Tritium in a few hours. Developers use their choice of editor to write Tritium code and use a Rails-like development flow using the management console.

Source: http://www.moovweb.com/developers/moovwebsdk

62 questions
4
votes
1 answer

Clearing attributes in Tritium

What's the best way to clear all attributes of an element with Tritium? Do I have to enumerate all existing attributes with attribute(%name, "") ?
4
votes
1 answer

How do I set a cookie that expires after a certain time using Tritium?

I'd like to create a cookie that expires within 5 minutes of the user visiting my page. I know about add_cookie() function, but have no idea how to set it to expire.
4
votes
1 answer

How can I create more than one page from a single upstream page using Moovweb?

I have a single page, lets say: http://en.wikipedia.org/wiki/Main_Page But I want to fragment it into 3 pages: A page w just the sidebar A 'Featured' page w just the 'green' sections (featured article / did you know) A 'News' page w just the 'blue'…
Sean Jezewski
  • 145
  • 1
  • 7
3
votes
1 answer

transform category drop-down to toggle using moovweb

I want to add toggler to the following code:

The Latest

3
votes
1 answer

Can available json response be reused in tritium to paint new mobile home page?

I am trying to use moovweb to transform existing desktop site to mobile version. I already have so many ajax response available in the desktop version. We also have a new wire frame for the mobile version.Is there any way to reuse the ajax response…
ambikanair
  • 4,004
  • 11
  • 43
  • 83
3
votes
1 answer

Inject multi-line JS in Tritium

I have a javascript snippet that I need to inject on each page to fire off my google analytics. I tried using inject and keep getting errors: inject("// load ga.js if it doesn't exist if (!window._gat) { var ga =…
3
votes
0 answers

Cookies going through moovweb project have their domains overwritten to "."

I have a project using the mixer "simple-mobile (1.0.183)". I a request returns a response with the Set-Cookie header, those cookies have the domain set to just "." Here's an example response header from a curl: HTTP/1.1 200 OK Server: nginx…
noj
  • 2,542
  • 1
  • 14
  • 9
3
votes
2 answers

Is there an easy way to add/remove/modify query parameters of a URL in Tritium?

I saw a very manual way of doing this in another post: How do I add a query parameter to a URL? This doesn't seem very intuitive, but someone there mentioned an easier way to accomplish this using the upcoming "URL scope". Is this feature out yet,…
3
votes
1 answer

Is there an easy way to add entirely new content using the Moovweb SDK?

I'm trying to make a simpler version of Facebook but want to construct a landing page from scratch. Right now, I'm doing something like home.ts $("/html/body") { remove("./*") insert("div", id: "wrapper") { insert("div", id: "categories") { …
3
votes
1 answer

Moovweb - uncompress gzipped outgoing_response.http content?

I have a Moovweb project and I'm trying to compare the incoming_response.http and outgoing_response.http files in tmp/messages/... folders. The incoming_response.http from the upstream server is saved in plain text, but the outgoing_response.http…
gregorygtseng
  • 851
  • 4
  • 12
3
votes
1 answer

In tritium, how can I do math operations?

I am transforming a website that contains elements with inline styles with fixed width and heights in pixels, like this:
...
I would like to create a function…
fegemo
  • 2,475
  • 6
  • 20
  • 40
3
votes
1 answer

Tritium Function Design for Responsive/JavaScript Frameworks

I'm using Moovweb/Tritium to make a regular desktop site responsive using the Zurb Foundation framework. As part of this I'd like to create helper functions for enabling Foundation widgets like the the Uranium integrations already in Moovweb. But…
Ishan
  • 1,346
  • 9
  • 11
3
votes
2 answers

In Tritium, how do I transform all

tags to

I’m working in the Moovweb SDK and am optimizing my personal desktop site for mobile. How do I transform all my

tags to

tags? I really don't want to do it manually! Search and replace?? haha
Currin Berdine
  • 287
  • 1
  • 10
3
votes
2 answers

In Tritium, how do I switch the position of two elements?

I have two elements next to each other like this:
What's the fastest way to switch the order of the two child elements?
gregorygtseng
  • 851
  • 4
  • 12
3
votes
1 answer

Transforming tables in html using tritium

I'm using the Moovweb SDK and I'd like to transform a table and all it's elements into divs to facilitate mobile web dev/styling. What is the best way to do this? …
Alex De Simone
  • 572
  • 1
  • 4
  • 8
1
2 3 4 5
...