Skip to content

Commit

Permalink
Add missing extension files
Browse files Browse the repository at this point in the history
  • Loading branch information
percyfal committed Oct 15, 2024
1 parent 2453159 commit 66858cf
Show file tree
Hide file tree
Showing 6 changed files with 8,136 additions and 0 deletions.
24 changes: 24 additions & 0 deletions _extensions/percyfal/nbis-course/partials/logo-hyperlink.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script type="text/javascript">
function hyperlink_logo() {
var button = document.createElement( 'div' );
button.className = "logo-button";
button.id = "logo-button";
button.style.visibility = "visible";
button.style.position = "absolute";
button.style.zIndex = 30;
button.style.fontSize = "24px";
button.style.left = "130px";
button.style.bottom = "14px";
button.style.top = "auto";
button.style.right = "auto";
if (window.location.host.startsWith("localhost")) {
button.innerHTML = `<a href="http://${window.location.host}"><i class="fa fa-home"></i></a>`
} else {
button.innerHTML = '<a href="https://nbis.se"><i class="fa fa-home"></i></a>';
}
document.querySelector( ".reveal" ).appendChild( button );
}
window.document.addEventListener("DOMContentLoaded", function (event) {
hyperlink_logo();
});
</script>
15 changes: 15 additions & 0 deletions _extensions/percyfal/nbis-course/partials/title-slide.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<section id="$idprefix$title-slide"$for(title-slide-attributes/pairs)$ $it.key$="$it.value$"$endfor$>
<h1 class="title">$title$</h1>
$if(subtitle)$
<h3 class="subtitle">$subtitle$</h3>
$endif$
$for(author)$
<h4 class="author">$author$</h4>
$endfor$
$for(institute)$
<h4 class="institute">$institute$</h4>
$endfor$
$if(date)$
<h4 class="date">$date$</h4>
$endif$
</section>
52 changes: 52 additions & 0 deletions _extensions/percyfal/nbishome/nbishome.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
.reveal .reveal-nbis-home {
position: absolute;
left: 40px;
}

.reveal .reveal-nbis-home.reveal-nbis-home-top {
top: 13px;
}

.reveal .reveal-nbis-home.reveal-nbis-home-bottom {
bottom: 13px;
}

.reveal .reveal-nbis-home .reveal-nbis-home-button {
display: inline-block;
color: $link-color;
font-size: .9em;
border-radius: 12px;
width: 30px;
text-align: center;
padding: 2px;
margin: 0 4px;
}

.reveal .reveal-nbis-home .reveal-nbis-home-button:hover {
color: #ffffff;
}

.hidden {
display: none;
}

.reveal .reveal-nbis-home .slide-menu-button {
position: initial;
left: initial;
bottom: initial;
}

.reveal .reveal-nbis-home .slide-menu-button a {
color: white;
}

.reveal .reveal-nbis-home .playback {
position: relative;
left: 4px;
bottom: -17px;
}

.reveal.paused .reveal-nbis-home .reveal-nbis-home-pause-button {
z-index: 110;
color: #757575;
}
44 changes: 44 additions & 0 deletions _extensions/percyfal/nbishome/nbishome.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
window.RevealNbisHome = window.RevealNbisHome || {
id: "RevealNbisHome",
init: function (deck) {
initNBISHome(deck);
},
configure: function (config) {
configure(config);
},
};

// cf chalkboard plugin
const initNBISHome = function( Reveal ) {
var position = { left: "30px", bottom: "30px" };
var url = "https://nbis.se";

var config = configure( Reveal.getConfig()['nbishome'] || {} );

function configure( config ) {
if ( config.url != undefined ) url = config.url;
if ( config.position != undefined ) position = config.position;
return config
}

var button = document.createElement('div');
button.className = 'reveal-nbis-home';
button.id = 'reveal-nbis-home';
button.style.visibility = 'visible';
button.style.position = 'absolute';
button.style.zIndex = 30;
button.style.fontSize = "24px";

button.style.left = position.left || "30px";
button.style.bottom = position.bottom || "30px";

button.style.top = position.top || "auto";
button.style.right = position.right || "auto";

button.innerHTML = '<a href="' + url + '" title="Home"><i class="fa fa-home"></i></a>';
document.querySelector('.reveal').appendChild(button);

this.configure = configure;

return this;
};
Loading

0 comments on commit 66858cf

Please sign in to comment.