Add base64 favicon
This commit is contained in:
parent
8f35a55e2a
commit
3d8ee42287
4 changed files with 66 additions and 65 deletions
|
@ -1,4 +1,4 @@
|
||||||
$(function() {
|
$(function () {
|
||||||
|
|
||||||
function slideSeparatorLines(text) {
|
function slideSeparatorLines(text) {
|
||||||
var lines = text.split('\n');
|
var lines = text.split('\n');
|
||||||
|
@ -19,7 +19,7 @@ $(function() {
|
||||||
var text = ace.edit("editor").getValue();
|
var text = ace.edit("editor").getValue();
|
||||||
var separatorPositions = slideSeparatorLines(text);
|
var separatorPositions = slideSeparatorLines(text);
|
||||||
var slideNumber = separatorPositions.length;
|
var slideNumber = separatorPositions.length;
|
||||||
separatorPositions.every(function(pos, num) {
|
separatorPositions.every(function (pos, num) {
|
||||||
if (pos >= cursorLine) {
|
if (pos >= cursorLine) {
|
||||||
slideNumber = num;
|
slideNumber = num;
|
||||||
return false;
|
return false;
|
||||||
|
@ -35,14 +35,14 @@ $(function() {
|
||||||
editor.getSession().setMode("ace/mode/markdown");
|
editor.getSession().setMode("ace/mode/markdown");
|
||||||
editor.getSession().setUseWrapMode(true);
|
editor.getSession().setUseWrapMode(true);
|
||||||
editor.setShowPrintMargin(true);
|
editor.setShowPrintMargin(true);
|
||||||
$.get('/slides.md', function(data) {
|
$.get('/slides.md', function (data) {
|
||||||
editor.setValue(data, -1);
|
editor.setValue(data, -1);
|
||||||
});
|
});
|
||||||
var lastSRow = -1;
|
var lastSRow = -1;
|
||||||
ace.edit('editor').getSession().selection.on('changeCursor', function(e) {
|
ace.edit('editor').getSession().selection.on('changeCursor', function (e) {
|
||||||
var cursorRow = ace.edit('editor').getCursorPosition().row;
|
var cursorRow = ace.edit('editor').getCursorPosition().row;
|
||||||
if(lastSRow === cursorRow){
|
if (lastSRow === cursorRow) {
|
||||||
return; // no update
|
return; // no update
|
||||||
}
|
}
|
||||||
lastSRow = cursorRow;
|
lastSRow = cursorRow;
|
||||||
var currentSlide = currentCursorSlide(cursorRow);
|
var currentSlide = currentCursorSlide(cursorRow);
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
$(function() {
|
$(function () {
|
||||||
function reloadMarkdown() {
|
function reloadMarkdown() {
|
||||||
$('#slides-frame')[0].contentWindow.postMessage(JSON.stringify({
|
$('#slides-frame')[0].contentWindow.postMessage(JSON.stringify({
|
||||||
method: 'reloadMarkdown'
|
method: 'reloadMarkdown'
|
||||||
}), window.location.origin);
|
}), window.location.origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.save = function() {
|
window.save = function () {
|
||||||
var editor = ace.edit("editor");
|
var editor = ace.edit("editor");
|
||||||
|
|
||||||
$.ajax("/slides.md", {
|
$.ajax("/slides.md", {
|
||||||
|
|
|
@ -17,58 +17,58 @@ function initializeReveal() {
|
||||||
|
|
||||||
// Optional reveal.js plugins
|
// Optional reveal.js plugins
|
||||||
dependencies: [{
|
dependencies: [{
|
||||||
src: '/static/reveal.js/lib/js/classList.js',
|
src: '/static/reveal.js/lib/js/classList.js',
|
||||||
condition: function() {
|
condition: function () {
|
||||||
return !document.body.classList;
|
return !document.body.classList;
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Interpret Markdown in <section> elements
|
|
||||||
{
|
|
||||||
src: '/static/reveal.js/plugin/markdown/marked.js',
|
|
||||||
condition: function() {
|
|
||||||
return !!document.querySelector('[data-markdown]');
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
src: '/static/reveal.js/plugin/markdown/markdown.js',
|
|
||||||
condition: function() {
|
|
||||||
return !!document.querySelector('[data-markdown]');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Syntax highlight for <code> elements
|
|
||||||
{
|
|
||||||
src: '/static/reveal.js/plugin/highlight/highlight.js',
|
|
||||||
async: true,
|
|
||||||
callback: function() {
|
|
||||||
hljs.initHighlightingOnLoad();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Zoom in and out with Alt+click
|
|
||||||
{
|
|
||||||
src: '/static/reveal.js/plugin/zoom-js/zoom.js',
|
|
||||||
async: true
|
|
||||||
},
|
|
||||||
|
|
||||||
// Speaker notes
|
|
||||||
{
|
|
||||||
src: '/static/reveal.js/plugin/notes/notes.js',
|
|
||||||
async: true
|
|
||||||
},
|
|
||||||
|
|
||||||
// MathJax
|
|
||||||
{
|
|
||||||
src: '/static/reveal.js/plugin/math/math.js',
|
|
||||||
async: true
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
src: '/static/reveal.js/lib/js/classList.js',
|
|
||||||
condition: function() {
|
|
||||||
return !document.body.classList;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Interpret Markdown in <section> elements
|
||||||
|
{
|
||||||
|
src: '/static/reveal.js/plugin/markdown/marked.js',
|
||||||
|
condition: function () {
|
||||||
|
return !!document.querySelector('[data-markdown]');
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
src: '/static/reveal.js/plugin/markdown/markdown.js',
|
||||||
|
condition: function () {
|
||||||
|
return !!document.querySelector('[data-markdown]');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Syntax highlight for <code> elements
|
||||||
|
{
|
||||||
|
src: '/static/reveal.js/plugin/highlight/highlight.js',
|
||||||
|
async: true,
|
||||||
|
callback: function () {
|
||||||
|
hljs.initHighlightingOnLoad();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// Zoom in and out with Alt+click
|
||||||
|
{
|
||||||
|
src: '/static/reveal.js/plugin/zoom-js/zoom.js',
|
||||||
|
async: true
|
||||||
|
},
|
||||||
|
|
||||||
|
// Speaker notes
|
||||||
|
{
|
||||||
|
src: '/static/reveal.js/plugin/notes/notes.js',
|
||||||
|
async: true
|
||||||
|
},
|
||||||
|
|
||||||
|
// MathJax
|
||||||
|
{
|
||||||
|
src: '/static/reveal.js/plugin/math/math.js',
|
||||||
|
async: true
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
src: '/static/reveal.js/lib/js/classList.js',
|
||||||
|
condition: function () {
|
||||||
|
return !document.body.classList;
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@ function initializeReveal() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function highlightAnyCodeBlocks() {
|
function highlightAnyCodeBlocks() {
|
||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
$('pre code').each(function(i, block) {
|
$('pre code').each(function (i, block) {
|
||||||
hljs.highlightBlock(block);
|
hljs.highlightBlock(block);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -108,7 +108,7 @@ function reloadMarkdown() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function externalLinksInNewWindow() {
|
function externalLinksInNewWindow() {
|
||||||
$(document.links).filter(function() {
|
$(document.links).filter(function () {
|
||||||
return this.hostname != window.location.hostname;
|
return this.hostname != window.location.hostname;
|
||||||
}).attr('target', '_blank');
|
}).attr('target', '_blank');
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ initializeReveal();
|
||||||
function themesCtrl() {
|
function themesCtrl() {
|
||||||
var defaultTheme = "black.css",
|
var defaultTheme = "black.css",
|
||||||
currentTheme = localStorage.getItem('theme?') ||
|
currentTheme = localStorage.getItem('theme?') ||
|
||||||
defaultTheme;
|
defaultTheme;
|
||||||
|
|
||||||
function setTheme(theme) {
|
function setTheme(theme) {
|
||||||
cssEl = $("#theme");
|
cssEl = $("#theme");
|
||||||
|
@ -145,12 +145,12 @@ function themesCtrl() {
|
||||||
"white.css",
|
"white.css",
|
||||||
];
|
];
|
||||||
themeEl = $("#themes");
|
themeEl = $("#themes");
|
||||||
availableThemes.forEach(function(theme) {
|
availableThemes.forEach(function (theme) {
|
||||||
elem = $("<option value=" + theme + ">" + theme + "</option>");
|
elem = $("<option value=" + theme + ">" + theme + "</option>");
|
||||||
themeEl.append(elem);
|
themeEl.append(elem);
|
||||||
})
|
})
|
||||||
themeEl.val(currentTheme);
|
themeEl.val(currentTheme);
|
||||||
themeEl.change(function() {
|
themeEl.change(function () {
|
||||||
val = themeEl.val()
|
val = themeEl.val()
|
||||||
setTheme(val);
|
setTheme(val);
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<title>Hacker Slides</title>
|
<title>Hacker Slides</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="/static/css/index.css">
|
<link rel="stylesheet" href="/static/css/index.css">
|
||||||
|
<link href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIsSURBVFhH7dg/SFVhGMfxg4FgJGVEGQSBBILYUAQl2NCftUkanKwhcmkQsq0iLIKiGiSwpQYDhSAadIlSl+aIpmzQzdwUTMToz/d3vQcuL885vnrP+16w+4MPeN7He9/nXj3nvOdN/oecxBUcLB1t5Dj6cKR0VMNcwx/8xQIuYhC/ymMrOIua5DBWoUbyzKMR0TMEqyFLL6JnDlYzlg+ImlOwGsmyjr2Ikla8gtVInlvYg2C5hGmkZ+12rGEMJ1BoXsOacLt0GdI3WkiaoU9uTVSN7ygsHXiMj/gGa8LN6Jr5FRO4A11Hg0WfXpM+wxN8KR+ndNZO4jamymOPEC03oUlflo6S5Bh+Im1Q33QTdGnRneQ39DvRshu670o7zlUcp05DCwn93IVCswtH0RbJIXhH347+mdM/Vyw6Cb1yBtYbhLYIr3TDeoPQluCVeoMZ6g1Wq95gtYI0qMXrfeh+69a0annnjOUJ0qCWXsow3NoFaJnmjmcJ0uAMlHG4tcs44IzlCdLgGyhaXrm1G1DSXYbNBGnwORRrcXEPirZE3JolSIN3oehG79ZeQPkMt2YJ0mA/GqAVs1t7C+U93JrFu8GtLLd6oG03q/YJyiisuusHvKJnCfchKIu21jqdsdQslKew6q6H8I7vkl/baudhTbgMZT+s11aq3PwsPAOwGhRNXpNoa1dbFyPI23XQLfABrkMnU7RchdVQFu0qbOnJrYjsQ4snPSnuxCTJP2DL0jFAlrNjAAAAAElFTkSuQmCC" rel="icon" type="image/x-icon">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in a new issue