<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- Load the library in the head -->
<script src="https://edu.labir.cz/software/1.3.4/embed.js"></script>
<link href="https://edu.labir.cz/software/1.3.4/embed.css" rel="stylesheet">
</head>
<body>
<p>Ukázka s pokročilými paletami a s teplotním rozsahem</p>
<!-- Provide additional parameters to the webcomponent -->
<thermal-file-app
url="https://edu.labir.cz/wp-content/uploads/2024/05/2-1__soleni-ledu__image_02.lrc"
advanced-palettes="true"
palette="rainbow_hc"
from="7"
to="27"
></thermal-file-app>
<body>
</hmtl><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- Load the library in the head -->
<script src="https://edu.labir.cz/software/1.3.4/embed.js"></script>
<link href="https://edu.labir.cz/software/1.3.4/embed.css" rel="stylesheet">
</head>
<body>
<p>Použijte CSS proměnné pro změnu vzhledu</p>
<!-- Override CSS variables from embed.css -->
<thermal-file-app
url="https://edu.labir.cz/wp-content/uploads/2024/05/2-1__soleni-ledu__image_02.lrc"
style="--thermal-slate: #f02b97;
--thermal-slate-light: pink;
--thermal-slate-dark: #9d28e0;
--thermal-foreground: blue;
--thermal-background: yellow;"
></thermal-file-app>
<body>
</hmtl><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- Load the library in the head -->
<script src="https://edu.labir.cz/software/1.3.4/embed.js"></script>
<link href="https://edu.labir.cz/software/1.3.4/embed.css" rel="stylesheet">
</head>
<body>
<p>Vložte analýzy do parametrů webkomponenty</p>
<!--
The syntax for pre-defined analyses is documented in the docs
There can be up to 7 predefined analyses. Each in its own parameter.
-->
<thermal-file-app
url="https://edu.labir.cz/wp-content/uploads/2024/05/2-1__soleni-ledu__image_02.lrc"
analysis1="První analýza;rectangle;color:Blue;top:8;left:92;width:49;height:31"
analysis2="Ellipsis 1;ellipsis;color:Green;top:14;left:14;width:29;height:36"
></thermal-file-app>
<body>
</hmtl><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<p>Click on buttons and observe the console output below</p>
<button id="manager">console.log( The Manager )</button>
<button id="iron">IRON</button>
<button id="jet">JET</button>
<br />
<br />
<thermal-file-app
id="myWebcomponent"
url="https://edu.labir.cz/wp-content/uploads/2024/05/2-1__soleni-ledu__image_02.lrc"
></thermal-file-app>
<!-- A custom script that handles the buttons -->
<script>
// Wait for the library to load
window.addEventListener( "labirthermal-webcomponents-loaded", () => {
// Get the webcomponent - the HTML element
const app = document.getElementById( "myWebcomponent" );
if (app) {
console.log( "Manažer jádra", app.manager );
}
// The first button
document.getElementById("manager")?.addEventListener(
"click",
function () {
console.log( app?.manager );
}
);
// The second button
document.getElementById("iron")?.addEventListener(
"click",
function () {
if ( ! app ) return;
app.manager.palette.setPalette( "iron" );
console.log( "Nastavil jsem paletu IRON" );
}
);
// The third button
document.getElementById("jet")?.addEventListener(
"click",
function () {
if ( ! app ) return;
app.manager.palette.setPalette( "jet" );
console.log( "Nastavil jsem paletu JET" );
}
);
});
</script>
<!-- Load the library in the footer, after the listener is registered -->
<script src="https://edu.labir.cz/software/1.3.4/embed.js"></script>
<link href="https://edu.labir.cz/software/1.3.4/embed.css" rel="stylesheet">
<body>
</hmtl>