From 524e5623fadfc78bc315fabf8a106efa24332d0d Mon Sep 17 00:00:00 2001 From: Vincent Mazenod <vmazenod@gmail.com> Date: Tue, 25 Aug 2020 16:08:51 +0200 Subject: [PATCH] changer blog url --- content/extra/custom.js | 36 ++++++++++++++++++++++++++++++++++++ pelicanconf.py | 7 ++++--- publishconf.py | 2 +- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 content/extra/custom.js diff --git a/content/extra/custom.js b/content/extra/custom.js new file mode 100644 index 0000000..210e084 --- /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 cdeaf50..8d7d889 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 917a0ec..0366084 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' -- GitLab