Skip to content

Instantly share code, notes, and snippets.

@ameliaikeda
Created February 4, 2014 17:15
Show Gist options
  • Select an option

  • Save ameliaikeda/8808135 to your computer and use it in GitHub Desktop.

Select an option

Save ameliaikeda/8808135 to your computer and use it in GitHub Desktop.

Creating a theme

A folder and a file here will show you everything you need to add.

Theme folder: /app/views/default/ Theme CSS: /public/css/default.css

The theme name here is "default". Say you wanted to make a theme called "claud",

You'd make an empty folder called /app/views/claud/ and then add any files you wanted to overwite in there. You'd also add /public/css/claud.css. Any images added must use a relative path in the CSS and go in /public/images/claud/.

(hint: homepage is home.blade.php)

Blade Syntax

There are two sections to every theme view, @section("content") and @section("script").

Their layout is as such:

@section("content")

    <div class="container main">
        <!-- your HTML -->
    </div>

@stop

@section("script")
    
    // you have access to jQuery.
    function fuckShitUp() {
        //
    }

@stop
  • Include variables (or any PHP) with {{ }}, use 3 braces instead of 2 for user input. I will go full militia on your ass if you change any of these in the existing theme file.
  • It's important to keep the list layout on the main page the same. Remove the queue entirely if you like, but make sure you dont re-arrange the last played (And it must be 5 elements until i get around to fixing that).
  • Do not make a window object called radio. It will break the entire site.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment