Firstly, a quick grumble about unnecessary use of Tumblr to create full websites. A Tumblr Grumble if you will. A Grumblr.
Anybody who has ever worked with the Tumblr platform will understand when I say that it is extremely limiting and more often than not a developer's nightmare. However sadly due to it's social shareability (is that even a word?), it's a platform that is increasingly being adopted by major companies/agencies as the go to web tool. In fact, there even appears to be a trend where creatives are using Tumblr as a glorified CMS for "standard" websites, as inexplicable as this may be.
This bizarre usage is hard to believe considering how well constructed the Tumblr API actually is. It's the equivalent of hacking a Facebook page to look like a full-blown website, just because you wanted to take advantage of Facebook Connect and social posting. It makes no sense at all. You would be much better off creating a clean coded, responsive website that utilises the Tumblr API to share your content. Keeping the code away from the Tumblr platform allows you not only to keep your code semantically clean (and therefore search engine friendly), but also allows you the flexibility of normal web development so that you can experiment with entirely new techniques of social sharing.
However this currently appears to be lost on the agency world. Sadly this is one of those moments in time when developers have to suck it up and wait for others to catch up and realise the futility and time cost. Something that we appear to have to do every 3 or 4 years alongside new technology trends.
If you're reading this post as a non-developer, ask yourself this... would you tell a painter what brush to use? Would you insist that an electrician use a particular size of screwdriver? Would you limit a chef to a single vegetable because you've been told by friends that it's the best vegetable available? Of course you wouldn't. You would respect that they know what they are doing and will provide the best possible result for you based on your requirements. Hopefully one day developers will achieve this respect too.
Now, grumble over, lets get down to hacking the hell out of Tumblr to get it to do what our clients would like it to do...
First things first, let me stress that all of the hacks that I'll post here are going to be just that - hacks. If you're looking for clean code, you're not going to find it here. The cleanest way to develop a full website using Tumblr is to turn off all Tumblr functionality and deal directly with the API's JSON output. If you have the time, click here for more details about the API and use something like Angular, Ember or Handlebars to bring your content to the page. But if you've found yourself in a position where you're dealing with a pre-built template and you simply need to hack together some unique page styles this is the place for you.
Tumblr allows you to create individual pages to support your posts, but doesn't allow you to give them individual styles. Tumblr also doesn't provide you with a unique page ID, no matter what this page appears to tell you. What Tumblr does do is offer you a page "block" that represents all pages and therefore when styled gives you a similar style for every page. Tumblr will strip out any <style> tags that you add to an individual page, so individual inline styling isn't an option either. Finally, Tumblr doesn't allow for server side code... so how the heck are we supposed to tell them apart so that we can style different sections?
The solution is simple but dirty...
Then click "Add a file" and import your CSS/JS files. Once they are added, click on them to get their direct tumblr URL so that you can include them in the <head> of your theme.
Add a new page using the following button that can be found at the very bottom of your theme's dashboard...
Stick to the "Standard layout" offered by the drop down - this will preserve the other core theme elements for your site, such as top bars, side bars and navigation etc. If you were to select "Custom layout" this would give you a completely blank page to start coding with, but you would be forced to repeat navigation elements etc which is to be frank, is a complete pain in the arse. Instead, select the <HTML> button on the layout bar and start coding your page here.
You can add your unique page styles onto your divs as classes/ids here, however if you want to create unique functionality (parallax pages, galleries and such like), you're going to have to add a <script> tag into this html box (complete with document listeners if necessary). Speaking from experience this does work like a charm, but the dirty bit is that you're likely to end up with more than one $(document).ready type function if you've already got one in place for the main theme. This is sadly unavoidable using this method. However...
Possible alternative solution:
If you want to try and make it a little cleaner, you could experiment with creating a script tag as follows:
<script> var pageID=1; </script>
...and then have your main theme document ready function search out the page ID and apply the code as necessary. I'm yet to experiment with this method (it literally just came to me as I was tapping out this post), but if it works then I guess it would be a considerably cleaner option than repeating a document ready function. Still not ideal though I know.
As per usual I'm completely open to new suggestions on these things, so if you have a better solution then please let me know! Best of luck and know that I entirely sympathise with you having to have even googled this in the first place.