-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.html
More file actions
206 lines (175 loc) · 6.57 KB
/
Copy pathprofile.html
File metadata and controls
206 lines (175 loc) · 6.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Report</title>
<script src="https://docs.getgrist.com/grist-plugin-api.js"></script>
<style>
/* Google-style blue buttons */
button {
background-color: #1a73e8;
color: #fff;
padding: 10px 20px;
font-size: 14px;
border: none;
border-radius: 4px;
cursor: pointer;
}
/* Google-style gray secondary button */
.secondary-button {
background-color: #e8eaed;
color: #202124;
padding: 10px 20px;
font-size: 14px;
border: none;
border-radius: 4px;
cursor: pointer;
}
/* Extra spacing after the picture */
#image {
margin-bottom: 20px;
border-radius: 50%; /* Make the picture rounded */
}
/* Hide the JSON data visually */
#readout {
font-size: 0;
margin: -16px; /* Adjust this value to control how much to hide */
position: absolute;
left: -9999px;
}
/* Hide the name and image initially */
#name,
#image {
display: none;
}
/* Google-style grid layout */
.grid-container {
display: grid;
grid-template-columns: 1fr;
grid-gap: 40px;
margin: 40px; /* Increase the horizontal margin to 80px */
}
/* Custom lines */
hr {
border: none;
border-top: 1px solid #dadce0; /* Use Google-style gray for HR */
}
/* Align button to the right */
.align-right {
display: flex;
justify-content: flex-end;
}
/* Align name and picture on the same row */
.name-image-row {
display: flex;
justify-content: space-between;
align-items: center;
}
/* Align button and link on the same row with spacing */
.button-link-row {
display: flex;
justify-content: space-between;
margin-top: 20px;
}
/* Add spacing after .button-link-row */
.button-link-row + br {
margin-top: 60px;
}
/* Bigger font and increased line height for the paragraph */
.custom-paragraph {
font-size: 18px;
line-height: 1.6;
}
/* Google-style fonts */
body {
font-family: Arial, sans-serif;
}
h1 {
font-size: 32px;
font-weight: bold;
color: #202124;
margin: 0;
padding: 0;
}
h2 {
font-size: 24px;
font-weight: bold;
color: #202124;
margin: 0;
padding: 0;
}
p {
font-size: 14px;
color: #5f6368;
}
</style>
</head>
<body>
<pre id="readout">Waiting for data...</pre>
<script>
grist.ready();
grist.onRecord(function (record) {
document.getElementById('readout').innerHTML = JSON.stringify(record, null, 2);
// Save the JSON data to the local storage
localStorage.setItem('json_data', JSON.stringify(record));
// Hide the readout element after data is available
document.getElementById('readout').style.display = 'none';
});
</script>
<div class="grid-container">
<div>
<div class="name-image-row">
<h2 id="name"></h2>
<img id="image" src="" />
</div>
<hr>
</div>
<div>
<div>
<h1>Advanced Sustainability Assessment</h1>
<p class="custom-paragraph">
Envision a future where businesses are a force for good, prioritizing the well-being of people and the planet. They celebrate not just profits but the positive impact they create for society. Harmony with nature prevails, replacing wasteful practices with responsible stewardship. Growth means trust, empathy, and equality, enriching lives and ecosystems. Society becomes inclusive, just, and restorative as barriers to collective progress are dismantled. Together, let's create this world of boundless possibilities and profound transformation.<br><br>
Discover the detailed roadmap to this inspiring future in our comprehensive Assessment. Empower yourself to be part of the positive change we all envision. Click the button below to unlock the insights and join us on this transformative journey. Together, let's make a difference and shape a better world for generations to come.<br><br>
</p>
<div class="button-link-row">
<button id="logout" class="secondary-button" onclick="location.href='logout-url'">Logout</button>
<button id="Report">Create Assessment</button>
</div>
<br><br><br> <!-- Adding three line breaks after the button-link-row -->
<hr>
</div>
</div>
<!--
<script>
// Replace the <name> and <image> placeholders with actual values from the API
const nameElement = document.getElementById("name");
const imageElement = document.getElementById("image");
const storedInfo = localStorage.getItem("info");
if (storedInfo) {
const info = JSON.parse(storedInfo);
if (nameElement) {
nameElement.textContent = info.name;
// Show the name element after data is available
nameElement.style.display = "inline";
}
if (imageElement) {
imageElement.src = info.picture;
// Set the 'onload' event for the image element to ensure it's displayed after the image is fully loaded
imageElement.onload = () => {
// Show the image element after data is available
imageElement.style.display = "inline";
};
}
} else {
// If data is not available, show a message or handle it as needed
const messageElement = document.createElement("p");
messageElement.textContent = "Waiting for user data...";
document.body.appendChild(messageElement);
}
</script>
-->
<script type="module" src="profile.js"></script>
</body>
</html>