Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 7 files changed
  • 0 comments
  • 1 contributor
5 CssMinify.yml
... ... @@ -0,0 +1,5 @@
  1 +files: [
  2 + 'assets/css/bootstrap.min.css',
  3 + 'assets/css/bootstrap-responsive.min.css',
  4 + 'assets/css/master.css'
  5 +]
4 _config.yml
... ... @@ -1,5 +1,5 @@
1   -auto: true
2   -server: true
  1 +auto: false
  2 +server: false
3 3
4 4 exclude: drafts
5 5
12 _includes/bio.html
@@ -8,14 +8,14 @@
8 8
9 9 <div class="social_networks row">
10 10 <div class="social_network span2">
11   - <a href="http://twitter.com/fxjz">@fxjz<br>
  11 + <a href="http://twitter.com/fxjz/">@fxjz<br>
12 12 <span>on Twitter</span>
13 13 </a>
14 14 </div><!-- /twitter -->
15 15
16 16 <div class="social_network span2">
17   - <a href="http://github.com/fxjz">fxjz<br>
18   - <span>on Github</span>
  17 + <a href="http://github.com/fxjz/">fxjz<br>
  18 + <span>on GitHub</span>
19 19 </a>
20 20 </div><!-- /github -->
21 21
@@ -28,7 +28,7 @@
28 28 </div><!-- /rdio -->
29 29
30 30 <div class="social_network span2">
31   - <a href="http://last.fm/user/fxjz">fxjz<br>
  31 + <a href="http://last.fm/user/fxjz/">fxjz<br>
32 32 <span>on Last.fm</span>
33 33 </a>
34 34 </div><!-- /last.fm -->
@@ -36,13 +36,13 @@
36 36
37 37
38 38 <div class="social_network span2">
39   - <a href="http://pinboard.in/u:fxjz">fxjz<br>
  39 + <a href="http://pinboard.in/u:fxjz/">fxjz<br>
40 40 <span>on Pinboard</span>
41 41 </a>
42 42 </div><!-- /pinboard -->
43 43
44 44 <div class="social_network span2">
45   - <a href="http://readability.com/fxjz/latest">fxjz<br>
  45 + <a href="http://readability.com/fxjz/latest/">fxjz<br>
46 46 <span>on Readability</span>
47 47 </a>
48 48 </div><!-- /readability -->
6 _layouts/default.html
@@ -4,7 +4,7 @@
4 4 <title>{% if page.title %}{{ page.title }} &bull;{% endif %} Felix Jimenez</title>
5 5
6 6 <meta name="author" content="Felix Jimenez">
7   - <meta name="description" content="The journal of Felix Jimenez">
  7 + <meta name="description" content="The blog of Felix Jimenez">
8 8 <meta name="viewport" content="width=device-width, initial-scale=1.0">
9 9 <meta charset="utf-8">
10 10
@@ -15,7 +15,7 @@
15 15 <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
16 16 <![endif]-->
17 17
18   - <link rel="stylesheet" href="/assets/css/master.css">
  18 + <link rel="stylesheet" href="{% minified_css_file %}">
19 19
20 20 <link rel="shortcut icon" href="/assets/img/favicon.png">
21 21 </head>
@@ -28,7 +28,7 @@
28 28 <ol>
29 29 <li><a href="/" class="home">Felix Jimenez</a></li>
30 30 <!-- <li><a href="/projects/">Projects</a></li> -->
31   - <!-- <li><a href="/about/">About</a></li> -->
  31 + <li><a href="/about/">About</a></li>
32 32 <!-- <li><a href="/contact/">Contact</a></li> -->
33 33 </ol>
34 34 </nav>
85 _plugins/CssMinify.rb
... ... @@ -0,0 +1,85 @@
  1 +module Jekyll
  2 + $minified_filename = ''
  3 +
  4 + # use this as a workaround for getting cleaned up
  5 + # reference: https://gist.github.com/920651
  6 + class CssMinifyFile < StaticFile
  7 + def write(dest)
  8 + # do nothing
  9 + end
  10 + end
  11 +
  12 + # minify css files
  13 + class CssMinifyGenerator < Generator
  14 + safe true
  15 +
  16 + def generate(site)
  17 + config = Jekyll::CssMinifyGenerator.get_config
  18 +
  19 + files_to_minify = config['files'] || get_css_files(site, config['css_source'])
  20 +
  21 + last_modified = files_to_minify.reduce( Time.at(0) ) do |latest,filepath|
  22 + modified = File.mtime(filepath)
  23 + modified > latest ? modified : latest
  24 + end
  25 + # reset the minified filename
  26 + $minified_filename = last_modified.strftime("%Y%m%d%H%M") + '.min.css'
  27 +
  28 + output_dir = File.join(site.config['destination'], config['css_destination'])
  29 + output_file = File.join(output_dir, $minified_filename)
  30 +
  31 + # need to create destination dir if it doesn't exist
  32 + FileUtils.mkdir_p(output_dir)
  33 + minify_css(files_to_minify, output_file)
  34 + site.static_files << CssMinifyFile.new(site, site.source, config['css_destination'], $minified_filename)
  35 + end
  36 +
  37 + # read the css dir for the css files to compile
  38 + def get_css_files(site, relative_dir)
  39 + # not sure if we need to do this, but keep track of the current dir
  40 + pwd = Dir.pwd
  41 + Dir.chdir(File.join(site.config['source'], relative_dir))
  42 + # read css files
  43 + css_files = Dir.glob('*.css').map{ |f| File.join(relative_dir, f) }
  44 + Dir.chdir(pwd)
  45 +
  46 + return css_files
  47 + end
  48 +
  49 + def minify_css(css_files, output_file)
  50 + css_files = css_files.join(' ')
  51 + juice_cmd = "juicer merge -f #{css_files} -o #{output_file}"
  52 + puts juice_cmd
  53 + system(juice_cmd)
  54 + end
  55 +
  56 + # Load configuration from CssMinify.yml
  57 + def self.get_config
  58 + if @config == nil
  59 + @config = {
  60 + 'css_source' => 'css', # relative to the route
  61 + 'css_destination' => '/css' # relative to site.config['destination']
  62 + }
  63 + config = YAML.load_file('CssMinify.yml') rescue nil
  64 + if config.is_a?(Hash)
  65 + @config = @config.merge(config)
  66 + end
  67 + end
  68 +
  69 + return @config
  70 + end
  71 + end
  72 +
  73 + class CssMinifyLinkTag < Liquid::Tag
  74 + def initialize(tag_name, text, tokens)
  75 + super
  76 + end
  77 +
  78 + def render(context)
  79 + config = Jekyll::CssMinifyGenerator.get_config
  80 + File.join(config['css_destination'], $minified_filename)
  81 + end
  82 + end
  83 +end
  84 +
  85 +Liquid::Template.register_tag('minified_css_file', Jekyll::CssMinifyLinkTag)
91 about.html
... ... @@ -0,0 +1,91 @@
  1 +---
  2 +layout: default
  3 +title: About
  4 +---
  5 +
  6 +<section id="about-fxjz" class="span6">
  7 + <h2>About Felix Jimenez</h2>
  8 +
  9 + <h3>tl;dr</h3>
  10 + <p>
  11 + I'm a two cat and one dog owning, Northern Virginia living, road trip
  12 + loving, car enthusiastic, web specializing geek who provides web design
  13 + and hosting services through my company,
  14 + <a href="http://kindaodd.com" class="kindaodd">kinda+odd</a>.
  15 + </p>
  16 +
  17 + <h3>Semi-coherent bio</h3>
  18 + <p>
  19 + I currently live in
  20 + <a href="http://en.wikipedia.org/wiki/Northern_Virginia">Northern
  21 + Virginia</a> where I have two cats and a dog. I run a small web studio
  22 + called <a href="http://kindaodd.com" class="kindaodd">kinda+odd</a>
  23 + which provides small businesses with web design and hosting services.
  24 + </p>
  25 +
  26 + <p>
  27 + When I'm not on a computer I'm often looking into automotive matters or
  28 + taking one of my spontaneous road trips where I place a bias towards the
  29 + <a href="http://en.wikipedia.org/wiki/United_States_Numbered_Highways">US
  30 + Highway System</a> in an attempt to avoid the
  31 + <a href="http://en.wikipedia.org/wiki/Interstate_Highway">Interstate
  32 + System</a> so I can see more interesting places.
  33 + </p>
  34 +
  35 + <p>
  36 + I can be found in many online communities, but mainly I like to tweet
  37 + like no one is watching on <a href="http://twitter.com/fxjz/">Twitter</a>,
  38 + store my web projects on <a href="http://github.com/fxjz/">GitHub</a>,
  39 + listen to my music on <a href="http://rdio.com/people/fxjz/">Rdio</a>,
  40 + chart my music history on <a href="http://last.fm/user/fxjz/">Last.fm</a>,
  41 + bookmark cool stuff on <a href="http://pinboard.in/u:fxjz/">Pinboard</a>,
  42 + and maintain an interesting (to me) reading list on
  43 + <a href="http://readability.com/fxjz/latest/">Readability</a>.
  44 + </p>
  45 +
  46 + <h3>Trivia</h3>
  47 + <ul class="trivia">
  48 + <li>
  49 + Because of Hulu and Netflix, I haven't watched cable television in
  50 + years.
  51 + </li>
  52 +
  53 + <li>
  54 + I still have all but my very first cell phone.
  55 + </li>
  56 +
  57 + <li>
  58 + I sometimes read random Wikipedia pages for kicks.
  59 + </li>
  60 +
  61 + <li>
  62 + I've lived in PR, MD, VA, NJ, NC, and OR, in no particular order.
  63 + </li>
  64 + </ul>
  65 +</section>
  66 +
  67 +<section id="about-site" class="span6">
  68 + <h2>About this site</h2>
  69 +
  70 + <p>
  71 + This is a personal space. It's a place for me to collect my thoughts and
  72 + interests and a place for me to test new ideas I may have. Most of what
  73 + you'll find here are blog posts which are either long-form articles or
  74 + links to other stuff with commentary. Occasionally you may stumble
  75 + across some other tidbits, but who knows.
  76 + </p>
  77 +
  78 + <p>
  79 + The site is powered by <a href="http://jekyllrb.com/">Jekyll</a> so it's
  80 + all static files and that makes it very fast and very flexible for me.
  81 + It also means that the <a href="http://github.com/fxjz/fxjz.org">entire
  82 + source code</a> is available and easy to understand. The typeface used
  83 + is <a href="http://www.google.com/webfonts/specimen/Lato">Lato</a>.
  84 + </p>
  85 +
  86 + <p>
  87 + Fast <span class="amp">&amp;</span> secure web hosting is provided by
  88 + <a href="http://kindaodd.com" class="kindaodd">kinda+odd</a>, the small
  89 + web studio I run.
  90 + </p>
  91 +</section>
47 assets/css/master.css
... ... @@ -1,7 +1,33 @@
1   -/* import bootstrap */
2   -@import url(http://fonts.googleapis.com/css?family=Lato:300,400,300italic,700|Lobster+Two);
3   -@import url("bootstrap.min.css");
4   -@import url("bootstrap-responsive.min.css");
  1 +/* START: Google web fonts
  2 +==============================================================================*/
  3 +@font-face {
  4 + font-family: 'Lobster Two';
  5 + font-style: italic;
  6 + font-weight: 400;
  7 + src: local('Lobster Two Italic'), local('LobsterTwo-Italic'), url('http://themes.googleusercontent.com/static/fonts/lobstertwo/v4/Ul_16MSbfayQv1I4QhLEoIo3ZslTYfJv0R05CazkwN8.woff') format('woff');
  8 +}
  9 +@font-face {
  10 + font-family: 'Lato';
  11 + font-style: normal;
  12 + font-weight: 300;
  13 + src: local('Lato Light'), local('Lato-Light'), url('http://themes.googleusercontent.com/static/fonts/lato/v6/kcf5uOXucLcbFOydGU24WALUuEpTyoUstqEm5AMlJo4.woff') format('woff');
  14 +}
  15 +@font-face {
  16 + font-family: 'Lato';
  17 + font-style: italic;
  18 + font-weight: 300;
  19 + src: local('Lato Light Italic'), local('Lato-LightItalic'), url('http://themes.googleusercontent.com/static/fonts/lato/v6/2HG_tEPiQ4Z6795cGfdivLO3LdcAZYWl9Si6vvxL-qU.woff') format('woff');
  20 +}
  21 +@font-face {
  22 + font-family: 'Lato';
  23 + font-style: normal;
  24 + font-weight: 400;
  25 + src: local('Lato Regular'), local('Lato-Regular'), url('http://themes.googleusercontent.com/static/fonts/lato/v6/qIIYRU-oROkIk8vfvxw6QvesZW2xOQ-xsNqO47m55DA.woff') format('woff');
  26 +}
  27 +
  28 +/* END: Google web fonts
  29 +------------------------------------------------------------------------------*/
  30 +
5 31
6 32
7 33 /* START: Basic styling
@@ -52,15 +78,20 @@ blockquote {
52 78
53 79 ul, ol {margin-left: 0;}
54 80
55   -article ul li, article ol li {line-height: 160%;}
  81 +#canvas ul li, #canvas ol li {line-height: 160%;}
56 82
57 83
58   -a.kindaodd {color: #f78e1e;}
59   -a.kindaodd:hover {background: #f78e1e; color: #fff;}
  84 +a.kindaodd {color: #f78e1e !important;}
  85 +a.kindaodd:hover {background: #f78e1e !important; color: #fff !important;}
60 86
61 87
62 88 br {clear: both;}
63 89
  90 +span.amp {
  91 + font-family: Baskerville, "Palatino Linotype", Constantia, serif;
  92 + font-style: italic;
  93 +}
  94 +
64 95 /* END: Basic styling
65 96 ------------------------------------------------------------------------------*/
66 97
@@ -108,7 +139,7 @@ header nav ol li a:hover {background: rgba(255, 255, 255, 0.20);}
108 139 ==============================================================================*/
109 140 article {margin-bottom: 96px;}
110 141
111   -article .entry, aside {text-align: justify;}
  142 +article .entry, aside, section {text-align: justify;}
112 143
113 144 .entry img {margin: 0;}
114 145

No commit comments for this range

Something went wrong with that request. Please try again.