Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
fd68490
Add git to allow rake build
mattes Feb 10, 2015
437e078
Update Rouge to Version 1.8
realityking Feb 12, 2015
8974f32
Use strict mode for JavaScript
realityking Feb 12, 2015
4e3be72
Update jQuery to version 2.1.3
realityking Feb 12, 2015
68ffab8
Update lunr.js to version 0.5.7
realityking Feb 12, 2015
5fddadc
Update jQuery UI to version 1.11.3
realityking Feb 12, 2015
dbaabe9
Update normalize.css to version 3.0.2
realityking Feb 13, 2015
84861d8
Merge pull request #182 from mattes/patch-1
lord Feb 16, 2015
de8ff8a
Merge pull request #174 from realityking/strictmode
lord Feb 16, 2015
c058f9a
Merge pull request #179 from realityking/normalize
lord Feb 16, 2015
6137ab6
Merge pull request #173 from realityking/rouge
lord Feb 16, 2015
1cb038a
Merge pull request #176 from realityking/jsupdates
lord Feb 16, 2015
a38807d
Rename SCSS files, so no unnecessary stylesheets are generated.
realityking Feb 20, 2015
efb996c
Update Middleman to version 3.3.9
realityking Feb 20, 2015
ab7c6a4
Merge pull request #188 from realityking/middleman
lord Feb 20, 2015
a50410f
Merge pull request #187 from realityking/stylesheets
lord Feb 20, 2015
1e7654c
Optimize images
realityking Feb 20, 2015
65d5617
Merge pull request #190 from realityking/images
lord Feb 21, 2015
3b92d1b
Cleanup config.rb
cvkef Mar 7, 2015
3c0c53e
Cleanup Gemfile
cvkef Mar 7, 2015
467d76f
Remove wdm gem
cvkef Mar 7, 2015
1da2b83
Remove ruby18_source_location gem
cvkef Mar 7, 2015
e336139
Remove middleman-livereload gem
cvkef Mar 7, 2015
ef63de1
Update middleman gem to version 3.3.10
cvkef Mar 7, 2015
ed9bdda
Specify version for middleman-gh-pages gem to 0.0.3
cvkef Mar 7, 2015
037453e
Specify version for middleman-syntax gem to 2.0.0
cvkef Mar 7, 2015
713279a
Update redcarpet gem to version 3.2.2
cvkef Mar 7, 2015
5d901c9
Update rake gem to version 10.4.2
cvkef Mar 7, 2015
38985aa
Specify version for therubyracer gem to 0.12.1
cvkef Mar 7, 2015
4546d2e
Merge pull request #197 from cvkef/update_dependencies
lord Mar 9, 2015
acfa45f
Update README.md
germanattanasio Mar 26, 2015
0a1872d
Merge pull request #206 from germanattanasio/dev
lord Mar 26, 2015
1ef77f1
Don't use a selector to get the heading text for search results.
realityking Mar 29, 2015
e437418
Merge pull request #208 from realityking/css-escape
lord Mar 29, 2015
ada3972
tocify: clean up event handlers and helper divs.
MathieuDuponchelle Apr 3, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ubuntu:trusty

RUN apt-get update
RUN apt-get install -yq ruby ruby-dev build-essential
RUN apt-get install -yq ruby ruby-dev build-essential git
RUN gem install --no-ri --no-rdoc bundler
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN cd /app; bundle install
ADD . /app
EXPOSE 4567
WORKDIR /app
CMD ["bundle", "exec", "middleman", "server"]
CMD ["bundle", "exec", "middleman", "server"]
35 changes: 8 additions & 27 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,11 @@
# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'http://rubygems.org'

gem "rouge", "1.7.2"
# Middleman
gem 'middleman', '~>3.3.10'
gem 'middleman-gh-pages', '~> 0.0.3'
gem 'middleman-syntax', '~> 2.0.0'
gem 'rouge', '~> 1.8.0'
gem 'redcarpet', '~> 3.2.2'

gem "middleman", "~>3.3.0"

# For syntax highlighting
gem "middleman-syntax"

# Plugin for middleman to generate Github pages
gem 'middleman-gh-pages'

# Live-reloading plugin
gem "middleman-livereload", "~> 3.3.0"

gem 'redcarpet', '~> 3.2.1'

# For faster file watcher updates on Windows:
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]

# Cross-templating language block fix for Ruby 1.8
platforms :mri_18 do
gem "ruby18_source_location"
end

gem "rake", "~> 10.4.0"

gem 'therubyracer', :platforms => :ruby
gem 'rake', '~> 10.4.2'
gem 'therubyracer', '~> 0.12.1', platforms: :ruby
69 changes: 27 additions & 42 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,62 +9,57 @@ GEM
tzinfo (~> 1.1)
celluloid (0.16.0)
timers (~> 4.0.0)
chunky_png (1.3.3)
chunky_png (1.3.4)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.8.0)
compass (1.0.1)
coffee-script-source (1.9.1)
compass (1.0.3)
chunky_png (~> 1.2)
compass-core (~> 1.0.1)
compass-core (~> 1.0.2)
compass-import-once (~> 1.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.1)
compass-core (1.0.3)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
eventmachine (1.0.4)
execjs (2.2.2)
execjs (2.4.0)
ffi (1.9.6)
haml (4.0.6)
tilt
hike (1.2.3)
hitimes (1.2.2)
hooks (0.4.0)
uber (~> 0.0.4)
http_parser.rb (0.6.0)
i18n (0.6.11)
i18n (0.7.0)
json (1.8.2)
kramdown (1.5.0)
kramdown (1.6.0)
libv8 (3.16.14.7)
listen (2.8.5)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
middleman (3.3.7)
middleman (3.3.10)
coffee-script (~> 2.2)
compass (>= 1.0.0, < 2.0.0)
compass-import-once (= 1.0.5)
execjs (~> 2.0)
haml (>= 4.0.5)
kramdown (~> 1.2)
middleman-core (= 3.3.7)
middleman-core (= 3.3.10)
middleman-sprockets (>= 3.1.2)
sass (>= 3.4.0, < 4.0)
uglifier (~> 2.5)
middleman-core (3.3.7)
middleman-core (3.3.10)
activesupport (~> 4.1.0)
bundler (~> 1.1)
erubis
hooks (~> 0.3)
i18n (~> 0.6.9)
i18n (~> 0.7.0)
listen (>= 2.7.9, < 3.0)
padrino-helpers (~> 0.12.3)
rack (>= 1.4.5, < 2.0)
Expand All @@ -73,11 +68,7 @@ GEM
tilt (~> 1.4.1, < 2.0)
middleman-gh-pages (0.0.3)
rake (> 0.9.3)
middleman-livereload (3.3.4)
em-websocket (~> 0.5.1)
middleman-core (~> 3.2)
rack-livereload (~> 0.3.15)
middleman-sprockets (3.4.1)
middleman-sprockets (3.4.2)
middleman-core (>= 3.3)
sprockets (~> 2.12.1)
sprockets-helpers (~> 1.1.0)
Expand All @@ -86,16 +77,14 @@ GEM
middleman-core (~> 3.2)
rouge (~> 1.0)
minitest (5.5.1)
multi_json (1.10.1)
padrino-helpers (0.12.4)
multi_json (1.11.0)
padrino-helpers (0.12.5)
i18n (~> 0.6, >= 0.6.7)
padrino-support (= 0.12.4)
padrino-support (= 0.12.5)
tilt (~> 1.4.1)
padrino-support (0.12.4)
padrino-support (0.12.5)
activesupport (>= 3.1)
rack (1.6.0)
rack-livereload (0.3.15)
rack
rack-test (0.6.3)
rack (>= 1.0)
rake (10.4.2)
Expand All @@ -104,9 +93,8 @@ GEM
ffi (>= 0.5.0)
redcarpet (3.2.2)
ref (1.0.5)
rouge (1.7.2)
ruby18_source_location (0.2)
sass (3.4.9)
rouge (1.8.0)
sass (3.4.13)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
Expand All @@ -128,21 +116,18 @@ GEM
tzinfo (1.2.2)
thread_safe (~> 0.1)
uber (0.0.13)
uglifier (2.7.0)
uglifier (2.7.1)
execjs (>= 0.3.0)
json (>= 1.8.0)

PLATFORMS
ruby

DEPENDENCIES
middleman (~> 3.3.0)
middleman-gh-pages
middleman-livereload (~> 3.3.0)
middleman-syntax
rake (~> 10.4.0)
redcarpet (~> 3.2.1)
rouge (= 1.7.2)
ruby18_source_location
therubyracer
wdm (~> 0.1.0)
middleman (~> 3.3.10)
middleman-gh-pages (~> 0.0.3)
middleman-syntax (~> 2.0.0)
rake (~> 10.4.2)
redcarpet (~> 3.2.2)
rouge (~> 1.8.0)
therubyracer (~> 0.12.1)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Examples of Slate in the Wild
* [Dwolla API docs](https://docs.dwolla.com/)
* [RozpisyZapasu API docs](http://www.rozpisyzapasu.cz/dev/api/)
* [Codestar Framework Docs](http://codestarframework.com/documentation/)
* [IBM Cloudant](https://docs-testb.cloudant.com/content-review/_design/couchapp/index.html)

(Feel free to add your site to this list in a pull request!)

Expand Down
37 changes: 16 additions & 21 deletions config.rb
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
# Markdown
set :markdown_engine, :redcarpet
set :markdown,
fenced_code_blocks: true,
smartypants: true,
disable_indented_code_blocks: true,
prettify: true,
tables: true,
with_toc_data: true,
no_intra_emphasis: true

# Assets
set :css_dir, 'stylesheets'

set :js_dir, 'javascripts'

set :images_dir, 'images'

set :fonts_dir, 'fonts'

set :markdown_engine, :redcarpet

set :markdown, :fenced_code_blocks => true, :smartypants => true, :disable_indented_code_blocks => true, :prettify => true, :tables => true, :with_toc_data => true, :no_intra_emphasis => true

# Activate the syntax highlighter
activate :syntax

# This is needed for Github pages, since they're hosted on a subdomain
# Github pages require relative links
activate :relative_assets
set :relative_links, true

# Build-specific configuration
# Build Configuration
configure :build do
# For example, change the Compass output style for deployment
activate :minify_css

# Minify Javascript on build
activate :minify_javascript

# Enable cache buster
# activate :asset_hash

# Use relative URLs
# activate :relative_assets

# Or use a different image path
# set :http_prefix, "/Content/images/"
# activate :asset_hash
# activate :gzip
end

Binary file modified source/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/images/navbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions source/javascripts/app/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ License for the specific language governing permissions and limitations
under the License.
*/
(function (global) {
'use strict';

var languages = [];

global.setupLanguages = setupLanguages;
Expand All @@ -26,9 +28,9 @@ under the License.
$(".lang-selector a").removeClass('active');
$(".lang-selector a[data-language-name='" + language + "']").addClass('active');
for (var i=0; i < languages.length; i++) {
$(".highlight." + languages[i]).parent().hide();
$(".highlight." + languages[i]).hide();
}
$(".highlight." + language).parent().show();
$(".highlight." + language).show();

global.toc.calculateHeights();

Expand Down
4 changes: 3 additions & 1 deletion source/javascripts/app/search.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(function (global) {
'use strict';

var $global = $(global);
var content, darkBox, searchResults;
Expand Down Expand Up @@ -49,7 +50,8 @@
if (results.length) {
searchResults.empty();
$.each(results, function (index, result) {
searchResults.append("<li><a href='#" + result.ref + "'>" + $('#'+result.ref).text() + "</a></li>");
var elem = document.getElementById(result.ref);
searchResults.append("<li><a href='#" + result.ref + "'>" + $(elem).text() + "</a></li>");
});
highlight.call(this);
} else {
Expand Down
1 change: 1 addition & 0 deletions source/javascripts/app/toc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(function (global) {
'use strict';

var closeToc = function() {
$(".tocify-wrapper").removeClass('open');
Expand Down
18 changes: 14 additions & 4 deletions source/javascripts/lib/jquery.tocify.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
self.tocifyWrapper = $('.tocify-wrapper');
self.extendPageScroll = true;

// Getting rid of possibly existing helper divs
$("[data-unique]").remove();

// Internal array that keeps track of all TOC items (Helps to recognize if there are duplicate TOC item strings)
self.items = [];

Expand Down Expand Up @@ -536,9 +539,12 @@
$self,

// Instantiates a new variable that will be used to determine the smoothScroll animation time duration
duration;
duration,

li = this.element.find("li");

// Event delegation that looks for any clicks on list item elements inside of the HTML element calling the plugin
this.element.off("click.tocify", "li");
this.element.on("click.tocify", "li", function(event) {

if(self.options.history) {
Expand Down Expand Up @@ -567,7 +573,9 @@
});

// Mouseenter and Mouseleave event handlers for the list item's within the HTML element calling the plugin
this.element.find("li").on({
li.off("mouseenter.tocify");
li.off("mouseleave.tocify");
li.on({

// Mouseenter event handler
"mouseenter.tocify": function() {
Expand Down Expand Up @@ -595,10 +603,12 @@

// Reset height cache on scroll

$(window).on('resize', function() {
$(window).off('resize.tocify');
$(window).on('resize.tocify', function() {
self.calculateHeights();
});

$(window).off("scroll.tocify");
// Window scroll event handler
$(window).on("scroll.tocify", function() {

Expand Down Expand Up @@ -1040,4 +1050,4 @@

});

})); //end of plugin
})); //end of plugin
Loading