Skip to content

Commit

Permalink
use liquid
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb committed May 10, 2016
1 parent 7ecb1f2 commit b0488cb
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 27 deletions.
4 changes: 2 additions & 2 deletions csss.txt
Expand Up @@ -14,8 +14,8 @@
# http://groups.google.com/group/wwwmake


__file__.html slides.html.erb
__file__.css talk.css.erb
__file__.html slides.html
__file__.css style.css


# js machinery
Expand Down
57 changes: 34 additions & 23 deletions slides.html.erb → slides.html
@@ -1,30 +1,42 @@
---
---

{% if jekyll %}
{% assign headers = site.headers %}
{% assign slides = site.slides %}
{% assign style_css = 'style.css' %}
{% else %}
{% capture style_css %}{{ name }}.css{% endcapture %}
{% endif %}


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="generator" content="Slide Show (S9); see slideshow.rubyforge.org">
<meta name="author" content="<%= @headers['author']%>">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="generator" content="{{ headers['generator'] }}">
<meta name="author" content="{{ headers['author'] }}">

<title><%= @headers['title'] %></title>
<title>{{ headers['title'] }}</title>

<!-- Don't alter this, CSSS needs it to work -->
<link href="slideshow.css" rel="stylesheet" />
<link href="slideshow.css" rel="stylesheet">

<!-- Theme-specific styles go here (themes can be reused in multiple talks) -->
<link href="theme.css" rel="stylesheet" />
<link href="theme.css" rel="stylesheet">

<!-- Talk-specific styles go here -->
<!-- GB: changed fixed name (talk.css) to variable -->
<link href="<%= "#{@name}.css" %>" rel="stylesheet" />
<!-- GB: changed fixed name (style.css) to variable -->
<link href="{{ style_css }}" rel="stylesheet">

</head>
<!-- GB: todo: add duration header/property -->
<body data-duration="45">

<header id="intro" class="slide">
<h1><%= @headers['title'] %></h1>
<p class="attribution">By <%= @headers['author']%></p>
<h1>{{ headers['title'] }}</h1>
<p class="attribution">By {{ headers['author'] }}</p>
</header>

<section class="slide" id="navigation">
Expand All @@ -43,27 +55,26 @@ <h2>CSSS Navigation</h2>

<section class="slide">
<h2>CSSS Navigation Cont.</h2>

<p>Thumbnail view</p>
<ul>
<li>Press Ctrl+H (or Shift+H if you're in Opera) now.</li>
<li>Press Ctrl+Shift+H to see all slides (warning: can be slow!)</li>
</ul>

<p>Presenter view</p>
<ul>
<li>This slide has presenter notes. They are only visible in presenter view (Ctrl+P or Shift+P).</li>
</ul>
<p class="presenter-notes">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p class="presenter-notes">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

</section>

<!-- note: assumes no header (breaking slides w/ SLIDE directive) -->
<% @slides.each do |slide| %>
{% for slide in slides %}
<section class="slide">
<%= slide.content %>
{{ slide.content }}
</section>
<% end %>
{% endfor %}


<!--
Expand All @@ -84,8 +95,8 @@ <h2>Thank you!</h2>
<script src="plugins/css-controls.js"></script>
-->
<script>var slideshow = new SlideShow();
<%= content_for :js %>
{{ more_content_for_js }}
</script>

</body>
</html>
</html>
7 changes: 5 additions & 2 deletions talk.css.erb → style.css
@@ -1,3 +1,6 @@
---
---

#intro {
background: rgba(0,0,0,.7);
padding: 0;
Expand Down Expand Up @@ -33,11 +36,11 @@
object[type="image/svg+xml"] {
display: none;
}

#intro h1 {
background: url(logo.svg) no-repeat center;
background-size:100% auto;
}
}

<%= content_for :css %>
{{ more_content_for_css }}

0 comments on commit b0488cb

Please sign in to comment.