Browse Source

initial version of the BaySec website..

Feel free to suggest better layout, etc..
main
John-Mark Gurney 3 years ago
commit
f4564c4e6e
26 changed files with 936 additions and 0 deletions
  1. +3
    -0
      .gitignore
  2. +4
    -0
      README.md
  3. +5
    -0
      content/atom.xml
  4. +15
    -0
      content/calendar.ics
  5. +11
    -0
      content/index.html
  6. +468
    -0
      content/media/css/site.css
  7. +59
    -0
      content/media/css/syntax.css
  8. BIN
      content/media/images/apple-touch-icon.png
  9. BIN
      content/media/images/favicon.ico
  10. +13
    -0
      content/media/js/libs/dd_belatedpng.js
  11. +16
    -0
      content/media/js/libs/jquery-1.5.1.min.js
  12. +1
    -0
      content/media/js/libs/meta.yaml
  13. +2
    -0
      content/media/js/libs/modernizr-1.7.min.js
  14. +1
    -0
      content/media/meta.yaml
  15. +14
    -0
      content/meetups/2016-12-13-December.html
  16. +3
    -0
      content/meetups/meta.yaml
  17. +3
    -0
      info.yaml
  18. +14
    -0
      layout/analytics.j2
  19. +49
    -0
      layout/atom.j2
  20. +94
    -0
      layout/base.j2
  21. +67
    -0
      layout/blog.j2
  22. +4
    -0
      layout/devmode.j2
  23. +13
    -0
      layout/listing.j2
  24. +45
    -0
      layout/macros.j2
  25. +1
    -0
      notes.txt
  26. +31
    -0
      site.yaml

+ 3
- 0
.gitignore View File

@@ -0,0 +1,3 @@
.hyde_deps
deploy
*.pyc

+ 4
- 0
README.md View File

@@ -0,0 +1,4 @@
BaySec Website Source
=====================

Source to build the BaySec website.

+ 5
- 0
content/atom.xml View File

@@ -0,0 +1,5 @@
===
title: BaySec Event feed
extends: atom.j2
listable: false
===

+ 15
- 0
content/calendar.ics View File

@@ -0,0 +1,15 @@
BEGIN:VCALENDAR
METHOD:PUBLISH
VERSION:2.0
PRODID:-//BaySec Creations//Hyde Jinja2 Templates 0.1//EN
{% for post in resource.node.walk_resources_sorted_by_time() %}
{% if post.meta.event_summary %}
BEGIN:VEVENT
SUMMARY:{{ post.meta.event_summary }}
LOCATION:{{ post.meta.event_location }}
DTSTART{% if post.meta.event_timezone %};TZID={{ post.meta.event_timezone }}{% endif %}:{{ post.meta.event_start }}
DTEND{% if post.meta.event_timezone %};TZID={{ post.meta.event_timezone }}{% endif %}:{{ post.meta.event_end }}
END:VEVENT
{% endif %}
{% endfor %}
END:VCALENDAR

+ 11
- 0
content/index.html View File

@@ -0,0 +1,11 @@
---
title: BaySec
description: SF Bay Area Security Professionals Meetup
extends: listing.j2
default_block: test
listable: false
---
{% block page_title %}
BaySec is a meetup for security professionals that happens the third Tuesday of each month.
An <a href="/calendar.ics">ICS calendar</a> is available.
{% endblock %}

+ 468
- 0
content/media/css/site.css View File

@@ -0,0 +1,468 @@
* {
vertical-align: baseline;
font-weight: inherit;
font-family: inherit;
font-style: inherit;
text-decoration:inherit;
font-size: 100%;
padding: 0;
border: 0;
margin: 0;
}

article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
display:block;
}

table {
border-collapse: collapse;
}

:focus {
outline: 0;
}

::-moz-focus-inner {
border: 0;
}

.clear {
clear: both;
}

/* clearfix */
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}

.clearfix {
display: block;
}


* html .clearfix {
height: 1%;
}

a {
color: #37e;
text-decoration: underline;
}

a:hover{
color: #222;
}

body{
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: #efefef;
padding: 0;
margin: 0;
}

#container{
background-color: #eaeaea;
width: 640px;
margin: 0 auto;
padding: 12px;
-moz-box-shadow: 0px 4px 12px #ccc; /* FF3.5+ */
-webkit-box-shadow: 0px 4px 12px #ccc; /* Saf3.0+, Chrome */
box-shadow: 0px 4px 12px #ccc; /* Opera 10.5, IE 9.0 */
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=12px, OffY=12px, Color='#ccc'); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=12px, OffY=12px, Color='#ccc')"; /* IE8 */
}

footer{
font-size: 10px;
text-align: center;
margin-top: 24px;
}

/* Button styles from the awesome: http://www.webdesignerwall.com/demo/css-buttons.html */

.button {
display: inline-block;
zoom: 1; /* zoom and *display = ie7 hack for display:inline-block */
*display: inline;
vertical-align: baseline;
margin: 0 2px;
outline: none;
cursor: pointer;
text-align: center;
text-decoration: none;
font: 14px/100% Arial, Helvetica, sans-serif;
padding: .5em 2em .55em;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
border-radius: .5em;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.button:hover {
text-decoration: none;
}
.button:active {
position: relative;
top: 1px;
}

.bigrounded {
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
.medium {
font-size: 12px;
padding: .4em 1.5em .42em;
}
.small {
font-size: 11px;
padding: .2em 1em .275em;
}


/* white */
.white {
color: #606060;
border: solid 1px #b7b7b7;
background: #fff;
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed));
background: -moz-linear-gradient(top, #fff, #ededed);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed');
}
.white:hover {
background: #ededed;
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#dcdcdc));
background: -moz-linear-gradient(top, #fff, #dcdcdc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dcdcdc');
}
.white:active {
color: #999;
background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#fff));
background: -moz-linear-gradient(top, #ededed, #fff);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#ffffff');
}

.banner{
border-bottom: 12px solid #222;
padding: 0 12px;
position: relative;
}

.banner h1{
font-weight: 100;
font-size: 32px;
line-height: 48px;
}


.banner h3{
color: #666;
font-weight: normal;
font-size: 16px;
line-height: 24px;
margin-bottom: 12px;
}

.banner nav{
position: absolute;
right: 0;
bottom: 0;
}

.banner nav li{
list-style-type: none;
float: left;
}

.banner nav li a.button{
margin:0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
-moz-border-radius-bottomleft: 0;
-moz-border-radius-bottomright: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}

.banner nav li a.button:hover{
color: #000;
}
.banner nav li a.button.active{
color: #d7d7d7;
border: solid 1px #333;
background: #333;
background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#000));
background: -moz-linear-gradient(top, #666, #000);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#666666', endColorstr='#000000');
}

.blog_excerpt{
padding-bottom: 24px;
}

.blog_excerpt .post time{
float: none;
clear: left;
}

.blog_excerpt .button{
float: right;
}

.blog_excerpt h3,
h1.title{
font-size: 24px;
line-height: 36px;
border-bottom: 1px solid #ccc;
}

.blog_excerpt h3{
margin-bottom: 24px;
}

section.content{
padding: 12px;
}

/* listing */

.listing{
margin-top: 24px;
}

.listing img{
width: 120px;
height: 120px;
}

.listing li{
background-color: #ededed;
list-style-type: none;
float: left;
width: 272px;
margin-right: 24px;
margin-bottom: 24px;
padding: 12px;
-moz-box-shadow: 0px 4px 12px #ccc; /* FF3.5+ */
-webkit-box-shadow: 0px 4px 12px #ccc; /* Saf3.0+, Chrome */
box-shadow: 0px 4px 12px #ccc; /* Opera 10.5, IE 9.0 */
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=12px, OffY=12px, Color='#ccc'); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=12px, OffY=12px, Color='#ccc')"; /* IE8 */

}

.listing li:nth-child(2){
margin-right: 0;
}

.listing li:nth-child(3){
clear: left;
}

.listing li p{
font-size: 10px;
line-height: 12px;
margin-bottom: 12px;
}


.listing h3{
font-size: 16px;
line-height: 20px;
}

.listing time{
display:block;
border-top: 1px solid #ccc;
padding-top: 4px;
font-size: 10px;
}

/* Content */

article.post p{
font-size: 12px;
line-height: 24px;
margin: 6px 0;
}

article.post img{
display: block;
margin-bottom: 24px;
}

.post time{
font-size: 12px;
color: #999;
float:left;
margin-top: 6px;
}

ul.tags{
margin-bottom: 24px;
text-align: right;
}

ul.tags li{
list-style-type: none;
display: inline;
}

ul.tags li a{
color: #999;
text-decoration: none;
}

h1.tag:before,
ul.tags li a:before{
content: '\00AB';
}

h1.tag:after,
ul.tags li a:after{
content: '\00BB';
}

ul.tags li a:hover{
color: #222;
}

h1 a, h2 a, h3 a{
text-decoration: none;
}

nav.post_nav{
background-color: #efefef;
position: fixed;
width: 124px;
margin-left: -186px;
font-size: 12px;
padding: 12px;
padding-right: 24px;
-moz-box-shadow: 0px 2px 4px #ccc; /* FF3.5+ */
-webkit-box-shadow: 0px 2px 4px #ccc; /* Saf3.0+, Chrome */
box-shadow: 0px 2px 4px #ccc; /* Opera 10.5, IE 9.0 */
filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=12px, OffY=12px, Color='#ccc'); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=12px, OffY=12px, Color='#ccc')"; /* IE8 */

}

a.backlink{
display:block;
line-height: 24px;
margin-bottom: 12px;
}

a.backlink:before{
content: '\2190';
}

a.prev:before{
content: '\00AB';
}

a.next:after{
content: '\00BB';
}

a.prev{
margin-right: 12px;
}

a.prev,
a.next{
display: block;
float: left;
margin-bottom: 12px;
}

a.next{ float: right };

a.backlink:hover, a.prev:hover, a.next:hover{
color: #222;
}

.post_nav a.disabled{
color: #ccc;
}

.post_nav a{
color: #666;
text-decoration: none;
}

.post_nav div{
display: block;
float: left;
width: 58px;
overflow: hidden;
margin-left: 4px;
}

#facebook_like{
margin-top: 1px;
}

.archives ul.posts{
margin-top: 24px;
}

.archives li.post{
list-style-type: none;
border-bottom: 1px dotted #ccc;
padding: 12px 0;

}

.archives li.post time{
color: #999;
margin-right: 24px;
display:block;
float: left;
width: 120px;
}

.archives li.post a{
float: left;
}

.archives ul.tags{
float: right;
margin-bottom:0;
}


.codebox {
margin-top: 8px;
margin-bottom: 12px;
}
.code {
position: relative;
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
-o-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
background-color: #F0F3F3;
}
.code figcaption {
font-size: 10px;
position: absolute;
bottom: 3px;
right: 12px;
color: rgba(0, 0, 0, 0.5);
}
.highlight pre {
font-size: 12px;
padding: 16px 12px 12px;
line-height: 24px;
margin-bottom: 8px;
}

+ 59
- 0
content/media/css/syntax.css View File

@@ -0,0 +1,59 @@
.c, .cm { color: #998; font-style: italic } /* Comments */
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
.k { font-weight: bold } /* Keyword */
.o { font-weight: bold } /* Operator */
.cp { color: #999; font-weight: bold } /* Comment.Preproc */
.c1 { color: #998; font-style: italic } /* Comment.Single */
.cs { color: #999; font-weight: bold; font-style: italic } /* Comment.Special */
.gd { color: #000; background-color: #ffdddd } /* Generic.Deleted */
.gd .x { color: #000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.ge { font-style: italic } /* Generic.Emph */
.gr { color: #a00 } /* Generic.Error */
.gh { color: #999 } /* Generic.Heading */
.gi { color: #000; background-color: #ddffdd } /* Generic.Inserted */
.gi .x { color: #000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.go { color: #888 } /* Generic.Output */
.gp { color: #555 } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #aaaaaa } /* Generic.Subheading */
.gt { color: #a00 } /* Generic.Traceback */
.kc { font-weight: bold } /* Keyword.Constant */
.kd { font-weight: bold } /* Keyword.Declaration */
.kp { font-weight: bold } /* Keyword.Pseudo */
.kr { font-weight: bold } /* Keyword.Reserved */
.kt { color: #445588; font-weight: bold } /* Keyword.Type */
.m { color: #099 } /* Literal.Number */
.s { color: #d14 } /* Literal.String */
.na { color: #008080 } /* Name.Attribute */
.nb { color: #0086B3 } /* Name.Builtin */
.nc { color: #445588; font-weight: bold } /* Name.Class */
.no { color: #008080 } /* Name.Constant */
.ni { color: #800080 } /* Name.Entity */
.ne { color: #900; font-weight: bold } /* Name.Exception */
.nf { color: #900; font-weight: bold } /* Name.Function */
.nn { color: #555 } /* Name.Namespace */
.nt { color: #000080 } /* Name.Tag */
.nv { color: #008080 } /* Name.Variable */
.ow { font-weight: bold } /* Operator.Word */
.w { color: #bbb } /* Text.Whitespace */
.mf { color: #099 } /* Literal.Number.Float */
.mh { color: #099 } /* Literal.Number.Hex */
.mi { color: #099 } /* Literal.Number.Integer */
.mo { color: #099 } /* Literal.Number.Oct */
.sb { color: #d14 } /* Literal.String.Backtick */
.sc { color: #d14 } /* Literal.String.Char */
.sd { color: #d14 } /* Literal.String.Doc */
.s2 { color: #d14 } /* Literal.String.Double */
.se { color: #d14 } /* Literal.String.Escape */
.sh { color: #d14 } /* Literal.String.Heredoc */
.si { color: #d14 } /* Literal.String.Interpol */
.sx { color: #d14 } /* Literal.String.Other */
.sr { color: #009926 } /* Literal.String.Regex */
.s1 { color: #d14 } /* Literal.String.Single */
.ss { color: #990073 } /* Literal.String.Symbol */
.bp { color: #999 } /* Name.Builtin.Pseudo */
.vc { color: #008080 } /* Name.Variable.Class */
.vg { color: #008080 } /* Name.Variable.Global */
.vi { color: #008080 } /* Name.Variable.Instance */
.il { color: #099 } /* Literal.Number.Integer.Long */


BIN
content/media/images/apple-touch-icon.png View File

Before After
Width: 57  |  Height: 57  |  Size: 640B

BIN
content/media/images/favicon.ico View File

Before After

+ 13
- 0
content/media/js/libs/dd_belatedpng.js
File diff suppressed because it is too large
View File


+ 16
- 0
content/media/js/libs/jquery-1.5.1.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
content/media/js/libs/meta.yaml View File

@@ -0,0 +1 @@
uses_template: false

+ 2
- 0
content/media/js/libs/modernizr-1.7.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
content/media/meta.yaml View File

@@ -0,0 +1 @@
extends: false

+ 14
- 0
content/meetups/2016-12-13-December.html View File

@@ -0,0 +1,14 @@
---
title: December 2016 Baysec
layout: patriothouse
event_summary: Baysec
event_timezone: America/Los_Angeles
event_start: 20161220T190000
event_end: 20161220T230000
event_location: Patriot House Pub
created: !!timestamp '2016-12-14 01:00:00'
---

# December 20th, 2016

Starts at 7pm at Patriot House Pub.

+ 3
- 0
content/meetups/meta.yaml View File

@@ -0,0 +1,3 @@
extends: blog.j2
default_block: post
listable: true

+ 3
- 0
info.yaml View File

@@ -0,0 +1,3 @@
author: Lakshmi Vyasarajan
description: A basic layout for hyde. Based on html5 boilerplate
version: 0.1

+ 14
- 0
layout/analytics.j2 View File

@@ -0,0 +1,14 @@
{% if site.config.mode == "production" %}
<!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet
change the UA-XXXXX-X to be your site's ID -->
<script>
var _gaq = [['_setAccount', '{{ resource.meta.analytics.id }}'], ['_trackPageview']];
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
{% endif %}

+ 49
- 0
layout/atom.j2 View File

@@ -0,0 +1,49 @@
{% from "macros.j2" import render_excerpt, render_post with context %}
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>
{% block title %}{{ resource.meta.title|default(feed_title) }}{% endblock %}
</title>
{% block self_url %}
<link href="{{ resource.url }}" rel="self" />
{% endblock %}

{% block site_url %}
<link href="{{ content_url('') }}"/>
{% endblock %}

{% block feed_extra %}
{% endblock %}

<updated>{{ time_now|xmldatetime }}</updated>

<id>{{ content_url(resource.url) }}/</id>

{% for res in resource.node.walk_resources_sorted_by_time() %}
<entry>
<title type="html">{{ res.meta.title|forceescape }}</title>
<author><name>{{ res.meta.author }}</name></author>
<link href="{{ content_url(res.url) }}"/>
<updated>{{ res.meta.created|xmldatetime }}</updated>
<published>{{ res.meta.created|xmldatetime }}</published>
<id>{{ content_url(res.url) }}</id>
{% for tag in res.meta.tags %}
<category scheme="{{ content_url('blog/tags') }}"
term="{{tag}}"
label="{{ tag|title }}" />
{% endfor %}

<content type="html">
{% refer to res.relative_path as article -%}
{% filter forceescape -%}
{% if resource.meta.excerpts_only -%}
{{ article.image|markdown|typogrify }}
{{ article.excerpt|markdown|typogrify }}
{%- else %}
{{ article.post|markdown|typogrify }}
{%- endif %}
{%- endfilter %}
</content>
</entry>
{% endfor %}
</feed>

+ 94
- 0
layout/base.j2 View File

@@ -0,0 +1,94 @@
<!doctype html>
<!-- https://github.com/paulirish/html5-boilerplate/blob/master/index.html -->
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<head>
{% block starthead %}{% endblock starthead %}
<meta charset="{{ resource.meta.charset }}">

<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="{{ resource.meta.compatibility }}">

<!-- encoding must be specified within the first 512 bytes
www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset -->

<!-- meta element for compatibility mode needs to be before
all elements except title & meta
msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx -->
<!-- Chrome Frame is only invoked if meta element for
compatibility mode is within the first 1K bytes
code.google.com/p/chromium/issues/detail?id=23003 -->

<title>{% block title %}{{ resource.meta.title }}{% endblock %}</title>
<meta name="description" content="{{ resource.meta.description }}">
<meta name="author" content="{{ resource.meta.author }}">

<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="{{ resource.meta.viewport }}">

{% block favicons %}
<!-- Place favicon.ico & apple-touch-icon.png
in the root of your domain and delete these references -->
<link rel="shortcut icon" href="{{ media_url('/images/favicon.ico') }}">
<link rel="apple-touch-icon" href="{{ media_url('/images/apple-touch-icon.png') }}">
{% endblock favicons %}

{% block css %}
<link rel="stylesheet" href="{{ media_url('css/site.css') }}">
<link rel="stylesheet" href="{{ media_url('css/syntax.css') }}">
{% endblock css %}

{% block headjs %}
<!-- All JavaScript at the bottom, except for Modernizr which
enables HTML5 elements & feature detects -->
<script src="{{ media_url('js/libs/modernizr-1.7.min.js') }}"></script>
{% endblock headjs %}
{% block endhead %}{% endblock endhead %}
</head>
<body id="{{ resource.meta.id if resource.meta.id else resource.slug }}">
{% block content %}
<div id="container">
{% block container %}
<div id="main" role="main">
<header class="banner clearfix">
{% block header -%}
<h1>BaySec</h1>
<h3>SF Bay Area Security Professional Meetup</h3>
{%- endblock %}
</header>
<section class="content">
{% block main %}
{% endblock main %}
</section>
</div>
{% endblock container %}
</div> <!--! end of #container -->
<footer>
Powered by <a href="https://github.com/hyde/hyde">hyde</a>.
</footer>
{% endblock content%}
{% block js %}
<!-- Javascript at the bottom for fast page loading -->
{% block jquery %}
<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.5.1.min.js">\x3C/script>')</script>
{% endblock jquery %}

{% block scripts %}
{% endblock scripts %}


<!--[if lt IE 7 ]>
<script src="js/libs/dd_belatedpng.js"></script>
<script>DD_belatedPNG.fix('img, .png_bg'); // Fix any <img> or .png_bg bg-images. Also, please read goo.gl/mZiyb </script>
<![endif]-->

{% block analytics %}
{% include "analytics.j2" %}
{% endblock analytics %}

{% endblock js %}
</body>
</html>

+ 67
- 0
layout/blog.j2 View File

@@ -0,0 +1,67 @@
{% extends "base.j2" %}

{% block main -%}
<article class="post">
<nav class="post_nav">
<a class="backlink" href="/">Back to list</a>
<a class="prev{{' disabled' if not resource.prev_by_time }}"
title="{{ resource.prev_by_time.meta.title }}"
{% if resource.prev_by_time %}
href="{{ content_url(resource.prev_by_time.url) }}"{% endif %}>
Previous
</a>

<a class="next{{' disabled' if not resource.next_by_time }}"
title="{{ resource.next_by_time.meta.title }}"
{% if resource.next_by_time %}
href="{{ content_url(resource.next_by_time.url) }}"{% endif %}>
Next
</a>

<br>
<div id="twitter_share">
<a href="https://twitter.com/share"
class="twitter-share-button"
data-count="vertical"
data-via="{{ tweet_via }}">Tweet</a>
<script type="text/javascript"
src="https://platform.twitter.com/widgets.js"></script>
</div>
<div id="facebook_like">
<iframe src="https://www.facebook.com/plugins/like.php?href&amp;layout=box_count&amp;show_faces=false&amp;width=450&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=65"
scrolling="no"
frameborder="0"
style="border:none; overflow:hidden; width:450px; height:65px;"
allowTransparency="true"></iframe>
</div>
</nav>
<h1 class="title">
<a href="{{ content_url(resource.url) }}">
{{ resource.meta.title }}
</a>
</h1>
<time datetime="{{ resource.meta.created.strftime('%Y-%m-%d') }}">
Posted: {{ resource.meta.created.strftime('%a, %d %b %Y') }}
</time>

{% if resource.meta.tags %}
<ul class="tags clear">
{% for tag in resource.meta.tags %}
<li>
<a class="small" href="{{ content_url('blog/tags/'~tag~'.html') }}">
{{ tag }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
<div class="clear"/>
<br/>
{% filter markdown|typogrify -%}
{% mark post -%}
{% block post -%}{%- endblock %}
{%- endmark %}
{%- endfilter %}
</article>

{%- endblock %}

+ 4
- 0
layout/devmode.j2 View File

@@ -0,0 +1,4 @@
{%if not site.config.mode == "production" %}
<script src="js/profiling/yahoo-profiling.min.js"></script>
<script src="js/profiling/config.js"></script>
{% endif %}

+ 13
- 0
layout/listing.j2 View File

@@ -0,0 +1,13 @@
{% extends "base.j2" %}
{% from "macros.j2" import render_link with context %}
{% block main %}
{% block page_title %}<h1 class="title">{{ resource.meta.title }}</h1>{% endblock %}

<ul class="listing clearfix">
{% for res in resource.node.walk_resources_sorted_by_time() %}
<li>
{{ render_link(res) }}
</li>
{% endfor %}
</ul>
{% endblock %}

+ 45
- 0
layout/macros.j2 View File

@@ -0,0 +1,45 @@
{% macro render_link(res, class=None) %}
{% refer to res.relative_path as post %}
<h3><a href="{{ content_url(res.url) }}">{{ res.meta.title }}</a></h3>
{% endmacro %}

{% macro render_excerpt(res, class=None) %}
{% refer to res.relative_path as post %}
<article {{'class='~class if class }}>
<h3><a href="{{ content_url(res.url) }}">{{ res.meta.title }}</a></h3>
<a href="{{ content_url(res.url) }}">{{ post.image|markdown|typogrify }}</a>
{{ post.excerpt|markdown|typogrify }}
<time datetime="{{ res.meta.created.strftime('%Y-%m-%d') }}">
Posted: {{ res.meta.created.strftime('%a, %d %b %Y') }}
</time>
</article>
{% endmacro %}

{% macro render_nav(menu, cls=None) -%}
{% if menu -%}
<nav {{'class='~cls if cls }}>
<ul>
{% for item in menu -%}
{% set active = False -%}
{% if item.type == 'page' -%}
{% set active = (resource.url ==
site.content.resource_from_relative_path(item.url).url) -%}
{% else -%}
{% set active = (node ==
site.content.node_from_relative_path(item.url)) -%}
{%- endif %}
{% set classes = ['button', 'white'] -%}
{% do classes.append('active') if active -%}
{% do classes.append(item.css_class) if item.css_class -%}
<li>
<a title="{{ item.description }}"
class="{{ classes|join(' ') }}"
href="{{ content_url(item.url) }}">
{{ item.name }}
</a>
</li>
{%- endfor %}
</ul>
</nav>
{%- endif %}
{%- endmacro %}

+ 1
- 0
notes.txt View File

@@ -0,0 +1 @@
For debugging: http://stackoverflow.com/questions/13436841/display-all-jinja-object-attributes

+ 31
- 0
site.yaml View File

@@ -0,0 +1,31 @@
mode: development
media_root: media # Relative path from content folder.
media_url: /media # URL where the media files are served from.
base_url: / # The base url for autogenerated links.
plugins:
- hyde.ext.plugins.meta.MetaPlugin
- hyde.ext.plugins.meta.AutoExtendPlugin
- hyde.ext.plugins.meta.SorterPlugin
- hyde.ext.plugins.text.SyntextPlugin
- hyde.ext.plugins.text.TextlinksPlugin
context:
data:
tweet_via: encthenet
meta:
nodemeta: meta.yaml
created: !!timestamp 2010-01-01 00:00:00
author: John-Mark Gurney
sorter:
time:
attr:
- meta.created
reverse: true
filters:
source.kind: html
meta.listable: true
publisher:
github:
type: hyde.ext.publishers.dvcs.Git
path: .
url: git@github.com:baysec/baysec.git
branch: gh-pages

Loading…
Cancel
Save