{"id":498,"date":"2021-11-10T13:01:26","date_gmt":"2021-11-10T18:01:26","guid":{"rendered":"https:\/\/www.marshall.edu\/website\/?page_id=498"},"modified":"2023-01-06T08:47:34","modified_gmt":"2023-01-06T13:47:34","slug":"countdown","status":"publish","type":"page","link":"https:\/\/www.marshall.edu\/marsha\/countdown\/","title":{"rendered":"Countdown"},"content":{"rendered":"<h2>Countdown Shortcode Parameters<\/h2>\n<p>The parameters for the embed twitter feed shortcode:<\/p>\n<ul>\n<li><strong>Title (title): <\/strong>This should be the title of the countdown.<\/li>\n<li><span class=\"inline bg-red-100 text-red-700 font-bold px-2 py-1 rounded-sm uppercase text-xs mr-2 my-1\">Required<\/span><strong>End Date (end_date): <\/strong>This should be the end date for the countdown in the format of &#8220;Aug 7, 2023 12:00:00&#8221;.<\/li>\n<\/ul>\n<h2>Countdown Shortcode Examples<\/h2>\n\n<div x-data=\"{ copied: false, rawCode: '' }\" x-init=\"rawCode = $refs.codeSource.textContent\" class=\"mb-12\">\n\n\t\t\t<div class=\"px-6 py-6 border border-b-0 rounded-t-lg border-gray-200 bg-white\">\n\t\t\t<script>\n(function () {\n\tconst second = 1000,\n\t\tminute = second * 60,\n\t\thour = minute * 60,\n\t\tday = hour * 24;\n\tlet endDate = \"Aug\\u00207,\\u00202023\\u002012\\u003A00\\u003A00\",\n\t\tcountDown = new Date(endDate).getTime(),\n\t\tx = setInterval(function() {\n\t\t\tlet now = new Date().getTime(),\n\t\t\t\tdistance = countDown - now;\n\t\t\tdocument.getElementById(\"days\").innerText = Math.floor(distance \/ (day)),\n\t\t\tdocument.getElementById(\"hours\").innerText = Math.floor((distance % (day)) \/ (hour)),\n\t\t\tdocument.getElementById(\"minutes\").innerText = Math.floor((distance % (hour)) \/ (minute)),\n\t\t\tdocument.getElementById(\"seconds\").innerText = Math.floor((distance % (minute)) \/ second);\n\t\t\tif (distance < 0) {\n\t\t\t\tcountdownEl = document.getElementById(\"countdown\"),\n\t\t\t\tcountdownEl.style.display = \"none\";\n\t\t\t\tclearInterval(x);\n\t\t\t}\n\t\t}, 0)\n}());\n<\/script>\n<div id=\"countdown\" class=\" \">\n\t<div class=\"\">\n\t\t<div class=\"text-center text-green text-3xl lg:text-5xl font-semibold\">Countdown Until the Time<\/div>\n\t\t<div class=\"flex space-x-0 justify-between lg:justify-center lg:space-x-12 mt-4 lg:mt-0\">\n\t\t\t<div class=\"uppercase text-center flex flex-col\"><span class=\"text-4xl lg:text-7xl text-green font-bold\" id=\"days\"><\/span><span class=\"text-sm lg:text-base font-semibold -mt-2\">Days<\/span><\/div>\n\t\t\t<div class=\"uppercase text-center flex flex-col\"><span class=\"text-4xl lg:text-7xl text-green font-bold\" id=\"hours\"><\/span><span class=\"text-sm lg:text-base font-semibold -mt-2\">Hours<\/span><\/div>\n\t\t\t<div class=\"uppercase text-center flex flex-col\"><span class=\"text-4xl lg:text-7xl text-green font-bold\" id=\"minutes\"><\/span><span class=\"text-sm lg:text-base font-semibold -mt-2\">Minutes<\/span><\/div>\n\t\t\t<div class=\"uppercase text-center flex flex-col\"><span class=\"text-4xl lg:text-7xl text-green font-bold\" id=\"seconds\"><\/span><span class=\"text-sm lg:text-base font-semibold -mt-2\">Seconds<\/span><\/div>\n\t\t<\/div>\n\t\t\t<\/div>\n<\/div>\n\n\t\t<\/div>\n\t\n\t<div class=\"\">\n\t\t<div class=\"flex items-center justify-between px-4 py-2.5\" style=\"background: #181825; border-bottom: 1px solid rgba(255,255,255,.06);\">\n\t\t\t<span class=\"text-[11px] font-medium tracking-wide text-white\/40\" style=\"font-family: 'JetBrains Mono', ui-monospace, monospace;\">Shortcode<\/span>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\t@click=\"navigator.clipboard.writeText(rawCode); copied = true; setTimeout(() => copied = false, 2000)\"\n\t\t\t\tclass=\"flex items-center gap-1.5 px-3 py-1.5 rounded text-[11px] font-medium cursor-pointer transition-all duration-150\"\n\t\t\t\t:class=\"copied\n\t\t\t\t\t? 'bg-green\/20 text-green border border-green\/30'\n\t\t\t\t\t: 'bg-white\/8 text-white\/60 border border-white\/10 hover:bg-white\/14 hover:text-white\/90'\"\n\t\t\t\tstyle=\"font-family: 'JetBrains Mono', ui-monospace, monospace;\"\n\t\t\t>\n\t\t\t\t<template x-if=\"!copied\">\n\t\t\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"h-3.5 w-3.5\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t<rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"\/>\n\t\t\t\t\t\t<path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\/>\n\t\t\t\t\t<\/svg>\n\t\t\t\t<\/template>\n\t\t\t\t<template x-if=\"copied\">\n\t\t\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"h-3.5 w-3.5\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n\t\t\t\t\t\t<polyline points=\"20 6 9 17 4 12\"\/>\n\t\t\t\t\t<\/svg>\n\t\t\t\t<\/template>\n\t\t\t\t<span x-text=\"copied ? 'Copied!' : 'Copy'\"><\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t\t<div class=\"rounded-b-lg overflow-x-auto\" style=\"background: #1e1e2e;\">\n\t\t\t<pre class=\"px-5 py-4\"><code x-ref=\"codeSource\" class=\"language-bbcode text-[13px] leading-relaxed\" style=\"font-family: 'JetBrains Mono', ui-monospace, monospace; color: #cdd6f4;\">[mu_countdown title=&quot;Countdown Until the Time&quot; end_date=&quot;Aug 7, 2023 12:00:00&quot;]<\/code><\/pre>\n\t\t<\/div>\n\t<\/div>\n\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Countdown Shortcode Parameters The parameters for the embed twitter feed shortcode: Title (title): This should be the title of the countdown. End Date (end_date): This should be the end date for the countdown in the format of &#8220;Aug 7, 2023 12:00:00&#8221;. Countdown Shortcode Examples<\/p>\n","protected":false},"author":203,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-sidebar-left.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-498","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.marshall.edu\/marsha\/wp-json\/wp\/v2\/pages\/498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marshall.edu\/marsha\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.marshall.edu\/marsha\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.marshall.edu\/marsha\/wp-json\/wp\/v2\/users\/203"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marshall.edu\/marsha\/wp-json\/wp\/v2\/comments?post=498"}],"version-history":[{"count":3,"href":"https:\/\/www.marshall.edu\/marsha\/wp-json\/wp\/v2\/pages\/498\/revisions"}],"predecessor-version":[{"id":821,"href":"https:\/\/www.marshall.edu\/marsha\/wp-json\/wp\/v2\/pages\/498\/revisions\/821"}],"wp:attachment":[{"href":"https:\/\/www.marshall.edu\/marsha\/wp-json\/wp\/v2\/media?parent=498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}