Skip to content

Commit

Permalink
Merge pull request #14 from xfxf/master
Browse files Browse the repository at this point in the history
Fixes issues #1, 8, 9, 10, 11, 12, 13
  • Loading branch information
mithro committed Aug 10, 2015
2 parents 8f808b3 + e4d7d38 commit ca20c79
Show file tree
Hide file tree
Showing 43 changed files with 246 additions and 49 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.2.2
4 changes: 2 additions & 2 deletions Firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ href="">misoc</a> technologies.

<tr class="picture">
<td>&nbsp;</td>
<td class="fw-original"><img src=""></td>
<td class="fw-misoc"><img src="../img/misoc-logo.png"></td>
<td class="fw-original"><img class="firmware-pic" src=""></td>
<td class="fw-misoc"><img class="firmware-pic" src="../img/misoc-logo.png"></td>
</tr>

<tr class="code">
Expand Down
9 changes: 6 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
source 'https://rubygems.org'

gem 'jekyll', '~> 2.0.3'
gem 'kramdown', '~> 1.3.3'
gem 'rake', '~> 10.1.1'
gem 'jekyll', '~> 2.0.3'
gem 'kramdown', '~> 1.3.3'
gem 'rake', '~> 10.1.1'
gem 'mini_magick', '~> 4.2.5'


5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ GEM
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
mercenary (0.3.3)
mini_magick (4.2.9)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.8)
Expand All @@ -64,4 +65,8 @@ PLATFORMS
DEPENDENCIES
jekyll (~> 2.0.3)
kramdown (~> 1.3.3)
mini_magick (~> 4.2.5)
rake (~> 10.1.1)

BUNDLED WITH
1.10.6
4 changes: 2 additions & 2 deletions Help.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ tags: help, more-info

If you need help with anything, from getting a device running to wanting to develop on HDMI2USB, please get in touch:

* Sign up to our mailing list: [https://groups.google.com/forum/#!forum/hdmi2usb](https://groups.google.com/forum/#!forum/hdmi2usb
)
* Sign up to our mailing list (Google Account not required): [https://groups.google.com/forum/#!forum/gst-switch/join](https://groups.google.com/forum/#!forum/gst-switch/join)

* Ask a question on IRC: [#timvideos on irc.freenode.org](http://webchat.freenode.net?channels=%23timvideos)
* Ping us at [@timvideosus](https://twitter.com/timvideosus) on Twitter

Expand Down
98 changes: 79 additions & 19 deletions Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ tags: home
---

{::nomarkdown}
<div class="padding">
<div class="col-sm-12">
<div class="panel-default">
<div class="top-message">
The <a href="../numato-opsis">Numato Opsis board</a>, the first open hardware for the HDMI2USB will soon be available.<br>
<a href="http://bit.ly/get-opsis" class="btn btn-danger">Sign up to be notified when the Numato Opsis can be purchased!</a>
</div>
</div>
</div>
</div>

<div class="padding">
<div class="col-sm-12">
Expand All @@ -31,7 +21,7 @@ tags: home

# HDMI2USB: Open video capture hardware + firmware

![HDMI2USB Diagram](../img/hdmi2usb-diagram.png "HDMI2USB Diagram"){: .image-right}
![HDMI2USB Diagram](../img/hdmi2usb.jpg "HDMI2USB Diagram"){: .image-right}

**The HDMI2USB project develops affordable hardware options to record and stream HD videos (from HDMI & DisplayPort sources) for conferences, meetings and user groups.**

Expand Down Expand Up @@ -59,8 +49,8 @@ Our aim is this becomes the defacto, incredibly affordable and easy to use video
<div class="panel-body">

<div class="twitter-widget col-md-6">
<a class="twitter-timeline pull-right" href="https://twitter.com/TimVideosUs" data-widget-id="627672542765977600">Tweets by @TimVideosUs</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<a class="twitter-timeline" href="https://twitter.com/TimVideosUs" data-widget-id="630373467892789250">Tweets by @TimVideosUs</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>

<div class="col-md-6">
Expand All @@ -82,15 +72,85 @@ Our aim is this becomes the defacto, incredibly affordable and easy to use video
<div class="padding">
<div class="col-sm-12">
<div class="panel panel-default">
<span class="edit-link pull-right">
<a href="{% edit_url %}{{ page.path }}" target="_blank">
<i class="fa fa-edit"></i>
</a>
</span>
<div class="panel-body">

# TODO: Put some type of image carousal here.
<br />
<div class="imageslick">


<div>
<a class="fancybox" rel="group" href="/img/gallery/atlys.jpg">
{% thumbnail img/gallery/atlys.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/img7.jpg">
{% thumbnail img/gallery/img7.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/HDMI2USB.jpg">
{% thumbnail img/gallery/HDMI2USB.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/sprint-team-lca2015.jpg">
{% thumbnail img/gallery/sprint-team-lca2015.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/oss-hardware.png">
{% thumbnail img/gallery/oss-hardware.png 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/img4.jpg">
{% thumbnail img/gallery/img4.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/img0.jpg">
{% thumbnail img/gallery/img0.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/img5.jpg">
{% thumbnail img/gallery/img5.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/img3.jpg">
{% thumbnail img/gallery/img3.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/img1.jpg">
{% thumbnail img/gallery/img1.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/img8.jpg">
{% thumbnail img/gallery/img8.jpg 200x150 %}
</a>
</div>

<div>
<a class="fancybox" rel="group" href="/img/gallery/timvideos.jpg">
{% thumbnail img/gallery/timvideos.jpg 200x150 %}
</a>
</div>

</div>
</div>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ TODO: Update this information for HDMI2USB information.

```
sudo apt-get install build-essential ruby ruby-dev gem bundler rake nodejs
imagemagick
bundle install
bundle exec jekyll serve --watch
rake site:watch
```

## How to contribute to TimVideos Developer website?
Expand Down
8 changes: 8 additions & 0 deletions _includes/banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="col-sm-12">
<div class="panel-default">
<div class="top-message">
The <a href="../numato-opsis">Numato Opsis board</a>, the first open hardware for the HDMI2USB will soon be available to purchase.<br>
<a href="http://bit.ly/get-opsis" class="btn btn-danger">Sign up for Numato Opsis updates</a>
</div>
</div>
</div>
11 changes: 7 additions & 4 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="{{ site.description }}">
<link rel="alternate" type="application/atom+xml" title="Tim Videos Planet Feed" href="{{ "../feed.xml" | prepend: site.baseurl | preped: site.url }}" />
<link rel="alternate" type="application/atom+xml" title="Tim Videos Planet Feed" href="{{ "/feed.xml" | prepend: site.baseurl | preped: site.url }}" />
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link href="{{ "../css/bootstrap.min.css" | prepend: site.baseurl }}" rel="stylesheet">
<link href="{{ "../css/font-awesome.min.css" | prepend: site.baseurl }}" rel="stylesheet">
<link href="{{ "/css/bootstrap.min.css" | prepend: site.baseurl }}" rel="stylesheet">
<link href="{{ "/css/font-awesome.min.css" | prepend: site.baseurl }}" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.5.7/slick.css"/>
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/jquery.slick/1.5.7/slick-theme.css"/>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="{{ "../css/styles.css" | prepend: site.baseurl }}" rel="stylesheet">
<link href="{{ "/css/styles.css" | prepend: site.baseurl }}" rel="stylesheet">
</head>
7 changes: 5 additions & 2 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.slick/1.5.7/slick.min.js"></script>
<script type="text/javascript" src="{{ "/js/app.js" | prepend: site.baseurl }}"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.pack.js?v=2.1.5"></script>
20 changes: 10 additions & 10 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
</a>
<ul class="nav">
<li class="{% active_class home %}">
<a href="..{% page_url home %}">HOME</a>
<a href="{% page_url home %}">HOME</a>
</li>
<li class="{% active_class faq %}">
<a href="..{% page_url faq %}">ABOUT + FAQ</a>
<a href="{% page_url faq %}">ABOUT + FAQ</a>
</li>
<li class="{% active_class hardware %}">
<a href="..{% page_url hardware %}">HARDWARE</a>
<a href="{% page_url hardware %}">HARDWARE</a>
</li>
<li class="{% active_class digilent-atlys %}">
<ul>
<li><a href="..{% page_url digilent-atlys %}">Digilent Atlys</a></li>
<li><a href="{% page_url digilent-atlys %}">Digilent Atlys</a></li>
</ul>
</li>
<li class="{% active_class numato-opsis %}">
<ul>
<li><a href="..{% page_url numato-opsis %}">Numato Opsis</a></li>
<li><a href="{% page_url numato-opsis %}">Numato Opsis</a></li>
</ul>
</li>
<li class="{% active_class potential-boards %}">
Expand All @@ -29,23 +29,23 @@
</ul>
</li>
<li class="{% active_class firmware %}">
<a href="..{% page_url firmware %}">FIRMWARE</a>
<a href="{% page_url firmware %}">FIRMWARE</a>
</li>
<li class="{% active_class firmware-original %}">
<ul>
<li><a href="..{% page_url firmware-original %}">Original</a></li>
<li><a href="{% page_url firmware-original %}">Original</a></li>
</ul>
</li>
<li class="{% active_class firmware-misoc %}">
<ul>
<li><a href="..{% page_url firmware-misoc %}">misoc</a></li>
<li><a href="{% page_url firmware-misoc %}">misoc</a></li>
</ul>
</li>
<li class="{% active_class help %}">
<a href="..{% page_url help %}">GETTING HELP</a>
<a href="{% page_url help %}">GETTING HELP</a>
</li>
<li class="{% active_class news %}">
<a href="..{% page_url news %}">NEWS</a>
<a href="{% page_url news %}">NEWS</a>
</li>
<li>
<a href="http://code.timvideos.us">To TimVideos</a>
Expand Down
1 change: 1 addition & 0 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<div class="row">
{% include sidebar.html %}
<div class="column col-sm-9 col-md-9 col-lg-10" id="main">
{% include banner.html %}
{{ content }}
</div>
</div>
Expand Down
12 changes: 12 additions & 0 deletions _layouts/default-noedit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: base
---
<div class="padding">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-body">
{{ content }}
</div>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="{% edit_url %}{{ page.path }}" target="_blank">
<i class="fa fa-edit"></i>
</a>
</span>
</span>
<div class="panel-body">
{{ content }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: default
layout: default-noedit
---
<div class="col-sm-12">
<div class="panel panel-default" id="featured">
Expand Down
70 changes: 70 additions & 0 deletions _plugins/thumbnail.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Generates a thumbnail to an image and renders an image tag.
# The image will be resized to fit within a max bounding box.
# The resulting filename is based on original and includes dimensions.
# All paths are relative to /source.

# Usage:
#
# {% thumbnail /path/to/local/image.png 50x50< %}
#
# The dimensions will be given directly to imagemagick.
# You probably want the "<" at the end. See http://www.imagemagick.org/Magick++/Geometry.html.
#
# Installation:
#
# * add the gem: gem "mini_magick" (and bundle install)
# * copy thumbnail.rb to plugins folder
#
# https://github.com/xfxf/jekyll-thumbnailer

require 'mini_magick'

class Jekyll::Thumbnail < Liquid::Tag
def initialize(tag_name, markup, tokens)
if /(?<source>[^\s]+)\s+(?<dimensions>[^\s]+)/i =~ markup
@source = source
@dimensions = dimensions
end
super
end

def render(context)
if @source

# parking
source = @source
dimensions = @dimensions

raise "#{source} is not readable" unless File.readable?(source)
ext = File.extname(source)
desc = dimensions.gsub(/[^\da-z]+/i, '')
w, h = desc.split('x')

dest = "#{File.dirname(source)}/#{File.basename(source, ext)}_#{desc}#{ext}"

# only thumbnail the image if it doesn't exist tor is less recent than the source file
# will prevent re-processing thumbnails for a ton of images...
if !File.exists?(dest) || File.mtime(dest) <= File.mtime(source)
# puts ENV.inspect

puts "Thumbnailing #{source} to #{dest} (#{dimensions})"

MiniMagick::Tool::Convert.new do |convert|
convert << source
convert.resize dimensions
convert.gravity 'center'
convert.extent dimensions
convert << dest
end

end

"""<img src='/#{dest}' width='#{w}' height='#{h}'/>"""

else
"Could not create thumbnail for #{source}. Usage: thumbnail /path/to/local/image.png 50x50<"
end
end
end

Liquid::Template.register_tag('thumbnail', Jekyll::Thumbnail)
Loading

0 comments on commit ca20c79

Please sign in to comment.