{"id":1130,"date":"2025-10-30T14:13:07","date_gmt":"2025-10-30T12:13:07","guid":{"rendered":"https:\/\/mareklukk24.thkit.ee\/wp\/?page_id=1130"},"modified":"2025-10-30T14:25:09","modified_gmt":"2025-10-30T12:25:09","slug":"kalkulaator","status":"publish","type":"page","link":"https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/","title":{"rendered":"Kalkulaator"},"content":{"rendered":"\n<h1>Tupsu Kalkulaator<\/h1>\n\n<table>\n    <tr>\n        <td>\n            <h2>Vali tupsu t\u00fc\u00fcp:<\/h2>\n        <\/td>\n        <td>\n            <input type=\"radio\" id=\"chapo-white-cola\" name=\"snus\" onclick=\"muudaPilt()\">\n            <label for=\"chapo-white-cola\">Chapo White Cola &#8211; 2.50\u20ac<\/label><br>\n\n            <input type=\"radio\" id=\"extreme-x-lime\" name=\"snus\" onclick=\"muudaPilt()\">\n            <label for=\"extreme-x-lime\">Extreme X Lime &#8211; 3.20\u20ac<\/label><br>\n\n            <input type=\"radio\" id=\"killa-cold-mint\" name=\"snus\" onclick=\"muudaPilt()\">\n            <label for=\"killa-cold-mint\">Killa Cold Mint &#8211; 3.80\u20ac<\/label><br>\n\n            <input type=\"radio\" id=\"pablo-ice-cold\" name=\"snus\" onclick=\"muudaPilt()\">\n            <label for=\"pablo-ice-cold\">Pablo Ice Cold &#8211; 2.80\u20ac<\/label><br>\n\n            <input type=\"radio\" id=\"pablo-kiwi\" name=\"snus\" onclick=\"muudaPilt()\">\n            <label for=\"pablo-kiwi\">Pablo Kiwi &#8211; 4.20\u20ac<\/label><br>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>\n            <h2>Pilt:<\/h2>\n        <\/td>\n        <td>\n            <img decoding=\"async\" id=\"tupsPilt\" src=\"tipsuPildid\/pilt.png\" alt=\"Tupsu pilt\" >\n        <\/td>\n\n    <\/tr>\n    <tr>\n        <td>\n            <h2>Vali tupsu tugevus:<\/h2>\n        <\/td>\n        <td>\n            <input type=\"radio\" id=\"nork\" name=\"tugevus\" onchange=\"arvutaHind()\">\n            <label for=\"nork\">N\u00f5rk (+0.50\u20ac)<\/label><br>\n\n            <input type=\"radio\" id=\"keskmine\" name=\"tugevus\" onchange=\"arvutaHind()\">\n            <label for=\"keskmine\">Keskmine (+1.00\u20ac)<\/label><br>\n\n            <input type=\"radio\" id=\"tugev\" name=\"tugevus\" onchange=\"arvutaHind()\">\n            <label for=\"tugev\">Tugev (+1.50\u20ac)<\/label><br>\n\n            <input type=\"radio\" id=\"extra-tugev\" name=\"tugevus\" onchange=\"arvutaHind()\">\n            <label for=\"extra-tugev\">Extra tugev (+2.00\u20ac)<\/label><br>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>\n            <h2>Kogus:<\/h2>\n        <\/td>\n        <td>\n            <label for=\"kogus\"><\/label>\n            <input type=\"number\" id=\"kogus\" min=\"1\" value=\"1\" placeholder=\"Sisesta kogus\" oninput=\"arvutaHind()\">\n        <\/td>\n    <\/tr>\n    <tr>\n        <td colspan=\"2\">\n            <h2>L\u00f5pphind:<\/h2>\n            <p id=\"totalPrice\">0.00\u20ac<\/p>\n        <\/td>\n    <\/tr>\n<\/table>\n\n\n\n<style>\ntable {\n    border-collapse: collapse;\n    width: 100%;\n}\n\nth, td {\n    border: 1px solid #ddd;\n    padding: 8px;\n    text-align: left;\n}\n#tupsPilt{\n    width: 200px;\n    height: 150px;\n}\n\n<\/style>\n\n\n\n<script>\nconst chapoWhiteColaHind = 2.50;\nconst extremeXLimeHind = 3.20;\nconst killaColdMintHind = 3.80;\nconst pabloIceColdHind = 2.80;\nconst pabloKiwiHind = 4.20;\n\nfunction muudaPilt() {\n    let img = document.getElementById(\"tupsPilt\");\n\n    let chapoWhiteCola = document.getElementById(\"chapo-white-cola\");\n    let extremeXLime = document.getElementById(\"extreme-x-lime\");\n    let killaColdMint = document.getElementById(\"killa-cold-mint\");\n    let pabloIceCold = document.getElementById(\"pablo-ice-cold\");\n    let pabloKiwi = document.getElementById(\"pablo-kiwi\");\n\n    if (chapoWhiteCola.checked) {\n        img.src = \"https:\/\/mareklukk24.thkit.ee\/wp\/wp-content\/uploads\/2025\/10\/chapo-white-cola.webp\";\n    } else if (extremeXLime.checked) {\n        img.src = \"https:\/\/mareklukk24.thkit.ee\/wp\/wp-content\/uploads\/2025\/10\/extreme-x-lime.webp\";\n    } else if (killaColdMint.checked) {\n        img.src = \"https:\/\/mareklukk24.thkit.ee\/wp\/wp-content\/uploads\/2025\/10\/killa-cold-mint.webp\";\n    } else if (pabloIceCold.checked) {\n        img.src = \"https:\/\/mareklukk24.thkit.ee\/wp\/wp-content\/uploads\/2025\/10\/pablo-ice-cold.webp\";\n    } else if (pabloKiwi.checked) {\n        img.src = \"https:\/\/mareklukk24.thkit.ee\/wp\/wp-content\/uploads\/2025\/10\/pablo-kiwi.webp\";\n    }\n\n    arvutaHind();\n}\n\nfunction arvutaHind() {\n    let summa = document.getElementById(\"totalPrice\");\n    let kogusElement = document.getElementById(\"kogus\");\n    \n    let kogus = kogusElement.value;\n\n    let hind = 0;\n    let chapoWhiteCola = document.getElementById(\"chapo-white-cola\");\n    let extremeXLime = document.getElementById(\"extreme-x-lime\");\n    let killaColdMint = document.getElementById(\"killa-cold-mint\");\n    let pabloIceCold = document.getElementById(\"pablo-ice-cold\");\n    let pabloKiwi = document.getElementById(\"pablo-kiwi\");\n\n\n    if (chapoWhiteCola.checked) {\n        hind = chapoWhiteColaHind;\n    } else if (extremeXLime.checked) {\n        hind = extremeXLimeHind;\n    } else if (killaColdMint.checked) {\n        hind = killaColdMintHind;\n    } else if (pabloIceCold.checked) {\n        hind = pabloIceColdHind;\n    } else if (pabloKiwi.checked) {\n        hind = pabloKiwiHind;\n    }\n\n    let nork = document.getElementById(\"nork\");\n    let keskmine = document.getElementById(\"keskmine\");\n    let tugev = document.getElementById(\"tugev\");\n    let extraTugev = document.getElementById(\"extra-tugev\");\n\n    let lisahind = 0;\n    if (nork.checked) {\n        lisahind = 0.50;\n    }\n    else if  (keskmine.checked) {\n        lisahind = 1.00;\n    }\n    else if (tugev.checked) {\n        lisahind = 1.50;\n    }\n    else if (extraTugev.checked) {\n        lisahind = 2.00;\n    }\n\n    if (kogus > 0 && hind > 0) {\n        let kokku = kogus * (hind + lisahind);\n        summa.innerHTML = kokku.toFixed(2) + \"\u20ac\";\n    } else {\n        summa.innerHTML = \"0.00\u20ac\";\n    }\n}\n<\/script>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tupsu Kalkulaator Vali tupsu t\u00fc\u00fcp: Chapo White Cola &#8211; 2.50\u20ac Extreme X Lime &#8211; 3.20\u20ac Killa Cold Mint &#8211; 3.80\u20ac Pablo Ice [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1130","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Kalkulaator - Marek Lukk portfoolio<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/\" \/>\n<meta property=\"og:locale\" content=\"et_EE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kalkulaator - Marek Lukk portfoolio\" \/>\n<meta property=\"og:description\" content=\"Tupsu Kalkulaator Vali tupsu t\u00fc\u00fcp: Chapo White Cola &#8211; 2.50\u20ac Extreme X Lime &#8211; 3.20\u20ac Killa Cold Mint &#8211; 3.80\u20ac Pablo Ice [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/\" \/>\n<meta property=\"og:site_name\" content=\"Marek Lukk portfoolio\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-30T12:25:09+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/kalkulaator\\\/\",\"url\":\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/kalkulaator\\\/\",\"name\":\"Kalkulaator - Marek Lukk portfoolio\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/#website\"},\"datePublished\":\"2025-10-30T12:13:07+00:00\",\"dateModified\":\"2025-10-30T12:25:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/kalkulaator\\\/#breadcrumb\"},\"inLanguage\":\"et\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/kalkulaator\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/kalkulaator\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kalkulaator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/#website\",\"url\":\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/\",\"name\":\"Marek Lukk portfoolio\",\"description\":\"Noorem tarkvaraarendaja\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mareklukk24.thkit.ee\\\/wp\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"et\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kalkulaator - Marek Lukk portfoolio","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/","og_locale":"et_EE","og_type":"article","og_title":"Kalkulaator - Marek Lukk portfoolio","og_description":"Tupsu Kalkulaator Vali tupsu t\u00fc\u00fcp: Chapo White Cola &#8211; 2.50\u20ac Extreme X Lime &#8211; 3.20\u20ac Killa Cold Mint &#8211; 3.80\u20ac Pablo Ice [&hellip;]","og_url":"https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/","og_site_name":"Marek Lukk portfoolio","article_modified_time":"2025-10-30T12:25:09+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/","url":"https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/","name":"Kalkulaator - Marek Lukk portfoolio","isPartOf":{"@id":"https:\/\/mareklukk24.thkit.ee\/wp\/#website"},"datePublished":"2025-10-30T12:13:07+00:00","dateModified":"2025-10-30T12:25:09+00:00","breadcrumb":{"@id":"https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/#breadcrumb"},"inLanguage":"et","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/mareklukk24.thkit.ee\/wp\/kalkulaator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mareklukk24.thkit.ee\/wp\/"},{"@type":"ListItem","position":2,"name":"Kalkulaator"}]},{"@type":"WebSite","@id":"https:\/\/mareklukk24.thkit.ee\/wp\/#website","url":"https:\/\/mareklukk24.thkit.ee\/wp\/","name":"Marek Lukk portfoolio","description":"Noorem tarkvaraarendaja","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mareklukk24.thkit.ee\/wp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"et"}]}},"_links":{"self":[{"href":"https:\/\/mareklukk24.thkit.ee\/wp\/wp-json\/wp\/v2\/pages\/1130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mareklukk24.thkit.ee\/wp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mareklukk24.thkit.ee\/wp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mareklukk24.thkit.ee\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mareklukk24.thkit.ee\/wp\/wp-json\/wp\/v2\/comments?post=1130"}],"version-history":[{"count":4,"href":"https:\/\/mareklukk24.thkit.ee\/wp\/wp-json\/wp\/v2\/pages\/1130\/revisions"}],"predecessor-version":[{"id":1142,"href":"https:\/\/mareklukk24.thkit.ee\/wp\/wp-json\/wp\/v2\/pages\/1130\/revisions\/1142"}],"wp:attachment":[{"href":"https:\/\/mareklukk24.thkit.ee\/wp\/wp-json\/wp\/v2\/media?parent=1130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}