-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cookie banner implementation for docsite (#30)
* cookie banner implementation for docsite * version check update --------- Co-authored-by: Alonso Guevara <[email protected]>
- Loading branch information
1 parent
77f9dba
commit a4bd4a2
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
releases: | ||
"@graphrag/docsite": minor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ body{ | |
|
||
header { | ||
background-color: lightgrey; | ||
height: 40px; | ||
height: 2%; | ||
padding: 10px; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,33 @@ title: GraphRAG | |
<link href="https://unpkg.com/[email protected]/themes/prism-okaidia.css" rel="stylesheet"> | ||
<style>{{ css | safe }}</style> | ||
{% mermaid_js %} | ||
|
||
{% block js %} | ||
<script src="https://wcpstatic.microsoft.com/mscc/lib/v2/wcp-consent.js" type="text/javascript"></script> | ||
<script> | ||
function onConsentChanged(categoryPreferences) { | ||
console.log("onConsentChanged", categoryPreferences); | ||
} | ||
function initialize(){ | ||
var siteConsent | ||
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); | ||
} | ||
}, onConsentChanged, WcpConsent.themes.light); | ||
} | ||
addEventListener("DOMContentLoaded", initialize) | ||
</script> | ||
{% endblock %} | ||
</head> | ||
<body> | ||
<header> | ||
<div id="cookie-banner"></div> | ||
<a href="/"><span class="logotitle">GraphRAG</span></a> | ||
</header> | ||
<div class="page-content"> | ||
|