Skip to content

Commit

Permalink
fixed #20
Browse files Browse the repository at this point in the history
  • Loading branch information
shafayetShafee committed May 10, 2024
1 parent a0a5087 commit b8d9fbe
Show file tree
Hide file tree
Showing 11 changed files with 325 additions and 142 deletions.
2 changes: 1 addition & 1 deletion _extensions/reveal-header/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: Reveal-header
author: Shafayet Khan Shafee
version: 1.2.7
version: 1.2.8
quarto-required: ">=1.2.0"
contributes:
filters:
Expand Down
3 changes: 3 additions & 0 deletions _extensions/reveal-header/resources/css/add_header.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
.reveal-header.no-logo .sc-title p {margin-left: 6vw}


.reveal .header-logo svg,
.reveal .header-logo img {
margin: var(--header-margin);
padding-left: 1vw;
Expand All @@ -46,6 +47,8 @@
}




/* .reveal .slides { margin-top: 3vh !important;} */
.inverse-header { color: #c5d7ce !important;}

Expand Down
8 changes: 4 additions & 4 deletions _extensions/reveal-header/resources/js/add_header.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ function header() {
reveal.insertBefore(header, reveal.firstChild);

logo_img = document.querySelector('.header-logo img');
if (logo_img.getAttribute('src') == null) {
if (logo_img?.getAttribute('src') == null) {
if (logo_img?.getAttribute('data-src') != null) {
logo_img.src = logo_img?.getAttribute('data-src') || "";
logo_img.removeAttribute('data-src');
logo_img?.removeAttribute('data-src');
};
};
};
Expand Down Expand Up @@ -86,12 +86,12 @@ function header() {
const footer_logo_link = get_clean_attrs(header_logo, 'data-footer-logo-link');

if (header_logo_link != null) {
const header_logo_img = document.querySelector('div.header-logo img');
const header_logo_img = document.querySelector('div.header-logo').firstElementChild;
linkify_logo(header_logo_img, header_logo_link);
};

if (footer_logo_link != null) {
const footer_logo_img = document.querySelector('img.slide-logo');
const footer_logo_img = document.querySelector('.slide-logo');
footer_logo_img.setAttribute('style', "z-index:99;");
linkify_logo(footer_logo_img, footer_logo_link);
};
Expand Down
2 changes: 1 addition & 1 deletion _extensions/reveal-header/resources/js/sc_sb_title.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

if (Reveal.isReady()) {

if (document.querySelector('div.reveal-header img').getAttribute('src').length == 0) {
if (document.querySelector('div.reveal-header img')?.getAttribute('src')?.length == 0) {
document.querySelector('div.reveal-header').classList.add('no-logo')
}

Expand Down
127 changes: 89 additions & 38 deletions docs/example.html

Large diffs are not rendered by default.

101 changes: 76 additions & 25 deletions docs/example_all.html

Large diffs are not rendered by default.

127 changes: 89 additions & 38 deletions docs/example_hide_header_text.html

Large diffs are not rendered by default.

84 changes: 61 additions & 23 deletions docs/example_section_title.html

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions open_html_files.sh

This file was deleted.

6 changes: 0 additions & 6 deletions test_examples.sh

This file was deleted.

2 changes: 1 addition & 1 deletion testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ case "$argument" in
mv *.html docs/
echo "Opening HTML files from docs folder"
for html_file in docs/*.html; do
start "$html_file"
open "$html_file"
done
;;
"help")
Expand Down

0 comments on commit b8d9fbe

Please sign in to comment.