@@ -0,0 +1,65 @@
div#viewer {
height: 400px;
width: 600px;
float: left;
}

div#viewer div.info {
width: 600px;
border: 1px solid #999;
overflow: hidden;
float: left;
text-align: center;
}

div#viewer div.image {
/* height: 370px; */
width: 600px;
overflow: hidden;
float: left;
text-align: center;
}

div#viewer div.image img {
max-height: 370px;
max-width: 600px;
}

div#switcher {
height: 190px;
width: 280px;
float: right;
}

div#switcher div#photo-list {
height: 170px;
width: 280px;
}

div#switcher a.next {
margin-left: 160px;
}

div#switcher a.prev {
margin-left: 10px;
}

div#albums {
height: 190px;
width: 280px;
float: right;
margin-top: 20px;
}

div#albums div#album-list {
height: 170px;
width: 280px;
}

div#albums a.next {
margin-left: 160px;
}

div#albums a.prev {
margin-left: 10px;
}
@@ -0,0 +1,4 @@
/* Fix those stupid hover issues */
body {
behavior: url("../other/hover.htc");
}
@@ -0,0 +1,87 @@
* {
margin: 0px;
padding: 0px;
font-family: Verdana,Arial,Helvetica,sans-serif;
}

body {
background-color: #F8F8F8;
}

h3 {
padding-top: 3px;
}

#faq_list h4 {
padding-top: 3px;
}

#header {
width: 900px;
height: 200px;
margin: 0 auto;

background-color: #FFFFFF;
background-image: url('../images/header.png');
background-position: left center;
background-repeat: no-repeat;
}

#header_text {
padding-top: 10px;
padding-left: 15px;
}

#menu {
width: 900px;
height: 35px;
margin: 0 auto;
}

#content_holder {
width: 900px;
margin: 0 auto;
}

#main_content {
width: 900px;
background: #FFFFFF;
}

#footer {
width: 900px;
height: 110px;
margin: 0 auto;
margin-top: 5px;

background-color: #522e91;
}

#news_twitter_feeds {
height: 500px;
}

#twitter_7tha {
float: left;
width: 250px;
}

#twitter_ukscouts {
float: left;
width: 250px;
margin-left: 100px;
clear: right;
}

#news_articles {

}

#faq_list p {
margin-top: 2px;
padding: 5px;
}

#faq_list a {
color: #000000;
}
@@ -0,0 +1,126 @@
#menu ul {
list-style-type: none;
z-index: 3;
}

#menu ul li {
display: inline;
float: left;
}

#menu ul li img {
border: 0px;
}

#menu li ul li {
position: relative;
clear: left;
z-index: 3;
}

#menu li ul {
position: absolute;
display: none;
}

#menu li:hover ul {
display: block;
}

#menu li:hover ul li {
margin-top: -3px;
border-style: solid;
border-color: #000000;
border-width: 1px;
height: 35px;
width: 130px;
}

#footer_left {
float: left;
margin-top: 15px;
margin-left: 10px;
}

#footer_left p {
text-align: center;
margin-top: 5px;
color: #FFFFFF;
font-weight: bold;
font-size: 12px;
}

#footer_webring {
float: right;
margin-top: 6px;
margin-right: 12px;
text-align: center;
}

#footer_webring .wring_header {
margin: 0 auto;
text-align: center;
color: #FF0000;
font-size: 16px;
}

#footer_webring .wring_header span {
color: #FF8000;
font-size: 16px;
}

#footer_webring .wring_header span span {
color: #FF0000;
font-size: 16px;
}

#footer_webring .wring_flinks {
margin: 0 auto;
text-align: center;
font-size: 10px;
}

#footer_webring .wring_flinks a:link {
color: #FFFFFF;
}

#footer_webring .wring_flinks a:visited {
color: #FFFFFF;
}

#footer_webring .wring_flinks a:hover {
color: #cc9900;
}

#footer_webring .wring_flinks a:active {
color: #FFFFFF;
}

#footer_webring img {
border: 0;
padding-top: 5px;
padding-bottom: 2px;
}

#main_content h2 {
padding-top: 10px;
margin-bottom: 5px;
border-bottom-color: grey;
border-bottom-style: solid;
border-bottom-width: 1px;
width: 850px;
font-size: 18px;
}

#main_content p {
padding: 3px;
font-size: 14px;
}

.hidden {
display: none;
}

.blocker {
clear: both;
}
@@ -0,0 +1,99 @@
/* UKScouting */
#twitter_ukscouting {
width: 300px;
height: 460px;
padding: 20px;

margin-top: 10px;
margin-left: 70px;
float: left;

border: 1px solid #000000;

-moz-border-radius: 6px;
border-radius: 6px;

-webkit-box-shadow: 1px 0px 1px 0px #0f0f0f;
-moz-box-shadow: 1px 0px 1px 0px #0f0f0f;
box-shadow: 1px 0px 1px 0px #0f0f0f;
}

#tweets_ukscouting h4 {
font-size: 16px;
text-align: center;
}

#twitter_ukscouting p.follow {
text-align: right;
margin-bottom: -50px;
}

#tweets_ukscouting {
height: 420px;
}

#tweets_ukscouting li {
padding: 2px;
border-top: 1px solid #353434;
line-height: 130%;
}

#tweets_ukscouting li.tweet_content_0 {
border-top: 0px none;
}

#tweets_ukscouting li:last-child {
border-bottom: 0px none;
}

/* 7thA */
#twitter_7tha {
width: 300px;
height: 460px;
padding: 20px;

margin-top: 10px;
margin-left: 70px;
float: left;

border: 1px solid #000000;

-moz-border-radius: 6px;
border-radius: 6px;

-webkit-box-shadow: 1px 0px 1px 0px #0f0f0f;
-moz-box-shadow: 1px 0px 1px 0px #0f0f0f;
box-shadow: 1px 0px 1px 0px #0f0f0f;
}

#twitter_7tha p.follow {
text-align: right;
margin-bottom: -50px;
}

#tweets_7tha {
height: 420px;
}

#tweets_7tha h4 {
font-size: 16px;
text-align: center;
}

#tweets_7tha li {
padding: 2px;
border-top: 1px solid #353434;
line-height: 130%;
}

#tweets_7tha li.tweet_content_0 {
border-top: 0px none;
}

#tweets_7tha li:last-child {
border-bottom: 0px none;
}

.blocker {
clear: both;
}
@@ -0,0 +1,54 @@
/* http://meyerweb.com/eric/tools/css/reset/ */
/* v1.0 | 20080212 */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}

/* remember to define focus styles! */
:focus {
outline: 0;
}

/* remember to highlight inserts somehow! */
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}

/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}

@@ -0,0 +1,38 @@
a.videoPlayer {
text-align: center;
display: block;
width: 520px;
height: 330px;
border: 1px solid #999;
background-repeat: no-repeat;
background-position: center;
}

div.gallery_video a.videoPlayer {
text-align: center;
display: block;
height: 370px;
width: 598px;
border: 1px solid #999;
overflow: hidden;
background-repeat: no-repeat;
background-position: center;
}

a.videoPlayer img {
margin-top: 120px;
border: 0px;
width: 83px;
height: 83px;
}

a.videoPlayer:hover {
border: 1px solid #000;
}

div.gallery_video a.videoPlayer img {
margin-top: 150px;
border: 0px;
width: 83px;
height: 83px;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,53 @@
$(function(){
$(".switch, .switch_hide").hide();
$(".switch_unhide").show();
});

function preLoadImages(imageArray){
$.each(imageArray, function (i, val) {
/* Lets just make a new dom img object and set it's src to this value, the browser should then cache the image making the hover effects work nicely with no loading delay! */
cacheImage = document.createElement('img').src = val;
});
}

function switch_menu_image(item) {
/* Hack! */
image_parts = item.getAttribute('src').split('/');
image_path = image_parts.splice(0, image_parts.length-1).join("/");
image_name = image_parts[image_parts.length-1];

if(image_name.split('depressed_').length == 2){ // We are the depressed image
replace_image = image_path+'/'+image_name.split('depressed_')[1];
}else{ // We are the happy image
replace_image = image_path+'/depressed_'+image_name;
}
item.src = replace_image;
}

function switcher(show_id) {
var show = $("#" + show_id);
if (show.length) {
$(".switch").fadeOut("slow");

if (show.is(":visible")){
return true;
} else {
show.fadeIn("slow");
return true;
}
} else {
alert("Sorry we could not find that information");
return false;
}
}

/* Google stuff */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-11817192-3']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
@@ -0,0 +1,56 @@
if(window.location.href.indexOf('?page=') == -1){
pageToShow = 'photos';
}else{
pageToShow = String(window.location.href.slice(window.location.href.indexOf('?page=') + 1).split('=')[1].split('&')[0].split('#')[0]);
if(pageToShow.length == 0){
/* If the page varible is empty */
pageToShow = 'photos';
}
}

function loadFirstPage() {
cp = $("#page_" + currentPage);
cp.hide(1);
switchPage(pageToShow);
}

function jumpTo(section){
if($("a[name="+section+"]").length != 0){
section = $("a[name="+section+"]").offset().top - 100;
$('html,body').animate({scrollTop: section}, 500);
}
}

function switchPage(newPage, jumpToSection){
cp = $("#page_"+currentPage);
np = $("#page_"+newPage);

if(np.length != 0){
cp.fadeOut(null, function () {
$("#menu ul li").each(function(index){
$(this).removeClass("current_page_item");
});
if($("#mainm_"+newPage).length != 0){
$("#mainm_"+newPage).addClass("current_page_item");
}
np.fadeIn();
currentPage = newPage;
if(jumpToSection != null){
jumpTo(jumpToSection);
}
});
}else{
np = $("#page_404");
if(np.length != 0){
$("#menu ul li").each(function(index){
$(this).removeClass("current_page_item");
});
cp.fadeOut(null, function () {
np.fadeIn();
currentPage = '404';
});
}else{
alert("Sorry an error occurred, please try again!");
}
}
}
@@ -0,0 +1,70 @@
/*
* tweetable 1.6 - jQuery twitter feed generator plugin
*
* Copyright (c) 2009 Philip Beel (http://www.theodin.co.uk/)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* With modifications from Philipp Robbel (http://www.robbel.com/) and Patrick DW (stackoverflow)
* for IE compatibility.
*
* Revision: $Id: jquery.tweetable.js 2011-01-06 $
*
*/
(function ($) {
//define the tweetable plugin
$.fn.tweetable = function (options) {
//specify the plugins defauls
var defaults = {
limit: 5, //number of tweets to show
username: '', //@username tweets to display
time: false, //display date
replies: false, //filter out @replys
position: 'append' //append position
};
//overwrite the defaults
var options = $.extend(defaults, options);
//loop through each instance
return this.each(function (options) {
//assign our initial vars
var act = $(this);
var $tweetList;
var tweetMonth = '';
var shortMonths = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
var api = "http://api.twitter.com/1/statuses/user_timeline.json?screen_name=";
var count = "&count=";
//do a JSON request to twitters API
$.getJSON(api + defaults.username + count + defaults.limit + "&callback=?", act, function (data) {
//loop through twitters response
$.each(data, function (i, item) {
//check for the first loop
if (i == 0) {
//create an unordered list to store tweets in
$tweetList = $('<ul class="tweetList">')[defaults.position.toLowerCase() + 'To'](act);
}
//handle @reply filtering if required
if (defaults.replies === false) {
if (item.in_reply_to_status_id === null) {
$tweetList.append('<li class="tweet_content_' + i + '"><p class="tweet_link_' + i + '">' + item.text.replace(/#(.*?)(\s|$)/g, '<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, '<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g, '<a href="http://twitter.com/$1">@$1 </a>$2')+'</p></li>');
}
} else {
$tweetList.append('<li class="tweet_content_' + i + '"><p class="tweet_link_' + i + '">' + item.text.replace(/#(.*?)(\s|$)/g, '<span class="hash">#$1 </span>').replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, '<a href="$&">$&</a> ').replace(/@(.*?)(\s|\(|\)|$)/g, '<a href="http://twitter.com/$1">@$1 </a>$2') + '</p></li>');
}
//display the tiem of tweet if required
if (defaults.time == true) {
for(var iterate=0; iterate<=12; iterate++) {
if(shortMonths[iterate] == item.created_at.substr(4, 3)) {
tweetMonth = iterate + 1;
if(tweetMonth < 10) {
tweetMonth = '0' + tweetMonth;
}
}
}
$('.tweet_link_' + i).append('<small> ' + item.created_at.substr(8, 2) + '/' + tweetMonth + '/' + item.created_at.substr(26,4) + ' ' + item.created_at.substr(11,8) + '</small>');
}
});
//close the unordered list
});
});
}
})(jQuery);
@@ -0,0 +1,135 @@
<attach event="ondocumentready" handler="parseStylesheets" />

<script>
/*
* Whatever:hover - V1.42.060206 - hover & active
* ------------------------------------------------------------
* (c) 2005 - Peter Nederlof
* Peterned - http://www.xs4all.nl/~peterned/
* License - http://creativecommons.org/licenses/LGPL/2.1/
*
* Whatever:hover is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Whatever:hover is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* Credits and thanks to:
* Arnoud Berendsen, Martin Reurings, Robert Hanson
*
* howto: body { behavior:url("csshover.htc"); }
* ------------------------------------------------------------
*/

var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i,
currentSheet, doc = window.document, hoverEvents = [], activators =
{
onhover:{on:'onmouseover', off:'onmouseout'},
onactive:{on:'onmousedown', off:'onmouseup'}
}

function parseStylesheets()
{
if(!/MSIE (5|6|7|8)/.test(navigator.userAgent)) return;
window.attachEvent('onunload', unhookHoverEvents);
var sheets = doc.styleSheets, l = sheets.length;
for(var i=0; i<l; i++)
parseStylesheet(sheets[i]);
}

function parseStylesheet(sheet)
{
if(sheet.imports)
{
try
{
var imports = sheet.imports, l = imports.length;
for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
} catch(securityException){}
}
try
{
var rules = (currentSheet = sheet).rules, l = rules.length;
for(var j=0; j<l; j++) parseCSSRule(rules[j]);
} catch(securityException){}
}

function parseCSSRule(rule)
{
var select = rule.selectorText, style = rule.style.cssText;
if(!csshoverReg.test(select) || !style) return;
var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
var affected = select.replace(/:(hover|active).*$/, '');
var elements = getElementsBySelect(affected);
if(elements.length == 0) return;
currentSheet.addRule(newSelect, style);
for(var i=0; i<elements.length; i++)
new HoverElement(elements[i], className, activators[pseudo]);
}

function HoverElement(node, className, events)
{
if(!node.hovers) node.hovers = {};
if(node.hovers[className]) return;
node.hovers[className] = true;
hookHoverEvent(node, events.on, function() { node.className += ' ' + className; });
hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
}

function hookHoverEvent(node, type, handler)
{
node.attachEvent(type, handler);
hoverEvents[hoverEvents.length] = { node:node, type:type, handler:handler };
}

function unhookHoverEvents()
{
for(var e,i=0; i<hoverEvents.length; i++) {
e = hoverEvents[i];
e.node.detachEvent(e.type, e.handler);
}
}

function getElementsBySelect(rule)
{
var parts, nodes = [doc];
parts = rule.split(' ');
for(var i=0; i<parts.length; i++) {
nodes = getSelectedNodes(parts[i], nodes);
} return nodes;
}

function getSelectedNodes(select, elements)
{
var result, node, nodes = [];
var identify = (/\#([a-z0-9_-]+)/i).exec(select);
if(identify)
{
var element = doc.getElementById(identify[1]);
return element? [element]:nodes;
}

var classname = (/\.([a-z0-9_-]+)/i).exec(select);
var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false;
for(var i=0; i<elements.length; i++)
{
result = tagName? elements[i].all.tags(tagName):elements[i].all;
for(var j=0; j<result.length; j++)
{
node = result[j];
if(classReg && !classReg.test(node.className)) continue;
nodes[nodes.length] = node;
}
}

return nodes;
}

</script>
@@ -0,0 +1,4 @@
---
layout: default
title: Beavers
---
@@ -0,0 +1,4 @@
---
layout: default
title: Contact
---
@@ -0,0 +1,4 @@
---
layout: default
title: Cubs
---
@@ -0,0 +1,4 @@
---
layout: default
title: Explorers
---
@@ -0,0 +1,4 @@
---
layout: default
title: FAQ
---
@@ -0,0 +1,4 @@
---
layout: default
title: Gallery
---
@@ -0,0 +1,4 @@
---
layout: default
title: Home
---
@@ -0,0 +1,4 @@
---
layout: default
title: Leaders
---
@@ -0,0 +1,26 @@
---
layout: nil
---
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }}</title>
<link href="{{ site.basedomain }}/atom.xml" rel="self" />
<link href="{{ site.basedomain }}/" />
<updated>{{ site.time || date_to_xmlschema }}</updated>
<id>{{ site.basedomain }}</id>
<author>
<name>7th A Leadership team</name>
<email>gsl@7tharochdale.org.uk</email>
</author>
{% for post in site.posts %}
<entry>
<title>{{ post.title }}</title>
<link href="{{ site.basedomain }}{{ post.url }}" />
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>{{ site.basedomain }}{{ post.id }}</id>
<content type="html">
{{ post.content | xml_escape }}
</content>
</entry>
{% endfor %}
</feed>
@@ -0,0 +1,22 @@
---
layout: default
title: News Categories
---
<h2>Categories:</h2>
<p>
{% for category in site.categories %}
<a href="#{{ category | first }}">{{ category | first }}</a>
{% endfor %}
</p>

<h2>Articles by Category:</h2>
{% for category in site.categories %}
<div id="post">
<a name="{{ category | first }}">{{ category | first }}</a>
{% for posts in category %}
{% for post in posts %}
<p><a href="{{ post.url }}">{{ post.title }}</a></p>
{% endfor %}
{% endfor %}
</div>
{% endfor %}
@@ -0,0 +1,12 @@
---
layout: default
title: News
---

{% for post in site.posts %}
<div class="post">
<div class="post-title"><h3><a href="{{ post.url }}">{{ post.title }}</a></h3></div>
<div class="post-date">{{ post.date | date_to_string }}</div>
<div class="post-content">{% if post.excerpt == "" %}{{ post.content | strip_html | truncatewords: 35 }}{% else %}{{ post.excerpt }}{% endif %} [..] <a href="{{ post.url }}">Read more</a></div>
</div>
{% endfor %}
@@ -0,0 +1,4 @@
---
layout: default
title: Scouts
---
@@ -0,0 +1,119 @@
---
layout: nil
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{{ site.basedomain }}</loc>
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>

<url>
<loc>{{ site.basedomain }}/scouts.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/news.atom</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/leaders.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/gallery.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/faq.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/explorers.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/cubs.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/contact.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/beavers.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/about.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/news/</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/news/categories.html</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

<url>
<loc>{{ site.basedomain }}/news/archives/</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>

{% for post in site.posts %}
<url>
<loc>{{ site.basedomain }}{{ post.url }}</loc>
<lastmod>{{ site.time }}</lastmod>
<changefreq>monthly</changefreq>
<priority>0.2</priority>
</url>
{% endfor %}
</urlset>
@@ -0,0 +1,168 @@
<?php
/*
* This is horrible and should only be run on the command line.
* Will generate thumbnail images recursivly for all gallery images and videos.
*/
$images_folder = "/home/damian/Projects/7thA/7tharochdale.org.uk/assests/gallery/images/";
$thumbsfolder = "/home/damian/Projects/7thA/7tharochdale.org.uk/assests/gallery/image_thumbnails/";
$videos_folder = "/home/damian/Projects/7thA/7tharochdale.org.uk/assests/gallery/video/";
$imagesplash_folder = "/home/damian/Projects/7thA/7tharochdale.org.uk/assests/gallery/video_splash/";

$valid_image_exts = array("jpg", "JPG", "JPEG", "jpeg", "png", "PNG");
$valid_video_exts = array("flv", "m4v", "swf", "mp4");
$files = array();

ini_set("gd.jpeg_ignore_warning", 1);
ini_set("max_execution_time", 60*60*24);
ini_set("memory_limit", "512M");

function rm_dirs($path) {
if (is_dir($path)){
$handle = opendir($path);
}

if (!$handle){
return false;
}

while($file = readdir($handle)) {
if ($file != "." && $file != "..") {
if (!is_dir($path . "/" . $file)){
unlink($path . "/" . $file);
}else{
rm_dirs($path . "/" . $file);
}
}
}

closedir($handle);
rmdir($path);
return true;
}

function get_video_files($dir) {
global $files, $valid_video_exts;

$handle = opendir($dir);
while (($path = readdir($handle)) !== false){
if($path == "." || $path == ".."){ continue; }
$path = str_replace("//", "/", $dir . "/" . $path);

if(is_file($path)){
$parts = explode(".", $path);
$ext = $parts[count($parts)-1];
if(in_array($ext, $valid_video_exts)){
$files[] = $path;
}
}else if(is_dir($path)){
get_video_files($path);
}
}
closedir($handle);
return $files;
}

function get_image_files($dir) {
global $files, $valid_image_exts;

$handle = opendir($dir);
while (($path = readdir($handle)) !== false){
if($path == "." || $path == ".."){ continue; }
$path = str_replace("//", "/", $dir . "/" . $path);

if(is_file($path)){
$parts = explode(".", $path);
$ext = $parts[count($parts)-1];
if(in_array($ext, $valid_image_exts)){
$files[] = $path;
}
}else if(is_dir($path)){
get_image_files($path);
}
}
closedir($handle);
return $files;
}

function create_image_thumb($path, $height, $width){
global $images_folder, $thumbsfolder;
$new_path = str_replace($images_folder, $thumbsfolder, $path);

$parts = explode(".", $path);
if (preg_match("/jpg|jpeg/i", $parts[count($parts)-1])){
$image = imagecreatefromjpeg($path);
}else if (preg_match("/png/i", $parts[count($parts)-1])){
$image = imagecreatefrompng($path);
}else{
print "Unknown image format";
return;
}

if(!$image) { print "Could not open image"; return false; }

$x = imageSX($image);
$y = imageSY($image);

if ($x > $y){
$thumb_w = $width;
$thumb_h = $y*($height/$x);
}else if ($x < $y){
$thumb_w = $x*($width/$y);
$thumb_h = $height;
} else {
$thumb_w = $width;
$thumb_h = $height;
}

$thumb_image = ImageCreateTrueColor($thumb_w, $thumb_h);
imagecopyresampled($thumb_image, $image, 0, 0, 0, 0, $thumb_w, $thumb_h, $x, $y);

$dir = dirname($new_path);
if(!is_dir($dir)){
mkdir($dir, 0777, true);
}

if (preg_match("/jpg|jpeg/i", $parts[count($parts)-1])){
imagejpeg($thumb_image, $new_path);
}else if (preg_match("/png/i", $parts[count($parts)-1])){
imagepng($thumb_image, $new_path);
}
imagedestroy($image);
imagedestroy($thumb_image);
}

function create_video_thumb($path, $height, $width, $splash=False) {
global $imagesplash_folder, $thumbsfolder, $videos_folder, $images_folder;

if($splash === False){
$new_path = str_replace($images_folder, $thumbsfolder, $path . ".png");
}else{
$new_path = str_replace($videos_folder, $imagesplash_folder, $path . ".png");
}

mkdir(dirname($new_path), 0777, true);
system("ffmpeg -i " . $path . " -r 1 -ss 00:00:05 -s " . $width . "x" . $height . " -an -qscale 1 " . $new_path);
}

if(is_dir($thumbsfolder)){
rm_dirs($thumbsfolder);
}

$files=array();
$files = get_image_files($images_folder);
foreach($files as $file){
create_image_thumb($file, 50, 50);
}

$files=array();
$files = get_video_files($images_folder);
foreach($files as $file){
create_video_thumb($file, 330, 520);
}

$files=array();
$files = get_video_files($videos_folder);
foreach($files as $file){
create_video_thumb($file, 370, 598,True);
}
?>