<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pūrongo Ako – Lesson Log Generator</title>
font-family: Arial, sans-serif;
//background-color: #eef0d5
font-family: 'Georgia', serif;
//font-family: 'Lato', serif;
font-size: 20.8px; /* Increased font size for the report */
line-height: 1.5; /* Added for better line spacing */
textarea, select, button {
background-color: #007BFF;
background-color: #0056b3;
<div style="font-family: Arial; font-size: 20.8px; max-width: 780px;">
<label for="log-date" style="font-weight: bold;">Rā – Date:</label><br>
<div id="log-date" style="font-size: 20.8px; padding: 4px 0;"></div>
<h3>Pūrongo Ako – Lesson Log Generator</h3>
<label for="class">My Effort Today:</label><br>
<option value="">Select Effort</option>
<option value="mīharo">mīharo</option>
<option value="tino pai rawa atu">tino pai rawa atu</option>
<option value="taraiwa">taraiwa</option>
<option value="tupu">tupu</option>
<option value="tino pai rawa atu">tino pai rawa atu</option>
<option value="tino pai">tino pai</option>
<option value="pai">pai</option>
<label for="activity">I Mahia Ai – What You Did:</label><br>
<textarea id="activity" rows="4" placeholder="e.g. We listened to Māui and the Sun"></textarea><br><br>
<label for="kupu">Kupu Hou – New Kupu You Learned:</label><br>
<textarea id="kupu" rows="2" placeholder="e.g. tōmuri, tere"></textarea><br><br>
<label for="reflection">Learning reflection:</label><br>
<div style="font-size: 18px; margin-bottom: 4px;">
<strong>How are you taking ownership of your learning?</strong><br>
<textarea id="reflection" rows="10" placeholder="Describe what went well for you today.
Did you ask for help when you needed it?
How did you take charge of your learning?"></textarea><br><br>
<button onclick="generateLog()">Generate Log</button>
<button onclick="copyLog()" style="margin-left: 10px;">📋 Copy Log</button><br><br>
<label for="log">Pūrongo – Log (copy below):</label><br>
<div id="log" class="log-content"></div>
// Formatters: Māori (with macrons) and English
function formatDateMāori(dateObj) {
"Kohi-tātea", "Hui-tanguru", "Poutū-te-rangi", "Paenga-whāwhā",
"Haratua", "Pipiri", "Hōngongoi", "Here-turi-kōkā",
"Mahuru", "Whiringa-ā-nuku", "Whiringa-ā-rangi", "Hakihea"
const day = dateObj.getDate();
const month = months[dateObj.getMonth()];
const year = dateObj.getFullYear();
return `${day} o ${month} ${year}`;
function formatDateEnglish(dateObj) {
const day = dateObj.getDate();
const month = dateObj.toLocaleString('en-NZ', { month: 'long' });
const year = dateObj.getFullYear();
return `${day} ${month} ${year}`;
// Populate the date (display-only) on load
document.addEventListener("DOMContentLoaded", () => {
const today = new Date();
const formattedMāori = formatDateMāori(today);
const formattedEnglish = formatDateEnglish(today);
document.getElementById("log-date").textContent = `${formattedMāori} (${formattedEnglish})`;
const formattedDate = document.getElementById("log-date").textContent || "";
const classVal = document.getElementById("class").value;
const activity = document.getElementById("activity").value;
const kupu = document.getElementById("kupu").value;
const reflection = document.getElementById("reflection").value;
const log = `My Lesson Log 📅 Rā: ${formattedDate}
Kua <strong>${classVal}</strong> ahau i tāku ako i tēnei rā.
📚 I Mahia Ai – What You Did:
🗣️ Kupu Hou – New Kupu You Learned:
✍️ Tāku ako i tēnei rā - My learning today:
// Use innerHTML to render the HTML tags
document.getElementById("log").innerHTML = log;
// Copy log with modern clipboard API fallback
// Use textContent to get only the plain text for copying
const logText = document.getElementById("log").textContent || "";
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(logText)
.then(() => alert("Log copied to clipboard!"))
.catch(() => fallbackCopy());
function fallbackCopy() {
const textarea = document.createElement("textarea");
textarea.value = logText;
document.body.appendChild(textarea);
textarea.setSelectionRange(0, 99999);
document.execCommand("copy");
alert("Log copied to clipboard!");
alert("Unable to copy automatically — please select and copy the log manually.");
document.body.removeChild(textarea);