diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..88dfbde --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "atlascode.bitbucket.enabled": true +} \ No newline at end of file diff --git a/pages/api/days/[days].js b/pages/api/days/[days].js index c3b8319..4b24b31 100644 --- a/pages/api/days/[days].js +++ b/pages/api/days/[days].js @@ -70,7 +70,20 @@ const ApiResponse = async (req, res) => { ctx.textAlign = "left"; ctx.font = "50px AmaticSC"; //ctx.strokeText("WWW.GETAHEADCHRISTMAS.CO.UK", x, y); - ctx.fillText("WWW.GETAHEADCHRISTMAS.CO.UK", 40, 740); + var copyrightSymbol = 169; // 0xA9 + var $now = new Date(); + var $yearCount = $now.getFullYear(); + ctx.fillText( + String.fromCharCode(copyrightSymbol) + + " " + + "WWW.GETAHEADCHRISTMAS.CO.UK " + + " " + + $yearCount, + 40, + 740 + ); + + $yearCount; console.log(ctx); diff --git a/pages/api/sleeps/[sleeps].js b/pages/api/sleeps/[sleeps].js index fba5d9e..126a8e3 100644 --- a/pages/api/sleeps/[sleeps].js +++ b/pages/api/sleeps/[sleeps].js @@ -70,8 +70,18 @@ const ApiResponse = async (req, res) => { ctx.textAlign = "left"; ctx.font = "50px AmaticSC"; //ctx.strokeText("WWW.GETAHEADCHRISTMAS.CO.UK", x, y); - ctx.fillText("WWW.GETAHEADCHRISTMAS.CO.UK", 40, 740); - + var copyrightSymbol = 169; // 0xA9 + var $now = new Date(); + var $yearCount = $now.getFullYear(); + ctx.fillText( + String.fromCharCode(copyrightSymbol) + + " " + + "WWW.GETAHEADCHRISTMAS.CO.UK " + + " " + + $yearCount, + 40, + 740 + ); console.log(ctx); const png = canvas.toBuffer("image/png"); diff --git a/pages/api/weeks/[weeks].js b/pages/api/weeks/[weeks].js index 2188708..cdcff6c 100644 --- a/pages/api/weeks/[weeks].js +++ b/pages/api/weeks/[weeks].js @@ -62,8 +62,18 @@ const ApiResponse = async (req, res) => { ctx.textAlign = "left"; ctx.font = "50px AmaticSC"; //ctx.strokeText("WWW.GETAHEADCHRISTMAS.CO.UK", x, y); - ctx.fillText("WWW.GETAHEADCHRISTMAS.CO.UK", 40, 740); - + var copyrightSymbol = 169; // 0xA9 + var $now = new Date(); + var $yearCount = $now.getFullYear(); + ctx.fillText( + String.fromCharCode(copyrightSymbol) + + " " + + "WWW.GETAHEADCHRISTMAS.CO.UK " + + " " + + $yearCount, + 40, + 740 + ); console.log(ctx); const png = canvas.toBuffer("image/png"); diff --git a/pages/api/weekstoday/[weekstoday].js b/pages/api/weekstoday/[weekstoday].js index 4118237..4c3e847 100644 --- a/pages/api/weekstoday/[weekstoday].js +++ b/pages/api/weekstoday/[weekstoday].js @@ -62,7 +62,18 @@ const ApiResponse = async (req, res) => { ctx.textAlign = "left"; ctx.font = "50px AmaticSC"; //ctx.strokeText("WWW.GETAHEADCHRISTMAS.CO.UK", x, y); - ctx.fillText("WWW.GETAHEADCHRISTMAS.CO.UK", 40, 740); + var copyrightSymbol = 169; // 0xA9 + var $now = new Date(); + var $yearCount = $now.getFullYear(); + ctx.fillText( + String.fromCharCode(copyrightSymbol) + + " " + + "WWW.GETAHEADCHRISTMAS.CO.UK " + + " " + + $yearCount, + 40, + 740 + ); console.log(ctx); diff --git a/pages/days.js b/pages/days/[days].js similarity index 92% rename from pages/days.js rename to pages/days/[days].js index 94f1696..f507b59 100644 --- a/pages/days.js +++ b/pages/days/[days].js @@ -8,7 +8,7 @@ import axios from "axios"; const FourOhFour = (props) => { const router = useRouter(); - let numbDays = router.query.n; + let numbDays = router.query.days; return (