Permalink
Browse files

replace octopress

  • Loading branch information...
1 parent 410adf5 commit 5a0b630cf8aa0d677dcb339d48846eee146be699 @kvz committed Sep 26, 2012
Showing 459 changed files with 35 additions and 30,707 deletions.
View
@@ -11,3 +11,5 @@ source/_stash
source/stylesheets/screen.css
vendor
node_modules
+_config.yml
+Rakefile
View
@@ -299,7 +299,7 @@ task :setup_github_pages, :repo do |t, args|
if args.repo
repo_url = args.repo
else
- puts "Enter the read/write url for your repository"
+ puts "Enter the read/write url for your repository"
puts "(For example, 'git@github.com:your_username/your_username.github.com)"
repo_url = get_stdin("Repository url: ")
end
@@ -350,64 +350,6 @@ task :setup_github_pages, :repo do |t, args|
puts "\n---\n## Now you can deploy to #{url} with `rake deploy` ##"
end
-desc "Build jekyll source by php.js source"
-task :build do
- raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
- octodir = Dir.pwd()
- phpjsdir = "#{octodir}/.."
- Dir.chdir("../functions")
- Dir.glob("*/").each { |dir|
- category = dir.gsub /\//, ''
- next if File.file? dir or category[0] == '_'
- Dir.chdir(dir)
- Dir.glob("*.js").each { |file|
- function = file.gsub /\.js$/, ''
- next if function[0] == '_'
-
- mtime = File.mtime(file)
- mdate = mtime.strftime('%Y-%m-%d %H:%M')
- ctime = File.ctime(file)
- cdate = mtime.strftime('%Y-%m-%d')
- page_dir = "#{octodir}/#{source_dir}/#{posts_dir}"
- page_file = "#{page_dir}/#{cdate}-#{function}.#{new_post_ext}"
- mkdir_p page_dir
-
- puts "Creating page: #{page_file}"
- File.unlink(page_file) if File.file?(page_file)
- open(page_file, 'w') do |page|
- page.puts "---"
- page.puts "layout: post"
- page.puts "title: \"JavaScript #{function} function\""
- page.puts "date: #{mdate}"
- page.puts "comments: true"
- page.puts "sharing: true"
- page.puts "footer: true"
- page.puts "permalink: functions/#{function}"
- page.puts "categories: [ #{category}, functions ]"
- page.puts "---"
- page.puts "A JavaScript equivalent of PHP's #{function}"
- page.puts "<!-- more -->"
-
- codefile = File.open("#{phpjsdir}/functions/#{category}/#{function}.js", "r")
- contents = codefile.read
- page.puts "{% codeblock #{category}/#{function}.js lang:js https://raw.github.com/kvz/phpjs/master/functions/#{category}/#{function}.js raw on github %}"
- page.puts "#{contents}"
- page.puts "{% endcodeblock %}"
- page.puts "<ul>"
- page.puts " <li><a href=\"https://github.com/kvz/phpjs/blob/master/functions/#{category}/#{function}.js\">view on github</a></li>"
- page.puts " <li><a href=\"https://github.com/kvz/phpjs/edit/master/functions/#{category}/#{function}.js\">edit on github</a></li>"
- page.puts "</ul>"
- end
-
- # break
- }
- Dir.chdir("..")
- # break
- }
-
- Dir.chdir(octodir)
-end
-
def ok_failed(condition)
if (condition)
puts "OK"
View
@@ -2,12 +2,12 @@
# Main Configs #
# ----------------------- #
-url: http://kvz.github.com/phpjs/
-title: php.js
-subtitle: php functions in javascript
-author: phpjs.org
+url: http://kvz.github.com/phpjs
+title: My Octopress Blog
+subtitle: A blogging framework for hackers.
+author: Your Name
simple_search: http://google.com/search
-description: php.js is a community driven resource that shows how you could implement php functions in javacript
+description:
# Default date format is "ordinal" (resulting in "July 22nd 2007")
# You can customize the format as defined in
@@ -16,7 +16,7 @@ description: php.js is a community driven resource that shows how you could impl
date_format: "ordinal"
# RSS / Email (optional) subscription links (change if using something like Feedburner)
-subscribe_rss: /atom.xml
+subscribe_rss: /phpjs/atom.xml
subscribe_email:
# RSS feeds can list your email address if you like
email:
@@ -32,17 +32,16 @@ source: source
destination: public/phpjs
plugins: plugins
code_dir: downloads/code
-category_dir: categories
-category_title_prefix: "Category: "
+category_dir: blog/categories
markdown: rdiscount
pygments: false # default python pygments have been replaced by pygments.rb
-paginate: 1000 # Posts per page on the blog index
-pagination_dir: paginate # Directory base for pagination URLs eg. /blog/page/2/
-recent_posts: 15 # Posts in the sidebar Recent Posts section
+paginate: 10 # Posts per page on the blog index
+pagination_dir: blog # Directory base for pagination URLs eg. /blog/page/2/
+recent_posts: 5 # Posts in the sidebar Recent Posts section
excerpt_link: "Read on &rarr;" # "Continue reading" link text at the bottom of excerpted articles
-titlecase: false # Converts page and post titles to titlecase
+titlecase: true # Converts page and post titles to titlecase
# list each of the sidebar modules you want to include, in the order you want them to appear.
# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html'
@@ -65,15 +64,15 @@ github_show_profile_link: true
github_skip_forks: true
# Twitter
-twitter_user: phpjs
-twitter_tweet_count: 10
+twitter_user:
+twitter_tweet_count: 4
twitter_show_replies: false
twitter_follow_button: true
twitter_show_follower_count: false
twitter_tweet_button: true
# Google +1
-google_plus_one: true
+google_plus_one: false
google_plus_one_size: medium
# Google Plus Profile
@@ -90,11 +89,11 @@ delicious_user:
delicious_count: 3
# Disqus Comments
-disqus_short_name: phpjs
+disqus_short_name:
disqus_show_comment_count: false
# Google Analytics
-google_analytics_tracking_id: UA-63083-7
+google_analytics_tracking_id:
# Facebook Like
-facebook_like: true
+facebook_like: false
@@ -127,16 +127,17 @@ body.sidebar-footer {
@media only screen and (min-width: 750px) {
aside.sidebar { @include collapse-sidebar; }
}
+#main, #content, .sidebar {
+ @extend .group;
+}
@media only screen and (min-width: 768px) {
body { -webkit-text-size-adjust: auto; }
body > header { font-size: $header-font-size * 1.2; }
#main {
- @extend .group;
padding: 0;
margin: 0 auto;
}
#content {
- @extend .group;
overflow: visible;
margin-right: $sidebar-width-medium;
position: relative;
@@ -149,7 +150,6 @@ body.sidebar-footer {
}
}
aside.sidebar {
- @extend .group;
width: $sidebar-width-medium - $sidebar-pad-medium*2;
padding: 0 $sidebar-pad-medium $sidebar-pad-medium;
background: none;
@@ -180,7 +180,6 @@ body.sidebar-footer {
padding: 1.2em $sidebar-pad-wide $sidebar-pad-wide;
.collapse-sidebar & {
padding: { left: $pad-wide; right: $pad-wide; }
- @extend .group;
}
}
}
@@ -190,3 +189,4 @@ body.sidebar-footer {
ul, ol { margin-left: 0; }
}
}
+
@@ -13,7 +13,7 @@ body > nav {
.search {
padding: .3em .5em 0;
font-size: .85em;
- @extend .sans;
+ font-family: $sans;
line-height: 1.1em;
width: 95%;
@include border-radius(.5em);
@@ -54,7 +54,7 @@ body > nav {
}
a {
@include link-colors($nav-color, $nav-color-hover, $visited: $nav-color);
- @extend .sans;
+ font-family: $sans;
text-shadow: lighten($nav-bg, 12) 0 1px;
float: left;
text-decoration: none;
@@ -134,3 +134,4 @@ body > nav {
a[rel=subscribe-rss]{ @include mask-subscription-nav('rss.png'); }
a[rel=subscribe-email]{ @include mask-subscription-nav('email.png'); }
}
+
@@ -8,7 +8,7 @@ <h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% el
{% unless page.meta == false %}
<p class="meta">
{% include post/date.html %}{{ time }}
- {% if site.disqus_short_name and page.comments != false and site.disqus_show_comment_count == true %}
+ {% if site.disqus_short_name and page.comments != false and post.comments != false and site.disqus_show_comment_count == true %}
| <a href="{% if index %}{{ root_url }}{{ post.url }}{% endif %}#disqus_thread">Comments</a>
{% endif %}
</p>
@@ -16,7 +16,7 @@
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
- {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
+ {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %}
<link rel="canonical" href="{{ canonical }}">
<link href="{{ root_url }}/favicon.png" rel="icon">
<link href="{{ root_url }}/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
@@ -1,34 +0,0 @@
----
-layout: post
-title: "JavaScript abs function"
-date: 2012-05-17 18:49
-comments: true
-sharing: true
-footer: true
-permalink: functions/abs
-categories: [ math, functions ]
----
-A JavaScript equivalent of PHP's abs
-<!-- more -->
-{% codeblock math/abs.js lang:js https://raw.github.com/kvz/phpjs/master/functions/math/abs.js raw on github %}
-function abs (mixed_number) {
- // http://kevin.vanzonneveld.net
- // + original by: Waldo Malqui Silva
- // + improved by: Karol Kowalski
- // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
- // + improved by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
- // * example 1: abs(4.2);
- // * returns 1: 4.2
- // * example 2: abs(-4.2);
- // * returns 2: 4.2
- // * example 3: abs(-5);
- // * returns 3: 5
- // * example 4: abs('_argos');
- // * returns 4: 0
- return Math.abs(mixed_number) || 0;
-}
-{% endcodeblock %}
-<ul>
- <li><a href="https://github.com/kvz/phpjs/blob/master/functions/math/abs.js">view on github</a></li>
- <li><a href="https://github.com/kvz/phpjs/edit/master/functions/math/abs.js">edit on github</a></li>
-</ul>
@@ -1,25 +0,0 @@
----
-layout: post
-title: "JavaScript acos function"
-date: 2012-05-17 18:49
-comments: true
-sharing: true
-footer: true
-permalink: functions/acos
-categories: [ math, functions ]
----
-A JavaScript equivalent of PHP's acos
-<!-- more -->
-{% codeblock math/acos.js lang:js https://raw.github.com/kvz/phpjs/master/functions/math/acos.js raw on github %}
-function acos (arg) {
- // http://kevin.vanzonneveld.net
- // + original by: Onno Marsman
- // * example 1: acos(0.3);
- // * returns 1: 1.2661036727794992
- return Math.acos(arg);
-}
-{% endcodeblock %}
-<ul>
- <li><a href="https://github.com/kvz/phpjs/blob/master/functions/math/acos.js">view on github</a></li>
- <li><a href="https://github.com/kvz/phpjs/edit/master/functions/math/acos.js">edit on github</a></li>
-</ul>
@@ -1,25 +0,0 @@
----
-layout: post
-title: "JavaScript acosh function"
-date: 2012-05-17 18:49
-comments: true
-sharing: true
-footer: true
-permalink: functions/acosh
-categories: [ math, functions ]
----
-A JavaScript equivalent of PHP's acosh
-<!-- more -->
-{% codeblock math/acosh.js lang:js https://raw.github.com/kvz/phpjs/master/functions/math/acosh.js raw on github %}
-function acosh (arg) {
- // http://kevin.vanzonneveld.net
- // + original by: Onno Marsman
- // * example 1: acosh(8723321.4);
- // * returns 1: 16.674657798418625
- return Math.log(arg + Math.sqrt(arg * arg - 1));
-}
-{% endcodeblock %}
-<ul>
- <li><a href="https://github.com/kvz/phpjs/blob/master/functions/math/acosh.js">view on github</a></li>
- <li><a href="https://github.com/kvz/phpjs/edit/master/functions/math/acosh.js">edit on github</a></li>
-</ul>
Oops, something went wrong.

0 comments on commit 5a0b630

Please sign in to comment.