Permalink
Browse files

switch to jekyll

  • Loading branch information...
1 parent 6010fcf commit 0af27b8008576f89ee16b3a015cfeee78e72f8aa @crdx committed Jan 26, 2013
View
No changes.
View
@@ -1,3 +0,0 @@
-[submodule "bootstrap"]
- path = bootstrap
- url = https://github.com/crdx/bootstrap.git
View
231 .htaccess
@@ -0,0 +1,231 @@
+# https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess
+
+# ----------------------------------------------------------------------
+# Proper MIME type for all files
+# ----------------------------------------------------------------------
+
+# JavaScript
+# Normalize to standard type (it's sniffed in IE anyways)
+# tools.ietf.org/html/rfc4329#section-7.2
+AddType application/javascript js jsonp
+AddType application/json json
+
+# Audio
+AddType audio/ogg oga ogg
+AddType audio/mp4 m4a f4a f4b
+
+# Video
+AddType video/ogg ogv
+AddType video/mp4 mp4 m4v f4v f4p
+AddType video/webm webm
+AddType video/x-flv flv
+
+# SVG
+# Required for svg webfonts on iPad
+# twitter.com/FontSquirrel/status/14855840545
+AddType image/svg+xml svg svgz
+AddEncoding gzip svgz
+
+# Webfonts
+AddType application/vnd.ms-fontobject eot
+AddType application/x-font-ttf ttf ttc
+AddType font/opentype otf
+AddType application/x-font-woff woff
+
+# Assorted types
+AddType image/x-icon ico
+AddType image/webp webp
+AddType text/cache-manifest appcache manifest
+AddType text/x-component htc
+AddType application/xml rss atom xml rdf
+AddType application/x-chrome-extension crx
+AddType application/x-opera-extension oex
+AddType application/x-xpinstall xpi
+AddType application/octet-stream safariextz
+AddType application/x-web-app-manifest+json webapp
+AddType text/x-vcard vcf
+AddType application/x-shockwave-flash swf
+AddType text/vtt vtt
+
+# ----------------------------------------------------------------------
+# Gzip compression
+# ----------------------------------------------------------------------
+
+<IfModule mod_deflate.c>
+
+ # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
+ <IfModule mod_setenvif.c>
+ <IfModule mod_headers.c>
+ SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
+ RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
+ </IfModule>
+ </IfModule>
+
+ # Compress all output labeled with one of the following MIME-types
+ <IfModule mod_filter.c>
+ AddOutputFilterByType DEFLATE application/atom+xml \
+ application/javascript \
+ application/json \
+ application/rss+xml \
+ application/vnd.ms-fontobject \
+ application/x-font-ttf \
+ application/xhtml+xml \
+ application/xml \
+ font/opentype \
+ image/svg+xml \
+ image/x-icon \
+ text/css \
+ text/html \
+ text/plain \
+ text/x-component \
+ text/xml
+ </IfModule>
+
+</IfModule>
+
+# ----------------------------------------------------------------------
+# Expires headers (for better cache control)
+# ----------------------------------------------------------------------
+
+# These are pretty far-future expires headers.
+# They assume you control versioning with filename-based cache busting
+# Additionally, consider that outdated proxies may miscache
+# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
+
+# If you don't use filenames to version, lower the CSS and JS to something like
+# "access plus 1 week".
+
+<IfModule mod_expires.c>
+ ExpiresActive on
+
+# Perhaps better to whitelist expires rules? Perhaps.
+ ExpiresDefault "access plus 1 month"
+
+# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
+ ExpiresByType text/cache-manifest "access plus 0 seconds"
+
+# Your document html
+ ExpiresByType text/html "access plus 0 seconds"
+
+# Data
+ ExpiresByType text/xml "access plus 0 seconds"
+ ExpiresByType application/xml "access plus 0 seconds"
+ ExpiresByType application/json "access plus 0 seconds"
+
+# Feed
+ ExpiresByType application/rss+xml "access plus 1 hour"
+ ExpiresByType application/atom+xml "access plus 1 hour"
+
+# Favicon (cannot be renamed)
+ ExpiresByType image/x-icon "access plus 1 week"
+
+# Media: images, video, audio
+ ExpiresByType image/gif "access plus 1 month"
+ ExpiresByType image/png "access plus 1 month"
+ ExpiresByType image/jpeg "access plus 1 month"
+ ExpiresByType video/ogg "access plus 1 month"
+ ExpiresByType audio/ogg "access plus 1 month"
+ ExpiresByType video/mp4 "access plus 1 month"
+ ExpiresByType video/webm "access plus 1 month"
+
+# HTC files (css3pie)
+ ExpiresByType text/x-component "access plus 1 month"
+
+# Webfonts
+ ExpiresByType application/x-font-ttf "access plus 1 month"
+ ExpiresByType font/opentype "access plus 1 month"
+ ExpiresByType application/x-font-woff "access plus 1 month"
+ ExpiresByType image/svg+xml "access plus 1 month"
+ ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
+
+# CSS and JavaScript
+ ExpiresByType text/css "access plus 1 week"
+ ExpiresByType application/javascript "access plus 1 week"
+
+</IfModule>
+
+# ----------------------------------------------------------------------
+# Prevent mobile network providers from modifying your site
+# ----------------------------------------------------------------------
+
+# The following header prevents modification of your code over 3G on some
+# European providers.
+# This is the official 'bypass' suggested by O2 in the UK.
+
+<IfModule mod_headers.c>
+ Header set Cache-Control "no-transform"
+</IfModule>
+
+# ----------------------------------------------------------------------
+# Start rewrite engine
+# ----------------------------------------------------------------------
+
+# Turning on the rewrite engine is necessary for the following rules and
+# features. FollowSymLinks must be enabled for this to work.
+
+# Some cloud hosting services require RewriteBase to be set: goo.gl/HOcPN
+# If using the h5bp in a subdirectory, use `RewriteBase /foo` instead where
+# 'foo' is your directory.
+
+# If your web host doesn't allow the FollowSymlinks option, you may need to
+# comment it out and use `Options +SymLinksIfOwnerMatch`, but be aware of the
+# performance impact: http://goo.gl/Mluzd
+
+<IfModule mod_rewrite.c>
+ Options +FollowSymlinks
+# Options +SymLinksIfOwnerMatch
+ RewriteEngine On
+# RewriteBase /
+</IfModule>
+
+# ----------------------------------------------------------------------
+# Prevent 404 errors for non-existing redirected folders
+# ----------------------------------------------------------------------
+
+# without -MultiViews, Apache will give a 404 for a rewrite if a folder of the
+# same name does not exist.
+# webmasterworld.com/apache/3808792.htm
+
+Options -MultiViews
+
+# ----------------------------------------------------------------------
+# Custom 404/403 page
+# ----------------------------------------------------------------------
+
+# You can add custom pages to handle 500 or 403 pretty easily, if you like.
+# If you are hosting your site in subdirectory, adjust this accordingly
+# e.g. ErrorDocument 404 /subdir/404.html
+ErrorDocument 404 /404.html
+ErrorDocument 403 /403.html
+
+# ----------------------------------------------------------------------
+# UTF-8 encoding
+# ----------------------------------------------------------------------
+
+# Use UTF-8 encoding for anything served text/plain or text/html
+AddDefaultCharset utf-8
+
+# Force UTF-8 for a number of file formats
+AddCharset utf-8 .atom .css .js .json .rss .vtt .xml
+
+# ----------------------------------------------------------------------
+# A little more security
+# ----------------------------------------------------------------------
+
+# "-Indexes" will have Apache block users from browsing folders without a
+# default document Usually you should leave this activated, because you
+# shouldn't allow everybody to surf through every folder on your server (which
+# includes rather private places like CMS system folders).
+<IfModule mod_autoindex.c>
+ Options -Indexes
+</IfModule>
+
+# Block access to "hidden" directories or files whose names begin with a
+# period. This includes directories used by version control systems such as
+# Subversion or Git.
+<IfModule mod_rewrite.c>
+ RewriteCond %{SCRIPT_FILENAME} -d [OR]
+ RewriteCond %{SCRIPT_FILENAME} -f
+ RewriteRule "(^|/)\." - [F]
+ RewriteRule "(^|/).+\.md" - [F]
+</IfModule>
View
10 403.md
@@ -0,0 +1,10 @@
+---
+layout: default
+permalink: /403.html
+
+title: Forbidden (403)
+---
+
+### {{ page.title }}
+
+Sorry.
View
10 404.md
@@ -0,0 +1,10 @@
+---
+layout: default
+permalink: /404.html
+
+title: File Not Found (404)
+---
+
+### {{ page.title }}
+
+Sorry.
View
@@ -0,0 +1,3 @@
+# crdx.org
+
+This is the source of [crdx.org](http://crdx.org) which is currently generated by [jekyll](https://github.com/mojombo/jekyll/).
View
@@ -0,0 +1,12 @@
+url: "http://crdx.org"
+domain: "crdx.org"
+title: "crdx.org"
+
+permalink: "/:year/:month/:day/:title.html"
+paginate: 10
+destination: "../crdx.org-deploy/deploy"
+pygments: true
+markdown: "rdiscount"
+lsi: true
+
+exclude: [ "README.md" ]
View
@@ -0,0 +1,6 @@
+jekyll
+cd ../crdx.org-deploy
+git add .
+git add -u
+git commit -m "deploy"
+git push
View
@@ -0,0 +1,101 @@
+var repositories = [
+ { id: "crdx_org", repoName: "crdx.org" },
+ { id: "markdowns", repoName: "markdowns" },
+ { id: "demunger", repoName: "demunger" },
+ { id: "tile", repoName: "Tile" },
+ { id: "calc", repoName: "Calc" },
+ { id: "portablesettingsprovider", repoName: "PortableSettingsProvider" },
+ { id: "graph", repoName: "Graph" },
+ { id: "trivia_mrc", repoName: "trivia-mrc" },
+ { id: "utorrent_mrc", repoName: "utorrent-mrc" }
+];
+
+var url = "https://api.github.com/repos/crdx/0/commits";
+
+function getTooltip(commit)
+{
+ var toolTip = "[" + commit.tree.sha.substring(0, 6) + "] "
+ + commit.message
+ + "<br><br>(by " + commit.committer.name + " "
+ + timeAgo(commit.committer.date);
+
+ if (commit.committer.name !== commit.author.name)
+ toolTip += " and authored by " + commit.author.name;
+
+ return toolTip + ")";
+}
+
+function setTooltip($element, msg)
+{
+ $element
+ .attr('title', msg)
+ .tooltip('fixTitle')
+ .tooltip('show');
+}
+
+$(function() {
+ $.each(repositories, function(i, element) {
+ $("#" + element.id).css("cursor", "default");
+
+ $("#" + element.id + " b").tooltip({
+ html: true,
+ animation: false,
+ trigger: "manual",
+ placement: "right"
+ });
+
+ var mouseEnter = function()
+ {
+ var $this = $(this);
+
+ // if it's in the cache, just show and quit
+ if ($this.data("commit"))
+ {
+ setTooltip($this, $this.data("commit"));
+ $this.tooltip("show");
+ return;
+ }
+
+ // not in the cache, so show the 'loading' tooltip
+ setTooltip($this, "<i class='w-glyphicon-clock'></i> Loading...");
+ $this.tooltip("show");
+ $this.data("cancel", false); // reset cancelled flag
+
+ var repoUrl = url.replace(/0/, element.repoName);
+
+ $.ajax({ dataType: "jsonp", url: repoUrl, success: function(result) {
+ var tooltipMsg;
+
+ if (result.data[0])
+ {
+ tooltipMsg = getTooltip(result.data[0].commit);
+
+ $this.data("commit", tooltipMsg);
+ }
+ else
+ {
+ tooltipMsg = "unable to get commit"
+
+ if (result.data.message)
+ tooltipMsg += ": " + result.data.message;
+ }
+
+ // only show it if it hasn't been cancelled
+ if ($this.data("cancel") !== true)
+ setTooltip($this, tooltipMsg);
+ }});
+ };
+
+ var mouseLeave = function()
+ {
+ var $this = $(this);
+
+ // hide the tooltip, and cancel any future tooltip-showing operations
+ $this.tooltip("hide");
+ $this.data("cancel", true);
+ };
+
+ // tooltips on <td>s make everything jump around, so use the <b>
+ $("#" + element.id + " b").hover(mouseEnter, mouseLeave);
+ });
+});
Oops, something went wrong.

0 comments on commit 0af27b8

Please sign in to comment.