From 730f1d48df7d7a553e344644e9420e721c17f6cd Mon Sep 17 00:00:00 2001 From: Tully Foote Date: Mon, 1 Jan 2024 21:35:13 -0800 Subject: [PATCH 1/3] make Q&A result template generic --- _includes/package_body.html | 26 +------------------------- _layouts/package.html | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/_includes/package_body.html b/_includes/package_body.html index 742298a7..ea7f1b41 100644 --- a/_includes/package_body.html +++ b/_includes/package_body.html @@ -448,30 +448,6 @@

Recent questions tagged {{package.name}} at < - @@ -500,7 +476,7 @@

{{title}}

question.id = Math.round(Math.random() * 99999.0); return question; }); - var template = jQuery("#{{distro}}-question-list-template").text(); + var template = jQuery("#question-list-template").text(); Mustache.parse(template); var rendered = Mustache.render(template, {questions: questions}); jQuery("#{{distro}}-question-list").html(rendered); diff --git a/_layouts/package.html b/_layouts/package.html index 08d54328..7c9e7dee 100644 --- a/_layouts/package.html +++ b/_layouts/package.html @@ -51,6 +51,33 @@ {% endfor %} +{% comment %} Template for Q&A content {% endcomment %} + + + - - - - - - + + + + + + + + \ No newline at end of file diff --git a/_layouts/package.html b/_layouts/package.html index 7c9e7dee..16f23858 100644 --- a/_layouts/package.html +++ b/_layouts/package.html @@ -51,32 +51,7 @@ {% endfor %} -{% comment %} Template for Q&A content {% endcomment %} - - +{% include package_qna_updater.html %}