diff --git a/.yarn/versions/4ecf085d.yml b/.yarn/versions/4ecf085d.yml new file mode 100644 index 0000000000..0e8542a1e2 --- /dev/null +++ b/.yarn/versions/4ecf085d.yml @@ -0,0 +1,2 @@ +releases: + "@graphrag/docsite": minor diff --git a/javascript/docsite/_includes/page.css b/javascript/docsite/_includes/page.css index 28aa415710..c35f9aa009 100644 --- a/javascript/docsite/_includes/page.css +++ b/javascript/docsite/_includes/page.css @@ -9,6 +9,25 @@ body{ margin: 0; } +footer{ + width: 100%; + height: 32px; + font-size: 12px; + display: flex; + flex-direction: row; + justify-content: center; + gap: 18px; + align-items: center; + color: #5d5d5d; + background: #e9eaeb; + border-top: 1px solid #c4c5c6; +} + +#cookiesManager{ + cursor: pointer; + color: #485fc7; +} + .page-content { display: flex; flex-direction: row; diff --git a/javascript/docsite/_includes/page.njk b/javascript/docsite/_includes/page.njk index 9be7a748ae..91282c81bc 100644 --- a/javascript/docsite/_includes/page.njk +++ b/javascript/docsite/_includes/page.njk @@ -27,11 +27,13 @@ title: GraphRAG console.log("onConsentChanged", categoryPreferences); } + var siteConsent + function initialize(){ - var siteConsent + var currentYear = new Date().getFullYear() + document.getElementById("copyright").innerHTML = `©️ ${currentYear} Microsoft`; window.WcpConsent && WcpConsent.init("en-US", "cookie-banner", function (err, _siteConsent) { if (!err) { - console.log("consentUpdated", _siteConsent) siteConsent = _siteConsent; //siteConsent is used to get the current consent } else { console.log("Error initializing WcpConsent: "+ err); @@ -40,6 +42,12 @@ title: GraphRAG } addEventListener("DOMContentLoaded", initialize) + + function manageConsent() { + if(siteConsent.isConsentRequired){ + siteConsent.manageConsent(); + } + } {% endblock %} @@ -125,5 +133,20 @@ title: GraphRAG {{ content | safe }} + \ No newline at end of file