diff --git a/content/extra/custom.js b/content/extra/custom.js new file mode 100644 index 0000000000000000000000000000000000000000..210e0841cdfc8f41ee9ef7a204726f5a9e639f86 --- /dev/null +++ b/content/extra/custom.js @@ -0,0 +1,36 @@ +alert('helloworld'); + +$( document ).ready(function() { + + $('a.toggle').each(function() { + + $($(this).attr('href')).closest('li').hide(); + + }); + + $('a.expand').click(function(event) { + + if($(this).text() == 'version longue') { + $(this).text('version courte'); + $('a.toggle').each(function() { + $($(this).attr('href')).closest('li').show(); + }); + } + else { + $(this).text('version longue'); + $('a.toggle').each(function() { + $($(this).attr('href')).closest('li').hide(); + }); + } + + event.preventDefault(); + }); + + + $('a.toggle').click(function() { + + $($(this).attr('href')).closest('li').toggle(); + + }); + +}); \ No newline at end of file diff --git a/pelicanconf.py b/pelicanconf.py index cdeaf50ddb28a3862ebb3e5f8d01a797011fea6b..8d7d889610f5a64797a09fca108475e6e337f7c3 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -7,7 +7,7 @@ AUTHOR = 'Vincent Mazenod' SITENAME = 'Vincent Mazenod / ingénieur d\'études' SITELOGO = 'images/mazenovi.png' FAVICON = 'images/favicon.ico' -SITEURL = 'https://fc.isima.fr/~mazenod' +SITEURL = 'https://perso.limos.fr/~mazenovi/' DISQUS_SITENAME = 'limos-1' DISQUS_SHORTNAME = 'mazenovi' @@ -148,12 +148,13 @@ SHOW_ARTICLE_AUTHOR = False SHOW_ARTICLE_CATEGORY = True SHOW_DATE_MODIFIED = True CUSTOM_CSS = 'static/custom.css' -STATIC_PATHS = ['images', 'extra/custom.css', 'node_modules', 'slides'] +STATIC_PATHS = ['images', 'extra/custom.css', 'extra/custom.js', 'node_modules', 'slides'] ARTICLE_EXCLUDES = ['node_modules', 'slides'] PAGE_EXCLUDES = ['node_modules', 'slides'] STATIC_EXCLUDES = ['node_modules', 'slides'] EXTRA_PATH_METADATA = { - 'extra/custom.css': {'path': 'static/custom.css'} + 'extra/custom.css': {'path': 'static/custom.css'}, + 'extra/custom.js': {'path': 'static/custom.js'} } PYGMENTS_STYLE = "monokai" USE_PAGER = True diff --git a/publishconf.py b/publishconf.py index 917a0ec3497ed401d49f7f6e99ecb737b8d2e119..0366084f97d62a624a66062b02bbeee417c47c55 100644 --- a/publishconf.py +++ b/publishconf.py @@ -10,7 +10,7 @@ import sys sys.path.append(os.curdir) from pelicanconf import * -SITEURL = 'http://blog.m4z3.me' +SITEURL = 'https://perso.limos.fr/~mazenovi/' RELATIVE_URLS = False FEED_ALL_ATOM = 'feeds/all.atom.xml'