1
0
mirror of https://github.com/twirl/The-API-Book.git synced 2025-05-31 22:09:37 +02:00
This commit is contained in:
Sergey Konstantinov 2023-09-02 23:45:04 +03:00
parent f5efe3155b
commit ed9e4c2e5a
21 changed files with 41 additions and 31 deletions

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,34 +1,34 @@
@font-face { @font-face {
font-family: local-serif; font-family: local-serif;
src: url(/fonts/Vollkorn-VariableFont_wght.ttf); src: url(./Vollkorn-VariableFont_wght.ttf);
} }
@font-face { @font-face {
font-family: local-serif; font-family: local-serif;
src: url(/fonts/Vollkorn-Italic-VariableFont_wght.ttf); src: url(./Vollkorn-Italic-VariableFont_wght.ttf);
font-style: italic; font-style: italic;
} }
@font-face { @font-face {
font-family: local-serif; font-family: local-serif;
src: url(/fonts/Vollkorn-Italic-VariableFont_wght.ttf); src: url(./Vollkorn-Italic-VariableFont_wght.ttf);
font-style: oblique; font-style: oblique;
} }
@font-face { @font-face {
font-family: local-sans; font-family: local-sans;
src: url(../assets/PTSans-Regular.ttf); src: url(./PTSans-Regular.ttf);
} }
@font-face { @font-face {
font-family: local-sans; font-family: local-sans;
src: url(../assets/PTSans-Bold.ttf); src: url(./PTSans-Bold.ttf);
font-weight: bold; font-weight: bold;
} }
@font-face { @font-face {
font-family: local-monospace; font-family: local-monospace;
src: url(../assets/RobotoMono-VariableFont_wght.ttf); src: url(./RobotoMono-VariableFont_wght.ttf);
} }
body { body {
@ -39,3 +39,12 @@ pre,
code { code {
font-family: local-monospace; font-family: local-monospace;
} }
h1,
h2,
h3,
h4,
input,
button {
font-family: local-sans;
}

View File

@ -7,13 +7,13 @@
} }
h1 { h1 {
font-size: 1.5em; font-size: 150%;
} }
h1.title { h1.title {
font-size: 2em; font-size: 200%;
} }
h2 { h2 {
font-size: 1.2em; font-size: 120%;
} }
ul > li { ul > li {
@ -27,7 +27,7 @@ h3 {
} }
body { body {
font-size: 14pt; font-size: 16pt;
margin: 5px; margin: 5px;
} }

View File

@ -15,7 +15,7 @@
<style> <style>
:root { :root {
--example-list-width: 200px; --example-list-width: 200px;
--live-example-width: 390px; --live-example-width: 400px;
} }
* { * {

View File

@ -2,6 +2,7 @@
width: 390px; width: 390px;
height: 500px; height: 500px;
overflow: hidden; overflow: hidden;
font-family: local-sans;
} }
.our-coffee-sdk-search-box-head { .our-coffee-sdk-search-box-head {

View File

@ -32,7 +32,7 @@ We will make a task more specific. Imagine we need to develop a `SearchBox` that
The obvious approach to tackle these scenarios appears to be creating two additional subcomponents responsible for presenting a list of offers and the details of the specific offer. Let's name them `OfferList` and `OfferPanel` respectively. The obvious approach to tackle these scenarios appears to be creating two additional subcomponents responsible for presenting a list of offers and the details of the specific offer. Let's name them `OfferList` and `OfferPanel` respectively.
[![APP](/img/mockups/09.png "The subcomponents of a `SearchBox`")]() [![PLOT](/img/mockups/09.png "The subcomponents of a `SearchBox`")]()
If we had no customization requirements, the pseudo-code implementing interactions between all three components would look rather trivial: If we had no customization requirements, the pseudo-code implementing interactions between all three components would look rather trivial:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 KiB

After

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -32,7 +32,7 @@
Решение, которое напрашивается в данной ситуации — это выделение двух дополнительных компонентов, отвечающих за представление списка предложений и за панель показа конкретного предложения, назовём их `OfferList` и `OfferPanel`. Решение, которое напрашивается в данной ситуации — это выделение двух дополнительных компонентов, отвечающих за представление списка предложений и за панель показа конкретного предложения, назовём их `OfferList` и `OfferPanel`.
[![APP](/img/mockups/09.png "`SearchBox` и его суб-компоненты")]() [![PLOT](/img/mockups/09.png "`SearchBox` и его суб-компоненты")]()
В случае отсутствия требований кастомизации, псевдокод, имплементирующий взаимодействие всех трёх компонентов, выглядел бы достаточно просто: В случае отсутствия требований кастомизации, псевдокод, имплементирующий взаимодействие всех трёх компонентов, выглядел бы достаточно просто: