Slash

Install

Type the code below and experience Slash!

$ cd octopress
$ git clone git://github.com/tommy351/Octopress-Theme-Slash.git .themes/slash
$ rake install['slash']
$ rake generate

Have problems when installing with zsh? Try rake install\['slash'\] instead.

Overview

Slash is a clean one-column theme designed for Octopress, supporting all features in classic theme and built-in Fancybox. Want to try a different theme? That's is!

Photos

Slash can read alt property of photos and add it below photos.

Wallbase - dgnflyWallbase - dgnfly (wallbase.cc/wallpaper/1384450)

Slash comes with built-in Fancybox, which enables you to showcase your works easily.

Videos

Slash can resize HTML5 video and embedded video like iframe, object to page width automatically.

Just wrap embedded code with #video-container as below:

<div class="video-container">
	// embedded code      
</div>

Layouts

Slash supports responsive layouts. Whatever devices you use, you can get a great experience. You can try to resize your browser now!

Code won't trouble Slash. No matter Code Block, Gist, jsFiddle, Slash can display them all well.

Add to_fraction for floats (test.rb) download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
class Float
  def number_decimal_places
    self.to_s.length-2
  end
  def to_fraction
    higher = 10**self.number_decimal_places
    lower = self*higher
    gcden = greatest_common_divisor(higher, lower)

    return (lower/gcden).round, (higher/gcden).round
  end

private
  def greatest_common_divisor(a, b)
     while a%b != 0
       a,b = b.round,(a%b).round
     end
     return b
  end
end
@@ -590,7 +590,7 @@ class SpritesTest < Test::Unit::TestCase
  it "should generate a sprite from nested folders" do
    css = render <<-SCSS
- @import "nested/*.png";
+ @import "nested/**/*.png";
      @include all-nested-sprites;
    SCSS
    assert_correct css, <<-CSS
view raw test.diff This Gist brought to you by GitHub.

Q&A

How to show Facebook link in top right corner?

Add facebook_user parameter to _config.yml and fill it with your Facebook ID.

How to edit menus?

Edit slashsource_includescustomnavigation.html.

How to hide Twitter stream in banner?

Delete slashsource_layoutsdefault.html line 6.

How to disable Fancybox?

  1. Delete slashsource_includesafter_footer.html line 4.
  2. Delete slashsourcejavascriptscaption.js line 14.

If you have any problems or advices, feel free to comment here.

Fork me on GitHub