Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Publish PyConFR slides.

  • Loading branch information...
commit 1db6e9db0dccae4d9e9b515150cc0557c7cd1c82 1 parent 65769b4
@SimonSapin authored
View
2  exyr/__init__.py
@@ -115,7 +115,7 @@ def stylesheet():
return app.response_class(css, mimetype='text/css')
-STATIC_EXTENSIONS = ('.jpg', '.png', '.html', '.css', '.pdf')
+STATIC_EXTENSIONS = ('.jpg', '.png', '.svg', '.html', '.css', '.pdf')
# the repr() of a tuple matches the micro-syntax used by `any`
# http://werkzeug.pocoo.org/documentation/dev/routing.html#werkzeug.routing.AnyConverter
View
12 exyr/pages/2012/weasyprint-at-pyconfr.markdown
@@ -10,8 +10,7 @@ summary: |
I’ll be at PyConFR in Paris this weekend, September 15th and 16th.
I’ll be [giving a talk](http://www.pycon.fr/2012/schedule/presentation/16/)
Sunday 16th at noon, on [WeasyPrint](http://weasyprint.org/) and CSS for print.
-The talk will be in French, but the slides in English. I’ll post them here
-afterwards.
+I’ll post the slides here afterwards.
See you there!
@@ -25,3 +24,12 @@ make it look nice on A4. You can regenerate the same PDF with:
:::sh
weasyprint http://www.pycon.fr/2012/schedule/ PyConFR_2012_schedule.pdf \
-s http://exyr.org/2012/weasyprint-at-pyconfr/print.css
+
+**Update 2012-09-17**:
+I think the talk was a success although I forgot a few details. The slides
+are below (or <a href="embedder.html#slides.html">fullscreen</a>), with notes
+paraphrasing what I said “on stage”.
+
+<iframe
+ src="embedder.html#slides.html"
+ width="736" height="750" style="border: 2px solid black"></iframe>
View
BIN  exyr/pages/2012/weasyprint-at-pyconfr/CSS21-intro.pdf
Binary file not shown
View
45 exyr/pages/2012/weasyprint-at-pyconfr/embedder.html
@@ -6,6 +6,9 @@
<div id="slides">
<iframe allowfullscreen mozallowfullscreen webkitallowfullscreen></iframe>
</div>
+<div id="notes">
+ <p id="content"></p>
+</div>
<div id="controls">
<button title="prev" id="back" onclick="Dz.back()">&#9664;</button>
<button title="next" id="forward" onclick="Dz.forward()">&#9654;</button>
@@ -23,7 +26,7 @@
height: 100%;
width: 100%;
}
- #slides, #controls {
+ #slides, #controls, #notes {
left: 0;
position: absolute;
right: 0;
@@ -36,9 +39,21 @@
padding: 5px;
}
#slides {
- bottom: 40px;
+ bottom: 206px;
top: 0;
}
+ #notes {
+ bottom: 40px;
+ height: 150px;
+
+ background: #EEE;
+ color: #444;
+ padding: 0 20px;
+ overflow: auto;
+ font: 25px sans-serif;
+ border: 8px solid #555;
+ border-style: solid none;
+ }
iframe {
border: none;
background-color: white;
@@ -98,11 +113,11 @@
count: null,
iframe: null
};
-
+
Dz.init = function() {
this.loadIframe();
}
-
+
Dz.onkeydown = function(aEvent) {
// Don't intercept keyboard shortcuts
if (aEvent.altKey
@@ -142,13 +157,14 @@
this.goFullscreen();
}
}
-
+
Dz.onmessage = function(aEvent) {
if (aEvent.source === this.view) {
var argv = aEvent.data.split(" "), argc = argv.length;
argv.forEach(function(e, i, a) { a[i] = decodeURIComponent(e) });
if (argv[0] === "CURSOR" && argc === 2) {
var cursor = argv[1].split(".");
+ this.postMsg(this.view, "GET_NOTES");
this.idx = ~~cursor[0];
this.step = ~~cursor[1];
$("#slideidx").value = this.idx;
@@ -159,11 +175,14 @@
$("#slidecount").innerHTML = this.count = argv[2];
document.title = argv[1];
}
+ if (argv[0] === "NOTES" && argc === 2) {
+ $("#notes > #content").innerHTML = this.notes = argv[1];
+ }
}
}
-
+
/* Get url from hash or prompt and store it */
-
+
Dz.getUrl = function() {
var u = window.location.hash.split("#")[1];
if (!u) {
@@ -179,7 +198,7 @@
}
return u;
}
-
+
Dz.loadIframe = function() {
this.iframe = $("iframe");
this.iframe.src = this.url = this.getUrl();
@@ -188,15 +207,15 @@
Dz.postMsg(Dz.view, "REGISTER");
}
}
-
+
Dz.toggleContent = function() {
this.postMsg(this.view, "TOGGLE_CONTENT");
}
-
+
Dz.onhashchange = function() {
this.loadIframe();
}
-
+
Dz.back = function() {
this.postMsg(this.view, "BACK");
}
@@ -225,7 +244,7 @@
window.open(this.url + "#" + this.idx, '', 'width=800,height=600,personalbar=0,toolbar=0,scrollbars=1,resizable=1');
}
}
-
+
Dz.postMsg = function(aWin, aMsg) { // [arg0, [arg1...]]
aMsg = [aMsg];
for (var i = 2; i < arguments.length; i++)
@@ -249,7 +268,7 @@
Function.prototype.bind = function (oThis) {
// closest thing possible to the ECMAScript 5 internal IsCallable
- // function
+ // function
if (typeof this !== "function")
throw new TypeError(
"Function.prototype.bind - what is trying to be fBound is not callable"
View
20 exyr/pages/2012/weasyprint-at-pyconfr/slides.html
@@ -53,7 +53,7 @@ <h1 style="margin-bottom: 0"><img alt=WeasyPrint
</section>
<section>
- <h2>Flask-WeasyPrint</h2>
+ <h2>Flask-WeasyPrint (<a href="frozen_demo/foo/index.html">demo</a>)</h2>
<pre><code
>from flask_weasyprint import render_pdf
<span style="color: #888">from flask import Flask
@@ -66,7 +66,6 @@ <h1 style="margin-bottom: 0"><img alt=WeasyPrint
@app.route("/hello.pdf")
def hello_pdf():
return render_pdf("/hello")</code></pre>
-<!-- TODO: uncomment <p><a href="frozen_demo/foo/index.html">Demo</a></p>-->
<details>
Once you have that, PDF is easy.<br>
WeasyPrint: like the <em>print</em> function of your browser, but with
@@ -145,11 +144,9 @@ <h1 style="margin-bottom: 0"><img alt=WeasyPrint
<section>
<h2>Examples</h2>
<p><a href="PyConFR_2012_schedule.pdf">PyConFR 2012 schedule</a></p>
- <p>
- <!-- TODO: switch back to the absolute URL before uploading.
- <a href="http://weasyprint.org/samples/CSS21-intro.pdf">-->
- <a href="CSS21-intro.pdf">CSS 2.1 intro</a></p>
- <p><a href="http://www.webstandards.org/files/acid2/test.html">Acid2</a>
+ <p><a href="http://weasyprint.org/samples/CSS21-intro.pdf">
+ CSS 2.1 intro</a></p>
+ <p><a href="http://weasyprint.org/#acid2">Acid2</a>
<img src=images/acid2-small.png
style="vertical-align: middle; margin: 0 3em 0 .5em"></p>
<details>
@@ -295,6 +292,12 @@ <h1 style="margin-bottom: 0"><img alt=WeasyPrint
<li>BSD license</li>
</ul>
<details>
+ In spite of CSS’s inherent complexity, we try to keep the engine
+ simple. (Especially compared to a Gecko or a WebKit.)<br>
+ Python 2 & 3 with the same code base. Not using
+ <a href="http://pypi.python.org/pypi/six">six</a>,
+ but a custom 100-lines <code>compat.py</code> file.<br>
+ It’s open source and free software.
</details>
</section>
@@ -307,6 +310,9 @@ <h1 style="margin-bottom: 0"><img alt=WeasyPrint
<a href="http://community.kozea.fr/">community.kozea.fr</a><br>
IRC: ##kozea @ Freenode
</footer>
+ <details>
+ Come and chat with us!
+ </details>
</section>
<script src="prism.js"></script>
Please sign in to comment.
Something went wrong with that request. Please try again.