1
0
mirror of https://github.com/twirl/The-API-Book.git synced 2025-05-13 21:26:26 +02:00

142 lines
4.5 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>
“The API” book by Sergey Konstantinov. Examples to the “Decomposing
UI Components” chapter.
</title>
<link rel="stylesheet" type="text/css" href="../fonts.css" />
2023-07-30 15:25:21 +03:00
<link rel="icon" type="image/png" href="../../assets/favicon.png" />
<script
type="text/javascript"
src="../../assets/monaco-editor/dev/vs/loader.js"
></script>
<script type="text/javascript" src="./index.js"></script>
<style>
2023-07-30 15:25:21 +03:00
body {
padding: 5px;
}
2023-07-30 15:25:21 +03:00
2023-07-30 23:04:39 +03:00
header * {
font-size: 16px;
margin: 0;
padding: 0;
}
header {
padding-bottom: 10px;
}
2023-07-30 15:25:21 +03:00
ul#example-list {
list-style-type: none;
margin: 0;
2023-07-30 15:25:21 +03:00
padding: 0 0 5px 0;
}
ul#example-list > li {
margin: 2px 5px;
padding: 3px;
border: 2px solid rgba(128, 128, 128, 0.3);
display: inline-block;
}
ul#example-list > li > a {
color: inherit;
}
ul#example-list > li.selected {
border: 2px solid black;
}
2023-07-30 15:25:21 +03:00
#examples {
min-width: 400px;
}
#examples #editor {
min-height: 500px;
min-width: 400px;
width: calc(100% - 400px);
float: left;
}
#live-example {
min-width: 390px;
2023-07-30 23:04:39 +03:00
min-height: 500px;
2023-07-30 15:25:21 +03:00
float: left;
}
#live-example iframe {
border: none;
margin: 0;
padding: 0;
width: 390px;
height: 500px;
overflow: hidden;
}
</style>
<script src="sandbox.js"></script>
</head>
<body>
2023-07-30 23:04:39 +03:00
<header>
<p>
Studying materials for
<strong
><a href="https://twirl.github.io/The-API-Book/"
>“The API” book</a
>
by Sergey Konstantinov.</strong
>
</p>
<p>
<a href="https://twirl.github.io/The-API-Book/#sdk-decomposing"
>Chapter 43: Problems of Introducing UI Components</a
>. Find the source code of the components and additional tasks
for self-study at the
<a
href="https://github.com/twirl/The-API-Book/tree/gh-pages/docs/examples/01.%20Decomposing%20UI%20Components"
>Github repository.</a
>
</p>
</header>
2023-07-30 15:25:21 +03:00
<div id="playground">
<div id="live-example">
<div>Live example <button id="refresh">Refresh</button></div>
<hr />
</div>
<div id="examples">
<ul id="example-list">
2023-07-30 23:04:39 +03:00
<li id="example-00">
<a href="javascript:showExample('00')"
>The reference: A regular <code>SearchBox</code></a
>
</li>
2023-07-30 15:25:21 +03:00
<li id="example-01">
<a href="javascript:showExample('01')"
2023-07-30 23:04:39 +03:00
>Example #1: A <code>SearchBox</code> with a custom
icon</a
2023-07-30 15:25:21 +03:00
>
</li>
<li id="example-02">
<a href="javascript:showExample('02')"
2023-07-30 23:04:39 +03:00
>Example #2: A <code>SearchBox</code> with a map</a
2023-07-30 15:25:21 +03:00
>
</li>
<li id="example-03">
<a href="javascript:showExample('03')"
2023-07-30 23:04:39 +03:00
>Example #3: A <code>SearchBox</code> with in-place
actions</a
2023-07-30 15:25:21 +03:00
>
</li>
<li id="example-04">
<a href="javascript:showExample('04')"
2023-07-30 23:04:39 +03:00
>Example #4: A <code>SearchBox</code> with a dynamic
set of buttons</a
2023-07-30 15:25:21 +03:00
>
</li>
</ul>
<div id="editor"></div>
</div>
</div>
</body>
</html>