diff --git a/assets/css/md.scss b/assets/css/md.scss index 12a98ab..fd313ec 100644 --- a/assets/css/md.scss +++ b/assets/css/md.scss @@ -9,6 +9,10 @@ $heading: (h1, 2.25, 800), (h2, 2, 700), (h3, 1.75, 600), (h4, 1.5, 600), } } +.md p { + margin: .75rem 0; +} + .md pre { font-size: 13px; line-height: 1.3; diff --git a/assets/js/friends.js b/assets/js/friends.js deleted file mode 100644 index 6807d7e..0000000 --- a/assets/js/friends.js +++ /dev/null @@ -1,57 +0,0 @@ -const dom = document.getElementById('friends') - -const topk = '{{.Site.Params.friends.topk}}' -const raw = '{{.Site.Params.friends.feeds}}' - -const feeds = raw.replace(/^\[|\]$/g, '').split(' ') - -feeds.forEach(v => fetch(v).then(r => r.text()).then(r => rss(r))) - -/** - * @param {string} xml - */ -function rss(xml) { - xml = xml.trim().replace(/\n/g, '') - const g = xml.matchAll(/<(item|entry)>.*?<\/(item|entry)>/g) - let n = +topk || 2; - while (n) { - const next = g.next() - if (next.done) { - break - } - - // title - const title = next.value[0].match(/(?<=