Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: carmi/ecarmi.org-nanoc
base: 7afd7ce7f7
...
head fork: carmi/ecarmi.org-nanoc
compare: 9160066a65
  • 4 commits
  • 13 files changed
  • 0 commit comments
  • 1 contributor
View
7 Rules
@@ -140,6 +140,13 @@ compile '/' do
end
compile '*' do
+ if @item[:markup] == "markdown"
+ filter :kramdown
+ filter :colorize_syntax, {
+ # To use the default_colorizer option you need the nanoc3.2 version Colorize_Syntax filter.
+ :default_colorizer => :pygmentize,
+ }
+ end
layout 'default'
layout 'base'
end
View
28 content/about.haml
@@ -1,5 +1,29 @@
---
-title: A New Item
+title: About Evan Carmi
+markup: markdown
---
+# About Evan#
-Hi, I'm a new about page!
+## Work Status: [Open to Freelance Opportunities][resume] ##
+
+<img src="http://ecarmi.org/media/img/evan_bio.png" alt="Evan in front of the Mediterranean Sea" style="float: right; border: 1px solid black; margin: 5px;">
+
+Hi! I'm Evan Carmi, the creator of this Web site. I'm a programmer, Web developer, and student. I grew up in Oregon, spent a year in Spain, and now spend nine months of the year at school in Connecticut. I'm passionate about developing clean, cross-browser compliant, DRY Web applications in an efficient and enjoyable process. Oh, and I use [ViM][].
+
+*[DRY]: Don't Repeat Yourself
+
+I've used [Django][] and I've used [Rails][].
+
+I study Computer Science at Wesleyan University.
+
+Email me at **evan** at **ecarmi** dot **org**.
+
+Follow me on [twitter][]
+
+[twitter]: http://twitter.com/ehc
+[resume]: https://github.com/carmi/resume/raw/master/resume.pdf "My LaTeX Resume"
+[Python]: http://www.python.org/ "An easy-to-read, fun-to-code, programming language."
+[Django]: http://www.djangoproject.com/ "A kick-ass Python Web framework"
+[Rails]: http://rubyonrails.org/ "A hip Ruby framework for rockstar programmers"
+[vim]: http://www.vim.org/ "An advanced text editor"
+[git]: http://git-scm.com/ "A distributed version control system"
View
7 content/index.haml
@@ -1,8 +1,3 @@
---
-title: Welcome to ecarmi.org
+title: Evan Carmi
---
-
-h2.
- Evan Carmi is a developer and programmer blah blah blah.
- * hellow *
-
View
116 content/static/css/style.sass
@@ -36,6 +36,7 @@ $margin_top: 7em
//http://colorschemedesigner.com/#0u31Mw0w0w0w0
//Orange
+$scrollpage_dark: #242122
$bg_dark: #1f1f1f
$box_bg: #303030
$dark_bg: #303030
@@ -94,6 +95,19 @@ sup
@mixin max-width
max-width: 80em
+@mixin section_landing
+ position: relative
+ width: 100%
+ height: 42em
+ overflow: hidden
+ h1.section
+ font-variant: small-caps
+ font-family: 'Ultra'
+ font-weight: lighter
+ color: #ffffff
+ text-align: center
+ font-size: 7em
+
@mixin header-shadow
font-variant: small-caps
text-shadow: -1px -1px 0px #999
@@ -145,10 +159,14 @@ div.content
@include max-width
width: 75%
+div.content, div.landing
h1, h2, h3
font-variant: small-caps
font-family: 'Ultra'
font-weight: lighter
+ a
+ color: $header_text
+ text-decoration: none
div.article
max-width: 35em
@@ -159,24 +177,25 @@ div.article
nav.sidebar
// location
position: fixed
- top: 5em
+ top: $margin_top
left: 1em
float: left
width: $sidebar_width
- a
- font-weight: bold
- margin-left: 1.5em
- text-transform: uppercase
- text-decoration: none
- color: $bg_dark
- text-decoration: underline
- opacity: .6
- @include single-transition(.1s ease-in .1s)
-
- &:hover
+ p
+ margin-left: 1em
+ a
+ font-size: 2em
+ font-weight: bold
+ font-variant: small-caps
text-decoration: none
- opacity: 1
+ color: $bg_dark
+ opacity: .6
+ @include single-transition(.1s ease-in .1s)
+
+ &:hover
+ text-decoration: underline
+ opacity: 1
h2
@include rotate(-90deg)
@@ -307,9 +326,12 @@ header.flybar
float: left
color: #ccc
+div.container
+ footer
+ border-top: 1em solid $header_text
+
footer
@include max-width
- border-top: 1em solid $header_text
background: #ccc
margin-left: $sidebar_width + 1em
@@ -359,7 +381,7 @@ section#articles
min-width: 25em
margin-bottom: 1em
padding-right: 2em
- opacity: .7
+ opacity: .8
@include single-transition(opacity .2s linear .1s)
&:hover
@@ -376,21 +398,6 @@ section#articles
color: $header_text
font-weight: bold
-div#ten-tweets
- overflow: auto
- margin-bottom: 20px
- ul
- li
- clear: both
- //padding: 5px
- span.tweet
- width: 70%
- float: left
-
- a.date
- float: right
- color: #186487
-
.clear
clear: both
display: block
@@ -400,6 +407,9 @@ div#ten-tweets
@media screen and (min-width: 767px)
// Homepage styling
+ body
+ margin: 0
+ padding: 0
div.landing
width: 60em
margin-top: 4em
@@ -450,7 +460,7 @@ div#ten-tweets
margin: 0
margin-left: -.5em
margin-right: -.5em
- opacity: .3
+ opacity: .7
@include single-transition(opacity, .25s, linear, .1s)
&:after
color: #b6b6b6
@@ -471,6 +481,48 @@ div#ten-tweets
display: inline-block
overflow: hidden
+section.scrollpage
+ @include section_landing
+ a
+ color: #fff
+ text-decoration: none
+ font-weight: bolder
+ &:hover
+ color: $scrollpage_dark
+ h1, h2
+ a
+ font-weight: lighter
+ h1, h2
+ font-variant: small-caps
+ font-family: 'Ultra'
+ font-weight: lighter
+ color: #ffffff
+ div.wrapper
+ padding-right: 3em
+ padding-left: 3em
+ p
+ font-size: 1.2em
+
+section#write
+ background: #00af65
+section#code
+ background: #0b61a4
+section#work
+ background: #ff9200
+section#tweet
+ background: #ff4900
+
+ ul.tweet_list
+ font-size: 1.2em
+ list-style-type: none
+ li
+ overflow: hidden
+ padding: .1em
+ span.tweet_text
+ width: 39em
+ float: right
+
+
// ============================= */
// ! Layout for mobile version */
// ============================= */
@@ -514,6 +566,8 @@ div#ten-tweets
height: 100%
// Homepage styling
+ section.scrollpage
+ height: auto
div.landing
margin-left: auto
margin-right: auto
View
33 content/static/js/ecarmi.js
@@ -1,27 +1,18 @@
/*
* ecarmi.js - Some custom javascript UI touches for ecarmi.org
*
- * Copyright (c) 2011, Evan Carmi
+ * @author Evan Carmi
*/
-$(document).ready(function() {
- // Setup flybar animation by disabling default css hover events.
- $('section#articles ul li article div.meta-flybar').css('visibility', 'visible');
- $('section#articles ul li article div.meta-flybar').hide();
- $('section#articles ul li article').hover(
- function() {
- $('header').hide();
- $(this).children('div.meta-flybar').fadeIn('fast', function() {
- });
- },
- function() {
- $(this).children('div.meta-flybar').fadeOut('fast', function() {
- $('header').fadeIn('slow')
- });
- }
- );
-});
+// Make main landing links scrollTo respective sections.
+var duration = 850;
-/*
- *
- */
+$('div.landing li').each(function() {
+ // Get value of href to scroll to
+ var section = $($(this).find('a').first().attr('href'));
+
+ $(this).click(function() {
+ $.scrollTo($(section), duration);
+ return false;
+ });
+});
View
11 content/static/js/jquery-scrollTo-min.js
@@ -0,0 +1,11 @@
+/**
+ * jQuery.ScrollTo - Easy element scrolling using jQuery.
+ * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
+ * Dual licensed under MIT and GPL.
+ * Date: 5/25/2009
+ * @author Ariel Flesler
+ * @version 1.4.2
+ *
+ * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
+ */
+;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
View
3  content/writing/index.haml
@@ -1,4 +1,3 @@
-----
-markup: markdown
-title: These are some blog entries
+title: Archive of Articles
-----
View
14 layouts/base.html
@@ -23,8 +23,9 @@
%script{:src => "/static/js/jquery-timeago.js", :type => "text/javascript"}
+ %script{:src => "/static/js/jquery-scrollTo-min.js", :type => "text/javascript"}
%script{:src => "/static/js/jquery-tweet.js", :type => "text/javascript"}
- //%script{:src => "/static/js/ecarmi.js", :type => "text/javascript"}
+ %script{:src => "/static/js/ecarmi.js", :type => "text/javascript"}
%script{:type => "text/javascript"}
jQuery(document).ready(function() {
@@ -40,3 +41,14 @@
\ });
\ });
\ </script>
+ - if @item.path == '/'
+ \ <script type='text/javascript'>
+ \ $(document).ready(function(){
+ \ $("#tweetlist").tweet({
+ \ username: "ehc",
+ \ join_text: ":",
+ \ count: 10,
+ \ loading_text: 'Tweets are loading... <img src="/static/img/ajax-loader.gif">'
+ \ });
+ \ });
+ \ </script>
View
18 layouts/footer.haml
@@ -1,23 +1,19 @@
%div.clear
%footer
%div.column.ecarmi-org
- %h2
- ecarmi.org
- %p is a web site that serves as a collection of thoughts and experiences.
+ %h2 ecarmi.org
+ %p is my personal Web site. It is home to a collection of my thoughts and projects.
%div.column.colophon
- %h2
- colophon
+ %h2 colophon
%p
- Powered by <a class="nanoc" href="http://nanoc.stoneship.org/">nanoc</a> and the internets.
+ Powered by #{link_to('nanoc', 'http://nanoc.stoneship.org/')}, the complete source-code to this site is on #{link_to('github', "https://github.com/carmi/ecarmi.org-nanoc")}
%div.column.evancarmi
- %h2
- Evan
- %p is a programmer and developer living in New York City
+ %h2 Evan
+ %p is a programmer and developer living in New York City. #{link_to('Read more.', '/about/')}
%div.column.twitter
- %h2
- twitter
+ %h2 twitter
%div.handle
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/follow_button.html?screen_name=ehc&show_count=false" style="width:200px; height:25px;"></iframe>
%p#tweets
View
80 layouts/homepage.haml
@@ -5,22 +5,78 @@
%hgroup
%ul
%li.action.code
- %h1.action.code code
+ %h1.action.code
+ %a{:href => "#code"} code
%li.action.write
- %h1.action.write write
+ %h1.action.write
+ %a{:href => "#write"} write
%li.action.work
- %h1.action.work work
+ %h1.action.work
+ %a{:href => "#work"} work
%li.action.tweet
- %h1.action.tweet tweet
+ %h1.action.tweet
+ %a{:href => "#tweet"} tweet
- %div.action
- %h3.featured Featured Post
+%section.scrollpage#write
+ %div.wrapper
+ %h1.section.write write
+ %h2.featured
+ Featured Post
+ %h3
+ = link_to('Show me more', '/writing/')
%article
- = render('post-link', :item => featured_articles[0])
+ - featured_articles[0..1].each do |article|
+ = render('post-link', :item => article)
- %h1 Ten Tweets
- %div#ten-tweets
- Tweets are loading.
+%section.scrollpage#code
+ %div.wrapper
+ %h1.section.code code
+ %h2 A few projets on #{link_to('github', 'https://github.com/carmi/')}
+ %dl.projects
+ %dt
+ %h2
+ #{link_to('ecarmi.org - nanoc', "https://github.com/carmi/ecarmi.org-nanoc")}
+ %dl
+ %p The source code to this blog.
+ %dt
+ %h2
+ %a{:href => "https://github.com/carmi/facebook-analyzer"} Facebook Analyzer
+ %dl
+ %p A fun project to parse and analyze a downloaded facebook account.
+ %dt
+ %h2
+ %a{:href => "https://github.com/carmi/comp356"} Comp356 - Computer Graphics in C
+ %dl
+ %p A 3D ray tracer and maze game written in C for a Computer Graphics course.
- %h1 Work
- %p I'm currently interning at The New York Times. I just built this
+%section.scrollpage#work
+ %div.wrapper
+ %h1.section.work work
+ %h2
+ Work Status:
+ %span.current
+ I'm currently interning at The New York Times.
+ %dl.work
+ %dt
+ %h2 The New York Times
+ %dl
+ %p As a part of The New York Times Interactive News Technology devision I worked with developer/journalists building news applications.
+ %dt
+ %h2 Wesleyan University
+ %dl
+ %p I worked with Wesleyan's Program on Terrorism and Insurgency Research, a group seeking to improve knowledge about political violence, to develop a custom Django application to facilitate data research and analysis.
+ %dt
+ %h2 Myself
+ %dl
+ %p I built this web site from scratch using HTML5 and CSS3.
+
+
+%section.scrollpage#tweet
+ %div.wrapper
+ %h1.section.tweet tweet
+ %div.handle
+ <iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/follow_button.html?screen_name=ehc&show_count=false" style="width: 7em; margin-left: auto; margin-right: auto; display: block; height:20px;"></iframe>
+ %div#tweetlist
+
+
+= render 'footer'
View
14 layouts/nav.haml
@@ -1,11 +1,11 @@
%nav.sidebar
- %h2 navigation
+ //%h2 navigation
%p
- <a href="bah">About</a>
+ = link_to('About', '/about/')
+ //%p
+ //<a href="bah">Work</a>
+ //%p
+ // <a href="bah">Code</a>
%p
- <a href="bah">Work</a>
- %p
- <a href="bah">Code</a>
- %p
- <a href="bah">Writing</a>
+ = link_to('Writing', '/writing/')
View
2  layouts/post-link.haml
@@ -1,6 +1,6 @@
%div.post-content
%h2.title= link_to @item[:title], @item
%span.posted Posted
- %time.timeago{:datetime => @item[:created_timego]}
+ %time.timeago{:datetime => @item[:created_timeago]}
= @item[:created_time]
%p.summary= @item[:summary]
View
19 lib/helpers.rb
@@ -1,3 +1,4 @@
+require 'time'
# Activate helpers
include Nanoc3::Helpers::Blogging
include Nanoc3::Helpers::LinkTo
@@ -7,7 +8,25 @@
def featured_articles
articles = @items.select do |item|
+ build_timeago(item)
item[:kind] == 'article' && item[:featured] == true
end
articles.sort_by { |post| attribute_to_time(post[:created_at])}.reverse
end
+
+def build_timeago(article)
+ return unless article[:kind] == 'article'
+ attrs = article.attributes
+ created = Time.parse(attrs[:created_at])
+ updated = Time.parse(attrs[:updated_at])
+
+ if created.is_a? Time
+ attrs[:created_time] = created.strftime("%B %e, %Y")
+ attrs[:created_timeago] = created.utc.iso8601.to_s
+ end
+
+ if updated.is_a? Time
+ attrs[:updated_time] = updated.strftime("%B %e, %Y")
+ attrs[:updated_timeago] = updated.utc.iso8601.to_s
+ end
+end

No commit comments for this range

Something went wrong with that request. Please try again.