├── .env ├── .gitignore ├── .prettierignore ├── LICENSE ├── Makefile ├── README.md ├── package-lock.json ├── package.json ├── public ├── android-icon-144x144.png ├── android-icon-192x192.png ├── android-icon-36x36.png ├── android-icon-48x48.png ├── android-icon-72x72.png ├── android-icon-96x96.png ├── apple-icon-114x114.png ├── apple-icon-120x120.png ├── apple-icon-144x144.png ├── apple-icon-152x152.png ├── apple-icon-180x180.png ├── apple-icon-57x57.png ├── apple-icon-60x60.png ├── apple-icon-72x72.png ├── apple-icon-76x76.png ├── apple-icon-precomposed.png ├── apple-icon.png ├── browserconfig.xml ├── codebook-orange.png ├── codebook-yellow.png ├── favicon-16x16.png ├── favicon-32x32.png ├── favicon-96x96.png ├── favicon.ico ├── github.png ├── index.html ├── manifest.json ├── ms-icon-144x144.png ├── ms-icon-150x150.png ├── ms-icon-310x310.png ├── ms-icon-70x70.png ├── robots.txt └── social-media-500x261.png └── src ├── App.css ├── App.js ├── App.test.js ├── Book.css ├── Book.js ├── Book.test.js ├── BookAPI.js ├── BookContent.css ├── Code.css ├── Code.js ├── Code.test.js ├── book ├── 00-welcome.js ├── 01-html.js ├── 02-texts.js ├── 03-links.js ├── 04-css.js ├── 05-rules.js ├── 06-colors.js ├── 07-fonts.js ├── 08-align.js ├── 09-listas.js ├── 10-table.js ├── 11-containers.js ├── 12-dimensions.js ├── 13-borders.js ├── 14-outlines.js ├── 15-spacing.js ├── 16-display.js ├── 17-position.js ├── 18-forms.js ├── 19-buttons.js └── 99-credits.js ├── code └── placeholder.js ├── index.css ├── index.js ├── reset.css ├── serviceWorker.js └── setupTests.js /.env: -------------------------------------------------------------------------------- 1 | REACT_APP_CONTRIBUTING_URL = https://github.com/fernandomachado90/codebook#contributing 2 | REACT_APP_FEEDBACK_URL = https://forms.gle/VrLg2xwcPCDKG5cg7 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | package-lock.json 8 | 9 | # testing 10 | /coverage 11 | 12 | # production 13 | /build 14 | 15 | # misc 16 | .DS_Store 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | build 2 | public 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .SILENT: 2 | .DEFAULT_GOAL := help 3 | 4 | .PHONY: help 5 | help: 6 | $(info available commands:) 7 | $(info -> setup installs dependencies) 8 | $(info -> format formats source code) 9 | $(info -> build builds deployable version) 10 | $(info -> test runs available tests) 11 | $(info -> run starts application locally) 12 | $(info -> publish publishes changes to GitHub Pages) 13 | 14 | .PHONY: setup 15 | setup: 16 | npm install 17 | 18 | .PHONY: format 19 | format: 20 | npm run format 21 | 22 | .PHONY: build 23 | build: 24 | npm run build 25 | 26 | .PHONY: test 27 | test: 28 | npm test 29 | 30 | .PHONY: run 31 | run: 32 | npm start 33 | 34 | .PHONY: publish 35 | publish: 36 | npm run deploy 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # codebook 2 | 3 | Open-source learning tool that allows to users to follow a **textbook** while practicing **HTML**, **CSS** and **JS** using a live code editor. 4 | 5 | ## Requisites 6 | 7 | - [Node](https://nodejs.org/en/) 8 | 9 | ## Commands 10 | 11 | In the project directory, you can run: 12 | 13 | ### `make setup` 14 | 15 | Installs dependencies modules. 16 | 17 | ### `make build` 18 | 19 | Builds deployable version of React app. 20 | 21 | ### `make format` 22 | 23 | Formats source code using [Prettier](https://www.npmjs.com/package/prettier). 24 | 25 | ### `make run` 26 | 27 | Runs the app in development mode on [http://localhost:3000](http://localhost:3000). 28 | 29 | ### `make test` 30 | 31 | Launches the test runner in the interactive watch mode. 32 | 33 | ### `make publish` 34 | 35 | Publishes static page to GitHub Pages using [gh-pages](https://github.com/tschaub/gh-pages). Tutorial available [here](https://dev.to/yuribenjamin/how-to-deploy-react-app-in-github-pages-2a1f). 36 | 37 | ## Contributing 38 | 39 | There are many ways of contributing to this project, from minor typo fixes and code refactoring to adding whole new pages to the book! 40 | 41 | The book pages are imported from the [`src/book`](src/book/) directory, in alphabetic order. To get started and understand how your changes impact the book, try adding your name to the [credits page](src/book/99-credits.js). 42 | 43 | ## Credits 44 | 45 | - Powered by [CodePen Prefill Embeds](https://blog.codepen.io/documentation/prefill-embeds/) 46 | - Patterns by [Hero Patterns](http://www.heropatterns.com/) 47 | - Icons made by [prettycons](https://www.flaticon.com/authors/prettycons) from [Flaticon](https://www.flaticon.com) 48 | - Favicons by [Favicon Generator](https://www.favicon-generator.org/) 49 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codebook", 3 | "homepage": "https://fernandomachado90.github.io/codebook", 4 | "version": "1.0.0", 5 | "private": true, 6 | "dependencies": { 7 | "@testing-library/jest-dom": "^5.12.0", 8 | "@testing-library/react": "^11.2.7", 9 | "@testing-library/user-event": "^13.1.9", 10 | "react": "^17.0.2", 11 | "react-dom": "^17.0.2", 12 | "react-router-dom": "^5.2.0", 13 | "react-scripts": "^4.0.3" 14 | }, 15 | "scripts": { 16 | "format": "prettier --write --no-semi --trailing-comma es5 --print-width 120 .", 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject", 21 | "predeploy": "npm run build", 22 | "deploy": "gh-pages -d build" 23 | }, 24 | "eslintConfig": { 25 | "extends": "react-app" 26 | }, 27 | "browserslist": { 28 | "production": [ 29 | ">0.2%", 30 | "not dead", 31 | "not op_mini all" 32 | ], 33 | "development": [ 34 | "last 1 chrome version", 35 | "last 1 firefox version", 36 | "last 1 safari version" 37 | ] 38 | }, 39 | "devDependencies": { 40 | "gh-pages": "^3.1.0", 41 | "prettier": "^2.1.2" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /public/android-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/android-icon-144x144.png -------------------------------------------------------------------------------- /public/android-icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/android-icon-192x192.png -------------------------------------------------------------------------------- /public/android-icon-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/android-icon-36x36.png -------------------------------------------------------------------------------- /public/android-icon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/android-icon-48x48.png -------------------------------------------------------------------------------- /public/android-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/android-icon-72x72.png -------------------------------------------------------------------------------- /public/android-icon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/android-icon-96x96.png -------------------------------------------------------------------------------- /public/apple-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-114x114.png -------------------------------------------------------------------------------- /public/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-120x120.png -------------------------------------------------------------------------------- /public/apple-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-144x144.png -------------------------------------------------------------------------------- /public/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-152x152.png -------------------------------------------------------------------------------- /public/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-180x180.png -------------------------------------------------------------------------------- /public/apple-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-57x57.png -------------------------------------------------------------------------------- /public/apple-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-60x60.png -------------------------------------------------------------------------------- /public/apple-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-72x72.png -------------------------------------------------------------------------------- /public/apple-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-76x76.png -------------------------------------------------------------------------------- /public/apple-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon-precomposed.png -------------------------------------------------------------------------------- /public/apple-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/apple-icon.png -------------------------------------------------------------------------------- /public/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | #ffffff -------------------------------------------------------------------------------- /public/codebook-orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/codebook-orange.png -------------------------------------------------------------------------------- /public/codebook-yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/codebook-yellow.png -------------------------------------------------------------------------------- /public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/favicon-16x16.png -------------------------------------------------------------------------------- /public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/favicon-32x32.png -------------------------------------------------------------------------------- /public/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/favicon-96x96.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/favicon.ico -------------------------------------------------------------------------------- /public/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/github.png -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | CodeBook 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CodeBook", 3 | "icons": [ 4 | { 5 | "src": "\/android-icon-36x36.png", 6 | "sizes": "36x36", 7 | "type": "image\/png", 8 | "density": "0.75" 9 | }, 10 | { 11 | "src": "\/android-icon-48x48.png", 12 | "sizes": "48x48", 13 | "type": "image\/png", 14 | "density": "1.0" 15 | }, 16 | { 17 | "src": "\/android-icon-72x72.png", 18 | "sizes": "72x72", 19 | "type": "image\/png", 20 | "density": "1.5" 21 | }, 22 | { 23 | "src": "\/android-icon-96x96.png", 24 | "sizes": "96x96", 25 | "type": "image\/png", 26 | "density": "2.0" 27 | }, 28 | { 29 | "src": "\/android-icon-144x144.png", 30 | "sizes": "144x144", 31 | "type": "image\/png", 32 | "density": "3.0" 33 | }, 34 | { 35 | "src": "\/android-icon-192x192.png", 36 | "sizes": "192x192", 37 | "type": "image\/png", 38 | "density": "4.0" 39 | } 40 | ] 41 | } -------------------------------------------------------------------------------- /public/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/ms-icon-144x144.png -------------------------------------------------------------------------------- /public/ms-icon-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/ms-icon-150x150.png -------------------------------------------------------------------------------- /public/ms-icon-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/ms-icon-310x310.png -------------------------------------------------------------------------------- /public/ms-icon-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/ms-icon-70x70.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/social-media-500x261.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fernandomachado90/codebook/c1931480e1028972526fe0382e67ee258ddc76ea/public/social-media-500x261.png -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | @media only screen and (max-width: 992px) { 2 | .Box { 3 | width: 100%; 4 | height: calc(100% - 112px); 5 | } 6 | } 7 | 8 | @media only screen and (min-width: 992px) { 9 | .Box { 10 | height: 100%; 11 | } 12 | .Box.Single { 13 | width: 33%; 14 | } 15 | .Box.Double { 16 | width: 67%; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { HashRouter as Router, Switch, Route, useParams } from "react-router-dom" 3 | import "./App.css" 4 | import Book from "./Book" 5 | import Code from "./Code" 6 | 7 | function BookWithParams() { 8 | const { page } = useParams() 9 | return 10 | } 11 | 12 | function App() { 13 | return ( 14 | 15 | 16 | } /> 17 | } /> 18 | 19 | 20 | 21 | ) 22 | } 23 | 24 | export default App 25 | -------------------------------------------------------------------------------- /src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { render } from "@testing-library/react" 3 | import App from "./App" 4 | 5 | jest.mock("./Book", () => ({ className }) =>
Book
) 6 | jest.mock("./Code", () => ({ className }) =>
Code
) 7 | 8 | test("renders App", () => { 9 | const { container, getByText } = render() 10 | 11 | const app = container.firstChild 12 | expect(app).toBeInTheDocument() 13 | 14 | const book = getByText(/Book/i) 15 | expect(book).toHaveClass("Box Single") 16 | 17 | const code = getByText(/Code/i) 18 | expect(code).toHaveClass("Box Double") 19 | }) 20 | -------------------------------------------------------------------------------- /src/Book.css: -------------------------------------------------------------------------------- 1 | .Book { 2 | display: flex; 3 | flex-wrap: wrap; 4 | justify-content: space-evenly; 5 | align-items: center; 6 | } 7 | 8 | .Book .Header, 9 | .Book .Content, 10 | .Book .Footer { 11 | width: 100%; 12 | display: flex; 13 | align-items: center; 14 | } 15 | 16 | .Book .Header, 17 | .Book .Footer { 18 | justify-content: space-between; 19 | background-color: #28282a; 20 | color: #eaeaea; 21 | } 22 | 23 | .Book .Header { 24 | height: 50px; 25 | padding: 0px 8px; 26 | } 27 | 28 | .Book .Header img { 29 | margin-left: 6px; 30 | margin-top: 2px; 31 | } 32 | 33 | .Book .Header .Title { 34 | font-size: 24px; 35 | height: 50px; 36 | margin-top: -2px; 37 | line-height: 50px; 38 | text-transform: uppercase; 39 | white-space: nowrap; 40 | overflow: hidden; 41 | text-overflow: ellipsis; 42 | } 43 | 44 | @media only screen and (max-width: 1400px) { 45 | .Book .Header .Title { 46 | font-size: 20px; 47 | } 48 | } 49 | @media only screen and (max-width: 576px) { 50 | .Book .Header .Title { 51 | font-size: 18px; 52 | } 53 | } 54 | 55 | .Book .Header .Navigation { 56 | display: flex; 57 | justify-content: center; 58 | align-items: center; 59 | } 60 | 61 | .Book .Header .Navigation .Counter { 62 | display: inline-flex; 63 | align-items: center; 64 | justify-content: center; 65 | font-size: 15px; 66 | font-weight: bold; 67 | letter-spacing: 0.6px; 68 | margin-top: 4px; 69 | padding: 0px 10px; 70 | height: 40px; 71 | width: 30px; 72 | } 73 | 74 | .Book .Header .Navigation .Button { 75 | display: inline-flex; 76 | align-items: center; 77 | justify-content: center; 78 | font-size: 26px; 79 | text-decoration: none; 80 | color: #eaeaea; 81 | background-color: #424242; 82 | border: none; 83 | cursor: pointer; 84 | margin-top: 4px; 85 | height: 40px; 86 | width: 30px; 87 | -webkit-transition: color 200ms ease, background-color 200ms ease, box-shadow 50ms ease, -webkit-box-shadow 50ms ease; 88 | transition: color 200ms ease, background-color 200ms ease, box-shadow 50ms ease, -webkit-box-shadow 50ms ease; 89 | } 90 | 91 | .Book .Header .Navigation .Button:first-child { 92 | border-top-left-radius: 2px; 93 | border-bottom-left-radius: 2px; 94 | } 95 | 96 | .Book .Header .Navigation .Button:last-child { 97 | border-top-right-radius: 2px; 98 | border-bottom-right-radius: 2px; 99 | } 100 | 101 | .Book .Header .Navigation .Button:hover { 102 | opacity: 0.9; 103 | } 104 | 105 | .Book .Header .Navigation .Button:active { 106 | opacity: 1; 107 | transform: translateY(1px); 108 | background-color: #212121; 109 | box-shadow: inset 0px 3px #ff8a00; 110 | } 111 | 112 | .Book .Content { 113 | display: block; 114 | height: calc(100% - 100px); 115 | padding: 10px 20px; 116 | overflow: auto; 117 | background-color: #ffffff; 118 | } 119 | 120 | .Book .Footer { 121 | height: 30px; 122 | padding: 0px 10px; 123 | font-weight: bold; 124 | font-size: 10px; 125 | letter-spacing: 0.4px; 126 | } 127 | 128 | .Book .Footer .Link { 129 | color: #eaeaea; 130 | text-decoration: none; 131 | display: inline-flex; 132 | align-items: center; 133 | padding-left: 6px; 134 | } 135 | 136 | .Book .Footer .Link img { 137 | height: 20px; 138 | margin-right: -3px; 139 | margin-left: 6px; 140 | } 141 | 142 | .Book .Link:hover { 143 | opacity: 0.75; 144 | -webkit-transition: color 200ms ease, background-color 200ms ease, opacity 200ms ease; 145 | transition: color 200ms ease, background-color 200ms ease, opacity 200ms ease; 146 | } 147 | 148 | .Theme-Circuit { 149 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%23eaeaea' fill-opacity='0.5' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1zm0 16a5 5 0 1 1 0-2H304v2h-42.1zm6.2-114a5 5 0 1 1 0 2h-86.2a5 5 0 1 1 0-2h86.2zm-256-48a5 5 0 1 1 0 2H0v-2h12.1zm185.8 34a5 5 0 1 1 0-2h86.2a5 5 0 1 1 0 2h-86.2zM258 12.1a5 5 0 1 1-2 0V0h2v12.1zm-64 208a5 5 0 1 1-2 0v-54.2a5 5 0 1 1 2 0v54.2zm48-198.2V80h62v2h-64V21.9a5 5 0 1 1 2 0zm16 16V64h46v2h-48V37.9a5 5 0 1 1 2 0zm-128 96V208h16v12.1a5 5 0 1 1-2 0V210h-16v-76.1a5 5 0 1 1 2 0zm-5.9-21.9a5 5 0 1 1 0 2H114v48H85.9a5 5 0 1 1 0-2H112v-48h12.1zm-6.2 130a5 5 0 1 1 0-2H176v-74.1a5 5 0 1 1 2 0V242h-60.1zm-16-64a5 5 0 1 1 0-2H114v48h10.1a5 5 0 1 1 0 2H112v-48h-10.1zM66 284.1a5 5 0 1 1-2 0V274H50v30h-2v-32h18v12.1zM236.1 176a5 5 0 1 1 0 2H226v94h48v32h-2v-30h-48v-98h12.1zm25.8-30a5 5 0 1 1 0-2H274v44.1a5 5 0 1 1-2 0V146h-10.1zm-64 96a5 5 0 1 1 0-2H208v-80h16v-14h-42.1a5 5 0 1 1 0-2H226v18h-16v80h-12.1zm86.2-210a5 5 0 1 1 0 2H272V0h2v32h10.1zM98 101.9V146H53.9a5 5 0 1 1 0-2H96v-42.1a5 5 0 1 1 2 0zM53.9 34a5 5 0 1 1 0-2H80V0h2v34H53.9zm60.1 3.9V66H82v64H69.9a5 5 0 1 1 0-2H80V64h32V37.9a5 5 0 1 1 2 0zM101.9 82a5 5 0 1 1 0-2H128V37.9a5 5 0 1 1 2 0V82h-28.1zm16-64a5 5 0 1 1 0-2H146v44.1a5 5 0 1 1-2 0V18h-26.1zm102.2 270a5 5 0 1 1 0 2H98v14h-2v-16h124.1zM242 149.9V160h16v34h-16v62h48v48h-2v-46h-48v-66h16v-30h-16v-12.1a5 5 0 1 1 2 0zM53.9 18a5 5 0 1 1 0-2H64V2H48V0h18v18H53.9zm112 32a5 5 0 1 1 0-2H192V0h50v2h-48v48h-28.1zm-48-48a5 5 0 0 1-9.8-2h2.07a3 3 0 1 0 5.66 0H178v34h-18V21.9a5 5 0 1 1 2 0V32h14V2h-58.1zm0 96a5 5 0 1 1 0-2H137l32-32h39V21.9a5 5 0 1 1 2 0V66h-40.17l-32 32H117.9zm28.1 90.1a5 5 0 1 1-2 0v-76.51L175.59 80H224V21.9a5 5 0 1 1 2 0V82h-49.59L146 112.41v75.69zm16 32a5 5 0 1 1-2 0v-99.51L184.59 96H300.1a5 5 0 0 1 3.9-3.9v2.07a3 3 0 0 0 0 5.66v2.07a5 5 0 0 1-3.9-3.9H185.41L162 121.41v98.69zm-144-64a5 5 0 1 1-2 0v-3.51l48-48V48h32V0h2v50H66v55.41l-48 48v2.69zM50 53.9v43.51l-48 48V208h26.1a5 5 0 1 1 0 2H0v-65.41l48-48V53.9a5 5 0 1 1 2 0zm-16 16V89.41l-34 34v-2.82l32-32V69.9a5 5 0 1 1 2 0zM12.1 32a5 5 0 1 1 0 2H9.41L0 43.41V40.6L8.59 32h3.51zm265.8 18a5 5 0 1 1 0-2h18.69l7.41-7.41v2.82L297.41 50H277.9zm-16 160a5 5 0 1 1 0-2H288v-71.41l16-16v2.82l-14 14V210h-28.1zm-208 32a5 5 0 1 1 0-2H64v-22.59L40.59 194H21.9a5 5 0 1 1 0-2H41.41L66 216.59V242H53.9zm150.2 14a5 5 0 1 1 0 2H96v-56.6L56.6 162H37.9a5 5 0 1 1 0-2h19.5L98 200.6V256h106.1zm-150.2 2a5 5 0 1 1 0-2H80v-46.59L48.59 178H21.9a5 5 0 1 1 0-2H49.41L82 208.59V258H53.9zM34 39.8v1.61L9.41 66H0v-2h8.59L32 40.59V0h2v39.8zM2 300.1a5 5 0 0 1 3.9 3.9H3.83A3 3 0 0 0 0 302.17V256h18v48h-2v-46H2v42.1zM34 241v63h-2v-62H0v-2h34v1zM17 18H0v-2h16V0h2v18h-1zm273-2h14v2h-16V0h2v16zm-32 273v15h-2v-14h-14v14h-2v-16h18v1zM0 92.1A5.02 5.02 0 0 1 6 97a5 5 0 0 1-6 4.9v-2.07a3 3 0 1 0 0-5.66V92.1zM80 272h2v32h-2v-32zm37.9 32h-2.07a3 3 0 0 0-5.66 0h-2.07a5 5 0 0 1 9.8 0zM5.9 0A5.02 5.02 0 0 1 0 5.9V3.83A3 3 0 0 0 3.83 0H5.9zm294.2 0h2.07A3 3 0 0 0 304 3.83V5.9a5 5 0 0 1-3.9-5.9zm3.9 300.1v2.07a3 3 0 0 0-1.83 1.83h-2.07a5 5 0 0 1 3.9-3.9zM97 100a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-48 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 96a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-144a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm96 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM49 36a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-32 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM33 68a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 240a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm80-176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 48a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm112 176a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-16 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 180a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0 16a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm0-32a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16 0a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM17 84a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm32 64a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm16-16a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'%3E%3C/path%3E%3C/svg%3E"); 150 | } 151 | 152 | .Theme-Cogs { 153 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360' viewBox='0 0 360 360'%3E%3Cpath fill='%23eaeaea' fill-opacity='0.6' d='M0 85.02l4.62-4.27a49.09 49.09 0 0 0 7.33 3.74l-1.2 10.24 2.66.87 5.05-9c2.62.65 5.34 1.08 8.12 1.28L28.6 98h2.8l2.02-10.12c2.74-.2 5.46-.62 8.12-1.28l5.05 8.99 2.66-.86-1.2-10.24c2.55-1.03 5-2.29 7.33-3.74l7.58 7 2.26-1.65-4.3-9.38a48.3 48.3 0 0 0 5.8-5.8l9.38 4.3 1.65-2.26-7-7.58a49.09 49.09 0 0 0 3.74-7.33l10.24 1.2.87-2.66-9-5.05a48.07 48.07 0 0 0 1.28-8.12L88 41.4v-2.8l-10.12-2.02c-.2-2.74-.62-5.46-1.28-8.12l8.99-5.05-.86-2.66-10.24 1.2c-1.03-2.55-2.29-5-3.74-7.33l7-7.58-1.65-2.26-9.38 4.3a48.3 48.3 0 0 0-5.8-5.8L62.42 0h2.16l-1.25 2.72a50.31 50.31 0 0 1 3.95 3.95l9.5-4.36 3.52 4.85-7.08 7.68c.94 1.6 1.79 3.27 2.54 4.98l10.38-1.21 1.85 5.7-9.11 5.12c.39 1.8.68 3.65.87 5.52L90 37v6l-10.25 2.05a49.9 49.9 0 0 1-.87 5.52l9.11 5.12-1.85 5.7-10.38-1.21c-.75 1.7-1.6 3.37-2.54 4.98l7.08 7.68-3.52 4.85-9.5-4.36a50.31 50.31 0 0 1-3.95 3.95l4.36 9.5-4.85 3.52-7.68-7.08c-1.6.94-3.27 1.79-4.98 2.54l1.21 10.38-5.7 1.85-5.12-9.11c-1.8.39-3.65.68-5.52.87L33 100h-6l-2.05-10.25a49.9 49.9 0 0 1-5.52-.87l-5.12 9.11-5.7-1.85 1.21-10.38c-1.7-.75-3.37-1.6-4.98-2.54L0 87.68v-2.66zM0 52.7V27.3l8.38 4.84a22.96 22.96 0 0 0 0 15.72L0 52.7zm0-39.16A39.91 39.91 0 0 1 26 .2v17.15a22.98 22.98 0 0 0-13.62 7.86L0 18.06v-4.52zm0 52.92v-4.52l12.38-7.15A22.98 22.98 0 0 0 26 62.65V79.8A39.91 39.91 0 0 1 0 66.46zM34 79.8V62.65a22.98 22.98 0 0 0 13.62-7.86l14.85 8.58A39.97 39.97 0 0 1 34 79.8zm32.48-23.36l-14.86-8.58a22.96 22.96 0 0 0 0-15.72l14.86-8.58A39.86 39.86 0 0 1 70 40a39.9 39.9 0 0 1-3.52 16.44zm-4.01-39.8L47.62 25.2A22.98 22.98 0 0 0 34 17.35V.2a39.97 39.97 0 0 1 28.47 16.43v.01zM0 50.38l5.98-3.45a25.01 25.01 0 0 1 0-13.88L0 29.6v20.78zm.5-34.35l11.48 6.63c3.27-3.4 7.44-5.8 12.02-6.94V2.47A37.96 37.96 0 0 0 .5 16.04v-.01zm0 47.92A37.96 37.96 0 0 0 24 77.53V64.28a24.97 24.97 0 0 1-12.02-6.95L.5 63.96v-.01zM36 77.53a37.96 37.96 0 0 0 23.5-13.57l-11.48-6.63A24.97 24.97 0 0 1 36 64.28v13.25zm29.5-23.96a37.91 37.91 0 0 0 0-27.14l-11.48 6.63a25.01 25.01 0 0 1 0 13.88l11.49 6.63h-.01zm-6-37.53A37.96 37.96 0 0 0 36 2.47v13.25c4.66 1.15 8.8 3.6 12.02 6.95l11.48-6.63zM30 54a14 14 0 1 1 0-28 14 14 0 0 1 0 28zm0-2a12 12 0 1 0 0-24 12 12 0 0 0 0 24zm0-2a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm77.47 45.17l-1.62-5.97 5.67-2.06 2.61 5.64c1.09-.25 2.2-.44 3.33-.58l.52-6.2h6.04l.52 6.2c1.13.14 2.24.33 3.33.58l2.6-5.64 5.68 2.06-1.62 5.97c1.02.51 2 1.07 2.95 1.69l4.35-4.38 4.62 3.88-3.53 5c.8.84 1.53 1.71 2.23 2.62l5.52-2.6 3.02 5.23-4.98 3.46c.46 1.06.86 2.14 1.2 3.25l6.02-.54 1.05 5.94-5.84 1.54c.07 1.16.07 2.32 0 3.48l5.84 1.54-1.05 5.94-6.02-.54c-.34 1.1-.74 2.2-1.2 3.25l4.98 3.46-3.02 5.22-5.52-2.6c-.7.92-1.44 1.8-2.23 2.62l3.53 5-4.62 3.89-4.35-4.38a30.2 30.2 0 0 1-2.95 1.69l1.62 5.97-5.67 2.06-2.61-5.64c-1.09.25-2.2.44-3.33.58l-.52 6.2h-6.04l-.52-6.2a30.27 30.27 0 0 1-3.33-.58l-2.6 5.64-5.68-2.06 1.62-5.97c-1.01-.5-2-1.07-2.95-1.69l-4.35 4.38-4.62-3.88 3.53-5a32.5 32.5 0 0 1-2.23-2.62l-5.52 2.6-3.02-5.23 4.98-3.46a29.66 29.66 0 0 1-1.2-3.25l-6.02.54-1.05-5.94 5.84-1.54a30.28 30.28 0 0 1 0-3.48l-5.84-1.54 1.05-5.94 6.02.54c.34-1.1.74-2.2 1.2-3.25l-4.98-3.46 3.02-5.22 5.52 2.6c.7-.92 1.44-1.8 2.23-2.62l-3.53-5 4.62-3.89 4.35 4.38a30.2 30.2 0 0 1 2.95-1.69zm15.2-1.12l-.5-6.05h-2.34l-.5 6.05c-2.18.13-4.3.5-6.32 1.1l-2.54-5.5-2.2.8 1.6 5.85a27.97 27.97 0 0 0-5.56 3.21l-4.27-4.3-1.79 1.5 3.5 4.95a28.14 28.14 0 0 0-4.12 4.92l-5.5-2.59-1.16 2.02 4.98 3.46a27.8 27.8 0 0 0-2.2 6.03l-6.03-.55-.4 2.3 5.86 1.54a28.3 28.3 0 0 0 0 6.42l-5.87 1.55.4 2.3 6.05-.56a27.8 27.8 0 0 0 2.2 6.03l-5 3.47 1.17 2.02 5.49-2.59a28.14 28.14 0 0 0 4.12 4.92l-3.5 4.96 1.79 1.5 4.27-4.31a27.97 27.97 0 0 0 5.56 3.21l-1.6 5.85 2.2.8 2.54-5.5c2.02.6 4.14.97 6.32 1.1l.5 6.05h2.34l.5-6.05c2.18-.13 4.3-.5 6.32-1.1l2.54 5.5 2.2-.8-1.6-5.85a27.97 27.97 0 0 0 5.56-3.21l4.27 4.3 1.79-1.5-3.5-4.95a28.14 28.14 0 0 0 4.12-4.92l5.5 2.59 1.16-2.02-4.98-3.46a27.8 27.8 0 0 0 2.2-6.03l6.03.55.4-2.3-5.86-1.54a28.3 28.3 0 0 0 0-6.42l5.87-1.55-.4-2.3-6.05.56a27.8 27.8 0 0 0-2.2-6.03l4.99-3.46-1.17-2.02-5.49 2.59a28.14 28.14 0 0 0-4.12-4.92l3.5-4.96-1.79-1.5-4.27 4.31a27.97 27.97 0 0 0-5.56-3.21l1.6-5.85-2.2-.8-2.54 5.5c-2.02-.6-4.14-.97-6.32-1.1l.01-.01zM121 128a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm0-2a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm0-18a5 5 0 1 1 0-10 5 5 0 0 1 0 10zm8.49 3.51a5 5 0 1 1 6.95-7.2 5 5 0 0 1-6.95 7.2zM133 120a5 5 0 1 1 10 0 5 5 0 0 1-10 0zm-3.51 8.49a5 5 0 1 1 7.2 6.95 5 5 0 0 1-7.2-6.95zM121 132a5 5 0 1 1 0 10 5 5 0 0 1 0-10zm-8.49-3.51a5 5 0 1 1-6.95 7.2 5 5 0 0 1 6.95-7.2zM109 120a5 5 0 1 1-10 0 5 5 0 0 1 10 0zm3.51-8.49a5 5 0 1 1-7.2-6.95 5 5 0 0 1 7.2 6.95zM121 106a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm9.9 4.1a3 3 0 1 0 4.39-4.09 3 3 0 0 0-4.39 4.09zm4.1 9.9a3 3 0 1 0 6 0 3 3 0 0 0-6 0zm-4.1 9.9a3 3 0 1 0 4.09 4.39 3 3 0 0 0-4.09-4.39zM121 134a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-9.9-4.1a3 3 0 1 0-4.39 4.09 3 3 0 0 0 4.39-4.09zM107 120a3 3 0 1 0-6 0 3 3 0 0 0 6 0zm4.1-9.9a3 3 0 1 0-4.09-4.39 3 3 0 0 0 4.09 4.39zm129.42-6.95v.01c.87.07 1.74.17 2.6.3l1.5-3.91 1.94-3.64 3.89.97v4.13l-.5 4.13c.83.28 1.64.59 2.44.93l2.42-3.43 2.76-3.07 3.54 1.88-1 4-1.49 3.89c.73.47 1.45.97 2.15 1.49l3.19-2.76 3.42-2.3 2.97 2.67-1.93 3.65-2.38 3.4c.6.64 1.2 1.3 1.76 1.99l3.68-1.94 3.85-1.48 2.29 3.28-2.7 3.11-3.12 2.82c.43.76.84 1.53 1.22 2.32l4.04-1 4.1-.5 1.43 3.73-3.37 2.37-3.7 1.98c.23.84.44 1.68.62 2.54l4.17.01 4.1.5.48 3.97-3.85 1.48-4.06 1.02c.03.87.03 1.75 0 2.62l4.06 1.02 3.85 1.48-.48 3.97-4.1.51h-4.17c-.18.86-.39 1.71-.63 2.54l3.7 1.98 3.38 2.37-1.43 3.73-4.1-.5-4.04-1c-.38.79-.79 1.56-1.22 2.32l3.13 2.82 2.7 3.11-2.3 3.28-3.85-1.48-3.68-1.95a37 37 0 0 1-1.76 2l2.38 3.41 1.93 3.64-2.97 2.67-3.42-2.3-3.19-2.76a40.1 40.1 0 0 1-2.15 1.48l1.48 3.9 1 4-3.53 1.88-2.76-3.07-2.42-3.43c-.8.33-1.61.65-2.45.93l.5 4.13v4.13l-3.88.97-1.94-3.65-1.5-3.9c-.86.13-1.73.23-2.6.31L240 187l-1 4h-4l-1-4-.52-4.16a37.6 37.6 0 0 1-2.6-.3l-1.5 3.91-1.94 3.64-3.89-.97v-4.13l.5-4.13c-.83-.28-1.64-.59-2.44-.93l-2.42 3.43-2.76 3.07-3.54-1.88 1-4 1.49-3.89c-.74-.47-1.45-.97-2.15-1.49l-3.19 2.76-3.42 2.3-2.97-2.67 1.93-3.65 2.38-3.4c-.61-.65-1.2-1.31-1.76-1.99l-3.68 1.94-3.85 1.48-2.29-3.28 2.7-3.11 3.12-2.82c-.43-.76-.84-1.53-1.22-2.32l-4.04 1-4.1.5-1.43-3.73 3.37-2.37 3.7-1.98c-.23-.84-.44-1.68-.62-2.54l-4.17-.01-4.1-.5-.48-3.97 3.85-1.48 4.06-1.02c-.03-.87-.03-1.75 0-2.62l-4.06-1.02-3.85-1.48.48-3.97 4.1-.51h4.17c.18-.86.39-1.71.63-2.54l-3.7-1.98-3.38-2.37 1.43-3.73 4.1.5 4.04 1c.38-.79.79-1.56 1.22-2.32l-3.13-2.82-2.7-3.11 2.3-3.28 3.85 1.48 3.68 1.95a37 37 0 0 1 1.76-2l-2.38-3.41-1.93-3.64 2.97-2.67 3.42 2.3 3.19 2.76c.7-.52 1.41-1.02 2.15-1.48l-1.48-3.9-1-4 3.53-1.88 2.76 3.07 2.42 3.43c.8-.33 1.61-.65 2.45-.93l-.5-4.13v-4.13l3.88-.97 1.94 3.65 1.5 3.9c.86-.13 1.73-.23 2.6-.31L234 99l1-4h4l1 4 .52 4.15zm-14.3 3.4c-1.83.54-3.6 1.21-5.3 2l-3.5-4.97-1.38-1.53-.88.47.5 2 2.16 5.67a38.09 38.09 0 0 0-4.66 3.22l-4.61-4-1.71-1.15-.75.67.97 1.82 3.47 4.98a38.22 38.22 0 0 0-3.79 4.28l-5.37-2.84-1.92-.74-.57.82 1.35 1.56 4.52 4.09a37.9 37.9 0 0 0-2.64 5l-5.89-1.45-2.04-.25-.36.94 1.69 1.18 5.36 2.87a37.74 37.74 0 0 0-1.35 5.5l-6.08.01-2.04.25-.12 1 1.92.73 5.9 1.5a38.54 38.54 0 0 0 0 5.65l-5.9 1.49-1.92.74.12.99 2.04.25 6.08.01c.31 1.86.77 3.7 1.35 5.5l-5.36 2.87-1.7 1.18.37.94 2.04-.25 5.9-1.46a37.9 37.9 0 0 0 2.63 5.01l-4.52 4.1-1.35 1.55.57.82 1.92-.74 5.37-2.84a38.22 38.22 0 0 0 3.8 4.28l-3.48 4.98-.97 1.82.75.67 1.7-1.15 4.62-4a38.09 38.09 0 0 0 4.66 3.22l-2.17 5.67-.5 2 .89.47 1.38-1.53 3.5-4.98c1.7.8 3.47 1.47 5.3 2l-.73 6.04v2.06l.97.24.97-1.82 2.2-5.68c1.83.36 3.7.6 5.62.68L236 187l.5 2h1l.5-2 .75-6.04a38.2 38.2 0 0 0 5.62-.68l2.2 5.68.97 1.82.97-.24v-2.06l-.73-6.03c1.83-.54 3.6-1.21 5.3-2l3.5 4.97 1.38 1.53.88-.47-.5-2-2.16-5.67a38.09 38.09 0 0 0 4.66-3.22l4.61 4 1.71 1.15.75-.67-.97-1.82-3.47-4.98a38.22 38.22 0 0 0 3.79-4.28l5.37 2.84 1.92.74.57-.82-1.35-1.56-4.52-4.09c1-1.6 1.88-3.27 2.64-5l5.89 1.45 2.04.25.36-.94-1.69-1.18-5.36-2.87a37.4 37.4 0 0 0 1.35-5.5l6.08-.01 2.04-.25.12-1-1.92-.73-5.9-1.5c.14-1.88.14-3.77 0-5.65l5.9-1.49 1.92-.74-.12-.99-2.04-.25-6.08-.01a37.4 37.4 0 0 0-1.35-5.5l5.36-2.87 1.7-1.18-.37-.94-2.04.25-5.9 1.46a37.9 37.9 0 0 0-2.63-5.01l4.52-4.1 1.35-1.55-.57-.82-1.92.74-5.37 2.84a38.22 38.22 0 0 0-3.8-4.28l3.48-4.98.97-1.82-.75-.67-1.7 1.15-4.62 4a38.09 38.09 0 0 0-4.66-3.22l2.17-5.67.5-2-.89-.47-1.38 1.53-3.5 4.98c-1.7-.8-3.47-1.47-5.3-2l.73-6.04v-2.06l-.97-.24-.97 1.82-2.2 5.68c-1.83-.36-3.7-.6-5.62-.68L238 99l-.5-2h-1l-.5 2-.75 6.04c-1.92.09-3.8.32-5.62.68l-2.2-5.68-.97-1.82-.97.24v2.06l.73 6.03zm-5.85 5.65A34.82 34.82 0 0 1 236 108v6a28.8 28.8 0 0 0-12.63 3.39l-3-5.2v.01zm2.8.83l1 1.74a30.8 30.8 0 0 1 9.83-2.63v-2.01a32.8 32.8 0 0 0-10.83 2.9zm-4.53.17l3 5.2a29.12 29.12 0 0 0-9.24 9.24l-5.2-3a35.18 35.18 0 0 1 11.44-11.44zm-.67 2.84a33.19 33.19 0 0 0-7.93 7.93l1.74 1a31.18 31.18 0 0 1 7.2-7.2l-1.01-1.73zm-11.77 10.33h-.01l5.2 3A28.8 28.8 0 0 0 208 142h-6a34.82 34.82 0 0 1 4.2-15.63zm.83 2.8a32.8 32.8 0 0 0-2.9 10.83h2.01a30.8 30.8 0 0 1 2.63-9.83l-1.74-1zM202.01 144h6.01c.15 4.41 1.3 8.73 3.38 12.63l-5.2 3a34.82 34.82 0 0 1-4.19-15.63zm2.12 2a32.8 32.8 0 0 0 2.9 10.84l1.74-1a30.8 30.8 0 0 1-2.63-9.84h-2.01zm3.07 15.36l5.2-3c2.34 3.74 5.5 6.9 9.24 9.24l-3 5.2a35.18 35.18 0 0 1-11.44-11.44zm2.84.67a33.19 33.19 0 0 0 7.93 7.93l1-1.74a31.18 31.18 0 0 1-7.2-7.2l-1.73 1.01zm10.33 11.77v.01l3-5.2A28.85 28.85 0 0 0 236 172v6a34.82 34.82 0 0 1-15.63-4.2zm2.8-.83a32.8 32.8 0 0 0 10.83 2.9v-2.01a30.8 30.8 0 0 1-9.83-2.63l-1 1.74zm14.83 5.02v-6.01c4.41-.15 8.73-1.3 12.63-3.38l3 5.2a34.82 34.82 0 0 1-15.63 4.19zm2-2.12a32.8 32.8 0 0 0 10.84-2.9l-1-1.74a30.8 30.8 0 0 1-9.84 2.63v2.01zm15.36-3.07l-3-5.2c3.74-2.34 6.9-5.5 9.24-9.24l5.2 3a35.18 35.18 0 0 1-11.44 11.44zm.67-2.84a33.19 33.19 0 0 0 7.93-7.93l-1.74-1a31.18 31.18 0 0 1-7.2 7.2l1.01 1.73zm11.77-10.33h.01l-5.2-3A28.85 28.85 0 0 0 266 144h6a34.82 34.82 0 0 1-4.2 15.63zm-.83-2.8a32.8 32.8 0 0 0 2.9-10.83h-2.01a30.8 30.8 0 0 1-2.63 9.83l1.74 1zm5.02-14.83h-6.01a28.85 28.85 0 0 0-3.38-12.63l5.2-3a34.82 34.82 0 0 1 4.19 15.63zm-2.12-2a32.8 32.8 0 0 0-2.9-10.84l-1.74 1a30.8 30.8 0 0 1 2.63 9.84h2.01zm-3.07-15.36l-5.2 3a29.12 29.12 0 0 0-9.24-9.24l3-5.2a35.18 35.18 0 0 1 11.44 11.44zm-2.84-.67a33.19 33.19 0 0 0-7.93-7.93l-1 1.74a31.18 31.18 0 0 1 7.2 7.2l1.73-1.01zM238 108a34.82 34.82 0 0 1 15.63 4.19l-3 5.2a28.85 28.85 0 0 0-12.63-3.38V108zm12.84 5.02a32.8 32.8 0 0 0-10.84-2.9v2.01a30.8 30.8 0 0 1 9.83 2.63l1-1.74h.01zM237 156a13 13 0 1 1 0-26 13 13 0 0 1 0 26zm0-2a11 11 0 1 0 0-22 11 11 0 0 0 0 22zM137.54 0h56.92l-.74 1.03c.57.7 1.12 1.4 1.64 2.14l7.75-2.9 2 3.46-6.38 5.25c.37.82.72 1.65 1.03 2.5l8.22-.8 1.04 3.86-7.52 3.43c.15.88.26 1.77.35 2.67L210 22v4l-8.15 1.36c-.09.9-.2 1.8-.35 2.67l7.52 3.43-1.04 3.86-8.22-.8c-.31.85-.66 1.68-1.03 2.5l6.38 5.25-2 3.46-7.75-2.9c-.52.74-1.07 1.45-1.64 2.14l4.8 6.73-2.82 2.83-6.73-4.8c-.7.56-1.4 1.11-2.14 1.63l2.9 7.75-3.46 2-5.25-6.38c-.82.37-1.65.72-2.5 1.03l.8 8.22-3.86 1.04-3.43-7.52c-.88.15-1.77.26-2.67.35L168 68h-4l-1.36-8.15c-.9-.09-1.8-.2-2.67-.35l-3.43 7.52-3.86-1.04.8-8.22c-.85-.31-1.68-.66-2.5-1.03l-5.25 6.38-3.46-2 2.9-7.75a36.15 36.15 0 0 1-2.14-1.64l-6.73 4.8-2.83-2.82 4.8-6.73c-.56-.7-1.11-1.4-1.63-2.14l-7.75 2.9-2-3.46 6.38-5.25c-.37-.82-.72-1.65-1.03-2.5l-8.22.8-1.04-3.86 7.52-3.43c-.15-.88-.26-1.77-.35-2.67L122 26v-4l8.15-1.36c.09-.9.2-1.8.35-2.67l-7.52-3.43 1.04-3.86 8.22.8c.31-.85.66-1.68 1.03-2.5l-6.38-5.25 2-3.46 7.75 2.9c.52-.74 1.07-1.45 1.64-2.14L137.54 0zm2.43 0l.83 1.17a34.14 34.14 0 0 0-3.38 4.4l-7.63-2.86-.33.58 6.29 5.18a33.79 33.79 0 0 0-2.13 5.12l-8.1-.78-.18.64 7.42 3.37a34.02 34.02 0 0 0-.72 5.5L124 23.68v.66l8.04 1.34c.1 1.88.33 3.72.72 5.5l-7.42 3.38.18.64 8.1-.78a33.88 33.88 0 0 0 2.13 5.12l-6.29 5.18.33.58 7.63-2.86c1 1.56 2.14 3.03 3.38 4.4l-4.73 6.63.47.47 6.63-4.73a34.14 34.14 0 0 0 4.4 3.38l-2.86 7.63.58.33 5.18-6.29c1.63.84 3.35 1.56 5.12 2.13l-.78 8.1.64.18 3.37-7.42c1.79.39 3.63.63 5.5.72l1.35 8.04h.66l1.34-8.04c1.88-.1 3.72-.33 5.5-.72l3.38 7.42.64-.18-.78-8.1a33.88 33.88 0 0 0 5.12-2.13l5.18 6.29.58-.33-2.86-7.63c1.56-1 3.03-2.14 4.4-3.38l6.63 4.73.47-.47-4.73-6.63a34.14 34.14 0 0 0 3.38-4.4l7.63 2.86.33-.58-6.29-5.18a33.79 33.79 0 0 0 2.13-5.12l8.1.78.18-.64-7.42-3.37c.39-1.79.63-3.63.72-5.5l8.04-1.35v-.66l-8.04-1.34c-.1-1.88-.33-3.72-.72-5.5l7.42-3.38-.18-.64-8.1.78a33.79 33.79 0 0 0-2.13-5.12l6.29-5.18-.33-.58-7.63 2.86c-1-1.56-2.14-3.03-3.38-4.4l.83-1.17h-52.06V0zm-2.82 27h14.15A15.02 15.02 0 0 0 163 38.7v14.15A29.01 29.01 0 0 1 137.15 27zm12.57-27H163v9.3A15.02 15.02 0 0 0 151.3 21h-14.15a28.99 28.99 0 0 1 12.57-21zM169 52.85V38.7A15.02 15.02 0 0 0 180.7 27h14.15A29.01 29.01 0 0 1 169 52.85zM182.28 0a28.99 28.99 0 0 1 12.57 21H180.7A15.02 15.02 0 0 0 169 9.3V0h13.28zm-42.82 29A27.03 27.03 0 0 0 161 50.54V40.25A17.04 17.04 0 0 1 149.75 29h-10.29zm14.16-29a27.04 27.04 0 0 0-14.16 19h10.29A17.04 17.04 0 0 1 161 7.75V0h-7.38zM171 50.54A27.03 27.03 0 0 0 192.54 29h-10.29A17.04 17.04 0 0 1 171 40.25v10.29zM178.38 0H171v7.75A17.04 17.04 0 0 1 182.25 19h10.29a27.04 27.04 0 0 0-14.16-19zM166 34a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-39.51 176.15l-10.67-7.95 6-10.4 12.23 5.27a23.97 23.97 0 0 1 8.4-4.86L144 177h12l1.55 13.21a23.97 23.97 0 0 1 8.4 4.86l12.23-5.27 6 10.4-10.67 7.95a24 24 0 0 1 0 9.7l10.67 7.95-6 10.4-12.23-5.27a23.97 23.97 0 0 1-8.4 4.86L156 249h-12l-1.55-13.21a23.97 23.97 0 0 1-8.4-4.86l-12.23 5.27-6-10.4 10.67-7.95a24.1 24.1 0 0 1 0-9.7zm29.25-16.4l-1.5-12.75h-8.48l-1.5 12.76c-3.75 1-7.1 2.99-9.79 5.65l-11.8-5.08-4.23 7.34 10.3 7.68c-.98 3.7-.98 7.6 0 11.3l-10.3 7.68 4.23 7.34 11.8-5.08a22.1 22.1 0 0 0 9.8 5.65l1.5 12.76h8.47l1.5-12.76c3.75-1 7.1-2.99 9.79-5.65l11.8 5.08 4.23-7.34-10.3-7.68c.98-3.7.98-7.6 0-11.3l10.3-7.68-4.23-7.34-11.8 5.08a21.98 21.98 0 0 0-9.8-5.65l.01-.01zM150 225a12 12 0 1 1 0-24 12 12 0 0 1 0 24zm0-2a10 10 0 1 0 0-20 10 10 0 0 0 0 20zm3.53 67.72l4.26.07.51 1.93-3.65 2.19c.11.63.2 1.27.25 1.92L159 298v2l-4.1 1.17c-.05.65-.14 1.29-.25 1.92l3.65 2.2-.51 1.92-4.26.07c-.22.61-.47 1.21-.74 1.8l2.96 3.05-1 1.74-4.13-1.04a24.1 24.1 0 0 1-1.18 1.54l2.07 3.72-1.42 1.42-3.72-2.07c-.5.41-1.01.8-1.54 1.18l1.04 4.13-1.74 1-3.05-2.96c-.59.27-1.19.52-1.8.74l-.07 4.26-1.93.51-2.19-3.65c-.63.11-1.27.2-1.92.25L132 327h-2l-1.17-4.1c-.65-.05-1.29-.14-1.92-.25l-2.2 3.65-1.92-.51-.07-4.26c-.61-.22-1.21-.47-1.8-.74l-3.05 2.96-1.74-1 1.04-4.13a24.1 24.1 0 0 1-1.54-1.18l-3.72 2.07-1.42-1.42 2.07-3.72c-.41-.5-.8-1.01-1.18-1.54l-4.13 1.04-1-1.74 2.96-3.05c-.27-.59-.52-1.19-.74-1.8l-4.26-.07-.51-1.93 3.65-2.19c-.11-.63-.2-1.27-.25-1.92L103 300v-2l4.1-1.17c.05-.65.14-1.29.25-1.92l-3.65-2.2.51-1.92 4.26-.07c.22-.61.47-1.21.74-1.8l-2.96-3.05 1-1.74 4.13 1.04c.38-.53.77-1.04 1.18-1.54l-2.07-3.72 1.42-1.42 3.72 2.07c.5-.41 1.01-.8 1.54-1.18l-1.04-4.13 1.74-1 3.05 2.96c.59-.27 1.19-.52 1.8-.74l.07-4.26 1.93-.51 2.19 3.65c.63-.11 1.27-.2 1.92-.25L130 271h2l1.17 4.1c.65.05 1.29.14 1.92.25l2.2-3.65 1.92.51.07 4.26c.61.22 1.21.47 1.8.74l3.05-2.96 1.74 1-1.04 4.13c.53.38 1.04.77 1.54 1.18l3.72-2.07 1.42 1.42-2.07 3.72c.41.5.8 1.01 1.18 1.54l4.13-1.04 1 1.74-2.96 3.05c.27.59.52 1.19.74 1.8zM109 299a22 22 0 1 0 44 0 22 22 0 0 0-44 0zm27.11-10.86l-3 5.22a6 6 0 0 0-4.21 0l-3.01-5.22a11.95 11.95 0 0 1 10.22 0zm1.74 1a12 12 0 0 1 5.1 8.86h-6.01a6.01 6.01 0 0 0-2.1-3.64l3-5.22h.01zm-13.7 0l3.02 5.22a6.01 6.01 0 0 0-2.1 3.64h-6.03a12 12 0 0 1 5.11-8.86zm-5.1 10.86h6.01a6.01 6.01 0 0 0 2.1 3.64l-3 5.22a12 12 0 0 1-5.12-8.86h.01zm6.84 9.86l3-5.22a6 6 0 0 0 4.21 0l3.01 5.22a11.95 11.95 0 0 1-10.22 0zm11.96-1l-3.02-5.22a6.01 6.01 0 0 0 2.1-3.64h6.03a12 12 0 0 1-5.11 8.86zm-4.68-19.62a10.04 10.04 0 0 0-4.34 0l1.05 1.82c.74-.1 1.5-.1 2.24 0l1.05-1.82zm5.2 3l-1.05 1.82c.46.59.84 1.24 1.12 1.94h2.1a9.99 9.99 0 0 0-2.17-3.76zm-14.74 0a9.99 9.99 0 0 0-2.17 3.76h2.1c.28-.7.66-1.35 1.12-1.94l-1.05-1.82zm-2.17 9.76a9.99 9.99 0 0 0 2.17 3.76l1.05-1.82a8.01 8.01 0 0 1-1.12-1.94h-2.1zm7.37 6.76c1.43.32 2.91.32 4.34 0l-1.05-1.82c-.74.1-1.5.1-2.24 0l-1.05 1.82zm9.54-3a9.99 9.99 0 0 0 2.17-3.76h-2.1c-.28.7-.66 1.35-1.12 1.94l1.05 1.82zM127 299a4 4 0 1 1 8 0 4 4 0 0 1-8 0zm2 0a2 2 0 1 0 4 0 2 2 0 0 0-4 0zm15 0a4 4 0 1 1 8 0 4 4 0 0 1-8 0zm-6.5 11.26a4 4 0 1 1 4 6.93 4 4 0 0 1-4-6.93zm-13 0a4 4 0 1 1-4 6.93 4 4 0 0 1 4-6.93zM118 299a4 4 0 1 1-8 0 4 4 0 0 1 8 0zm6.5-11.26a4 4 0 1 1-4-6.93 4 4 0 0 1 4 6.93zm13 0a4 4 0 1 1 4-6.93 4 4 0 0 1-4 6.93zM146 299a2 2 0 1 0 4 0 2 2 0 0 0-4 0zm-7.5 12.99a2 2 0 1 0 1.66 3.64 2 2 0 0 0-1.66-3.64zm-15 0a2 2 0 1 0-2.15 3.38 2 2 0 0 0 2.15-3.38zM116 299a2 2 0 1 0-4 0 2 2 0 0 0 4 0zm7.5-12.99a2 2 0 1 0-1.66-3.64 2 2 0 0 0 1.66 3.64zm15 0a2 2 0 1 0 2.15-3.38 2 2 0 0 0-2.15 3.38zm103.8-61.7l-.8-8.22 5.8-1.55 3.42 7.52c2.26-.43 4.57-.74 6.92-.9L259 213h6l1.36 8.16c2.35.16 4.66.47 6.92.9l3.42-7.52 5.8 1.55-.8 8.22c2.21.77 4.37 1.66 6.45 2.68l5.25-6.38 5.2 3-2.9 7.74a60.25 60.25 0 0 1 5.53 4.25l6.73-4.8 4.24 4.24-4.8 6.73a60.25 60.25 0 0 1 4.25 5.53l7.74-2.9 3 5.2-6.38 5.25a59.62 59.62 0 0 1 2.68 6.45l8.22-.8 1.55 5.8-7.52 3.42c.43 2.26.74 4.57.9 6.92L330 278v6l-8.16 1.36a60.03 60.03 0 0 1-.9 6.92l7.52 3.42-1.55 5.8-8.22-.8a59.62 59.62 0 0 1-2.68 6.45l6.38 5.25-3 5.2-7.74-2.9a60.25 60.25 0 0 1-4.25 5.53l4.8 6.73-4.24 4.24-6.73-4.8a60.25 60.25 0 0 1-5.53 4.25l2.9 7.74-5.2 3-5.25-6.38a59.62 59.62 0 0 1-6.45 2.68l.8 8.22-5.8 1.55-3.42-7.52c-2.26.43-4.57.74-6.92.9L265 349h-6l-1.36-8.16a60.03 60.03 0 0 1-6.92-.9l-3.42 7.52-5.8-1.55.8-8.22a59.62 59.62 0 0 1-6.45-2.68l-5.25 6.38-5.2-3 2.9-7.74a60.25 60.25 0 0 1-5.53-4.25l-6.73 4.8-4.24-4.24 4.8-6.73a60.25 60.25 0 0 1-4.25-5.53l-7.74 2.9-3-5.2 6.38-5.25a59.62 59.62 0 0 1-2.68-6.45l-8.22.8-1.55-5.8 7.52-3.42c-.43-2.29-.73-4.6-.9-6.92L194 284v-6l8.16-1.36c.16-2.35.47-4.66.9-6.92l-7.52-3.42 1.55-5.8 8.22.8c.77-2.2 1.66-4.35 2.68-6.45l-6.38-5.25 3-5.2 7.74 2.9a60.25 60.25 0 0 1 4.25-5.53l-4.8-6.73 4.24-4.24 6.73 4.8a60.25 60.25 0 0 1 5.53-4.25l-2.9-7.74 5.2-3 5.25 6.38a59.62 59.62 0 0 1 6.45-2.68zm2.12 1.4c-3.15 1-6.19 2.27-9.08 3.77l-5.19-6.3-2.3 1.33 2.86 7.65a58.24 58.24 0 0 0-7.79 5.98l-6.65-4.75-1.88 1.88 4.75 6.65a58.24 58.24 0 0 0-5.98 7.79l-7.65-2.86-1.33 2.3 6.3 5.2a57.64 57.64 0 0 0-3.77 9.07l-8.12-.79-.69 2.58 7.43 3.38a58 58 0 0 0-1.27 9.73l-8.06 1.35v2.66l8.06 1.35c.15 3.32.58 6.58 1.27 9.73l-7.43 3.38.7 2.58 8.11-.79c1 3.15 2.27 6.19 3.77 9.08l-6.3 5.19 1.33 2.3 7.65-2.86a58.24 58.24 0 0 0 5.98 7.79l-4.75 6.65 1.88 1.88 6.65-4.75a60.3 60.3 0 0 0 7.79 5.98l-2.86 7.65 2.3 1.33 5.2-6.3a56.99 56.99 0 0 0 9.07 3.77l-.79 8.12 2.58.69 3.38-7.43c3.15.69 6.4 1.12 9.73 1.27l1.35 8.06h2.66l1.35-8.06c3.32-.15 6.58-.58 9.73-1.27l3.38 7.43 2.58-.7-.79-8.11c3.15-1 6.19-2.27 9.08-3.77l5.19 6.3 2.3-1.33-2.86-7.65a58.24 58.24 0 0 0 7.79-5.98l6.65 4.75 1.88-1.88-4.75-6.65a60.3 60.3 0 0 0 5.98-7.79l7.65 2.86 1.33-2.3-6.3-5.2a56.99 56.99 0 0 0 3.77-9.07l8.12.79.69-2.58-7.43-3.38a58 58 0 0 0 1.27-9.73l8.06-1.35v-2.66l-8.06-1.35a58.04 58.04 0 0 0-1.27-9.73l7.43-3.38-.7-2.58-8.11.79c-1-3.15-2.27-6.19-3.77-9.08l6.3-5.19-1.33-2.3-7.65 2.86a58.24 58.24 0 0 0-5.98-7.79l4.75-6.65-1.88-1.88-6.65 4.75a58.24 58.24 0 0 0-7.79-5.98l2.86-7.65-2.3-1.33-5.2 6.3a57.64 57.64 0 0 0-9.07-3.77l.79-8.12-2.58-.69-3.38 7.43a58 58 0 0 0-9.73-1.27l-1.35-8.06h-2.66l-1.35 8.06c-3.32.15-6.58.58-9.73 1.27l-3.38-7.43-2.58.7.79 8.11zm4.58 50.1a13.96 13.96 0 0 0 0 10.39l-33.88 19.55A52.77 52.77 0 0 1 209 281c0-8.94 2.21-17.37 6.12-24.75L249 275.8v.01zm2-3.47l-33.87-19.56A52.97 52.97 0 0 1 260 228.04v39.1a13.99 13.99 0 0 0-9 5.2zm0 17.32a13.99 13.99 0 0 0 9 5.2v39.1a52.97 52.97 0 0 1-42.87-24.74L251 289.66zm13 5.2a13.99 13.99 0 0 0 9-5.2l33.87 19.56A52.97 52.97 0 0 1 264 333.96v-39.1zm11-8.66a13.96 13.96 0 0 0 0-10.4l33.88-19.55A52.77 52.77 0 0 1 315 281c0 8.94-2.21 17.37-6.12 24.75L275 286.2zm-2-13.86a13.99 13.99 0 0 0-9-5.2v-39.1a52.97 52.97 0 0 1 42.87 24.74L273 272.34zm-57.04-13.3A50.8 50.8 0 0 0 211 281a50.8 50.8 0 0 0 4.96 21.96l30.62-17.68c-.78-2.8-.78-5.76 0-8.56l-30.62-17.68zm4-6.93l30.62 17.68a16.08 16.08 0 0 1 7.42-4.29v-35.35a50.96 50.96 0 0 0-38.04 21.96zm0 57.78A50.96 50.96 0 0 0 258 331.85V296.5a15.98 15.98 0 0 1-7.42-4.29l-30.62 17.68zM266 331.85a50.96 50.96 0 0 0 38.04-21.96l-30.62-17.68a16.08 16.08 0 0 1-7.42 4.29v35.35zm42.04-28.89A50.8 50.8 0 0 0 313 281a50.8 50.8 0 0 0-4.96-21.96l-30.62 17.68c.78 2.8.78 5.76 0 8.56l30.62 17.68zm-4-50.85A50.96 50.96 0 0 0 266 230.15v35.35c2.86.74 5.41 2.25 7.42 4.29l30.62-17.68zM262 290a9 9 0 1 1 0-18 9 9 0 0 1 0 18zm0-2a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM0 242.64l2.76.4 4.75 2.27a38.2 38.2 0 0 1 2.85-3.4l-3.06-4.28-1.69-5.11 3.07-2.58 4.74 2.55 3.69 3.76a37.96 37.96 0 0 1 3.84-2.22l-1.42-5.07.17-5.38 3.76-1.37 3.6 4.02 2.17 4.79c1.42-.34 2.88-.6 4.37-.77L34 225l2-5h4l2 5 .4 5.25c1.49.17 2.95.43 4.37.77l2.18-4.8 3.59-4 3.76 1.36.17 5.38-1.42 5.07c1.33.67 2.6 1.41 3.84 2.22l3.69-3.76 4.74-2.55 3.07 2.58-1.69 5.11-3.06 4.29a38.2 38.2 0 0 1 2.85 3.4l4.75-2.28 5.33-.77 2 3.46-3.33 4.23-4.34 2.98c.59 1.36 1.1 2.75 1.52 4.17l5.23-.52 5.27 1.1.7 3.94-4.58 2.84-5.1 1.31a38.6 38.6 0 0 1 0 4.44l5.1 1.3 4.58 2.85-.7 3.93-5.27 1.1-5.23-.5a36.3 36.3 0 0 1-1.52 4.16l4.34 2.98 3.33 4.23-2 3.46-5.33-.77-4.75-2.27a38.2 38.2 0 0 1-2.85 3.4l3.06 4.28 1.69 5.11-3.07 2.58-4.74-2.55-3.69-3.76a37.96 37.96 0 0 1-3.84 2.22l1.42 5.07-.17 5.38-3.76 1.37-3.6-4.02-2.17-4.79c-1.42.34-2.88.6-4.37.77L42 311l-2 5h-4l-2-5-.4-5.25a37.87 37.87 0 0 1-4.37-.77l-2.18 4.8-3.59 4-3.76-1.36-.17-5.38 1.42-5.07c-1.32-.66-2.6-1.4-3.84-2.22l-3.69 3.76-4.74 2.55-3.07-2.58 1.69-5.11 3.06-4.29a38.2 38.2 0 0 1-2.85-3.4l-4.75 2.28-2.76.4v-8.17l3.1-2.13a37.72 37.72 0 0 1-1.52-4.17l-1.58.16v-8.82l.06-.01a38.6 38.6 0 0 1 0-4.44l-.06-.01v-8.82l1.58.16c.43-1.43.94-2.82 1.52-4.17L0 250.8v-8.17.01zm0 1.87v3.89l5.62 3.84a35.74 35.74 0 0 0-2.55 7.02l-3.07-.3v4.75l2.2.56a36.42 36.42 0 0 0 0 7.46l-2.2.56v4.75l3.07-.3a35.2 35.2 0 0 0 2.55 7.02L0 287.6v3.89l1.76-.26 6.41-3.07c1.4 2.06 3 3.98 4.8 5.71l-4.14 5.78-1.01 3.07 1.22 1.03 2.85-1.52 4.98-5.08c2 1.45 4.16 2.7 6.45 3.73l-1.9 6.84.1 3.23 1.5.55 2.15-2.4 2.94-6.48a35.9 35.9 0 0 0 7.34 1.3L36 311l1.2 3h1.6l1.2-3 .55-7.09a35.9 35.9 0 0 0 7.34-1.29l2.94 6.47 2.15 2.4 1.5-.54.1-3.23-1.9-6.84a35.96 35.96 0 0 0 6.45-3.73l4.98 5.08 2.85 1.52 1.22-1.03-1-3.07-4.15-5.78a35.8 35.8 0 0 0 4.8-5.7l6.4 3.06 3.2.46.8-1.38-2-2.54-5.85-4.01c1.1-2.24 1.95-4.6 2.55-7.02l7.07.7 3.16-.66.28-1.58-2.75-1.7-6.88-1.77c.26-2.48.26-4.98 0-7.46l6.88-1.77 2.75-1.7-.28-1.58-3.16-.66-7.07.7a35.74 35.74 0 0 0-2.55-7.02l5.86-4 2-2.55-.8-1.38-3.2.46-6.41 3.07c-1.4-2.06-3-3.98-4.8-5.71l4.14-5.78 1.01-3.07-1.22-1.03-2.85 1.52-4.98 5.08c-2-1.45-4.16-2.7-6.45-3.73l1.9-6.84-.1-3.23-1.5-.55-2.15 2.4-2.94 6.48a35.9 35.9 0 0 0-7.34-1.3L40 225l-1.2-3h-1.6l-1.2 3-.55 7.09c-2.48.17-4.94.6-7.34 1.29l-2.94-6.47-2.15-2.4-1.5.54-.1 3.23 1.9 6.84a35.96 35.96 0 0 0-6.45 3.73l-4.98-5.08-2.85-1.52-1.22 1.03 1 3.07 4.15 5.78a36.18 36.18 0 0 0-4.8 5.7l-6.4-3.06L0 244.5v.01zM38 272a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-26a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm24 24a4 4 0 1 1 8 0 4 4 0 0 1-8 0zm-24 24a4 4 0 1 1 0 8 4 4 0 0 1 0-8zm-24-24a4 4 0 1 1-8 0 4 4 0 0 1 8 0zm24-26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm26 26a2 2 0 1 0 4 0 2 2 0 0 0-4 0zm-26 26a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm-26-26a2 2 0 1 0-4 0 2 2 0 0 0 4 0zm3.37 22.63a12 12 0 1 1 16.17-17.74 12 12 0 0 1-16.17 17.74zm0-45.26a12 12 0 1 1 17.74 16.17 12 12 0 0 1-17.74-16.17zm45.26 0a12 12 0 1 1-16.17 17.74 12 12 0 0 1 16.17-17.74zm0 45.26a12 12 0 1 1-17.74-16.17 12 12 0 0 1 17.74 16.17zm-15.56-29.7a10 10 0 1 0 14.39-13.9 10 10 0 0 0-14.39 13.9zm0 14.14a10 10 0 1 0 13.9 14.39 10 10 0 0 0-13.9-14.39zm-14.14 0a10 10 0 1 0-14.39 13.9 10 10 0 0 0 14.39-13.9zm0-14.14a10 10 0 1 0-13.9-14.39 10 10 0 0 0 13.9 14.39zm230.9-245.4l-.08-4.18 1.93-.52 2.04 3.67c1.07-.2 2.16-.35 3.26-.43L270 10h2l1.02 4.07c1.1.08 2.2.22 3.26.43l2.04-3.67 1.93.52-.07 4.19a27 27 0 0 1 3.04 1.26l2.91-3.01 1.74 1-1.16 4.03c.91.62 1.78 1.29 2.61 2l3.6-2.15 1.41 1.41-2.16 3.6c.72.83 1.4 1.7 2 2.6l4.04-1.15 1 1.74-3.01 2.91c.48.98.9 2 1.26 3.04l4.2-.07.5 1.93-3.66 2.04c.2 1.07.35 2.16.43 3.26L303 41v2l-4.07 1.02a26.9 26.9 0 0 1-.43 3.26l3.67 2.04-.52 1.93-4.19-.07a27.82 27.82 0 0 1-1.26 3.04l3.01 2.91-1 1.74-4.03-1.16c-.62.91-1.29 1.78-2 2.61l2.15 3.6-1.41 1.41-3.6-2.16c-.83.72-1.7 1.4-2.6 2l1.15 4.04-1.74 1-2.91-3.01a27 27 0 0 1-3.04 1.26l.07 4.2-1.93.5-2.04-3.66c-1.07.2-2.16.35-3.26.43L272 74h-2l-1.02-4.07a26.9 26.9 0 0 1-3.26-.43l-2.04 3.67-1.93-.52.07-4.19a27.82 27.82 0 0 1-3.04-1.26l-2.91 3.01-1.74-1 1.16-4.03c-.9-.62-1.78-1.29-2.61-2l-3.6 2.15-1.41-1.41 2.16-3.6c-.72-.83-1.4-1.7-2-2.6l-4.04 1.15-1-1.74 3.01-2.91a27 27 0 0 1-1.26-3.04l-4.2.07-.5-1.93 3.66-2.04c-.2-1.07-.35-2.16-.43-3.26L239 43v-2l4.07-1.02c.08-1.1.22-2.2.43-3.26l-3.67-2.04.52-1.93 4.19.07a27 27 0 0 1 1.26-3.04l-3.01-2.91 1-1.74 4.03 1.16c.62-.91 1.29-1.78 2-2.61l-2.15-3.6 1.41-1.41 3.6 2.16c.83-.72 1.7-1.4 2.6-2l-1.15-4.04 1.74-1 2.91 3.01a27 27 0 0 1 3.04-1.26l.01-.01zM271 68a26 26 0 1 0 0-52 26 26 0 0 0 0 52zm0-9a17 17 0 1 1 0-34 17 17 0 0 1 0 34zm0-2a15 15 0 1 0 0-30 15 15 0 0 0 0 30zm0-8a7 7 0 1 1 0-14 7 7 0 0 1 0 14zm0-2a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0-14a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm9 9a2 2 0 1 1 4 0 2 2 0 0 1-4 0zm-9 9a2 2 0 1 1 0 4 2 2 0 0 1 0-4zm-9-9a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm47.93 53.79l-1.8-3.91 1.63-1.18 3.15 2.92c.4-.17.82-.3 1.25-.4L315 89h2l.84 4.21c.43.1.85.24 1.25.4l3.15-2.9 1.62 1.17-1.8 3.9c.3.33.55.69.78 1.06l4.26-.5.62 1.9-3.75 2.1c.04.44.04.87 0 1.31l3.75 2.1-.62 1.9-4.26-.5c-.23.38-.49.74-.77 1.06l1.8 3.91-1.63 1.18-3.15-2.92c-.4.17-.82.3-1.25.4L317 113h-2l-.84-4.21c-.43-.1-.85-.24-1.25-.4l-3.15 2.9-1.62-1.17 1.8-3.9a8.03 8.03 0 0 1-.78-1.06l-4.26.5-.62-1.9 3.75-2.1a8.1 8.1 0 0 1 0-1.31l-3.75-2.1.62-1.9 4.26.5c.23-.38.49-.74.77-1.06zM316 106a5 5 0 1 0 0-10 5 5 0 0 0 0 10zM75.73 179.2l-.6-2.1 1.74-1 1.51 1.57a9.93 9.93 0 0 1 2.1-.55L81 175h2l.53 2.12c.72.1 1.42.3 2.09.55l1.51-1.56 1.74 1-.6 2.1c.56.45 1.07.96 1.52 1.52l2.1-.6 1 1.74-1.56 1.51c.25.67.44 1.37.55 2.1L94 186v2l-2.12.53a9.9 9.9 0 0 1-.55 2.09l1.56 1.51-1 1.74-2.1-.6a9.93 9.93 0 0 1-1.52 1.52l.6 2.1-1.74 1-1.51-1.56c-.67.25-1.37.44-2.1.55L83 199h-2l-.53-2.12c-.71-.1-1.42-.3-2.09-.55l-1.51 1.56-1.74-1 .6-2.1a9.93 9.93 0 0 1-1.52-1.52l-2.1.6-1-1.74 1.56-1.51a9.93 9.93 0 0 1-.55-2.1L70 188v-2l2.12-.53c.1-.72.3-1.42.55-2.09l-1.56-1.51 1-1.74 2.1.6c.45-.56.96-1.07 1.52-1.52v-.01zm2.15.94a8.04 8.04 0 0 0-2.74 2.74l-.14.25a7.96 7.96 0 0 0 0 7.74l.14.25a8.04 8.04 0 0 0 2.74 2.74l.25.14a7.96 7.96 0 0 0 7.74 0l.25-.14a8.04 8.04 0 0 0 2.74-2.74l.14-.25a7.96 7.96 0 0 0 0-7.74l-.14-.25a8.04 8.04 0 0 0-2.74-2.74l-.25-.14a7.96 7.96 0 0 0-7.74 0l-.25.14zM82 193a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm278 3.18l-3.8 5.6-7.18-3.51 2.6-8.07a32.15 32.15 0 0 1-3.07-2.46l-7.27 4.35-5.04-6.22 5.82-6.26c-.64-1.13-1.2-2.3-1.7-3.52l-8.45.73-1.8-7.8 7.95-3.07a32.5 32.5 0 0 1 0-3.9l-7.95-3.07 1.8-7.8 8.45.73a31.7 31.7 0 0 1 1.7-3.52l-5.82-6.26 5.04-6.22 7.27 4.35c.97-.88 2-1.7 3.07-2.46l-2.6-8.07 7.19-3.5 3.79 5.59v64.36zm0-3.53v-57.3l-4.46-6.58-4.1 2 2.53 7.87a30.14 30.14 0 0 0-5.13 4.1l-7.08-4.24-2.88 3.55 5.65 6.09a29.87 29.87 0 0 0-2.82 5.86l-8.24-.7-1.03 4.46 7.73 2.99a30.34 30.34 0 0 0 0 6.5l-7.73 3 1.03 4.45 8.24-.7a29.87 29.87 0 0 0 2.82 5.86l-5.65 6.1 2.88 3.54 7.08-4.23a30.14 30.14 0 0 0 5.13 4.09l-2.54 7.86 4.11 2 4.46-6.57zm0-51.57v5.71l-3.56-3.8a24.94 24.94 0 0 1 3.56-1.91zm0 22.68l-14.17 6.64c-2.5-9.5.77-19.57 8.38-25.78l5.79 10.5v8.64zm0 23.16a25.08 25.08 0 0 1-13.32-13.9l13.32-2.55v16.45zm0-43.64l-.39.2.39.4v-.6zm0 18.29v-2.35l-6.3-11.44a22.93 22.93 0 0 0-6.43 19.76l12.73-5.97zm0 23.15v-12.23l-10.47 2.01A23.1 23.1 0 0 0 360 182.72zM0 129.82l1 1.46a31.8 31.8 0 0 1 3.8-.86L6 122h8l1.2 8.42c1.3.21 2.57.5 3.8.86l4.8-7.06 7.18 3.51-2.6 8.07c1.07.76 2.1 1.58 3.07 2.46l7.27-4.35 5.04 6.22-5.82 6.26c.64 1.13 1.2 2.3 1.7 3.52l8.45-.73 1.8 7.8-7.95 3.07c.08 1.3.08 2.6 0 3.9l7.95 3.07-1.8 7.8-8.45-.73a33.5 33.5 0 0 1-1.7 3.52l5.82 6.26-5.04 6.22-7.27-4.35c-.97.88-2 1.7-3.07 2.46l2.6 8.07-7.19 3.5-4.78-7.05c-1.24.36-2.51.65-3.8.86L14 202H6l-1.2-8.42a31.8 31.8 0 0 1-3.8-.86l-1 1.46v-64.36zm0 3.53v57.3l.2-.29c2.02.7 4.15 1.2 6.34 1.44l1.17 8.2h4.58l1.17-8.2c2.2-.25 4.32-.74 6.35-1.44l4.65 6.87 4.1-2-2.53-7.87a30.14 30.14 0 0 0 5.13-4.1l7.08 4.24 2.88-3.55-5.65-6.09c1.14-1.83 2.1-3.8 2.82-5.86l8.24.7 1.03-4.46-7.73-2.99a30.7 30.7 0 0 0 0-6.5l7.73-3-1.03-4.45-8.24.7a29.87 29.87 0 0 0-2.82-5.86l5.65-6.1-2.88-3.54-7.08 4.23a30.14 30.14 0 0 0-5.13-4.09l2.54-7.86-4.11-2-4.65 6.86a29.82 29.82 0 0 0-6.35-1.44l-1.17-8.2H7.7l-1.17 8.2c-2.2.25-4.32.74-6.35 1.44l-.19-.29H0zm34.17 35.05l-16.26-7.62a7.94 7.94 0 0 0-.8-2.44l8.68-15.72a24.95 24.95 0 0 1 8.38 25.78zm-.85 2.63a25.01 25.01 0 0 1-21.94 15.93l2.23-17.82a8.3 8.3 0 0 0 2.07-1.5l17.64 3.39zM0 139.08A24.92 24.92 0 0 1 10 137c5 0 9.65 1.47 13.56 4l-12.28 13.1a8.06 8.06 0 0 0-2.56 0L0 144.8v-5.72zm0 22.68v-8.65l2.88 5.23c-.4.77-.66 1.59-.79 2.44l-2.09.98zm0 23.16v-16.45l4.32-.83c.6.6 1.3 1.11 2.07 1.5l2.23 17.82c-2.97-.16-5.9-.85-8.62-2.04zM10 156a6 6 0 1 1 0 12 6 6 0 0 1 0-12zm0 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM0 141.28v.6l9.48 10.13c.35-.02.7-.02 1.04 0l9.87-10.54A22.9 22.9 0 0 0 10 139c-3.58 0-6.98.82-10 2.28zm0 18.29l.34-.16c.09-.34.2-.67.32-.99l-.66-1.2v2.35zm0 23.15c1.97.95 4.1 1.63 6.34 1.99l-1.8-14.33a11.6 11.6 0 0 1-.83-.6l-3.71.7v12.24zm13.66 1.99a23.03 23.03 0 0 0 16.8-12.21l-14.17-2.72c-.27.21-.55.42-.84.6l-1.79 14.33zm19.07-19.17a22.93 22.93 0 0 0-6.42-19.75l-6.97 12.63c.12.32.23.65.32.99l13.07 6.13zM137.54 360l-4.07-5.7 2.83-2.83 6.73 4.8c.7-.56 1.4-1.11 2.14-1.63l-2.9-7.75 3.46-2 5.25 6.38c.82-.37 1.65-.72 2.5-1.03l-.8-8.22 3.86-1.04 3.43 7.52c.88-.15 1.77-.26 2.67-.35L164 340h4l1.36 8.15c.9.09 1.8.2 2.67.35l3.43-7.52 3.86 1.04-.8 8.22c.85.31 1.68.66 2.5 1.03l5.25-6.38 3.46 2-2.9 7.75c.74.52 1.45 1.07 2.14 1.64l6.73-4.8 2.83 2.82-4.07 5.7h-56.92zm2.43 0h52.06l3.9-5.46-.47-.47-6.63 4.73a34.14 34.14 0 0 0-4.4-3.38l2.86-7.63-.58-.33-5.18 6.29a33.79 33.79 0 0 0-5.12-2.13l.78-8.1-.64-.18-3.37 7.42a34.02 34.02 0 0 0-5.5-.72l-1.35-8.04h-.66l-1.34 8.04c-1.88.1-3.72.33-5.5.72l-3.38-7.42-.64.18.78 8.1a33.88 33.88 0 0 0-5.12 2.13l-5.18-6.29-.58.33 2.86 7.63c-1.56 1-3.03 2.14-4.4 3.38l-6.63-4.73-.47.47 3.9 5.46zm9.75 0a28.83 28.83 0 0 1 13.28-4.85V360h-13.28zm32.56 0H169v-4.85c4.9.5 9.42 2.22 13.28 4.85zm-28.66 0H161v-2.54a26.8 26.8 0 0 0-7.38 2.54zm24.76 0a26.8 26.8 0 0 0-7.38-2.54V360h7.38zM358.79 0h-1.21l1.5 3.28a48.3 48.3 0 0 0-5.8 5.8l-9.38-4.3-1.65 2.26 7 7.58a47.84 47.84 0 0 0-3.74 7.33l-10.24-1.2-.86 2.66 8.99 5.05a47.91 47.91 0 0 0-1.28 8.12L332 38.6v2.8l10.12 2.02c.2 2.78.63 5.5 1.28 8.12l-9 5.05.87 2.66 10.24-1.2c1.04 2.54 2.29 5 3.74 7.33l-7 7.58 1.65 2.26 9.38-4.3a48.3 48.3 0 0 0 5.8 5.8l-4.3 9.38 2.26 1.65 2.96-2.73v2.66l-2.84 2.62-4.85-3.52 4.36-9.5a50.31 50.31 0 0 1-3.95-3.95l-9.5 4.36-3.52-4.85 7.08-7.68a49.83 49.83 0 0 1-2.54-4.98l-10.38 1.21-1.85-5.7 9.11-5.12a49.9 49.9 0 0 1-.87-5.52L330 43v-6l10.25-2.05c.19-1.87.48-3.72.87-5.52l-9.11-5.12 1.85-5.7 10.38 1.21c.75-1.71 1.6-3.37 2.54-4.98l-7.08-7.68 3.52-4.85 9.5 4.36a50.31 50.31 0 0 1 3.95-3.95L355.42 0h3.37zM360 52.7l-6.48 3.74A39.86 39.86 0 0 1 350 40a39.9 39.9 0 0 1 3.52-16.44L360 27.3v25.4zm0-39.16v4.52l-2.47-1.43c.77-1.07 1.6-2.1 2.47-3.09zm0 52.92c-.87-.99-1.7-2.02-2.47-3.1l2.47-1.42v4.52zm0-16.07V29.61l-5.5-3.18a37.91 37.91 0 0 0 0 27.14l5.5-3.18zM62.42 360h2.16l3.11-6.78-4.85-3.52-7.68 7.08a49.83 49.83 0 0 0-4.98-2.54l1.21-10.38-5.7-1.85-5.12 9.11a49.9 49.9 0 0 0-5.52-.87L33 340h-6l-2.05 10.25c-1.85.19-3.7.48-5.52.87l-5.12-9.11-5.7 1.85 1.21 10.38c-1.71.75-3.37 1.6-4.98 2.54L0 352.32v5.17-2.5l4.62 4.26a47.84 47.84 0 0 1 7.33-3.74l-1.2-10.24 2.66-.86 5.05 8.99a47.91 47.91 0 0 1 8.12-1.28L28.6 342h2.8l2.02 10.12c2.78.2 5.5.63 8.12 1.28l5.05-9 2.66.87-1.2 10.24c2.54 1.04 5 2.29 7.33 3.74l7.58-7 2.26 1.65-2.8 6.1zM360 244.51l-1.44-.2-.8 1.38 2 2.54.24.17v-3.89zm0 14.45l-4-.4-3.16.66-.28 1.58 2.75 1.7 4.69 1.2v-4.74zm0 13.33l-4.7 1.2-2.74 1.71.28 1.58 3.16.66 4-.4v-4.75zm0 15.31l-.24.17-2 2.54.8 1.38 1.44-.2v-3.89zm0 5.76l-2.57.37-2-3.46 3.33-4.23 1.24-.85v8.17zm0-14.31l-3.65.36-5.27-1.1-.7-3.94 4.58-2.84 5.04-1.3v8.82zm0-13.28l-5.04-1.3-4.58-2.84.7-3.93 5.27-1.1 3.65.35v8.82zm0-14.96l-1.24-.85-3.33-4.23 2-3.46 2.57.37v8.17zm0 101.5V360h-4.58l-3.11-6.78 4.85-3.52 2.84 2.62v-.01zm0 2.67l-2.96-2.73-2.26 1.65 2.8 6.1H360v-5.02z'%3E%3C/path%3E%3C/svg%3E"); 154 | } 155 | -------------------------------------------------------------------------------- /src/Book.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react" 2 | import "./Book.css" 3 | import "./BookContent.css" 4 | import { fetchBookPages, selectRandomTheme } from "./BookAPI" 5 | 6 | import { Link } from "react-router-dom" 7 | 8 | const theme = selectRandomTheme() 9 | const book = fetchBookPages() 10 | const pages = book.length - 1 11 | 12 | function clamp(page) { 13 | if (page <= 0) return 0 14 | if (page >= pages) return pages 15 | return page 16 | } 17 | const linkToPrevPage = (page) => clamp(page - 1) 18 | const linkToNextPage = (page) => clamp(page + 1) 19 | 20 | function Book({ page = 0, className }) { 21 | page = Number(clamp(page)) 22 | 23 | const [content, setContent] = useState() 24 | useEffect(() => { 25 | import(`${book[page]}`).then(setContent).catch(console.error) 26 | }, [page]) 27 | 28 | return ( 29 |
30 | 47 |
{content?.body}
48 |
49 |
50 | ) 51 | } 52 | 53 | function Footer() { 54 | const year = new Date().getFullYear() 55 | 56 | const [seconds, setSeconds] = useState(0) 57 | const formatTimestamp = (seconds) => new Date(seconds * 1000).toISOString().substr(11, 8) 58 | 59 | useEffect(() => { 60 | const interval = setInterval(() => { 61 | setSeconds((seconds) => seconds + 1) 62 | }, 1000) 63 | return () => clearInterval(interval) 64 | }, []) 65 | 66 | return ( 67 |
68 | © CodeBook 69 |
70 | 2020—{year} 71 | {formatTimestamp(seconds)} 72 | 73 | Colabore GitHub 74 | 75 |
76 | ) 77 | } 78 | 79 | export default Book 80 | -------------------------------------------------------------------------------- /src/Book.test.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { render } from "@testing-library/react" 3 | import Book from "./Book" 4 | 5 | jest.mock("./BookAPI", () => ({ 6 | fetchBookPages: () => ["./book/00-start", "./book/50-middle", "./book/99-end"], 7 | selectRandomTheme: () => "Test", 8 | })) 9 | 10 | jest.mock( 11 | "./book/00-start", 12 | () => ({ 13 | title: "hello", 14 | body: <>this is a test, 15 | }), 16 | { virtual: true } 17 | ) 18 | 19 | jest.mock( 20 | "./book/50-middle", 21 | () => ({ 22 | title: "hey", 23 | body: <>halfway there, 24 | }), 25 | { virtual: true } 26 | ) 27 | 28 | jest.mock( 29 | "./book/99-end", 30 | () => ({ 31 | title: "goodbye", 32 | body: <>hope all went well, 33 | }), 34 | { virtual: true } 35 | ) 36 | 37 | jest.mock("react-router-dom", () => ({ 38 | Link: ({ className, to, children }) => ( 39 | 40 | {children} 41 | 42 | ), 43 | })) 44 | 45 | test("renders Book box", async () => { 46 | const { container, getByText, findByText } = render() 47 | 48 | const header = await findByText(/hello/i) 49 | expect(header.parentElement).toHaveClass("Header") 50 | 51 | const content = await findByText(/this is a test/i) 52 | expect(content).toHaveClass("Content", "Theme-Test") 53 | 54 | const footer = getByText(/2020—\d{4}/i) 55 | expect(footer).toHaveClass("Footer") 56 | 57 | const timestamp = getByText(/00:00:\d{2}/i) 58 | expect(timestamp).toBeInTheDocument() 59 | 60 | const book = container.firstChild 61 | expect(book).toBeInTheDocument() 62 | expect(book).toHaveClass("Book", "Box", "Test") 63 | }) 64 | 65 | test("render Book pages navigation buttons (start)", async () => { 66 | const { findByText } = render() 67 | 68 | expect(await findByText(/hello/i)).toBeInTheDocument() 69 | expect(await findByText(/this is a test/i)).toBeInTheDocument() 70 | 71 | const previous = await findByText("<") 72 | expect(previous.href).toBe(`${global.window.location.href}0`) 73 | 74 | const next = await findByText(">") 75 | expect(next.href).toBe(`${global.window.location.href}1`) 76 | }) 77 | 78 | test("render Book pages navigation buttons (middle)", async () => { 79 | const { findByText } = render() 80 | 81 | expect(await findByText(/hey/i)).toBeInTheDocument() 82 | expect(await findByText(/halfway there/i)).toBeInTheDocument() 83 | 84 | const previous = await findByText("<") 85 | expect(previous.href).toBe(`${global.window.location.href}0`) 86 | 87 | const next = await findByText(">") 88 | expect(next.href).toBe(`${global.window.location.href}2`) 89 | }) 90 | 91 | test("render Book pages navigation buttons (end)", async () => { 92 | const { findByText } = render() 93 | 94 | expect(await findByText(/goodbye/i)).toBeInTheDocument() 95 | expect(await findByText(/hope all went well/i)).toBeInTheDocument() 96 | 97 | const previous = await findByText("<") 98 | expect(previous.href).toBe(`${global.window.location.href}1`) 99 | 100 | const next = await findByText(">") 101 | expect(next.href).toBe(`${global.window.location.href}2`) 102 | }) 103 | 104 | test("render Book pages navigation buttons (clamp min)", async () => { 105 | const { findByText } = render() 106 | 107 | expect(await findByText(/hello/i)).toBeInTheDocument() 108 | expect(await findByText(/this is a test/i)).toBeInTheDocument() 109 | 110 | const previous = await findByText("<") 111 | expect(previous.href).toBe(`${global.window.location.href}0`) 112 | 113 | const next = await findByText(">") 114 | expect(next.href).toBe(`${global.window.location.href}1`) 115 | }) 116 | 117 | test("render Book pages navigation buttons (clamp max)", async () => { 118 | const { findByText } = render() 119 | 120 | expect(await findByText(/goodbye/i)).toBeInTheDocument() 121 | expect(await findByText(/hope all went well/i)).toBeInTheDocument() 122 | 123 | const previous = await findByText("<") 124 | expect(previous.href).toBe(`${global.window.location.href}1`) 125 | 126 | const next = await findByText(">") 127 | expect(next.href).toBe(`${global.window.location.href}2`) 128 | }) 129 | -------------------------------------------------------------------------------- /src/BookAPI.js: -------------------------------------------------------------------------------- 1 | export function fetchBookPages() { 2 | const ctx = require.context("./book/", false, /.js$/, "sync") 3 | const pages = ctx.keys().map((file) => file.replace("./", "./book/")) 4 | return pages 5 | } 6 | 7 | export function selectRandomTheme() { 8 | const themes = ["Circuit", "Cogs"] 9 | const random = Math.floor(Math.random() * themes.length) 10 | return themes[random] 11 | } 12 | -------------------------------------------------------------------------------- /src/BookContent.css: -------------------------------------------------------------------------------- 1 | .Content img { 2 | display: block; 3 | margin: 12px auto; 4 | max-width: 100%; 5 | } 6 | 7 | .Content code { 8 | display: block; 9 | margin: 12px auto; 10 | font-family: "Courier New", Courier, monospace; 11 | } 12 | 13 | .Content hr, 14 | .Content form { 15 | display: block; 16 | margin: 12px auto; 17 | } 18 | 19 | .Content pre { 20 | white-space: pre-wrap; 21 | } 22 | 23 | .Content table { 24 | display: table; 25 | margin: 12px auto; 26 | } 27 | 28 | .Content th { 29 | font-weight: 900; 30 | } 31 | 32 | .Content td, 33 | .Content th { 34 | border: 1px solid #28282a; 35 | padding: 16px; 36 | } 37 | 38 | .Content ol, 39 | .Content ul { 40 | margin: 12px auto; 41 | } 42 | 43 | .Content ol { 44 | list-style-type: decimal; 45 | } 46 | 47 | .Content ul { 48 | list-style-type: square; 49 | } 50 | 51 | .Content li { 52 | margin-left: 24px; 53 | line-height: 150%; 54 | } 55 | 56 | .Content a:hover { 57 | opacity: 0.95; 58 | } 59 | 60 | .Content b { 61 | font-weight: 900; 62 | } 63 | 64 | .Content i { 65 | font-style: italic; 66 | } 67 | 68 | .Content p, 69 | .Content h1, 70 | .Content h2, 71 | .Content h3, 72 | .Content h4, 73 | .Content h5, 74 | .Content h6 { 75 | padding: 6px 0; 76 | line-height: 150%; 77 | color: #28282a; 78 | } 79 | 80 | .Content h1, 81 | .Content h2, 82 | .Content h3, 83 | .Content h4, 84 | .Content h5, 85 | .Content h6 { 86 | text-transform: uppercase; 87 | } 88 | 89 | .Content p { 90 | font-size: 16px; 91 | line-height: 24px; 92 | } 93 | 94 | .Content h1 { 95 | font-size: 28px; 96 | } 97 | 98 | .Content h2 { 99 | font-size: 26px; 100 | } 101 | 102 | .Content h3 { 103 | font-size: 24px; 104 | } 105 | 106 | .Content h4 { 107 | font-size: 22px; 108 | } 109 | 110 | .Content h5 { 111 | font-size: 20px; 112 | } 113 | 114 | .Content h6 { 115 | font-size: 18px; 116 | } 117 | -------------------------------------------------------------------------------- /src/Code.css: -------------------------------------------------------------------------------- 1 | .Code .cp_embed_wrapper { 2 | width: 100%; 3 | height: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /src/Code.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import "./Code.css" 3 | import { placeholder } from "./code/placeholder" 4 | 5 | function Code({ title = "", html, css, js, className }) { 6 | return ( 7 |
8 |
18 |
{html || placeholder.html}
19 |
{css || placeholder.css}
20 |
{js || placeholder.js}
21 |
22 |
23 | ) 24 | } 25 | 26 | export default Code 27 | -------------------------------------------------------------------------------- /src/Code.test.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { render } from "@testing-library/react" 3 | import Code from "./Code" 4 | 5 | const placeholder = { 6 | html: ``, 7 | css: `body { };`, 8 | js: `//one-line comment for testing purposes`, 9 | } 10 | jest.mock("./code/placeholder", () => ({ placeholder })) 11 | 12 | test("renders Code box", () => { 13 | const { container } = render() 14 | 15 | const code = container.firstChild 16 | expect(code).toBeInTheDocument() 17 | expect(code).toHaveClass("Code", "Box", "Test") 18 | }) 19 | 20 | test("renders CodePen", () => { 21 | const { getByTitle } = render() 22 | 23 | const codepen = getByTitle("codepen") 24 | expect(codepen).toBeInTheDocument() 25 | expect(codepen).toHaveAttribute("data-prefill", `{"title":""}`) 26 | expect(codepen).not.toHaveTextContent() 27 | }) 28 | 29 | test("renders CodePen with title", () => { 30 | const title = "Hello, World!" 31 | 32 | const { getByTitle } = render() 33 | 34 | const codepen = getByTitle("codepen") 35 | expect(codepen).toBeInTheDocument() 36 | expect(codepen).toHaveAttribute("data-prefill", `{"title":"${title}"}`) 37 | expect(codepen).not.toHaveTextContent() 38 | }) 39 | 40 | test("renders CodePen with default placeholder prefill for html, css and js", () => { 41 | const { getByText } = render() 42 | 43 | const html = getByText(placeholder.html) 44 | expect(html).toBeInTheDocument() 45 | expect(html).toHaveAttribute("data-lang", "html") 46 | 47 | const css = getByText(placeholder.css) 48 | expect(css).toBeInTheDocument() 49 | expect(css).toHaveAttribute("data-lang", "css") 50 | 51 | const js = getByText(placeholder.js) 52 | expect(js).toBeInTheDocument() 53 | expect(js).toHaveAttribute("data-lang", "js") 54 | }) 55 | 56 | test("renders CodePen with custom provided prefill for html, css and js", () => { 57 | const custom = { 58 | html: `
welcome
`, 59 | css: `div {color: purple}`, 60 | js: `alert('hello')`, 61 | } 62 | 63 | const { getByText } = render() 64 | 65 | const html = getByText(custom.html) 66 | expect(html).toBeInTheDocument() 67 | expect(html).toHaveAttribute("data-lang", "html") 68 | 69 | const css = getByText(custom.css) 70 | expect(css).toBeInTheDocument() 71 | expect(css).toHaveAttribute("data-lang", "css") 72 | 73 | const js = getByText(custom.js) 74 | expect(js).toBeInTheDocument() 75 | expect(js).toHaveAttribute("data-lang", "js") 76 | }) 77 | -------------------------------------------------------------------------------- /src/book/00-welcome.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CodeBook" 4 | export const body = ( 5 | <> 6 |

Olá!

7 |

8 | Boas-vindas ao CodeBook! 9 |

10 |

11 | Aqui você pode aprender os fundamentos básicos de HTML e CSS, tecnologias utilizadas para construir 12 | praticamente todas as coisas que você encontra na internet (como esse tutorial) e também criar as suas 13 | primeiras páginas web. 14 |

15 | 16 |

Teoria + Prática = Página

17 |

A plataforma é dividida em três janelas:

18 | 19 | 20 | 21 | 22 | 26 | 37 | 40 | 41 | 42 |
23 | 📚 material 24 | < > 25 | 35 | ⌨️ código 36 | 38 | 📰 resultado 39 |
43 | 44 |

45 | Navegando pelas páginas do material, você vai conhecendo os conceitos essenciais da web enquanto pode ir 46 | colocando o que aprendeu em prática na janela de código e acompanha o progresso da construção de sua página 47 | na janela de resultado. 48 |

49 | 50 |

51 | Se quiser salvar seu trabalho, clique no botão EDIT (canto superior direito) para acessar o CodePen. Crie 52 | sua conta e mantenha um portfólio de páginas web! 53 |

54 | 55 |

Colabore

56 |

Caso tenha interesse, você pode fazer parte desse projeto em diferentes frentes:

57 | 58 |
    59 |
  • revisando o material de ensino;
  • 60 |
  • adicionando novas páginas ao guia;
  • 61 |
  • melhorando a usabilidade da plataforma;
  • 62 |
  • recomendando o CodeBook pra alguém;
  • 63 |
  • 64 | contribuindo com{" "} 65 | 66 | ideias ou feedbacks 67 | 68 | ! 69 |
  • 70 |
71 | 72 |

73 | Acesse o{" "} 74 | 75 | GitHub 76 | {" "} 77 | do projeto e saiba como colaborar. 78 |

79 | 80 | ) 81 | -------------------------------------------------------------------------------- /src/book/01-html.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "HTML" 4 | export const body = ( 5 | <> 6 |

Estrutura

7 | 8 |

9 | HTML (Hypertext Markup Language) é a linguagem usada para definir a estrutura do conteúdo de uma página, 10 | declarando elementos como parágrafos, imagens, listas, links, tabelas, botões e outros. 11 |

12 | 13 |

Elementos

14 | 15 |

16 | Para definir os elementos que compõe uma página web, utilizamos tags: estruturas compostas por "palavras 17 | reservadas" que representam diferentes elementos. 18 |

19 |

20 | Tags são escritas seguindo a estrutura: abertura (<>), conteúdo e fechamento (</>) 21 |

22 | <elemento> conteúdo </elemento> 23 |

24 | O conteúdo de um página web é o conteúdo do elemento <body> 25 |

26 | 27 | 28 |
{`
29 |     conteúdo
30 | `}
31 |
32 | 33 |

Parágrafo

34 |

35 | Os blocos de texto que você lê nesse guia estão dentro de elementos <p> 36 |

37 | 38 |
{`

Os blocos de texto que você lê nesse guia...

`}
39 |
40 | 41 |

Separador

42 |

43 | O elemento <hr/> renderiza um separador na página. Note que, diferente do parágrafo, esse elemento 44 | "fecha em si mesmo", pois não aceita nenhum conteúdo. 45 |

46 | 47 |
48 | 49 |

Comentário

50 |

51 | Quando queremos ocultar algum trecho de código, por ser algo relevante apenas pra quem desenvolve, usamos 52 | comentários para não renderizar os elementos demarcados. A notação para comentários em HTML é <!--{" "} 53 | conteúdo comentado --> 54 |

55 | 56 | 57 |
{``}
58 |
59 | 60 | ) 61 | -------------------------------------------------------------------------------- /src/book/02-texts.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "HTML" 4 | export const body = ( 5 | <> 6 |

Textos

7 | 8 |

Além de paragráfos, podemos usar outros elementos para demarcar textos especiais.

9 | 10 |

Cabeçalho

11 |

12 | As tags <h1>, <h2>, <h3>, <h4>, <h5> e 13 | <h6> são usadas para representar títulos e subtítulos, sendo que o nível 1 é o mais alto e o 6 o mais 14 | baixo. 15 |

16 | 17 | <h1>H1</h1> <h2>H2</h2> ... <h6>H6</h6> 18 | 19 |

h1

20 |

h2

21 |

h3

22 |

h4

23 |
h5
24 |
h6
25 | 26 |

Negrito e Itálico

27 |

28 | Podemos destacar ou dar ênfase a blocos de texto usando negrito (<b> ou <strong>) 29 | ou itálico (<i> ou <em>). Combine tags e crie destaques. 30 |

31 | 32 | 33 |
{`

Combine tags e crie destaques.

`}
34 |
35 | 36 |

Linha

37 |

38 | O elemento <br/> é usado para pular linhas. Assim como o separador, esse elemento é "autosuficiente" 39 | já que não faz sentido uma quebra de linha possuir conteúdo. 40 |

41 | 42 | 43 |
{`

— onde você mora?
— na outra rua

`}
44 |
45 |

46 | — onde você mora? 47 |
— na outra rua 48 |

49 | 50 | ) 51 | -------------------------------------------------------------------------------- /src/book/03-links.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "HTML" 4 | export const body = ( 5 | <> 6 |

Recursos

7 | 8 |

É possível referenciar recursos disponíveis na internet, como links e imagens.

9 | 10 |

Links

11 |

12 | Para incluir um link para outra página da internet, usamos a tag <a href=""> ... </a>, 13 | onde href é um atributo que espera como valor o endereço de destino. 14 |

15 |

16 | Atributos são "palavras reservadas" escritas dentro das tags de abertura de elementos e que seguem o padrão{" "} 17 | atributo="valor" 18 |

19 |

20 | Caso queira abrir a página numa outra janela, adicione o atributo target="_blank" 21 |

22 | 23 |
{`

24 | clique 25 | aqui 26 | para fazer sua busca :) 27 |

`}
28 |
29 | 30 |

31 | clique{" "} 32 | 33 | aqui 34 | {" "} 35 | para fazer sua busca :) 36 |

37 | 38 |

Imagens

39 |

40 | Para adicionar imagens, usamos a tag <img/> acompanhada do atributo src="" com o endereço da 41 | imagem. O atributo alt="" define um texto alternativo para a imagem, tornando o conteúdo acessível por 42 | leitores de tela. Já o atributo title="" define a mensagem que aparece ao colocar o cursor do mouse sobre a 43 | imagem. 44 |

45 | 46 | 47 | <img alt="ícone do CodeBook" title="CodeBook" 48 | src="https://fernandomachado90.github.io/codebook/favicon-96x96.png" /> 49 | 50 | 51 | ícone do CodeBook 52 | 53 |

54 | Assim como a quebra de linha <br/>, o elemento <img/> não aceita conteúdo. 55 |

56 | 57 | ) 58 | -------------------------------------------------------------------------------- /src/book/04-css.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Estilos

7 | 8 |

9 | CSS (Cascading Style Sheet) é a linguagem responsável por definir o estilo das páginas, descrevendo regras 10 | que definem a forma como elementos serão exibidos. 11 |

12 |

13 | Numa analogia com o corpo humano podemos dizer que, enquanto o HTML é o esqueleto que estrutura as partes do 14 | corpo, o CSS é a pele, os panos e os acessórios. 15 |

16 | 17 |

Propriedade

18 |

19 | A estrutura de declaração de estilos é propriedade: valor. Por exemplo, para definir a cor de um texto como 20 | vermelho, declaramos o estilo: 21 |

22 | 23 | color: red; 24 | 25 |

Essa declaração pode feita de duas formas: por elemento ou criando regras gerais.

26 | 27 |

elemento + style

28 | 29 |

30 | Ao adicionar o atributo style="" em qualquer elemento HTML, podemos definir estilos válidos somente para 31 | seu conteúdo. 32 |

33 | 34 | 35 |
{`
36 |   

esse parágrafo é vermelho

37 |

já esse não é

38 |

esse também não

39 |

esse parágrafo é azul

40 |

mais um parágrafo padrão

41 |

e mais um parágrafo vermelho

42 | `}
43 |
44 | 45 |

esse parágrafo é vermelho

46 |

já esse não é

47 |

esse também não

48 |

esse parágrafo é azul

49 |

mais um parágrafo padrão

50 |

e mais um parágrafo vermelho

51 | 52 | ) 53 | -------------------------------------------------------------------------------- /src/book/05-rules.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Regras

7 | 8 |

9 | Criando um elemento <style> ou com um arquivo dedicado (aba CSS no editor ⌨️), podemos definir 10 | regras de estilos válidas para todos os elementos de nossa página. 11 |

12 | 13 |

Seletores

14 | 15 |

16 | Para definir regras gerais, precisamos utilizar seletores: marcações que referenciam os atributos id="" e{" "} 17 | class="" ou a própria tag do elemento. 18 |

19 | 20 |

21 | A estrutura de cada regra é seletor { estilos... } 22 |

23 | 24 |

25 | Para selecionar elementos, basta escrever o nome da própria tag. Para selecionar um id, usamos # e 26 | para selecionar classe, usamos . 27 |

28 | 29 |

30 | Nomes de ids e classes devem ser escolhidos de acordo com a utilidade da regra. Enquanto id só pode aparecer uma 31 | vez por página, classes aparecem múltiplas vezes. 32 |

33 | 34 | 35 |
{`
46 | 
47 |   

pendente

48 |

premium

49 |

autorizado

50 |

pendente

51 |

autorizado

52 | `}
53 |
54 |

55 |

pendente

56 |

premium

57 |

autorizado

58 |

pendente

59 |

autorizado

60 |

61 |

Comentário

62 |

63 | Em CSS, é possível comentar trechos de código e ignorar definições de propriedades embrulhando o conteúdo 64 | desconsiderado na notação {"/*"} conteúdo comentado {"*/"}. 65 |

66 | 67 | 68 |
{`
80 | 
81 | 
82 |   

qual será meu tom de rosa?

83 | `}
84 |
85 | 86 |

qual será meu tom de rosa?

87 | 88 | ) 89 | -------------------------------------------------------------------------------- /src/book/06-colors.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Cores

7 | 8 |

9 | Alterando o valor da propriedade color, podemos customizar a cor de nossos textos. 10 |

11 | 12 |

13 | color: _____; (palavra reservada para cor | código hexadecimal | código RGB) 14 |

15 | 16 |

17 | black silver{" "} 18 | gray white{" "} 19 | maroon red{" "} 20 | purple fuchsia{" "} 21 | green lime{" "} 22 | olive yellow{" "} 23 | navy blue{" "} 24 | teal aqua{" "} 25 | orange aliceblue{" "} 26 | antiquewhite{" "} 27 | aquamarine azure{" "} 28 | beige bisque{" "} 29 | blanchedalmond{" "} 30 | blueviolet brown{" "} 31 | burlywood cadetblue{" "} 32 | chartreuse chocolate{" "} 33 | coral cornflowerblue{" "} 34 | cornsilk crimson{" "} 35 | cyan darkblue{" "} 36 | darkcyan darkgoldenrod{" "} 37 | darkgray darkgreen{" "} 38 | darkgrey darkkhaki{" "} 39 | darkmagenta{" "} 40 | darkolivegreen{" "} 41 | darkorange darkorchid{" "} 42 | darkred darksalmon{" "} 43 | darkseagreen{" "} 44 | darkslateblue{" "} 45 | darkslategray{" "} 46 | darkslategrey{" "} 47 | darkturquoise{" "} 48 | darkviolet deeppink{" "} 49 | deepskyblue dimgray{" "} 50 | dimgrey dodgerblue{" "} 51 | firebrick floralwhite{" "} 52 | forestgreen gainsboro{" "} 53 | ghostwhite gold{" "} 54 | goldenrod greenyellow{" "} 55 | grey honeydew{" "} 56 | hotpink indianred{" "} 57 | indigo ivory{" "} 58 | khaki lavender{" "} 59 | lavenderblush{" "} 60 | lawngreen lemonchiffon{" "} 61 | lightblue lightcoral{" "} 62 | lightcyan{" "} 63 | lightgoldenrodyellow{" "} 64 | lightgray lightgreen{" "} 65 | lightgrey lightpink{" "} 66 | lightsalmon{" "} 67 | lightseagreen{" "} 68 | lightskyblue{" "} 69 | lightslategray{" "} 70 | lightslategrey{" "} 71 | lightsteelblue{" "} 72 | lightyellow limegreen{" "} 73 | linen magenta{" "} 74 | mediumaquamarine{" "} 75 | mediumblue{" "} 76 | mediumorchid{" "} 77 | mediumpurple{" "} 78 | mediumseagreen{" "} 79 | mediumslateblue{" "} 80 | mediumspringgreen{" "} 81 | mediumturquoise{" "} 82 | mediumvioletred{" "} 83 | midnightblue mintcream{" "} 84 | mistyrose moccasin{" "} 85 | navajowhite oldlace{" "} 86 | olivedrab orangered{" "} 87 | orchid palegoldenrod{" "} 88 | palegreen{" "} 89 | paleturquoise{" "} 90 | palevioletred{" "} 91 | papayawhip peachpuff{" "} 92 | peru pink{" "} 93 | plum powderblue{" "} 94 | rosybrown royalblue{" "} 95 | saddlebrown salmon{" "} 96 | sandybrown seagreen{" "} 97 | seashell sienna{" "} 98 | skyblue slateblue{" "} 99 | slategray snow{" "} 100 | springgreen steelblue{" "} 101 | tan thistle{" "} 102 | tomato turquoise{" "} 103 | violet wheat{" "} 104 | whitesmoke yellowgreen{" "} 105 | rebeccapurple{" "} 106 |

107 | 108 |

109 | Além das palavras reservadas, você pode usar cores customizadas usando códigos hexadecimais ou RGB. 110 | Use este seletor para encontrar o código da cor: 111 |

112 | 113 | 114 |
{`.crash-orange {
115 |   color: #ff6522;
116 | }
117 | .spyro-purple {
118 |   color: rgb(156,53,186);
119 | }
120 | 

crash orange

121 |

spyro purple

`}
122 |
123 |

crash orange

124 |

spyro purple

125 | 126 | ) 127 | -------------------------------------------------------------------------------- /src/book/07-fonts.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Fontes

7 | 8 |

Além de alterar a cor, podemos customizar nossos textos com diversas propriedades.

9 | 10 |

Tipo

11 |

12 | font-family: _____; (nomes das fontes, em ordem de preferência; entre aspas se há espaço) 13 |

14 | 15 |

16 | Arial |{" "} 17 | "Comic Sans MS" |{" "} 18 | Courier | Tahoma |{" "} 19 | "Times New Roman" 20 |

21 | 22 |

Tamanho

23 |

24 | font-size: _____px; (tamanho da fonte, em pixels) 25 |

26 | 27 |

28 | 8px | 16px |{" "} 29 | 24px | 32px 30 |

31 | 32 |

Negrito

33 |

34 | font-weight:_____; (espessura da fonte, um valor entre 0 e 900) 35 |

36 | 37 |

38 | 100 | 300 |{" "} 39 | 500 | 700 |{" "} 40 | 900 41 |

42 | 43 |

Itálico

44 |

45 | font-style: _____; (tipo de itálico, usar palavra reservada) 46 |

47 | 48 |

49 | normal | italic |{" "} 50 | oblique 51 |

52 | 53 |

Sublinhado

54 |

55 | text-decoration: _____; (tipo de sublinhado, usar palavra reservada) 56 |

57 | 58 |

59 | underline |{" "} 60 | overline |{" "} 61 | line-through 62 |

63 | 64 | 65 |
{`.meu-titulo {
66 |   font-family: "Arial Narrow";
67 |   font-size: 20px;
68 |   font-weight: 700;
69 |   font-style: italic;
70 |   text-decoration: line-through;
71 | }
72 | 

título perigosamente customizado

`}
73 |
74 | 75 |

85 | título perigosamente customizado 86 |

87 | 88 | ) 89 | -------------------------------------------------------------------------------- /src/book/08-align.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Alinhamentos

7 | 8 |

9 | Podemos definir um alinhamento horizontal para o texto contido em um elemento, como por exemplo, um parágrafo 10 | usando essa propriedade: 11 |

12 |

13 | text-align: _____; (usar palavra reservada: left | center | right | justify) 14 |

15 | 16 | 17 |
{`.menu {
18 |   text-align: left;
19 | }
20 | .destaque {
21 |   text-align: center;
22 |   font-weight: 900;
23 | }
24 | .rodape {
25 |   text-align: right;
26 |   font-size: 12px;
27 | }
28 | .texto {
29 |   text-align: justify;
30 |   font-style: italic;
31 | }
32 | 
33 | 

MANCHETE

34 | 35 |

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

36 |

© 2021

`}
37 |
38 | 39 |

MANCHETE

40 |

41 | item a
42 | item b
43 | item c 44 |

45 |

46 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore 47 | magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 48 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 49 |

50 |

© 2021

51 | 52 | ) 53 | -------------------------------------------------------------------------------- /src/book/09-listas.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "HTML" 4 | export const body = ( 5 | <> 6 |

Listas

7 | 8 |

9 | O HTML oferece dois tipos de lista: listas ordenadas (<ol>) ou desordenadas (<ul>), que 10 | devem ser usadas de acordo com o propósito da lista. Para cada item a ser incluído, é preciso incluir elementos{" "} 11 | list-item (<li>) como conteúdo de <ol> ou <ul>. 12 |

13 | 14 | 15 |
{`

Guacamole

16 |
    17 |
  • 1 abacate brasileiro médio (ou 4 avocados)
  • 18 |
  • 1 tomate grande sem sementes
  • 19 |
  • 1 cebola pequena
  • 20 |
  • 2 dentes de alho bem socados
  • 21 |
  • 1 maço de coentro
  • 22 |
  • suco de 1 limão grande
  • 23 |
  • sal, pimenta e azeite
  • 24 |
25 |
    26 |
  1. Amasse o abacate com um garfo, acrescente o alho socado, o suco de limão, sal e azeite a gosto e misture como um purê.
  2. 27 |
  3. Pique a cebola, o tomate e o coentro. Pique bem a pimenta.
  4. 28 |
  5. Acrescente os ingredientes picados ao "purê" de abacate.
  6. 29 |
  7. Sirva com chips, crackers, tacos, no burrito ou mesmo junto com arroz e feijão.
  8. 30 |
`}
31 |
32 | 33 |

Guacamole

34 |
    35 |
  • 1 abacate brasileiro médio (ou 4 avocados)
  • 36 |
  • 1 tomate grande sem sementes
  • 37 |
  • 1 cebola pequena
  • 38 |
  • 2 dentes de alho bem socados
  • 39 |
  • 1 maço de coentro
  • 40 |
  • suco de 1 limão grande
  • 41 |
  • sal, pimenta e azeite
  • 42 |
43 | 44 |
    45 |
  1. 46 | Amasse o abacate com um garfo, acrescente o alho socado, o suco de limão, sal e azeite a gosto e misture como um 47 | purê. 48 |
  2. 49 |
  3. Pique a cebola, o tomate e o coentro. Pique bem a pimenta.
  4. 50 |
  5. Acrescente os ingredientes picados ao "purê" de abacate.
  6. 51 |
  7. Sirva com chips, crackers, tacos, no burrito ou mesmo junto com arroz e feijão.
  8. 52 |
53 | 54 | ) 55 | -------------------------------------------------------------------------------- /src/book/10-table.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "HTML" 4 | export const body = ( 5 | <> 6 |

Tabelas

7 | 8 |

9 | Para certos conteúdos, como calendários semanais ou bancos de dados, pode ser interessante apresentar os dados em 10 | formato de tabela. 11 |

12 | 13 |

14 | O elemento <table> define a tabela. Dentro da tabela, para cada linha é criado um elemento{" "} 15 | table-row (<tr>), seguido de elementos table-data (<td>) para cada item da 16 | linha. Opcionalmente, usar elementos table-header (<th>) para definir itens títulos. 17 |

18 | 19 | 20 |
{`/* necessário para as bordas (mais sobre border à seguir) */
21 | table, th, td {
22 |   border: 1px solid black;
23 |   border-collapse: collapse;
24 | }
25 | 
26 | 
27 |   
28 |     
29 |     
30 |     
31 |   
32 |   
33 |     
34 |     
35 |     
36 |   
37 |   
38 |     
39 |     
40 |     
41 |   
42 |   
43 |     
44 |     
45 |     
46 |   
47 | 
HorárioAtividadeResponsável
14:30 - 15:00Aula sobre tabelas(à confirmar)
15:30 - 15:45Intervalo
15:45 - 16:45ExercíciosPaulo Freire
`}
48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
HorárioAtividadeResponsável
14:30 - 15:00Aula sobre tabelas 60 | (à confirmar) 61 |
15:30 - 15:45Intervalo
15:45 - 16:45ExercíciosPaulo Freire
75 | 76 | ) 77 | -------------------------------------------------------------------------------- /src/book/11-containers.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "HTML" 4 | export const body = ( 5 | <> 6 |

Containers

7 |

8 | Para organizar o código ou aplicar estilos uniformes em seções da página, podemos usar elementos "containers" de 9 | dois tipos: blocos (<div>) ou trechos (<span>) 10 |

11 | 12 |

13 | Enquanto os blocos ocupam a linha inteira, os trechos tem a dimensão definida pelo seu conteúdo, como o número de 14 | caracteres de um texto. 15 |

16 |

17 | Para visualizar os containers, podemos usar a propriedade background em seu estilo. 18 |

19 |

20 | background: _____; (palavra reservada para cor | código hexadecimal | código RGB) 21 |

22 | 23 | 24 |
{`.title {
25 |   color: white;
26 |   background: black;
27 | }
28 | .red {
29 |   color: red;
30 |   background: white;
31 | }
32 | 
33 | 
34 | a última palavra será vermelha 35 |
`}
36 |
37 | 38 |
39 | a última palavra será vermelha 40 |
41 | 42 |
43 |

Semântica

44 | 45 |

46 | Usando blocos (<div>), trechos (<span>) e estilos CSS, podemos construir praticamente 47 | qualquer coisa na web. No entanto, é considerado boa prática usar elementos que garantam a semântica da página, 48 | isto é, não apenas definam sua aparência, mas também indiquem seu propósito ou sentido. Por exemplo: 49 |

50 | 51 |
    52 |
  • 53 | Usar <strong> e <em> (ao invés de <b> e <i>) para indicar 54 | ênfase 55 |
  • 56 |
  • 57 | Usar títulos e subtítulos <h1>, <h2>,<h3>,<h4>,{" "} 58 | <h5>, <h6> 59 |
  • 60 |
  • 61 | Usar <header> para definir o cabeçalho da página 62 |
  • 63 |
  • 64 | Usar <nav> para agrupar elementos de navegação, como menus 65 |
  • 66 |
  • 67 | Usar <article> para artigos e textos principais 68 |
  • 69 |
  • 70 | Usar <section> para dividir conteúdo em seções 71 |
  • 72 |
  • 73 | Usar <figure> para agrupar imagens e legendas 74 |
  • 75 |
  • 76 | Usar <footer> para definir o rodapé da página 77 |
  • 78 |
79 | 80 | ) 81 | -------------------------------------------------------------------------------- /src/book/12-dimensions.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Dimensões

7 | 8 |

9 | Elementos em bloco, como <div>, <img> e <table>, podem ter suas dimensões 10 | customizadas através das propriedades height (altura) e width (largura).{" "} 11 |

12 | 13 |

14 | height: _____px; (tamanho em pixels | porcentagem da página) 15 |
16 | width: _____%; (tamanho em pixels | porcentagem da página) 17 |

18 | 19 | 20 |
21 |         {`.quadrado {
22 |   background: fuchsia;
23 |   height: 90px;
24 |   width: 90px;
25 | }
26 | .horizontal {
27 |   background: yellow;
28 |   height: 90px;
29 |   width: 100%;
30 | }
31 | .vertical {
32 |   background: aqua;
33 |   height: 180px;
34 |   width: 90px;
35 | }
36 | 
37 | 
//
38 |
39 |
`} 40 |
41 |
42 |
{"//"}
43 |
44 |
45 | 46 | ) 47 | -------------------------------------------------------------------------------- /src/book/13-borders.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Bordas

7 |

8 | Com a propriedade border (e suas variantes), podemos adicionar bordas internas aos elementos, isso 9 | é, bordas que se somam as larguras e alturas definidas nos elementos. 10 |

11 | 12 |

13 | border-width: _____px (espessura em pixels) 14 |
15 | border-style: _____ (dotted | dashed | solid | double | groove | ridge | inset | outset | none) 16 |
17 | border-color: _____ (palavra reservada para cor | código hexadecimal | código RGB) 18 |
19 | border-radius: _____px (curvatura em pixels | curvatura em porcentagem) 20 |
21 |

22 | 23 |

Com a notação reduzida, podemos customizar a borda em uma única linha.

24 | 25 |

26 | border: _____px   _____   _____ (espessura em pixels + estilo + cor) 27 |

28 | 29 |

30 | Adicionando o sufixo{" "} 31 | 32 | -lado 33 | {" "} 34 | ao fim da propriedade, customizamos apenas esse lado. 35 |

36 | 37 |

38 | border-width-top: _____px{" "} 39 | 40 | (espessura em pixels da borda superior) 41 | 42 |
43 | border-style-right: _____{" "} 44 | 45 | (palavra reservada que define o estilo da borda direita) 46 | 47 |
48 | border-color-bottom: _____{" "} 49 | 50 | (cor da borda inferior) 51 | 52 |
53 | border-left: _____px   _____   _____{" "} 54 | 55 | (notação reduzida que define a borda esquerda) 56 | 57 |
58 |

59 | 60 | 61 |
 62 |         {`.circulo {
 63 |   border-width: 6px;
 64 |   border-style: double; 
 65 |   border-color: purple;
 66 |   border-radius: 50%;
 67 |   height: 60px;
 68 |   width: 60px;
 69 | }
 70 | .banner {
 71 |   border: 2px dashed orange;
 72 |   height: 50px;
 73 |   width: 100%;
 74 | }
 75 | 
 76 | 
77 | `} 78 |
79 |
80 | 81 |
91 |
98 |

mensagem impactante

99 |
100 | 101 | ) 102 | -------------------------------------------------------------------------------- /src/book/14-outlines.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Contornos

7 |

8 | Com a propriedade outline (e variantes), adicionamos contornos aos elementos. Diferente de bordas, 9 | contornos são decorações externas que não ocupam espaço. 10 |

11 | 12 |

13 | outline-width: _____px (espessura em pixels) 14 |
15 | outline-style: _____ (dotted | dashed | solid | double | groove | ridge | inset | outset | none) 16 |
17 | outline-color: _____ (palavra reservada para cor | código hexadecimal | código RGB) 18 |

19 | 20 |

Com a notação reduzida, podemos customizar o contorno em uma única linha.

21 | 22 |

23 | outline: _____px   _____   _____ (espessura em pixels + estilo + cor) 24 |

25 | 26 | 27 |
28 |         {`.banner {
29 |   background: seashell;
30 |   border: 10px inset deeppink;
31 |   outline: 10px outset deepskyblue;
32 | }
33 | 
34 | 

35 | 36 |

37 | `} 38 |
39 |
40 |
41 |
48 |
49 |
50 |
57 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore 58 | magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 59 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 60 | Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 61 |
62 |
63 |
64 |
71 |

Lorem ipsum

72 |
73 | 74 | ) 75 | -------------------------------------------------------------------------------- /src/book/15-spacing.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Espaçamento

7 | 8 |

9 | Ao lado de largura, altura e bordas, as dimensões resultantes de elementos são definidas pelas propriedades{" "} 10 | margin (margem, a distância externa a borda) e padding (um preenchimento transparente interno a 11 | borda). 12 |

13 | 14 |

15 | margin: _____px (distância externa em pixels) 16 |
17 | padding: _____px (preenchimento interno em pixels) 18 |

19 | 20 |

21 | Assim como bordas e contornos, o sufixo{" "} 22 | 23 | -lado 24 | {" "} 25 | pode ser adicionado para definir margens e preenchimentos específicos para cada lado. 26 |

27 | 28 |

29 | margin-top: _____px{" "} 30 | 31 | (margem superior) 32 | 33 |
34 | margin-bottom: _____px{" "} 35 | 36 | (margem inferior) 37 | 38 |
39 | padding-left: _____px{" "} 40 | 41 | (preenchimento à esquerda) 42 | 43 |
44 | padding-right: _____px{" "} 45 | 46 | (preenchimento à direita) 47 | 48 |
49 |

50 | 51 |

Além disso, com a notação reduzida, podemos definir múltiplos lados de uma vez.

52 | 53 |

54 | margin: _____px   _____px   _____px   _____px (margem cima, direita, baixo, esquerda) 55 |
56 | padding: _____px   _____px   _____px (preenchimento cima, direita/esquerda, baixo) 57 |
58 | margin: _____px   _____px (margem cima/baixo, direita/esquerda) 59 |
60 |

61 | 62 |

63 | Para entender como margem, borda e preenchimento são usados para calcular as dimensões de elementos, as 64 | ilustrações de box model abaixo podem ajudar. 65 |

66 | 67 | {renderBoxModel("30px", "20px", "70px")} 68 |
69 | {renderBoxModel("90px", "30px", "0px")} 70 |
71 | {renderBoxModel("0px", "40px", "40px")} 72 |
73 | {renderBoxModel("0px", "50px", "0px")} 74 |
75 | {renderBoxModel("40px", "0px", "60px")} 76 | 77 | ) 78 | 79 | function renderBoxModel(margin, border, padding) { 80 | const spacingColor = "#FFF430" 81 | const borderColor = "#9C59D1" 82 | return ( 83 | <> 84 | 85 |
 86 |           {`.box {
 87 |   margin: ${margin};
 88 |   padding: ${padding};
 89 |   border: ${border} solid ${borderColor};
 90 | }
 91 | 
conteúdo
`} 92 |
93 |
94 |
95 | margin ({margin}) 96 |
97 | border ({border}) 98 |
99 | padding ({padding}) 100 |
101 | conteúdo 102 |
103 |
104 |
105 |
106 | 107 | ) 108 | } 109 | -------------------------------------------------------------------------------- /src/book/16-display.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "CSS" 4 | export const body = ( 5 | <> 6 |

Display

7 | 8 |

9 | Do lado CSS das coisas, blocos (<div>) e trechos (<span>) podem ser compreendidos (e 10 | também ter suas apresentações padrão alteradas) através da propriedade display. 11 |

12 | 13 |

14 | display: _____; (block | inline | inline-block | none) 15 |

16 | 17 |
    18 |
  • 19 | block é um bloco que ocupa uma linha toda, mas pode ter width e height alteradas 20 |
  • 21 |
  • 22 | inline é um trecho de linha, que não pode ter width e height alteradas 23 |
  • 24 |
  • 25 | inline-block é um trecho de linha, mas que pode ter width e height alteradas 26 |
  • 27 |
  • 28 | none oculta o elemento da página 29 |
  • 30 |
31 | 32 |
33 |
34 | div block "padrão" (20 x 100%, ocupa uma linha inteira){" "} 35 |
36 |
37 | div inline-block (80 x 130, compartilha linha){" "} 38 |
39 |
40 | div inline (dimensões do conteúdo, compartilha linha){" "} 41 |
42 | span inline "padrão" (dimensões do conteúdo, compartilha linha) 43 | 44 | span inline-block (conteúdo x 130, compartilha linha) 45 | 46 | 47 | span block (100 x 100, mesmo assim ocupa uma linha inteira) 48 | 49 |
50 | 51 | 52 |
53 |         {`.red {
54 |   background: #e40303;
55 |   height: 20px;
56 | }
57 | .orange {
58 |   background: #ff8c00;
59 |   display: inline-block;
60 |   height: 80px;
61 |   width: 130px;
62 | }
63 | .yellow {
64 |   background: #ffed00;
65 |   display: inline;
66 |   /* width e height são inefetivos em div inline */
67 | }
68 | .green {
69 |   background: #008026;
70 |   /* width e height são inefetivos em span inline (padrão) */
71 | }
72 | .blue {
73 |   background: #004dff;
74 |   display: inline-block;
75 |   width: 130px;
76 | }
77 | .purple {
78 |   background: #750787;
79 |   display: block;
80 |   height: 100px;
81 |   width: 100px;
82 | }
83 | 
84 |
div block "padrão"
85 |
div inline-block
86 |
div inline
87 | span inline "padrão" 88 | span inline-block 89 | span block 90 |
`} 91 |
92 |
93 | 94 | ) 95 | -------------------------------------------------------------------------------- /src/book/17-position.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | const boxStyle = { 4 | display: "inline-block", 5 | outline: "5px dashed black", 6 | fontSize: "50px", 7 | margin: "10px", 8 | lineHeight: "70px", 9 | height: "70px", 10 | width: "70px", 11 | } 12 | 13 | export const title = "CSS" 14 | export const body = ( 15 | <> 16 |

Posicionamento

17 | 18 |

19 | A propridade position permite especificar o método de posicionamento que desejamos usar: static{" "} 20 | (comportamento padrão), relative, absolute ou fixed. 21 |

22 | 23 |

24 | Ao usar métodos diferentes do padrão, é preciso utilizar as propriedades que definem coordenadas: top{" "} 25 | (cima), right (direita), bottom (baixo) e left (esquerda). 26 |

27 | 28 |

Static

29 |

30 | Até agora, vimos que elementos são posicionados em blocos (de cima-para-baixo) e em trechos (ocupando as linhas da 31 | esquerda-para-direita). Esse método de posicionamento é o static (padrão) e, aqui, as coordenadas não são 32 | consideradas. 33 |

34 | 35 | 36 |
{`.box {
 37 |   display: inline-block;
 38 |   margin: 10px;
 39 |   width: 70px;
 40 |   height: 70px;
 41 |   outline: 5px dashed black;
 42 | }
 43 | .cat {
 44 |   position: static; /* redundante, pois o padrão é static */
 45 | }
 46 | 
 47 | 
🐈
48 |
🐈
49 |
🐈
50 | `}
51 |
52 | 53 |

54 |

🐈
55 |
🐈
56 |
🐈
57 |

58 | 59 |
60 |

Relative

61 |

62 | Com o posicionamento relative, podemos ajustar a posição do elemento em relação a sua posição original, de 63 | acordo com os pixels definidos em top, right, bottom e left. As posições dos elementos 64 | vizinhos não são afetadas pela mudança. 65 |

66 | 67 | 68 |
{`.rat {
 69 |   position: relative;
 70 |   top: 10px;
 71 |   left: 10px;
 72 | }
 73 | .mouse {
 74 |   position: relative;
 75 |   bottom: 20px;
 76 |   right: 5px;
 77 | }
 78 | 
 79 | 
🐈
80 |
🐀
81 |
🐈
82 |
🐁
83 |
🐈
`}
84 |
85 | 86 |

87 |

🐈
88 |
96 | 🐀 97 |
98 |
🐈
99 |
107 | 🐁 108 |
109 |
🐈
110 |

111 | 112 |
113 |

Absolute

114 |

115 | No posicionamento absolute, podemos ajustar a posição do elemento com relação ao seu "elemento pai 116 | posicionado" (um elemento com posicionamento não-static). Caso esse elemento "referencial" não exista, as 117 | dimensões da própria tela são consideradas. Os elementos vizinhos tem suas posições reajustadas pela mudança. 118 |

119 | 120 | 121 |
{`.container {
122 |   position: relative;
123 |   background: darkviolet;
124 |   padding: 10px;
125 | }
126 | .rabbit {
127 |   position: absolute;
128 |   top: -80px;
129 |   right: 0px;
130 | }
131 | .poodle {
132 |   position: absolute;
133 |   bottom: 10px;
134 |   right: 10px;
135 | }
136 | 
137 | 
138 |
🐈
139 |
🐇
140 |
🐩
141 |
🐈
142 |
`}
143 |
144 | 145 |

152 |

🐈
153 |
161 | 🐇 162 |
163 |
171 | 🐩 172 |
173 |
🐈
174 |

175 | 176 |
177 |

Fixed

178 |

179 | O posicionamento fixed permite ajustar a posição de um elemento com relação as dimensões da própria tela. É 180 | o mesmo comportamento de absolute quando não há "referencial" e os elementos vizinhos também tem suas 181 | posições reajustadas. 182 |

183 | 184 | 185 |
{`.monkey {
186 |   position: fixed;
187 |   bottom: 0;
188 |   left: 20%;
189 |   outline: none; /* o macaco escapou! */
190 | }
191 | 
192 | 
🐈
193 |
🐒
194 |
🐈
`}
195 |
196 | 197 |

198 |

🐈
199 |
208 | 🐒 209 |
210 |
🐈
211 |

212 | 213 | ) 214 | -------------------------------------------------------------------------------- /src/book/18-forms.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "HTML" 4 | export const body = ( 5 | <> 6 |

Formulários

7 | 8 |

9 | Dentro de uma seção demarcada por <form>, podemos incluir elementos como campos de texto, caixas de 10 | seleção e botões que permitem interação com a página. 11 |

12 | 13 |

14 | <input type=" " />{" "} 15 | 16 | (campo de entrada, atributos variam de acordo com o type="") 17 | 18 |
19 | <label for=" " />{" "} 20 | 21 | (rótulo que se conecta ao campo input com id indicado em for="") 22 | 23 |

24 | 25 |

Textos

26 | 27 |

28 | Os tipos mais simples de <input> são text (texto puro), email (validação de emails),{" "} 29 | password (oculta senhas por segurança) e search (indicado para filtros).{" "} 30 |

31 | 32 |

33 | Para uso com rótulos, é preciso incluir um id="" correspondente ao <label for="">. Já o 34 | atributo name="" define o nome do campo a ser enviado pelo formulário. 35 |

36 | 37 |

38 | O atributo required pode ser usado para tornar um campo obrigatório. 39 |

40 | 41 | 42 |
{`
43 |

44 | 45 | 46 |

47 |

48 | 49 | 50 |

51 |

52 | 53 | 54 |

55 |

56 | 57 | 58 |

59 |
`}
60 |
61 |
62 |

63 | 64 |

65 |

66 | 67 |

68 |

69 | 70 |

71 |

72 | 73 |

74 |
75 | 76 |

Números

77 | 78 |

79 | Os tipos number (campo aberto) e range (barra de seleção) aceitam números. O atributo min=""{" "} 80 | define o valor mínimo válido, o max="" o valor máximo válido e o step="" define o passo no qual o 81 | seletor incrementa (e decrementa) valores. 82 |

83 | 84 | 85 |
{`
 86 | 
 87 | 
 88 | 
 89 | `}
90 |
91 |
92 |

93 | {" "} 94 | 95 |

96 |

97 | {" "} 98 | 99 |

100 |
101 | 102 |

Seletores

103 | 104 |

105 | Os seletores radio (única escolha) e checkbox (múltipla escolha) permitem fazer uma seleção entre os 106 | diferentes value="" disponíveis. 107 |

108 |

109 | Enquanto cada opção precisa ter um id="" único correspondente ao <label for="">, o atributo{" "} 110 | name="" deve ser comum para identificar o mesmo "grupo de escolhas". 111 |

112 | 113 | 114 |
{`Gênero: 
115 | 116 |
117 | 118 | 119 |
120 | 121 | 122 |
123 | 124 | Transporte:
125 | 126 |
127 | 128 | 129 |
130 | 131 | 132 |
133 | 134 | 135 |
`}
136 |
137 |
138 |

139 | Gênero: 140 |
141 | 142 |
143 | 144 |
145 | 146 |

147 |

148 | Transporte: 149 |
150 | 151 |
152 | 153 |
154 | 155 |
156 | 157 |

158 |
159 | 160 |

161 | O elemento <select> também permite uma única escolha entre <option value=""> 162 |

163 | 164 | 165 |
{`
166 | `}
174 |
175 | 176 |
177 |

178 | {" "} 179 | 187 |

188 |
189 | 190 |

Especiais

191 | 192 |

193 | Há outros tipos de <input>, recomendados para situações específicas e sem garantia de compatibilidade 194 | com todo navegador. Podemos listar: color (seleção de cores), time (horário), date (data),{" "} 195 | datetime-local (data e hora) e file (upload de arquivos). 196 |

197 | 198 | 199 |
{`
200 | 
201 | 
202 | 
203 | 
204 | 
205 | 
206 | 
208 | 
209 | 
210 | 
211 | 
212 | 
213 | `}
214 |
215 |
216 |

217 | 218 |

219 |

220 | 221 |

222 |

223 | {" "} 224 | 225 |

226 |

227 | {" "} 228 | 229 |

230 |

231 | 232 |

233 |
234 | 235 | ) 236 | -------------------------------------------------------------------------------- /src/book/19-buttons.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "HTML" 4 | export const body = ( 5 | <> 6 |

Botões

7 | 8 |

9 | Para interagir com os dados de um <form>, é preciso incluir botões no formulário. 10 |

11 | 12 |

13 | <input type=" "/>{" "} 14 | 15 | (button: não faz nada | reset: limpa dados | submit: envia formulário) 16 | 17 |
18 | <button>...</button>{" "} 19 | (envia formulário e aceita conteúdo customizável, como imagens) 20 |
21 |

22 | 23 |
24 |

25 | (obrigatório) 26 |

27 |

28 | {" "} 29 | (obrigatório) 30 |

31 |

32 | {" "} 33 | (obrigatório) 34 |

35 |

36 | 37 |

38 | 39 |

40 | {" "} 41 | (entre 0 e 100) 42 |

43 |

44 | {" "} 45 | 46 |

47 | 48 |

49 | Gênero: 50 | 51 | 52 | 53 |

54 |

55 | Transporte: 56 | 57 | 58 | 59 | 60 |

61 | 62 |

63 | {" "} 64 | 72 |

73 | 74 |

75 | 76 |

77 |

78 | 79 |

80 |

81 | {" "} 82 | 83 |

84 |

85 | {" "} 86 | 87 |

88 |

89 | 90 |

91 | 92 |

93 | { 97 | alert("Olá!") 98 | }} 99 | />{" "} 100 | {" "} 101 | 105 |

106 |
107 | 108 | 109 |
{`...
110 |   
111 |   
112 |   
113 |   
114 | `}
115 |
116 | 117 |

118 | Por padrão, o botão simples type="button" não possui comportamento. Ao clicar no botão Oi!, o código 119 | Javascript alert("Olá!") é executado para exibir uma mensagem. 120 |

121 |

122 | O botão type="reset" limpa todos os dados do form onde está incluído. 123 |

124 |

125 | Já os botões type="submit" e o <button> tem o mesmo comportamento: enviar os dados dos campos 126 | para processamento no servidor. Experimente preencher o formulário e clicar nesses botões para visualizar seus 127 | dados na barra de endereços. 128 |

129 | 130 | ) 131 | -------------------------------------------------------------------------------- /src/book/99-credits.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | export const title = "Créditos" 4 | export const body = ( 5 | <> 6 |

VALEU!

7 | 8 |

9 | Que bom que chegou até aqui! O que achou do material e da plataforma? Aprendeu algo novo? Tem alguma ideia de como 10 | podemos melhorar? Escreva seu{" "} 11 | 12 | feedback 13 | 14 | ! 15 |

16 | 17 |

Próximos passos

18 | 19 |

20 | Com o que aprendeu até aqui, você já é capaz de criar suas primeiras páginas web. Essa é uma lista de links para 21 | seguir estudando HTML, CSS e outras tecnologias: 22 |

23 | 24 | 44 | 45 |

46 | Para continuar seu trabalho, clique no botão EDIT (canto superior direito) para acessar o CodePen. Crie sua 47 | conta e mantenha seu portfólio de páginas web! 48 |

49 | 50 |

Créditos

51 | 52 |

53 | Este guia de estudos foi originalmente desenvolvido entre 2018—2020, em mutirões de trabalho voluntário realizado 54 | por pessoas consultoras da{" "} 55 | 56 | ThoughtWorks Brasil 57 | {" "} 58 | envolvidas na construção da{" "} 59 | 60 | Aceleradora Inclusiva 61 | 62 | , um projeto de educação popular de tecnologia viabilizado por uma parceria entre ThoughtWorks Brasil e PUC-RS. 63 |

64 | 65 |

66 | Em 2021, o material didático foi disponibilizado no CodeBook, uma plataforma de ensino open-source{" "} 67 | e, desde então, se tornou aberto a contribuições da comunidade. 68 |

69 | 70 |

Essa é uma lista das pessoas que contribuíram até agora:

71 | 72 | 90 | 91 | ) 92 | -------------------------------------------------------------------------------- /src/code/placeholder.js: -------------------------------------------------------------------------------- 1 | export const placeholder = { 2 | html: ` 3 |

Olá!

4 |

5 | Boas-vindas ao CodeBook! 6 |

7 | 8 | `, 9 | css: `body { 10 | font-family: "Lato", "Lucida Sans Unicode", Tahoma, Sans-Serif; 11 | }; 12 | `, 13 | js: undefined, 14 | } 15 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | height: 100vh; 3 | width: 100vw; 4 | font-family: "Lato", "Lucida Grande", "Lucida Sans Unicode", Tahoma, Sans-Serif; 5 | background-color: #28282a; 6 | -webkit-animation: fadein 4s; 7 | -moz-animation: fadein 4s; 8 | -ms-animation: fadein 4s; 9 | -o-animation: fadein 4s; 10 | animation: fadein 4s; 11 | } 12 | 13 | #root { 14 | width: 100vw; 15 | height: 100vh; 16 | display: flex; 17 | flex-wrap: wrap; 18 | overflow-x: hidden; 19 | } 20 | 21 | ::-webkit-scrollbar { 22 | width: 6px; 23 | height: 6px; 24 | } 25 | 26 | ::-webkit-scrollbar-thumb { 27 | background: #424242cc; 28 | } 29 | 30 | @keyframes fadein { 31 | from { 32 | opacity: 0; 33 | } 34 | to { 35 | opacity: 1; 36 | } 37 | } 38 | 39 | @-moz-keyframes fadein { 40 | from { 41 | opacity: 0; 42 | } 43 | to { 44 | opacity: 1; 45 | } 46 | } 47 | 48 | @-webkit-keyframes fadein { 49 | from { 50 | opacity: 0; 51 | } 52 | to { 53 | opacity: 1; 54 | } 55 | } 56 | 57 | @-ms-keyframes fadein { 58 | from { 59 | opacity: 0; 60 | } 61 | to { 62 | opacity: 1; 63 | } 64 | } 65 | 66 | @-o-keyframes fadein { 67 | from { 68 | opacity: 0; 69 | } 70 | to { 71 | opacity: 1; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import ReactDOM from "react-dom" 3 | import "./reset.css" 4 | import "./index.css" 5 | import App from "./App" 6 | import * as serviceWorker from "./serviceWorker" 7 | 8 | ReactDOM.render( 9 | 10 | 11 | , 12 | document.getElementById("root") 13 | ) 14 | 15 | // If you want your app to work offline and load faster, you can change 16 | // unregister() to register() below. Note this comes with some pitfalls. 17 | // Learn more about service workers: https://bit.ly/CRA-PWA 18 | serviceWorker.unregister() 19 | -------------------------------------------------------------------------------- /src/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, 7 | body, 8 | div, 9 | span, 10 | applet, 11 | object, 12 | iframe, 13 | h1, 14 | h2, 15 | h3, 16 | h4, 17 | h5, 18 | h6, 19 | p, 20 | blockquote, 21 | pre, 22 | a, 23 | abbr, 24 | acronym, 25 | address, 26 | big, 27 | cite, 28 | code, 29 | del, 30 | dfn, 31 | em, 32 | img, 33 | ins, 34 | kbd, 35 | q, 36 | s, 37 | samp, 38 | small, 39 | strike, 40 | strong, 41 | sub, 42 | sup, 43 | tt, 44 | var, 45 | b, 46 | u, 47 | i, 48 | center, 49 | dl, 50 | dt, 51 | dd, 52 | ol, 53 | ul, 54 | li, 55 | fieldset, 56 | form, 57 | label, 58 | legend, 59 | table, 60 | caption, 61 | tbody, 62 | tfoot, 63 | thead, 64 | tr, 65 | th, 66 | td, 67 | article, 68 | aside, 69 | canvas, 70 | details, 71 | embed, 72 | figure, 73 | figcaption, 74 | footer, 75 | header, 76 | hgroup, 77 | menu, 78 | nav, 79 | output, 80 | ruby, 81 | section, 82 | summary, 83 | time, 84 | mark, 85 | audio, 86 | video { 87 | margin: 0; 88 | padding: 0; 89 | border: 0; 90 | font-size: 100%; 91 | font: inherit; 92 | vertical-align: baseline; 93 | touch-action: manipulation; 94 | } 95 | /* HTML5 display-role reset for older browsers */ 96 | article, 97 | aside, 98 | details, 99 | figcaption, 100 | figure, 101 | footer, 102 | header, 103 | hgroup, 104 | menu, 105 | nav, 106 | section { 107 | display: block; 108 | } 109 | body { 110 | line-height: 1; 111 | } 112 | ol, 113 | ul { 114 | list-style: none; 115 | } 116 | blockquote, 117 | q { 118 | quotes: none; 119 | } 120 | blockquote:before, 121 | blockquote:after, 122 | q:before, 123 | q:after { 124 | content: ""; 125 | content: none; 126 | } 127 | table { 128 | border-collapse: collapse; 129 | border-spacing: 0; 130 | } 131 | -------------------------------------------------------------------------------- /src/serviceWorker.js: -------------------------------------------------------------------------------- 1 | // This optional code is used to register a service worker. 2 | // register() is not called by default. 3 | 4 | // This lets the app load faster on subsequent visits in production, and gives 5 | // it offline capabilities. However, it also means that developers (and users) 6 | // will only see deployed updates on subsequent visits to a page, after all the 7 | // existing tabs open on the page have been closed, since previously cached 8 | // resources are updated in the background. 9 | 10 | // To learn more about the benefits of this model and instructions on how to 11 | // opt-in, read https://bit.ly/CRA-PWA 12 | 13 | const isLocalhost = Boolean( 14 | window.location.hostname === "localhost" || 15 | // [::1] is the IPv6 localhost address. 16 | window.location.hostname === "[::1]" || 17 | // 127.0.0.0/8 are considered localhost for IPv4. 18 | window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/) 19 | ) 20 | 21 | export function register(config) { 22 | if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) { 23 | // The URL constructor is available in all browsers that support SW. 24 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href) 25 | if (publicUrl.origin !== window.location.origin) { 26 | // Our service worker won't work if PUBLIC_URL is on a different origin 27 | // from what our page is served on. This might happen if a CDN is used to 28 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374 29 | return 30 | } 31 | 32 | window.addEventListener("load", () => { 33 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js` 34 | 35 | if (isLocalhost) { 36 | // This is running on localhost. Let's check if a service worker still exists or not. 37 | checkValidServiceWorker(swUrl, config) 38 | 39 | // Add some additional logging to localhost, pointing developers to the 40 | // service worker/PWA documentation. 41 | navigator.serviceWorker.ready.then(() => { 42 | console.log( 43 | "This web app is being served cache-first by a service " + 44 | "worker. To learn more, visit https://bit.ly/CRA-PWA" 45 | ) 46 | }) 47 | } else { 48 | // Is not localhost. Just register service worker 49 | registerValidSW(swUrl, config) 50 | } 51 | }) 52 | } 53 | } 54 | 55 | function registerValidSW(swUrl, config) { 56 | navigator.serviceWorker 57 | .register(swUrl) 58 | .then((registration) => { 59 | registration.onupdatefound = () => { 60 | const installingWorker = registration.installing 61 | if (installingWorker == null) { 62 | return 63 | } 64 | installingWorker.onstatechange = () => { 65 | if (installingWorker.state === "installed") { 66 | if (navigator.serviceWorker.controller) { 67 | // At this point, the updated precached content has been fetched, 68 | // but the previous service worker will still serve the older 69 | // content until all client tabs are closed. 70 | console.log( 71 | "New content is available and will be used when all " + 72 | "tabs for this page are closed. See https://bit.ly/CRA-PWA." 73 | ) 74 | 75 | // Execute callback 76 | if (config && config.onUpdate) { 77 | config.onUpdate(registration) 78 | } 79 | } else { 80 | // At this point, everything has been precached. 81 | // It's the perfect time to display a 82 | // "Content is cached for offline use." message. 83 | console.log("Content is cached for offline use.") 84 | 85 | // Execute callback 86 | if (config && config.onSuccess) { 87 | config.onSuccess(registration) 88 | } 89 | } 90 | } 91 | } 92 | } 93 | }) 94 | .catch((error) => { 95 | console.error("Error during service worker registration:", error) 96 | }) 97 | } 98 | 99 | function checkValidServiceWorker(swUrl, config) { 100 | // Check if the service worker can be found. If it can't reload the page. 101 | fetch(swUrl, { 102 | headers: { "Service-Worker": "script" }, 103 | }) 104 | .then((response) => { 105 | // Ensure service worker exists, and that we really are getting a JS file. 106 | const contentType = response.headers.get("content-type") 107 | if (response.status === 404 || (contentType != null && contentType.indexOf("javascript") === -1)) { 108 | // No service worker found. Probably a different app. Reload the page. 109 | navigator.serviceWorker.ready.then((registration) => { 110 | registration.unregister().then(() => { 111 | window.location.reload() 112 | }) 113 | }) 114 | } else { 115 | // Service worker found. Proceed as normal. 116 | registerValidSW(swUrl, config) 117 | } 118 | }) 119 | .catch(() => { 120 | console.log("No internet connection found. App is running in offline mode.") 121 | }) 122 | } 123 | 124 | export function unregister() { 125 | if ("serviceWorker" in navigator) { 126 | navigator.serviceWorker.ready 127 | .then((registration) => { 128 | registration.unregister() 129 | }) 130 | .catch((error) => { 131 | console.error(error.message) 132 | }) 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import "@testing-library/jest-dom/extend-expect" 6 | --------------------------------------------------------------------------------