re-add theme submodule

This commit is contained in:
Paul Lesur 2022-10-19 14:00:14 +02:00
parent 7dfb752f28
commit b99df0c7b7
10 changed files with 3 additions and 8076 deletions

6
.gitmodules vendored
View file

@ -1,3 +1,3 @@
[submodule "themes/hugo-flex"]
path = themes/hugo-flex
url = https://github.com/de-souza/hugo-flex.git
[submodule "themes/hugo-book"]
path = themes/hugo-book
url = https://github.com/alex-shpak/hugo-book

View file

@ -1 +0,0 @@
body{font-family:-apple-system,BlinkMacSystemFont,segoe ui,Roboto,Oxygen-Sans,Ubuntu,Cantarell,helvetica neue,sans-serif;line-height:1.6;display:flex;flex-direction:column;min-height:100vh;margin:0;padding:0}main{flex-grow:1}img{max-width:100%;border-radius:.2rem}pre{overflow-x:auto;border:.1rem solid #d3d3d3;padding:1rem}code{font-family:SFMono-Regular,Consolas,liberation mono,Menlo,Courier,monospace}.Banner{list-style:none;display:flex;flex-flow:row-reverse wrap-reverse;justify-content:space-between;margin:0;padding:0}.Banner-item:nth-child(1){order:5}.Banner-item:nth-child(2){order:4}.Banner-item:nth-child(3){order:3}.Banner-item:nth-child(4){order:2}.Banner-item:nth-child(5){order:1}.Banner-item--title{flex-grow:1}.Banner-link{font-size:1.25rem;color:#fff;padding:.5rem 1rem}.Heading{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline}.Heading-title{margin:1.5rem .5rem 0 0}.Heading-link{color:inherit}.Tags{list-style:none;display:flex;flex-wrap:wrap;justify-content:center;margin:1.5rem 0;padding:0}.Tags-item{border-radius:.2rem;margin:.2rem;padding:0 .3rem}.Tags-link{color:#fff}.Pagination{font-size:1.25rem;color:inherit}.Pagination--right{float:right}.Footer{text-align:center;margin:1rem 0}.u-wrapper{max-width:42rem;margin:auto}.u-padding{padding:0 1rem}.u-background{background:teal}.u-clickable{font-weight:700;text-decoration:none;display:inline-block}

View file

@ -1 +0,0 @@
{"Target":"css/base.min.21688b64210142c045c9a1d930a48fc517f428060c78a3a012d71f971874c5c3.css","MediaType":"text/css","Data":{"Integrity":"sha256-IWiLZCEBQsBFyaHZMKSPxRf0KAYMeKOgEtcflxh0xcM="}}

View file

@ -1,228 +0,0 @@
// import backToTop from './backToTop';
// import mobileNavbar from './mobileNavbar';
// import toc from './toc';
// import headerAnchor from './headerAnchor';
// import fnTooltip from './footnoteTooltip';
// import highlight from './highlight';
/**
* back to top
*/
var backToTop = function() {
const $backToTop = $('#back-to-top');
$(window)
.scroll(function() {
if ($(window)
.scrollTop() > 100) {
$backToTop.fadeIn(1000);
} else {
$backToTop.fadeOut(1000);
}
})
$backToTop.click(function() {
$('body,html')
.animate({
scrollTop: 0
});
})
}
/**
* mobile Navbar
*/
var mobileNavbar = function() {
const $mobileNav = $('#mobile-navbar');
const $mobileNavIcon = $('.mobile-navbar-icon');
const slideout = new Slideout({
'panel': document.getElementById('mobile-panel'),
'menu': document.getElementById('mobile-menu'),
'padding': 180,
'tolerance': 70
})
slideout.disableTouch()
$mobileNavIcon.click(function () {
slideout.toggle()
})
slideout.on('beforeopen', function () {
$mobileNav.addClass('fixed-open')
$mobileNavIcon.addClass('icon-click').removeClass('icon-out')
})
slideout.on('beforeclose', function () {
$mobileNav.removeClass('fixed-open')
$mobileNavIcon.addClass('icon-out').removeClass('icon-click')
})
$('#mobile-panel').on('touchend', function () {
slideout.isOpen() && $mobileNavIcon.click()
})
$('.mobile-submenu-open').on('click', function () {
const $mobileSubmenuList = $('.mobile-submenu-list')
const $mobileMenuParent = $('.mobile-menu-parent')
if ($(this).parent().next().css('display') == "none") {
$mobileSubmenuList.slideUp(300)
$(this).parent().next('ul').slideDown(300)
$(this).parent().addClass('mobile-submenu-show')
$(this).parent().parent().siblings().children().removeClass('mobile-submenu-show')
} else {
$(this).parent().next('ul').slideUp(300)
$mobileMenuParent.removeClass('mobile-submenu-show')
}
});
}
/**
* Table of Content fix
*/
function initToc() {
const $toc = $('#post-toc');
if ($toc.length && $(window)
.width() >= 1080) {
$(window)
.scroll(function() {
if ($(window)
.scrollTop() > 100) {
$toc.fadeIn(1000);
} else {
$toc.fadeOut(100);
}
});
}
}
var toc = function() {
const tocContainer = document.getElementById('post-toc');
if (tocContainer !== null) {
const toc = document.getElementById('TableOfContents');
if (toc === null) {
// if global config 'toc = true', but there are no headings
tocContainer.parentNode.removeChild(tocContainer);
} else {
initToc();
}
}
}
/**
* Anchor for post content header
**/
var anchorForId = function (id) {
var anchor = document.createElement("a");
anchor.className = "header-link";
anchor.href = "#" + id;
anchor.innerHTML = '<svg viewBox="0 0 16 10" version="1.1" width="24" height="24"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"/></svg>';
return anchor;
};
var linkifyAnchors = function (level, containingElement) {
var headers = containingElement.getElementsByTagName("h" + level);
for (var h = 0; h < headers.length; h++) {
var header = headers[h];
header.className = "post-content-header";
if (typeof header.id !== "undefined" && header.id !== "") {
// insert header-link before the header
header.appendChild(anchorForId(header.id));
}
}
};
var headerAnchor = function() {
var contentBlock = document.getElementsByClassName("post-content")[0];
if (!contentBlock) {
return;
}
for (var level = 1; level <= 4; level++) {
linkifyAnchors(level, contentBlock);
}
};
/**
* footnote tooltip
*/
var fnTooltip = function () {
$(".footnote-ref").each(function () {
var id = $(this).children("a").attr("href").substr(1),
footnote = $(document.getElementById(id)).clone(),
outer_wrapper = $("<span>", { "class": "fn-content" }),
inner_wrapper = $("<span>", { "class": "fn-text" });
footnote.find(".footnote-return").remove();
$(this).append(outer_wrapper.append(inner_wrapper.html(footnote.html())));
});
// fix tooltip position & width
var position = function () {
var content = $(".fn-content").removeAttr("style");
if ($(window).width() < 640)
content.css("width", $(window).width() / 2);
else
content.css("width", 340); // default value
content.each(function () {
var width = $(this).children(".fn-text").outerWidth();
$(this).css({
"width": width,
"margin-left": width / -2
});
});
}
position();
$(window).resize(position());
}
/**
* highlight
*/
var highlight = function () {
document.querySelectorAll('.chroma>table')
.forEach((element) => {
const sub = element.querySelector('code[data-lang]');
if (sub !== null) {
element.setAttribute('data-lang', mapLang(sub.getAttribute('data-lang')));
}
});
}
function mapLang(name) {
return {
coffeescript: 'CoffeeScript',
cpp: 'C++',
cs: 'C#',
css: 'CSS',
html: 'HTML',
http: 'HTTP',
js: 'JavaScript',
json: 'JSON',
objectivec: 'Objective-C',
php: 'PHP',
sql: 'SQL',
toml: 'TOML',
ts: 'TypeScript',
typescript: 'TypeScript',
xml: 'XML',
yaml: 'YAML',
}[name] || name;
}
/* main */
$(document).ready(function () {
backToTop();
mobileNavbar();
toc();
headerAnchor();
fnTooltip();
});
highlight();

View file

@ -1 +0,0 @@
{"Target":"js/main.638251f4230630f0335d8c6748e53a96f94b72670920b60c09a56fdc8bece214.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-Y4JR9CMGMPAzXYxnSOU6lvlLcmcJILYMCaVv3Ivs4hQ="}}

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
{"Target":"sass/jane.min.31c4b7729c8d71cc152f8de4203d90bfd8a04f7eab69372de7234ebf55b7701b.css","MediaType":"text/css","Data":{"Integrity":"sha256-McS3cpyNccwVL43kID2Qv9igT36raTct5yNOv1W3cBs="}}

View file

@ -1 +0,0 @@
{"Target":"css/style.css","MediaType":"text/css","Data":{}}

@ -1 +0,0 @@
Subproject commit da0192c7a78b57dfdbb73c0633de131c3253cc4f