Skip to content

Commit

Permalink
New footer in docsite (#39)
Browse files Browse the repository at this point in the history
* footer progress

* footer implementation for docsite

* yarn version changed

* spellcheck fix

---------

Co-authored-by: Alonso Guevara <[email protected]>
  • Loading branch information
gaudyb and AlonsoGuevara authored Apr 3, 2024
1 parent 1243856 commit b956384
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .yarn/versions/4ecf085d.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
releases:
"@graphrag/docsite": minor
19 changes: 19 additions & 0 deletions javascript/docsite/_includes/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
27 changes: 25 additions & 2 deletions javascript/docsite/_includes/page.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -40,6 +42,12 @@ title: GraphRAG
}
addEventListener("DOMContentLoaded", initialize)
function manageConsent() {
if(siteConsent.isConsentRequired){
siteConsent.manageConsent();
}
}
</script>
{% endblock %}
</head>
Expand Down Expand Up @@ -125,5 +133,20 @@ title: GraphRAG
{{ content | safe }}
</main>
</div>
<footer>
<a href="https://go.microsoft.com/fwlink/?LinkId=521839">Privacy</a>
|
<a href="https://go.microsoft.com/fwlink/?LinkId=2259814">Consumer Health Privacy</a>
|
<span id="cookiesManager" onClick="manageConsent();">Cookies</span>
|
<a href="https://go.microsoft.com/fwlink/?LinkID=206977">Terms of Use</a>
|
<a href="https://www.microsoft.com/trademarks">Trademarks</a>
|
<a href="https://www.microsoft.com" id="copyright"></a>
|
<a href="https://github.com/microsoft/graphrag">GitHub</a>
</footer>
</body>
</html>

0 comments on commit b956384

Please sign in to comment.