Skip to content

Commit ac9bdc4

Browse files
committed
update type specimen
1 parent f55076c commit ac9bdc4

File tree

1 file changed

+154
-56
lines changed

1 file changed

+154
-56
lines changed

type-specimen.html

+154-56
Original file line numberDiff line numberDiff line change
@@ -7,74 +7,163 @@
77
<link rel="preconnect" href="https://fonts.googleapis.com" />
88
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
99
<link
10-
href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wdth,wght@0,87.5,100..900;1,87.5,100..900&display=swap"
10+
href="https://fonts.googleapis.com/css2?family=Noto+Sans+Display:ital,wdth,wght@0,87.5,100..900;1,87.5,100..900&display=swap"
1111
rel="stylesheet"
1212
/>
13+
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wdth,[email protected],550&display=swap" rel="stylesheet"/>
1314
<style>
14-
:root {
15-
--color-cyan: rgb(0, 90, 156);
15+
16+
*, *::before, *::after {
17+
box-sizing: border-box;
18+
}
19+
* {
20+
margin: 0;
1621
}
1722
body {
18-
font-family: "Noto Sans";
19-
font-variation-settings: "wdth" 87.5;
23+
line-height: 1.5;
24+
-webkit-font-smoothing: antialiased;
2025
}
21-
code {
22-
font-family: "Noto Sans Condensed", monospace;
23-
font-weight: 500;
24-
color: var(--color-cyan);
26+
img, picture, video, canvas, svg {
27+
display: block;
28+
max-width: 100%;
2529
}
26-
27-
h1 {
28-
font-weight: 600;
30+
input, button, textarea, select {
31+
font: inherit;
32+
}
33+
p, h1, h2, h3, h4, h5, h6 {
34+
overflow-wrap: break-word;
2935
}
30-
h2 {
31-
font-weight: 600;
36+
#root, #__next {
37+
isolation: isolate;
3238
}
33-
h3 {
34-
font-weight: 500;
39+
40+
/*----------------------------------------*/
41+
42+
:root {
43+
--color-cyan: rgb(0, 90, 156);
3544
}
36-
h4 {
37-
font-weight: 600;
45+
body {
46+
font-family: "Noto Sans Display", serif;
3847
}
39-
h5 {
40-
font-weight: 600;
48+
h1, h2, h3, h4, h5, h6 {
49+
display: block;
50+
line-height: 1;
51+
margin-top: 1em;
52+
margin-bottom: 0em;
53+
font-weight: 650;
4154
}
42-
h6 {
43-
font-weight: 600;
55+
h1 { font-size: 1.75em; }
56+
h2 { font-size: 1.5em; font-weight: 600; }
57+
h3 { font-size: 1.375em; font-weight: 600; }
58+
h4 { font-size: 1.25em; font-weight: 600; }
59+
h5 { font-size: 1.125em; font-weight: 600; }
60+
h6 { font-size: 1em; font-weight: 600; }
61+
p {
62+
margin: 1em 0em;
4463
}
45-
4664
a {
4765
color: var(--color-cyan);
4866
text-decoration: none;
4967
}
68+
a:hover {
69+
text-decoration: underline;
70+
}
71+
code {
72+
font-family: "Noto Sans Mono", serif;
73+
}
74+
pre {
75+
font-family: "Noto Sans Mono", serif;
76+
background-color: #f8f8f8;
77+
margin: 1em;
78+
padding: 1em;
79+
border: 1px solid #e8e8e8;
80+
}
81+
h6:has(+table)
82+
{
83+
margin-left: 1em;
84+
}
85+
table {
86+
border-collapse: collapse;
87+
border: 1px solid #e8e8e8;
88+
margin: 1em;
89+
}
90+
th {
91+
background-color: #f8f8f8;
92+
text-align: left;
93+
padding: 0.25em 0.55em;
94+
font-weight: 550;
95+
}
96+
td {
97+
border: 1px solid #e8e8e8;
98+
padding: 0.25em 0.55em;
99+
}
50100
</style>
51101
</head>
52102

53103
<body>
104+
54105
<h1>Overview</h1>
55-
<p
56-
>Boost.URL is a portable C++ library which provides containers and algorithms which model a "URL," more formally
57-
described using the Uniform Resource Identifier (URI) specification (henceforth referred to as rfc3986). A URL is
58-
a compact sequence of characters that identifies an abstract or physical resource. For example, this is a valid
59-
URL:
106+
107+
<p>
108+
Boost.URL is a portable C++ library which provides containers and algorithms
109+
which model a "URL," more formally described using the
110+
<a href="https://datatracker.ietf.org/doc/html/rfc3986">Uniform Resource Identifier</a>
111+
(<a href="https://datatracker.ietf.org/doc/html/rfc3986">URI</a>) specification
112+
(henceforth referred to as rfc3986). A URL is a compact sequence of characters
113+
that identifies an abstract or physical resource. For example, this is a valid URL:
114+
</p>
115+
<pre>https://www.example.com/path/to/file.txt?userid=1001&pages=3&results=full#page1
116+
</pre>
117+
This library understands the grammars related to URLs and provides
118+
functionality to validate, parse, examine, and modify urls, and apply
119+
normalization or resolution algorithms
120+
121+
<h2>Features</h2>
122+
123+
<p>
124+
While the library is general purpose, special care has been taken to ensure
125+
that the implementation and data representation are friendly to network
126+
programs which need to handle URLs efficiently and securely, including the
127+
case where the inputs come from untrusted sources. Interfaces are provided
128+
for using error codes instead of exceptions as needed, and most algorithms
129+
have the means to opt-out of dynamic memory allocation. Another feature of
130+
the library is that all modifications leave the URL in a valid state. Code
131+
which uses this library is easy to read, flexible, and performant.
132+
<p>
133+
Boost.URL offers these features:
60134
</p>
135+
<ul>
136+
<li>C++11 as only requirement</li>
137+
<li>Fast compilation, few templates</li>
138+
<li>Strict compliance with rfc3986</li>
139+
<li>Containers that maintain valid URLs</li>
140+
<li>Parsing algorithms that work without exceptions</li>
141+
<li>Control over storage and allocation for URLs</li>
142+
<li>Support for -fno-exceptions, detected automatically</li>
143+
<li>Features that work well on embedded devices</li>
144+
</ul>
61145

62146
<h2>Requirements</h2>
63-
<p>The library requires a compiler supporting at least C++11.</p>
147+
148+
<p>
149+
The library requires a compiler supporting at least C++11.
150+
</p>
151+
<p>
152+
Aliases for standard types, such as
153+
<a href="https://www.boost.org/doc/libs/master/libs/url/doc/html/url/ref/boost__urls__error_code.html"><code>error_code</code></a> or
154+
<a href="https://www.boost.org/doc/libs/master/libs/url/doc/html/url/ref/boost__urls__string_view.html"><code>string_view</code></a>,
155+
use their Boost equivalents.
156+
</p>
157+
64158
<h2>Reference</h2>
65159

66160
<h3>serializer</h3>
67161
<p>A serializer for JSON.</p>
68162

69163
<h4>Synopsis</h4>
70-
<p
71-
>Defined in header &lt;<code><a href="">boost/json/serializer.hpp</a></code
72-
>&gt;</p
73-
>
74-
<pre>
75-
class serializer
76-
</pre
77-
>
164+
<p>Defined in header &lt;<a href="">boost/json/serializer.hpp</a>&gt;</p>
165+
<pre>class serializer</pre>
166+
78167
<h4>Member Functions</h4>
79168
<table>
80169
<thead>
@@ -86,49 +175,50 @@ <h4>Member Functions</h4>
86175
<tbody>
87176
<tr>
88177
<td>
89-
<a href="#">done</a>
178+
<a href="#"><code>done</code></a>
90179
</td>
91180
<td>Returns <code>true</code> if the serialization is complete.</td>
92181
</tr>
93182
<tr>
94183
<td>
95-
<a href="#">read</a>
184+
<a href="#"><code>read</code></a>
96185
</td>
97186
<td>Read the next buffer of serialized JSON. </td>
98187
</tr>
99188
<tr>
100189
<td>
101-
<a href="#">reset</a>
190+
<a href="#"><code>reset</code></a>
102191
</td>
103192
<td>Reset the serializer for a new string.</td>
104193
</tr>
105194
<tr> </tr></tbody
106195
></table>
107196

108197
<h4>Description</h4>
109-
<p
110-
>This class traverses an instance of a library type and emits serialized JSON text by filling in one or more
111-
caller-provided buffers. To use, declare a variable and call <code>reset</code> with a pointer to the variable you
112-
want to serialize. Then call <code>read</code> over and over until <code>done</code> returns <code>true</code>.
198+
<p>
199+
This class traverses an instance of a library type and emits serialized
200+
JSON text by filling in one or more caller-provided buffers. To use, declare
201+
a variable and call
202+
<a href="#"><code>reset</code></a> with a pointer to the variable you want
203+
to serialize. Then call
204+
<a href="#"><code>read</code></a> over and over until
205+
<a href="#"><code>done</code></a> returns <code>true</code>.
113206
</p>
114207

115208
<h4>Example</h4>
116209
<p>This demonstrates how the serializer may be used to print a JSON value to an output stream.</p>
117-
<pre>
118-
void print( std::ostream& os, value const & jv)
210+
<pre>void print( std::ostream& os, value const & jv)
211+
{
212+
serializer sr;
213+
sr.reset( &jv );
214+
while ( ! sr.done() )
119215
{
120-
serializer sr;
121-
sr.reset( &jv );
122-
while ( ! sr.done() )
123-
{
124-
char buf[ 4000 ];
125-
os << sr.read( buf );
126-
}
216+
char buf[ 4000 ];
217+
os << sr.read( buf );
127218
}
128-
</pre
129-
>
219+
}</pre>
130220

131-
<p>Table 1.33. Character Sets</p>
221+
<h6 class="table">Table 1.33. Character Sets</h6>
132222
<table>
133223
<thead>
134224
<tr>
@@ -164,5 +254,13 @@ <h4>Thread Safety</h4>
164254
>Convenience header &lt;<code><a href="">boost/json.hpp</a></code
165255
>&gt;</p
166256
>
257+
258+
<h1>Heading 1</h1>
259+
<h2>Heading 2</h2>
260+
<h3>Heading 3</h3>
261+
<h4>Heading 4</h4>
262+
<h5>Heading 5</h5>
263+
<h6>Heading 6</h6>
264+
167265
</body>
168266
</html>

0 commit comments

Comments
 (0)