Commit 5470189a authored by JackV's avatar JackV
Browse files

Merge remote-tracking branch 'origin2/master'

parents 78f47ab7 21c41571
[submodule "reveal.js"]
path = reveal.js
url = https://gitlab.poul.org/corsi/reveal.js
branch = poul
# POuL reveal.js template
This is a base template that will allow you to make state-of-art presentations
using advanced technologies such as Markdown, reveal.js (thus the
industry-standard language JavaScript), still complying with the mandatory
design guidelines.
## Getting Started
In order for the slides to work (ie. display anything) you need to run:
`git submodule update --init --depth 1`
In case you need the mathjax submodule as well
`git submodule update --init --depth 1 --recursive`
## How do I use this thing?
### Where do I write my stuff?
[Download][download] this repo and put your content inside the 'content.md'
file placed in the root of this directory. What were you expecting?
### How do I write my stuff?
Using a text editor and typing Markdown syntax on your keyboard.
[Here][markdown-guide] you can find a comprehensive guide to the syntax.
Remember to use three dashes (`---`) to create a new slide horizontally and
four dashes (`----`) to create a new one vertically.
### How do I see my stuff?
Make sure you have Python 3 installed. Nothing more is required.
Make the deploy.py script executable with
chmod +x deploy.py
Then just run
./deploy.py --show
A new tab will open in your default browser showing the presentation.
You can spacify your browser using the `BROWSER` environment variable.
BROWSER=surf ./deploy.py --show
You can see what kind of trickery this script is able to do running it with the
`-h` or `--help` flag.
#### Why?
This is required since modern browsers won't allow you to include a local file
(the Markdown document) from JavaScript.
The Python script will run a small HTTP server and fix this issue.
## How do I make a PDF out of the slides?
Append `?print-pdf` at the end of the URL.
For instance if you're running the `deploy.py` script locally the URL will be
something like `http://127.0.0.1:8080/?print-pdf`.
Then just use the print function of your browser to make a PDF of the page.
On **Firefox** it is advised to enable *Print Backgrounds* under the *Options* tab,
to select paper size *Choukei 2 Envelope* and *Landscape* orientation.
[download]: https://gitlab.poul.org/corsi/revealjs-poul/repository/archive.zip?ref=master
[markdown-guide]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
# Intro e outro dentro l'HTML
Il markdown contiene solo il contenuto.
Di base si possono fare le slide anche in HTML se si vogliono animazioni buffe.
----
This is a long dash -- made of two little dashes (`--`).
This dash is even longer --- and it is made of three little dashes (`---`).
"Quoting" is fun and easy. `"`Plain quoting`"` is ugly.
----
# Heading level 1
## Heading level 2
### Heading level 3
#### Heading level 4
There are **no** more heading levels.
----
```python
import sys
x = 1 + 2
if x > 2:
pass
try:
with open('/dev/null') as f:
pass
except IOError:
raise Exception('Error!')
finally:
sys.exit()
```
----
- Do you remember bullet list?
```python
bullet_list = ["Do you remember bullet list?"]
```
- You can also allign code to bullet lists!
```python
bullet_list.append("You can also allign code to bullet lists!")
```
- It's not too hard!
```python
if not hard:
bullet_list.append("It's not too hard!")
```
\ No newline at end of file
#!/usr/bin/env python3
import sys
from time import sleep
from threading import Thread
from argparse import ArgumentParser
from socketserver import TCPServer
from http.server import SimpleHTTPRequestHandler as Handler
import webbrowser
DEFAULT_ADDR = '127.0.0.1'
DEFAULT_PORT = 8080
parser = ArgumentParser(description="Serve reveal.js slides.")
parser.add_argument('port', metavar='PORT', type=int, nargs='?',
default=DEFAULT_PORT)
parser.add_argument('--show', action='store_true', default=False,
help="Open in browser.")
arg = parser.parse_args()
def httpd_t():
print("Serving at http://{}:{}".format(DEFAULT_ADDR, arg.port))
s = TCPServer((DEFAULT_ADDR, arg.port), Handler)
s.serve_forever()
def show():
webbrowser.open("http://{}:{}/".format(DEFAULT_ADDR, arg.port))
if __name__ == '__main__':
httpd = Thread(target=httpd_t)
httpd.daemon = True
httpd.start()
if arg.show:
show()
try:
while True:
sleep(60 * 60 * 24)
except (KeyboardInterrupt, SystemExit):
sys.exit(0)
<!doctype html>
<html lang="it">
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style"
content="black-translucent">
<!-- reveal.js base stylesheel. Don't remove nor edit this. -->
<link rel="stylesheet" href="reveal.js/css/reveal.css">
<!-- POuL theme for reveal.js -->
<link rel="stylesheet" href="poul/css/poul.css" id="theme">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="reveal.js/lib/css_highlight/hopscotch.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match(/print-pdf/gi)
? 'reveal.js/css/print/pdf.css' : 'reveal.js/css/print/paper.css';
document.getElementsByTagName('head')[0].appendChild(link);
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section class="intro">
<h1>Corsi Punto Croce 2018</h1>
<h2>Come fare gli orli</h2>
<img src="poul/img/logo-text-white.svg"/>
<p>Autore &lt;email@email.com&gt;</p>
</section>
<section data-markdown="content.md"
data-charset="utf-8"
data-separator="^\r?\n---\r?\n$"
data-separator-vertical="^\r?\n----\r?\n$"
data-separator-notes="^Notes:">
</section>
<section class="outro">
<h1>Thank you!</h1>
<img class="logo" src="poul/img/logo-notext-white.svg"/>
<p>Rilasciato sotto licenza Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International</p>
<img class="cc" src="poul/img/creativecommons-by-nc-sa.svg"/>
<p>Autore &lt;email@email.com&gt;</p>
</section>
</div>
</div>
<script src="reveal.js/lib/js/head.min.js"></script>
<script src="reveal.js/js/reveal.js"></script>
<script>
Reveal.initialize({
controls: false,
slideNumber: true,
history: true,
transition: 'none',
pdfMaxPagesPerSlide: 1,
markdown: {
smartypants: true,
},
keyboard: {
38: 'prev', // Up arrow
40: 'next' // Down arrow
},
math: {
mathjax: 'reveal.js/lib/js/mathjax/MathJax.js',
config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
},
dependencies: [
{
src: 'reveal.js/plugin/markdown/marked.js',
condition: function(){ return !!document.querySelector('[data-markdown]'); }
},
{
src: 'reveal.js/plugin/markdown/markdown.js',
condition: function() { return !!document.querySelector('[data-markdown]'); }
},
{
src: 'reveal.js/plugin/highlight/highlight.js',
async: true,
callback: function() { hljs.initHighlightingOnLoad(); }
},
{
src: 'reveal.js/plugin/notes/notes.js',
async: true
},
{
src: 'reveal.js/plugin/math/math.js',
async: true
}
]
});
</script>
</body>
<!--
vim: tabstop=2 shiftwidth=2 expandtab:
-->
/**
* POuL reveal.js theme.
*
* Forked from the default black theme.
*/
@import url(../../reveal.js/lib/font/source-sans-pro/source-sans-pro.css);
section.has-light-background,
section.has-light-background h1,
section.has-light-background h2,
section.has-light-background h3,
section.has-light-background h4,
section.has-light-background h5,
section.has-light-background h6 {
color: #222; }
/*********************************************
* GLOBAL STYLES
*********************************************/
body {
background: #191919;
background-color: #191919; }
.reveal {
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-size: 38px;
font-weight: normal;
color: #fff; }
::selection {
color: #fff;
background: #fc4a2c;
text-shadow: none; }
.reveal .slides > section,
.reveal .slides > section > section {
line-height: 1.3;
font-weight: inherit; }
/*********************************************
* HEADERS
*********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
margin: 0 0 20px 0;
color: #ffc600;
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-weight: 600;
line-height: 1.2;
letter-spacing: normal;
text-shadow: none;
word-wrap: break-word; }
.reveal h1 {
font-size: 2.5em; }
.reveal h2 {
font-size: 1.6em; }
.reveal h3 {
font-size: 1.3em; }
.reveal h4 {
font-size: 1em; }
.reveal h1 {
text-shadow: none; }
/*********************************************
* OTHER
*********************************************/
.reveal p {
margin: 20px 0;
line-height: 1.3; }
/* Ensure certain elements are never larger than the slide itself */
.reveal img,
.reveal video,
.reveal iframe {
max-width: 95%;
max-height: 95%; }
.reveal strong,
.reveal b {
font-weight: bold;
color: #ffc600; }
.reveal em {
font-style: italic; }
.reveal ol,
.reveal dl,
.reveal ul {
display: inline-block;
text-align: left;
margin: 0 0 0 1em; }
.reveal ol {
list-style-type: decimal; }
.reveal ul {
list-style-type: disc; }
.reveal ul ul {
list-style-type: square; }
.reveal ul ul ul {
list-style-type: circle; }
.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
display: block;
margin-left: 40px; }
.reveal dt {
font-weight: bold; }
.reveal dd {
margin-left: 40px; }
.reveal q,
.reveal blockquote {
quotes: none; }
.reveal blockquote {
display: block;
position: relative;
width: 70%;
margin: 20px auto;
padding: 5px;
font-style: italic;
background: rgba(255, 255, 255, 0.05);
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); }
.reveal blockquote p:first-child,
.reveal blockquote p:last-child {
display: inline-block; }
.reveal q {
font-style: italic; }
.reveal pre {
display: block;
position: relative;
width: 90%;
min-width: 40em;
margin: 20px auto;
text-align: left;
font-size: 0.55em;
font-family: monospace;
line-height: 1.2em;
word-wrap: break-word;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
.reveal code {
font-family: monospace; }
.reveal pre code {
display: block;
padding: 5px;
overflow: auto;
max-height: 400px;
word-wrap: normal; }
.reveal table {
margin: auto;
border-collapse: collapse;
border-spacing: 0; }
.reveal table th {
font-weight: bold; }
.reveal table th,
.reveal table td {
text-align: left;
padding: 0.2em 0.5em 0.2em 0.5em;
border-bottom: 1px solid; }
.reveal table th[align="center"],
.reveal table td[align="center"] {
text-align: center; }
.reveal table th[align="right"],
.reveal table td[align="right"] {
text-align: right; }
.reveal table tr:last-child td {
border-bottom: none; }
.reveal sup {
vertical-align: super; }
.reveal sub {
vertical-align: sub; }
.reveal small {
display: inline-block;
font-size: 0.6em;
line-height: 1.2em;
vertical-align: top; }
.reveal small * {
vertical-align: top; }
/*********************************************
* LINKS
*********************************************/
.reveal a {
color: #ffc600;
text-decoration: none;
-webkit-transition: color 0.15s ease;
-moz-transition: color 0.15s ease;
transition: color 0.15s ease; }
.reveal a:hover {
color: #aa8833;
text-shadow: none;
border: none; }
.reveal .roll span:after {
color: #fff;
background: #068de9; }
/*********************************************
* IMAGES
*********************************************/
.reveal section img {
max-width: 67%;
padding: 4%;
}
.reveal section img.plain {
border: 0;
box-shadow: none; }
.reveal a img {
-webkit-transition: all 0.15s linear;
-moz-transition: all 0.15s linear;
transition: all 0.15s linear; }
.reveal a:hover img {
background: rgba(255, 255, 255, 0.2);
border-color: #fc4a2c;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); }
/*********************************************
* NAVIGATION CONTROLS
*********************************************/
.reveal .controls .navigate-left,
.reveal .controls .navigate-left.enabled {
border-right-color: #ffc600; }
.reveal .controls .navigate-right,
.reveal .controls .navigate-right.enabled {
border-left-color: #ffc600; }
.reveal .controls .navigate-up,
.reveal .controls .navigate-up.enabled {
border-bottom-color: #ffc600; }
.reveal .controls .navigate-down,
.reveal .controls .navigate-down.enabled {
border-top-color: #ffc600; }
.reveal .controls .navigate-left.enabled:hover {
border-right-color: #aa8833; }
.reveal .controls .navigate-right.enabled:hover {
border-left-color: #aa8833; }
.reveal .controls .navigate-up.enabled:hover {
border-bottom-color: #aa8833; }
.reveal .controls .navigate-down.enabled:hover {
border-top-color: #aa8833; }
/*********************************************
* PROGRESS BAR
*********************************************/
.reveal .progress {
background: rgba(0, 0, 0, 0.2); }
.reveal .progress span {
background: #ffc600;
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
.reveal section.outro h1 {
padding: 0;
margin: 0;
}
.reveal section.outro img.logo {
max-height: 40vh;
padding: 0;
}
.reveal section.outro img.cc {
max-height: 10vh;
padding: 0;
}
<svg version="1.0" viewBox="0 0 119.99999 42" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(2.0408688e-5,1.417352e-6)">
<g transform="matrix(.9937808 0 0 .9936696 -437.12334 -74.436914)">
<path id="path3817_5_" d="m443.28857 75.3667 114.06348 0.20264c1.59375 0 3.01758-0.23633 3.01758 3.18066l-0.13965 37.56689h-119.82031v-37.70654c0-1.68506 0.16308-3.24365 2.8789-3.24365z" fill="#aab2ab" nodetypes="ccccccc"/>
<path d="m558.34912 74.91113h-116.22851c-1.24707 0-2.26172 1.01465-2.26172 2.26123v39.49609c0 0.28174 0.22852 0.51025 0.51074 0.51025h119.72949c0.28223 0 0.51074-0.22852 0.51074-0.51025v-39.49609c0-1.24658-1.01465-2.26123-2.26074-2.26123zm-116.22851 1.02149h116.22852c0.68359 0 1.23926 0.55615 1.23926 1.23975v27.39404h-83.07324c-3.04492 5.50586-8.91211 9.24414-15.64453 9.24414-6.73438 0-12.59961-3.73486-15.64258-9.24414h-4.34766v-27.39404c-1e-5 -0.6836 0.55663-1.23975 1.24023-1.23975z"/>
<g id="g5908_5_" transform="matrix(.872921 0 0 .872921 50.12536 143.2144)">
<path id="path5906_5_" cx="296.35416" cy="264.3577" rx="22.939548" ry="22.939548" d="m486.26599-55.7066c6e-3 8.68079-7.02789 15.7215-15.70813 15.72708-8.68018 0.0056-15.7215-7.02786-15.72705-15.7081v-0.01898c-6e-3 -8.68079 7.02783-15.7215 15.70807-15.72711 8.68134-5e-3 15.7226 7.02783 15.72711 15.70807v0.01904z" fill="#fff" type="arc"/>
<g id="g5706_5_" transform="translate(-289.6157,99.0653)">
<path id="path5708_5_" d="m772.94165-167.5741c3.48486 3.48541 5.22778 7.75336 5.22778 12.80219 0 5.04938-1.71277 9.27203-5.13831 12.66794-3.63586 3.57602-7.93176 5.36374-12.89001 5.36374-4.89783 0-9.11987-1.77264-12.66394-5.31955-3.54639-3.54526-5.31848-7.78244-5.31848-12.71213 0-4.92859 1.77209-9.19598 5.31848-12.80219 3.45459-3.48651 7.67664-5.22949 12.66394-5.22949 5.04883 0 9.31458 1.74298 12.80054 5.22949zm-23.11853 2.34485c-2.94678 2.97638-4.42017 6.46289-4.42017 10.46179s1.45886 7.45581 4.37427 10.37122c2.9176 2.9165 6.38904 4.37476 10.4176 4.37476s7.53015-1.47281 10.50708-4.41895c2.82593-2.73645 4.23889-6.17767 4.23889-10.32703 0-4.11749-1.4364-7.61292-4.30823-10.48419-2.87061-2.87061-6.34985-4.30652-10.43774-4.30652s-7.54699 1.44318-10.3717 4.32892zm7.75391 8.70319c-0.44971-0.98169-1.12317-1.47284-2.02271-1.47284-1.58862 0-2.38293 1.07007-2.38293 3.20911 0 2.13953 0.79431 3.2085 2.38293 3.2085 1.04944 0 1.79895-0.52075 2.24866-1.56458l2.20276 1.17303c-1.05042 1.86548-2.62561 2.79901-4.72546 2.79901-1.62 0-2.91772-0.4967-3.89209-1.48956-0.97546-0.99341-1.46326-2.36334-1.46326-4.10852 0-1.71503 0.50342-3.07654 1.50806-4.08502 1.00452-1.00854 2.25757-1.51257 3.75781-1.51257 2.22058 0 3.8092 0.87488 4.77136 2.62286zm10.36389 0c-0.45081-0.98169-1.11206-1.47284-1.98242-1.47284-1.62097 0-2.43213 1.07007-2.43213 3.20911 0 2.13953 0.81116 3.2085 2.43213 3.2085 1.05164 0 1.78772-0.52075 2.20728-1.56458l2.25195 1.17303c-1.04822 1.86548-2.62109 2.79901-4.71765 2.79901-1.61768 0-2.91199-0.4967-3.88647-1.48956-0.97217-0.99341-1.45996-2.36334-1.45996-4.10852 0-1.71503 0.49451-3.07654 1.48352-4.08502 0.98779-1.00854 2.24524-1.51257 3.77344-1.51257 2.21619 0 3.80371 0.87488 4.76135 2.62286z"/>
</g>
</g>
<circle cx="491.94629" cy="90.231934" r="10.80615" fill="#fff"/>
<path d="m495.07373 87.10498c0-0.4165-0.33789-0.75391-0.75391-0.75391h-4.77246c-0.41602 0-0.75391 0.3374-0.75391 0.75391v4.77295h1.33105v5.65186h3.61719v-5.65186h1.33203v-4.77295z"/>
<circle cx="491.93359" cy="84.090332" r="1.63232"/>
<path d="m491.91846 78.3252c-3.23145 0-5.96777 1.12793-8.20703 3.38379-2.29785 2.3335-3.44629 5.0957-3.44629 8.28467s1.14844 5.93164 3.44629 8.22705c2.29785 2.29395 5.03418 3.44189 8.20703 3.44189 3.21289 0 5.99805-1.15674 8.35449-3.47168 2.21973-2.19727 3.3291-4.92969 3.3291-8.19727s-1.12891-6.02881-3.3877-8.28467-5.02343-3.38378-8.29589-3.38378zm0.0303 2.0996c2.64844 0 4.89648 0.93408 6.74609 2.80127 1.87012 1.84717 2.80469 4.10352 2.80469 6.76758 0 2.68359-0.91504 4.91064-2.74609 6.68066-1.92773 1.90576-4.19629 2.8584-6.80469 2.8584-2.61035 0-4.85938-0.94287-6.74805-2.82959-1.88867-1.88623-2.83301-4.12256-2.83301-6.70947s0.9541-4.84229 2.8623-6.76758c1.83107-1.86718 4.07032-2.80127 6.71876-2.80127z" clip-rule="evenodd" fill-rule="evenodd"/>
<g enable-background="new " fill="#fff">
<path d="m488.56299 107.86719c0.31738 0 0.60742 0.0283 0.86914 0.084s0.48633 0.14746 0.67383 0.27539c0.18652 0.12695 0.33105 0.29688 0.43457 0.50781 0.10254 0.21191 0.1543 0.47266 0.1543 0.78418 0 0.33594-0.0762 0.61523-0.22949 0.83887-0.15234 0.22461-0.37891 0.40723-0.67773 0.55078 0.41211 0.11816 0.71973 0.3252 0.92285 0.62109s0.30469 0.65234 0.30469 1.06934c0 0.33594-0.0654 0.62695-0.19629 0.87305-0.13086 0.24512-0.30762 0.44629-0.5293 0.60156-0.2207 0.15625-0.47363 0.27148-0.75684 0.3457-0.28418 0.0752-0.5752 0.1123-0.875 0.1123h-3.23633v-6.66406h3.1416zm-0.1875 2.69531c0.26172 0 0.47656-0.0625 0.64453-0.18652 0.16895-0.12402 0.25293-0.3252 0.25293-0.60449 0-0.15527-0.0283-0.2832-0.084-0.38184-0.0566-0.0996-0.13086-0.17676-0.22461-0.2334-0.0937-0.0557-0.20117-0.0947-0.32227-0.11621-0.12207-0.0215-0.24805-0.0322-0.37891-0.0322h-1.37305v1.55469zm0.0859 2.82812c0.14355 0 0.28027-0.0137 0.41113-0.042s0.24609-0.0752 0.34668-0.13965c0.0996-0.0654 0.17871-0.1543 0.23828-0.2666 0.0586-0.11133 0.0889-0.25488 0.0889-0.42871 0-0.3418-0.0967-0.58594-0.29004-0.73242-0.19336-0.14551-0.44922-0.21875-0.7666-0.21875h-1.59961v1.82812z"/>
<path d="m491.27393 107.86719h1.64258l1.56055 2.63184 1.55176-2.63184h1.63379l-2.47461 4.10645v2.55762h-1.46875v-2.59473z"/>
</g>
<g enable-background="new " fill="#fff">