Skip to content

Commit 4b574be

Browse files
author
Steve Kwak
committed
header adjusted
1 parent aeef514 commit 4b574be

File tree

2 files changed

+104
-87
lines changed

2 files changed

+104
-87
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Summary
22

3+
* [Overview](./README.md)
34
* [Develop](./develop.md)
45
* [Quick start](./develop.md)
56
* [Quick start](./tutorials/quick-start/index.md)

public/header.html

Lines changed: 103 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,116 @@
1-
<!-- privacy management via evidon -->
2-
<link rel="stylesheet" type="text/css" href="https://wwwimages2.adobe.com/etc/beagle/public/globalnav/adobe-privacy/latest/privacy.min.css">
3-
<script defer src="https://wwwimages2.adobe.com/etc/beagle/public/globalnav/adobe-privacy/latest/privacy.min.js"></script>
4-
<script defer>
5-
function createTrackerID() {
6-
let fmt = 'xxxxxxxx-xxxx-4xxx-1xxx-xxxxxxxxxxxx';
7-
return fmt.split("").map(function (c) {
8-
if (c === 'x') {
9-
return Math.floor(Math.random() * 16).toString(16);
10-
} else {
11-
return c;
12-
}
13-
}).join("");
14-
}
15-
16-
let INGEST_ENDPOINT = "https://cc-api-data.adobe.io/ingest";
17-
let TRACKER_KEY = "xdplatform";
18-
let ENVIRONMENT = "prod";
19-
let tracker;
20-
let evidonTimer = setTimeout(track, 500);
21-
22-
/* report page hit IF we have privacy consent from the user */
23-
window.addEventListener("adobePrivacy:PrivacyConsent", function () {
24-
25-
// check if the user has a cookie
26-
let cookies = document.cookie.split(';');
27-
let trackerCookie = cookies.filter(function (v) {
28-
return v.trim().substr(0, TRACKER_KEY.length + 1) === TRACKER_KEY + '=';
29-
});
30-
if (trackerCookie.length > 0) {
31-
tracker = trackerCookie[0].split("=")[1];
1+
<!-- privacy management via evidon -->
2+
<link rel="stylesheet" type="text/css"
3+
href="https://wwwimages2.adobe.com/etc/beagle/public/globalnav/adobe-privacy/latest/privacy.min.css">
4+
<script defer
5+
src="https://wwwimages2.adobe.com/etc/beagle/public/globalnav/adobe-privacy/latest/privacy.min.js"></script>
6+
<script defer>
7+
function createTrackerID() {
8+
let fmt = 'xxxxxxxx-xxxx-4xxx-1xxx-xxxxxxxxxxxx';
9+
return fmt.split("").map(function (c) {
10+
if (c === 'x') {
11+
return Math.floor(Math.random() * 16).toString(16);
3212
} else {
33-
tracker = createTrackerID();
34-
document.cookie = TRACKER_KEY + "=" + tracker;
13+
return c;
3514
}
15+
}).join("");
16+
}
3617

37-
clearInterval(evidonTimer);
38-
track();
18+
let INGEST_ENDPOINT = "https://cc-api-data.adobe.io/ingest";
19+
let TRACKER_KEY = "xdplatform";
20+
let ENVIRONMENT = "prod";
21+
let tracker;
22+
let evidonTimer = setTimeout(track, 500);
3923

40-
if (typeof gitbook !== "undefined") {
41-
gitbook.events.on("page.change", () => track());
42-
}
24+
/* report page hit IF we have privacy consent from the user */
25+
window.addEventListener("adobePrivacy:PrivacyConsent", function () {
26+
27+
// check if the user has a cookie
28+
let cookies = document.cookie.split(';');
29+
let trackerCookie = cookies.filter(function (v) {
30+
return v.trim().substr(0, TRACKER_KEY.length + 1) === TRACKER_KEY + '=';
4331
});
32+
if (trackerCookie.length > 0) {
33+
tracker = trackerCookie[0].split("=")[1];
34+
} else {
35+
tracker = createTrackerID();
36+
document.cookie = TRACKER_KEY + "=" + tracker;
37+
}
4438

45-
function track() {
39+
clearInterval(evidonTimer);
40+
track();
4641

47-
// track the page hit
48-
let req = new XMLHttpRequest();
49-
req.open("POST", INGEST_ENDPOINT);
42+
if (typeof gitbook !== "undefined") {
43+
gitbook.events.on("page.change", () => track());
44+
}
45+
});
5046

51-
req.setRequestHeader("Content-Type", "application/json");
52-
req.setRequestHeader("X-API-Key", "xdplatform-web-service");
47+
function track() {
5348

54-
// (Note: we don't care about errors here)
49+
// track the page hit
50+
let req = new XMLHttpRequest();
51+
req.open("POST", INGEST_ENDPOINT);
5552

56-
let data = {
57-
"events": [{
58-
"project": "xdplatform-web-service",
59-
"environment": ENVIRONMENT,
60-
"time": new Date().toISOString(),
61-
"ingesttype": "dunamis",
62-
"data": {
63-
"event.workflow": "XD",
64-
"event.category": "WEB",
65-
"event.subcategory": "VIEW",
66-
"event.type": "render",
67-
"event.type": "page",
68-
"event.pagename": location.hostname + location.pathname,
69-
"event.user_guid": tracker || createTrackerID(), // fall back to random ID (in case of no evidon)
70-
"event.user_agent": navigator.userAgent,
71-
"event.language": navigator.language,
72-
"event.url": location.href,
73-
"event.referrer": document.referrer,
74-
"source.name": "XD Platform",
75-
"source.platform": "Web"
76-
}
77-
}]
78-
};
53+
req.setRequestHeader("Content-Type", "application/json");
54+
req.setRequestHeader("X-API-Key", "xdplatform-web-service");
7955

80-
req.send(JSON.stringify(data));
56+
// (Note: we don't care about errors here)
8157

82-
}
83-
</script>
58+
let data = {
59+
"events": [{
60+
"project": "xdplatform-web-service",
61+
"environment": ENVIRONMENT,
62+
"time": new Date().toISOString(),
63+
"ingesttype": "dunamis",
64+
"data": {
65+
"event.workflow": "XD",
66+
"event.category": "WEB",
67+
"event.subcategory": "VIEW",
68+
"event.type": "render",
69+
"event.type": "page",
70+
"event.pagename": location.hostname + location.pathname,
71+
"event.user_guid": tracker || createTrackerID(), // fall back to random ID (in case of no evidon)
72+
"event.user_agent": navigator.userAgent,
73+
"event.language": navigator.language,
74+
"event.url": location.href,
75+
"event.referrer": document.referrer,
76+
"source.name": "XD Platform",
77+
"source.platform": "Web"
78+
}
79+
}]
80+
};
81+
82+
req.send(JSON.stringify(data));
83+
84+
}
85+
</script>
8486

85-
<header style="border-bottom: 1px solid #ddd; height: 96px; display: flex; flex-direction: row; align-items: center;">
86-
<a href="/" style="height: 48px; width: 48px; margin: 0px 24px 24px; position: relative; top: 14px;">
87-
<img src="/plugin-docs/images/xd-logo.png" style="height: 48px; width: 48px;"></a>
88-
<h1 style="font-size: 24px; margin-top: 10px;"><a href="/">Adobe XD Platform</a></h1>
89-
<ul style="list-style: none; margin-top: 18px;">
90-
<li style="display: inline-block; margin-right: 24px; font-size: 14px;"><a href="/plugin-docs/" style="color: rgb(255, 38, 190); font-weight: bold; text-decoration: none;">Overview</a></li>
91-
<li style="display: inline-block; margin-right: 24px; font-size: 14px;"><a href="/plugin-docs/tutorials/quick-start" style="color: rgb(255, 38, 190); font-weight: bold; text-decoration: none;">Quick
92-
Start</a></li>
93-
<li style="display: inline-block; margin-right: 24px; font-size: 14px;"><a href="/plugin-docs/reference/how-to-read.html" style="color: rgb(255, 38, 190); font-weight: bold; text-decoration: none;">API
94-
Reference</a></li>
95-
<li style="display: inline-block; margin-right: 24px; font-size: 14px;"><a href="https://github.com/AdobeXD/plugin-samples" target="_blank" style="color: rgb(255, 38, 190); font-weight: bold; text-decoration: none;">Samples</a></li>
96-
<li style="display: inline-block; margin-right: 24px; font-size: 14px;"><a href="/plugin-docs/community.html" style="color: rgb(255, 38, 190); font-weight: bold; text-decoration: none;">Community</a></li>
97-
<li style="display: inline-block; margin-right: 24px; font-size: 14px;"><a target="_blank" href="https://console.adobe.io/plugins" style="color: rgb(255, 38, 190); font-weight: bold; text-decoration: none;">Submit
98-
Plugin</a></li>
99-
</ul>
100-
</header>
87+
<header
88+
style="margin-left: 5%; border-bottom: 1px solid #ddd; height: 96px; display: flex; flex-direction: row; align-items: center;">
89+
<a href="/" style="height: 48px; width: 48px; margin: 0px 24px 24px 0px; position: relative; top: 14px;">
90+
<img src="/plugin-docs/images/xd-logo.png" style="height: 48px; width: 48px; margin-left: 0"></a>
91+
<h1 style="font-size: 24px; margin-top: 10px; font-weight: bold; font-family: roboto"><a href="/">Adobe XD
92+
Platform</a></h1>
93+
<ul style="list-style: none; margin-top: 15px; margin-left: 50px;">
94+
<li
95+
style="display: inline-block; list-style: none; text-align: -webkit-match-parent; margin-right: 24px; font-size: 14px;">
96+
<a href="/plugin-docs/" style="color: #323232; text-decoration: none; font-family: roboto, medium; ">Plugin
97+
APIs</a>
98+
</li>
99+
<li
100+
style="display: inline-block; list-style: none; text-align: -webkit-match-parent; margin-right: 24px; font-size: 14px;">
101+
<a href="/plugin-docs/tutorials/quick-start"
102+
style="color: #323232; text-decoration: none; font-family: roboto, medium; ">Cloud Contents
103+
APIs</a></li>
104+
<li
105+
style="display: inline-block; list-style: none; text-align: -webkit-match-parent; margin-right: 24px; font-size: 14px;">
106+
<a href="/plugin-docs/reference/how-to-read.html"
107+
style="color: #323232; text-decoration: none; font-family: roboto, medium; ">Community &
108+
Support</a></li>
109+
</ul>
110+
<!-- <a style="margin-left:auto; margin-right:10%;" href="https://console.adobe.io/plugins">
111+
<button type="button" class="console-btn coral-btn coral-btn-cta"> I/O Developer Console</button>
112+
</a> -->
113+
</header>
114+
<!-- <div class="divider">
115+
<p class="divider-text">Community and Support</p>
116+
</div> -->

0 commit comments

Comments
 (0)