Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

redesign again, added mobypicture background autofetch

  • Loading branch information...
commit 9176359ba17aefae3d51dd5e9c778f6067f4cb9f 1 parent 1fe7b23
Jeff Kreeftmeijer authored
21 Rakefile
View
@@ -1,9 +1,22 @@
+require 'rubygems'
+require 'net/ssh'
+require 'lib/moby'
+
desc 'update site from remote repo'
task :update do
- require 'rubygems'
- require 'net/ssh'
-
Net::SSH.start('208.88.125.96', 'jeff') do |ssh|
ssh.exec("cd jeffkreeftmeijer.com && git pull origin master && jekyll")
- end
+ end
+end
+
+namespace :moby do
+ desc 'fetch the newest image from mobypicture'
+ task :fetch do
+ Moby.fetch
+ end
+
+ desc 'fetch the newest image from mobypicture every fifteen minutes'
+ task :loop do
+ loop { Moby.fetch; sleep 900 }
+ end
end
107 css/screen.css
View
@@ -1,74 +1,83 @@
-body{
- background-color: #eee;
- background-image: url('../images/background.gif');
- background-repeat:repeat-x;
- color: #444;
- font-family: "Helvetica Neue", Helvetica, Airal, sans-serif;
- font-size: 15px;
- line-height: 150%;
- text-shadow: 0px 1px 0px #fff;
+body
+{
+ background-color: #222;
+ background-image: url('../images/background.jpg');
+ background-size: 100%;
+ background-attachment: fixed;
+ background-position: center;
}
-div#wrapper{
- min-width:380px;
- max-width: 580px;
- margin: 50px auto;
- padding:0px 10px;
+div#wrapper
+{
+ color:#222;
+ font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size:15px;
+ line-height:150%;
+ margin:50px auto;
+ text-shadow:0 1px 0 #fff;
+ width:450px;
+ padding: 20px;
+ background-color:#eee;
+ opacity: 0.9;
+ -webkit-border-radius:5px;
+ -webkit-box-shadow:0 1px 0 #fff;
}
div#header{
- font-size: 13px;
+ margin:0px 0px 45px 0px;
}
-ul{
- float: right;
+h1{
+ -webkit-border-radius:5px;
+ -webkit-box-shadow:0 1px 0 #fff;
+ background-color:#222;
+ color:#fff;
+ font-size:13px;
+ font-weight:normal;
+ line-height:150%;
+ text-shadow:0 1px 0 #000;
+ display:inline;
+ padding: 10px;
+ float:left;
}
-li{
- float: left;
- margin: 0px 0px 0px 10px;
+ul{
+ float:right;
}
-li a{
- background-color: #ddd;
+li{
+ margin: 0px 0px 0px 20px;
+ float:left;
}
-li a:hover{
- background-color: #ccc;
+h2{
+ font-size:34px;
}
-h1{
- background-color: #444;
- color: #eee;
- text-shadow: 0px 1px 0px #000;
+h2,h3,h4,h5,h6
+{
+ line-height:100%;
+ font-weight:900;
}
-h1, li a{
- display: inline;
- padding: 3px 5px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-
- -moz-box-shadow: 0px 1px 0px #fff;
- -webkit-box-shadow: 0px 1px 0px #fff;
- box-shadow: 0px 1px 0px #fff;
+p,h2,h3,h4,h5,h6
+{
+ margin:20px 0;
}
-h2{
- font-weight: 900;
- font-size: 26px;
- line-height: 125%;
+a
+{
+ color:#000;
+ font-weight:900;
+ text-decoration:none;
}
-a{
- color: #222;
- text-decoration: none;
+a:hover
+{
+ color:#444;
}
hr{
- margin: 25px 0px;
- border: none;
- border-top:1px solid;
- border-color: #ddd;
+ clear:both;
+ visibility: hidden;
}
BIN  images/background.gif
View
Deleted file not rendered
3  index.html
View
@@ -19,10 +19,9 @@
<a href="http://twitter.com/jkreeftmeijer">Twitter &rarr;</a>
</li>
</ul>
+ <hr/>
</div>
- <hr/>
<h2>Open source enthusiast and Ruby (on Rails) programmer @ <a href="http://80beans.com"><span style="color:#007236">80</span><span style="color:#72bf44">beans</span></a>, Amsterdam.</h2>
- <hr/>
</div>
<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
21 lib/moby.rb
View
@@ -0,0 +1,21 @@
+require 'rubygems'
+require 'httparty'
+require 'json'
+
+class Moby
+ def self.fetch
+ result = HTTParty.get(
+ 'http://api.mobypicture.com/',
+ :query => {
+ :action => 'searchPosts',
+ :k => '2bejXK0oEnftvaYu',
+ :format => 'json',
+ :searchUsername => 'jkreeftmeijer',
+ :searchItemsPerPage => 1
+ }
+ )
+
+ url = JSON.parse(result)['results'].first['post']['media']['url_full']
+ %x(mkdir -p _site/images && curl -o _site/images/background.jpg #{url})
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.