├── .babelrc ├── .dockerignore ├── .env ├── .env.local ├── .eslintignore ├── .eslintrc.json ├── .gitignore ├── .stylelintrc ├── CONTRIBUTING.rst ├── Dockerfile ├── LICENSE ├── README.md ├── deploy.sh ├── dist ├── index.html └── public │ ├── bundle.js │ ├── img │ ├── 09f2865dd7e1c6e3813ef4586211960e.gif │ ├── 2f257980b243711d9f2b338cd837de84.gif │ ├── 8cdd213b0f845e18df6dd221e2707291.png │ └── c2dc07db85fa20cb71725b5e36d053be.gif │ └── styles.css ├── docker-compose.yml ├── media ├── repo-banner@2x.png └── repo-banner@2x.sketch ├── nginx.conf ├── package.json ├── public ├── bundle.js ├── img │ ├── 0446455ec9abf92713b955a3332a77cb.png │ ├── 09f2865dd7e1c6e3813ef4586211960e.gif │ ├── 2f257980b243711d9f2b338cd837de84.gif │ ├── 8cdd213b0f845e18df6dd221e2707291.png │ └── c2dc07db85fa20cb71725b5e36d053be.gif └── styles.css ├── src ├── app │ ├── components │ │ ├── App.jsx │ │ ├── Append.jsx │ │ ├── Burn.jsx │ │ ├── Code.jsx │ │ ├── Create.jsx │ │ ├── Footer.jsx │ │ ├── Home.jsx │ │ ├── Icons.jsx │ │ ├── Output.jsx │ │ ├── Retrieve.jsx │ │ ├── ScrollToTop.jsx │ │ ├── Steps.jsx │ │ └── TutorialStep.jsx │ ├── getErrorMessage.js │ ├── img │ │ ├── BDB@2ds.png │ │ ├── flame-gif-6.gif │ │ ├── loading.gif │ │ └── tumblr_m9wlwqH8Xf1rfjowdo1_500.gif │ ├── index.jsx │ ├── initdb.js │ └── styles │ │ ├── App.scss │ │ ├── Code.scss │ │ ├── Layout.scss │ │ ├── Steps.scss │ │ ├── bigchaindb │ │ ├── _account.scss │ │ ├── _animations.scss │ │ ├── _asset.scss │ │ ├── _buttons.scss │ │ ├── _card.scss │ │ ├── _code.scss │ │ ├── _forms.scss │ │ ├── _grid.scss │ │ ├── _icons.scss │ │ ├── _layout.scss │ │ ├── _logo.scss │ │ ├── _menu.scss │ │ ├── _mixins.scss │ │ ├── _modal.scss │ │ ├── _normalize.css │ │ ├── _search.scss │ │ ├── _sidebar.scss │ │ ├── _style.scss │ │ ├── _transaction.scss │ │ ├── _typography.scss │ │ └── _variables.scss │ │ └── main.scss └── index.html └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets" : ["@babel/preset-env", "@babel/preset-react"] 3 | } 4 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | BDB_URL=https://getstarted.bigchaindb.com/api/v1/ 2 | -------------------------------------------------------------------------------- /.env.local: -------------------------------------------------------------------------------- 1 | BDB_URL=http://localhost:9984/api/v1/ 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | node_modules -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "ascribe" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | package-lock.json 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-bigchaindb" 3 | } 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | .. highlight:: shell 2 | 3 | ============ 4 | Contributing 5 | ============ 6 | 7 | Contributions are welcome, and they are greatly appreciated! Every 8 | little bit helps, and credit will always be given. 9 | 10 | You can contribute in many ways: 11 | 12 | Types of Contributions 13 | ---------------------- 14 | 15 | Report Bugs 16 | ~~~~~~~~~~~ 17 | 18 | Report bugs at https://github.com/bigchaindb/tutorial-crab/issues. 19 | 20 | If you are reporting a bug, please include: 21 | 22 | * Your operating system name and version. 23 | * Any details about your local setup that might be helpful in troubleshooting. 24 | * Detailed steps to reproduce the bug. 25 | 26 | Fix Bugs 27 | ~~~~~~~~ 28 | 29 | Look through the GitHub issues for bugs. Anything tagged with "bug" 30 | and "help wanted" is open to whoever wants to implement it. 31 | 32 | Implement Features 33 | ~~~~~~~~~~~~~~~~~~ 34 | 35 | Look through the GitHub issues for features. Anything tagged with "enhancement" 36 | and "help wanted" is open to whoever wants to implement it. 37 | 38 | Write Documentation 39 | ~~~~~~~~~~~~~~~~~~~ 40 | 41 | bigchaindb-tutorial-crab could always use more documentation, whether as part of the 42 | official bigchaindb-tutorial-crab docs, in docstrings, or even on the web in blog posts, 43 | articles, and such. 44 | 45 | Submit Feedback 46 | ~~~~~~~~~~~~~~~ 47 | 48 | The best way to send feedback is to file an issue at https://github.com/bigchaindb/tutorial-crab/issues. 49 | 50 | If you are proposing a feature: 51 | 52 | * Explain in detail how it would work. 53 | * Keep the scope as narrow as possible, to make it easier to implement. 54 | * Remember that this is a volunteer-driven project, and that contributions 55 | are welcome :) 56 | 57 | Get Started! 58 | ------------ 59 | 60 | Ready to contribute? Here's how to set up `tutorial-crab`_ for local 61 | development. 62 | 63 | 1. Fork the `tutorial-crab`_ repo on GitHub. 64 | 2. Clone your fork locally and enter into the project:: 65 | 66 | $ git clone git@github.com:your_name_here/tutorial-crab.git 67 | $ cd tutorial-crab/ 68 | 69 | 3. Create a branch for local development:: 70 | 71 | $ git checkout -b name-of-your-bugfix-or-feature 72 | 73 | Now you can make your changes locally. 74 | 75 | 4. Write tests ;-) 76 | 77 | 5. Test! 78 | 79 | 6. Commit your changes and push your branch to GitHub:: 80 | 81 | $ git add . 82 | $ git commit -m "Your detailed description of your changes." 83 | $ git push origin name-of-your-bugfix-or-feature 84 | 85 | 7. Submit a pull request through the GitHub website. 86 | 87 | 88 | Pull Request Guidelines 89 | ----------------------- 90 | 91 | Before you submit a pull request, check that it meets these guidelines: 92 | 93 | 1. The pull request should include tests. 94 | 2. If the pull request adds functionality, the docs should be updated. Put 95 | your new functionality into a function with a docstring, and add the 96 | feature to the list in README.rst. 97 | 3. The pull request should work for JS and node. Travis or others would be an interesting 98 | way for automate the tests... 99 | 100 | 101 | Dependency on Bigchaindb 102 | ~~~~~~~~~~~~~~~~~~~~~~~~ 103 | 104 | This version is compatible from BigchainDB server v0.10.1 105 | 106 | .. _bigchaindb-tutorial-crab: https://github.com/bigchaindb/tutorial-crab 107 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | RUN apt-get update 4 | RUN apt-get install -y curl build-essential nginx libpng-dev 5 | 6 | RUN curl -sL https://deb.nodesource.com/setup_8.x | bash 7 | RUN apt-get install -y nodejs 8 | 9 | WORKDIR /app 10 | 11 | COPY . . 12 | 13 | RUN npm install 14 | 15 | RUN npm run production 16 | 17 | ADD ./nginx.conf /etc/nginx/nginx.conf 18 | 19 | EXPOSE 80 20 | 21 | CMD ["nginx", "-g", "daemon off;"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [![tutorial-crab](media/repo-banner@2x.png)](https://www.bigchaindb.com) 2 | 3 | A tutorial website using and explaining js-driver-orm use on BigchainDB with interactive examples. 4 | 5 | Try the CRAB Tutorial available now at https://tutorials.bigchaindb.com/crab/ 6 | 7 | ## Clone 8 | Clone or fork this repo 9 | 10 | https://github.com/bigchaindb/tutorial-crab.git 11 | 12 | ```bash 13 | git clone git@github.com:bigchaindb/tutorial-crab.git my-bigchaindb-project 14 | ``` 15 | 16 | and 17 | 18 | ```bash 19 | cd my-bigchaindb-project 20 | ``` 21 | 22 | Now you can set your remotes to your local app and so forth 23 | 24 | ## Quickstart with Docker (Windows, OSX, lazy Linux) 25 | 26 | > Supports BigchainDB Server v1.0 27 | 28 | ### Prequisites 29 | 30 | You must have `docker`, `docker-compose` (and `make`) installed. 31 | These versions or higher should work: 32 | 33 | - `docker`: `v1.13.0` 34 | - `docker-compose`: `v1.7.1` 35 | 36 | ### Make or docker-compose 37 | 38 | To spin up the services, simple run the make command, which will orchestrate `docker-compose` 39 | 40 | ```bash 41 | make 42 | ``` 43 | 44 | This might take a few minutes, perfect moment for a :coffee:! 45 | 46 | Once docker-compose has built and launched all services, have a look: 47 | 48 | ```bash 49 | docker-compose ps 50 | ``` 51 | 52 | ``` 53 | Name Command State Ports 54 | ------------------------------------------------------------------------------------------------------------------------ 55 | mybigchaindbproject_bdb_1 bigchaindb start Up 0.0.0.0:49984->9984/tcp, 0.0.0.0:49985->9985/tcp 56 | mybigchaindbproject_client_1 npm run serve Up 0.0.0.0:4000->4000/tcp 57 | mybigchaindbproject_mdb_1 docker-entrypoint.sh mongo ... Up 0.0.0.0:32797->27017/tcp 58 | ``` 59 | 60 | Which means that the internal docker port for the API is `9984` 61 | and the external one is `49984`. 62 | 63 | The external ports might change, so for the following use the ports as indicated by `docker-compose ps`. 64 | 65 | You can simply check if it's running by going to [`http://localhost:4000/crab`](http://localhost:4000/crab). 66 | 67 | If you already built the images and want to `restart`: 68 | 69 | ```bash 70 | make restart 71 | ``` 72 | 73 | Stop (and remove) the containers with 74 | 75 | ```bash 76 | make stop 77 | ``` 78 | 79 | ### Launch docker-compose services manually 80 | 81 | No make? Launch the services manually: 82 | 83 | Launch MongoDB: 84 | 85 | ```bash 86 | docker-compose up -d mdb 87 | ``` 88 | 89 | Wait about 10 seconds and then launch the server & client: 90 | 91 | ```bash 92 | docker-compose up -d bdb 93 | docker-compose up -d client 94 | ``` 95 | 96 | ## BigchainDB javascript ORM driver 97 | 98 | see the [js-driver-orm](https://github.com/bigchaindb/js-driver-orm) for more details 99 | 100 | ## License 101 | 102 | ``` 103 | Copyright 2017 BigchainDB GmbH 104 | 105 | Licensed under the Apache License, Version 2.0 (the "License"); 106 | you may not use this file except in compliance with the License. 107 | You may obtain a copy of the License at 108 | 109 | http://www.apache.org/licenses/LICENSE-2.0 110 | 111 | Unless required by applicable law or agreed to in writing, software 112 | distributed under the License is distributed on an "AS IS" BASIS, 113 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 114 | See the License for the specific language governing permissions and 115 | limitations under the License. 116 | ``` 117 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | aws s3 rm s3://tutorials.bigchaindb.com/crab --recursive 4 | aws s3 cp ./dist s3://tutorials.bigchaindb.com/crab/ --recursive --acl public-read --cache-control 'public, max-age=0' -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BigchainDB CRAB tutorial 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 36 | 37 | 38 |
39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /dist/public/img/09f2865dd7e1c6e3813ef4586211960e.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/dist/public/img/09f2865dd7e1c6e3813ef4586211960e.gif -------------------------------------------------------------------------------- /dist/public/img/2f257980b243711d9f2b338cd837de84.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/dist/public/img/2f257980b243711d9f2b338cd837de84.gif -------------------------------------------------------------------------------- /dist/public/img/8cdd213b0f845e18df6dd221e2707291.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/dist/public/img/8cdd213b0f845e18df6dd221e2707291.png -------------------------------------------------------------------------------- /dist/public/img/c2dc07db85fa20cb71725b5e36d053be.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/dist/public/img/c2dc07db85fa20cb71725b5e36d053be.gif -------------------------------------------------------------------------------- /dist/public/styles.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ 2 | /** 3 | * 1. Set default font family to sans-serif. 4 | * 2. Prevent iOS and IE text size adjust after device orientation change, 5 | * without disabling user zoom. 6 | */ 7 | html { 8 | font-family: sans-serif; 9 | /* 1 */ 10 | -ms-text-size-adjust: 100%; 11 | /* 2 */ 12 | -webkit-text-size-adjust: 100%; 13 | /* 2 */ } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | body { 19 | margin: 0; } 20 | 21 | /* HTML5 display definitions 22 | ========================================================================== */ 23 | /** 24 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 25 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 26 | * and Firefox. 27 | * Correct `block` display not defined for `main` in IE 11. 28 | */ 29 | article, 30 | aside, 31 | details, 32 | figcaption, 33 | figure, 34 | footer, 35 | header, 36 | hgroup, 37 | main, 38 | menu, 39 | nav, 40 | section, 41 | summary { 42 | display: block; } 43 | 44 | /** 45 | * 1. Correct `inline-block` display not defined in IE 8/9. 46 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 47 | */ 48 | audio, 49 | canvas, 50 | progress, 51 | video { 52 | display: inline-block; 53 | /* 1 */ 54 | vertical-align: baseline; 55 | /* 2 */ } 56 | 57 | /** 58 | * Prevent modern browsers from displaying `audio` without controls. 59 | * Remove excess height in iOS 5 devices. 60 | */ 61 | audio:not([controls]) { 62 | display: none; 63 | height: 0; } 64 | 65 | /** 66 | * Address `[hidden]` styling not present in IE 8/9/10. 67 | * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. 68 | */ 69 | [hidden], 70 | template { 71 | display: none; } 72 | 73 | /* Links 74 | ========================================================================== */ 75 | /** 76 | * Remove the gray background color from active links in IE 10. 77 | */ 78 | a { 79 | background-color: transparent; } 80 | 81 | /** 82 | * Improve readability of focused elements when they are also in an 83 | * active/hover state. 84 | */ 85 | a:active, 86 | a:hover { 87 | outline: 0; } 88 | 89 | /* Text-level semantics 90 | ========================================================================== */ 91 | /** 92 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 93 | */ 94 | abbr[title] { 95 | border-bottom: 1px dotted; } 96 | 97 | /** 98 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 99 | */ 100 | b, 101 | strong { 102 | font-weight: bold; } 103 | 104 | /** 105 | * Address styling not present in Safari and Chrome. 106 | */ 107 | dfn { 108 | font-style: italic; } 109 | 110 | /** 111 | * Address variable `h1` font-size and margin within `section` and `article` 112 | * contexts in Firefox 4+, Safari, and Chrome. 113 | */ 114 | h1 { 115 | font-size: 2em; 116 | margin: 0.67em 0; } 117 | 118 | /** 119 | * Address styling not present in IE 8/9. 120 | */ 121 | mark { 122 | background: #ff0; 123 | color: #000; } 124 | 125 | /** 126 | * Address inconsistent and variable font size in all browsers. 127 | */ 128 | small { 129 | font-size: 80%; } 130 | 131 | /** 132 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 133 | */ 134 | sub, 135 | sup { 136 | font-size: 75%; 137 | line-height: 0; 138 | position: relative; 139 | vertical-align: baseline; } 140 | 141 | sup { 142 | top: -0.5em; } 143 | 144 | sub { 145 | bottom: -0.25em; } 146 | 147 | /* Embedded content 148 | ========================================================================== */ 149 | /** 150 | * Remove border when inside `a` element in IE 8/9/10. 151 | */ 152 | img { 153 | border: 0; } 154 | 155 | /** 156 | * Correct overflow not hidden in IE 9/10/11. 157 | */ 158 | svg:not(:root) { 159 | overflow: hidden; } 160 | 161 | /* Grouping content 162 | ========================================================================== */ 163 | /** 164 | * Address margin not present in IE 8/9 and Safari. 165 | */ 166 | figure { 167 | margin: 1em 40px; } 168 | 169 | /** 170 | * Address differences between Firefox and other browsers. 171 | */ 172 | hr { 173 | box-sizing: content-box; 174 | height: 0; } 175 | 176 | /** 177 | * Contain overflow in all browsers. 178 | */ 179 | pre { 180 | overflow: auto; } 181 | 182 | /** 183 | * Address odd `em`-unit font size rendering in all browsers. 184 | */ 185 | code, 186 | kbd, 187 | pre, 188 | samp { 189 | font-family: monospace, monospace; 190 | font-size: 1em; } 191 | 192 | /* Forms 193 | ========================================================================== */ 194 | /** 195 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 196 | * styling of `select`, unless a `border` property is set. 197 | */ 198 | /** 199 | * 1. Correct color not being inherited. 200 | * Known issue: affects color of disabled elements. 201 | * 2. Correct font properties not being inherited. 202 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 203 | */ 204 | button, 205 | input, 206 | optgroup, 207 | select, 208 | textarea { 209 | color: inherit; 210 | /* 1 */ 211 | font: inherit; 212 | /* 2 */ 213 | margin: 0; 214 | /* 3 */ } 215 | 216 | /** 217 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 218 | */ 219 | button { 220 | overflow: visible; } 221 | 222 | /** 223 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 224 | * All other form control elements do not inherit `text-transform` values. 225 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 226 | * Correct `select` style inheritance in Firefox. 227 | */ 228 | button, 229 | select { 230 | text-transform: none; } 231 | 232 | /** 233 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 234 | * and `video` controls. 235 | * 2. Correct inability to style clickable `input` types in iOS. 236 | * 3. Improve usability and consistency of cursor style between image-type 237 | * `input` and others. 238 | */ 239 | button, 240 | html input[type="button"], 241 | input[type="reset"], 242 | input[type="submit"] { 243 | -webkit-appearance: button; 244 | /* 2 */ 245 | cursor: pointer; 246 | /* 3 */ } 247 | 248 | /** 249 | * Re-set default cursor for disabled elements. 250 | */ 251 | button[disabled], 252 | html input[disabled] { 253 | cursor: default; } 254 | 255 | /** 256 | * Remove inner padding and border in Firefox 4+. 257 | */ 258 | button::-moz-focus-inner, 259 | input::-moz-focus-inner { 260 | border: 0; 261 | padding: 0; } 262 | 263 | /** 264 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 265 | * the UA stylesheet. 266 | */ 267 | input { 268 | line-height: normal; } 269 | 270 | /** 271 | * It's recommended that you don't attempt to style these elements. 272 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 273 | * 274 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 275 | * 2. Remove excess padding in IE 8/9/10. 276 | */ 277 | input[type="checkbox"], 278 | input[type="radio"] { 279 | box-sizing: border-box; 280 | /* 1 */ 281 | padding: 0; 282 | /* 2 */ } 283 | 284 | /** 285 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 286 | * `font-size` values of the `input`, it causes the cursor style of the 287 | * decrement button to change from `default` to `text`. 288 | */ 289 | input[type="number"]::-webkit-inner-spin-button, 290 | input[type="number"]::-webkit-outer-spin-button { 291 | height: auto; } 292 | 293 | /** 294 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 295 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. 296 | */ 297 | input[type="search"] { 298 | -webkit-appearance: textfield; 299 | /* 1 */ 300 | box-sizing: content-box; 301 | /* 2 */ } 302 | 303 | /** 304 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 305 | * Safari (but not Chrome) clips the cancel button when the search input has 306 | * padding (and `textfield` appearance). 307 | */ 308 | input[type="search"]::-webkit-search-cancel-button, 309 | input[type="search"]::-webkit-search-decoration { 310 | -webkit-appearance: none; } 311 | 312 | /** 313 | * Define consistent border, margin, and padding. 314 | */ 315 | fieldset { 316 | border: 1px solid #c0c0c0; 317 | margin: 0 2px; 318 | padding: 0.35em 0.625em 0.75em; } 319 | 320 | /** 321 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 322 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 323 | */ 324 | legend { 325 | border: 0; 326 | /* 1 */ 327 | padding: 0; 328 | /* 2 */ } 329 | 330 | /** 331 | * Remove default vertical scrollbar in IE 8/9/10/11. 332 | */ 333 | textarea { 334 | overflow: auto; } 335 | 336 | /** 337 | * Don't inherit the `font-weight` (applied by a rule above). 338 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 339 | */ 340 | optgroup { 341 | font-weight: bold; } 342 | 343 | /* Tables 344 | ========================================================================== */ 345 | /** 346 | * Remove most spacing between table cells. 347 | */ 348 | table { 349 | border-collapse: collapse; 350 | border-spacing: 0; } 351 | 352 | td, 353 | th { 354 | padding: 0; } 355 | 356 | /** 357 | * Colors and backgrounds 358 | */ 359 | /*79589F*/ 360 | /** 361 | * Sizes 362 | */ 363 | html { 364 | font-size: 18px; 365 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } 366 | @media (min-width: 85em) { 367 | html { 368 | font-size: 20px; } } 369 | 370 | body { 371 | font-family: "europa", "Avenir Next", "Avenir", "Helvetica Neue", "Helvetica", "Arial", sans-serif; 372 | font-size: 1rem; 373 | font-weight: 400; 374 | line-height: 1.5; 375 | color: #445261; 376 | background-color: #E8EBEF; 377 | overflow-wrap: break-word; 378 | word-wrap: break-word; 379 | word-break: break-word; 380 | text-rendering: optimizeLegibility; 381 | -webkit-font-smoothing: antialiased; 382 | -moz-osx-font-smoothing: grayscale; 383 | -moz-font-feature-settings: 'liga', 'kern'; 384 | font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "pnum" 1, "tnum" 0, "onum" 0, "lnum" 0, "dlig" 1; } 385 | 386 | a { 387 | color: #39BA91; 388 | text-decoration: none; 389 | transition: .2s ease-out; } 390 | a:hover, a:focus { 391 | color: #5acca8; 392 | outline: 0; } 393 | a .icon { 394 | stroke: #39BA91; } 395 | 396 | h1, h2, h3, h4, h5, h6, 397 | .h1, .h2, .h3, .h4, .menu__title, .h5, .h6 { 398 | font-family: inherit; 399 | line-height: 1.2; 400 | color: #074354; 401 | font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "pnum" 1, "tnum" 0, "onum" 0, "lnum" 0, "dlig" 1; } 402 | .wf-loading h1, .wf-loading h2, .wf-loading h3, .wf-loading h4, .wf-loading h5, .wf-loading h6, .wf-loading 403 | .h1, .wf-loading .h2, .wf-loading .h3, .wf-loading .h4, .wf-loading .menu__title, .wf-loading .h5, .wf-loading .h6 { 404 | font-weight: 400; } 405 | h1, 406 | .wf-active h1, 407 | .wf-inactive h1, h2, 408 | .wf-active h2, 409 | .wf-inactive h2, h3, 410 | .wf-active h3, 411 | .wf-inactive h3, h4, 412 | .wf-active h4, 413 | .wf-inactive h4, h5, 414 | .wf-active h5, 415 | .wf-inactive h5, h6, 416 | .wf-active h6, 417 | .wf-inactive h6, 418 | .h1, 419 | .wf-active 420 | .h1, 421 | .wf-inactive 422 | .h1, .h2, 423 | .wf-active .h2, 424 | .wf-inactive .h2, .h3, 425 | .wf-active .h3, 426 | .wf-inactive .h3, .h4, .menu__title, 427 | .wf-active .h4, 428 | .wf-active .menu__title, 429 | .wf-inactive .h4, 430 | .wf-inactive .menu__title, .h5, 431 | .wf-active .h5, 432 | .wf-inactive .h5, .h6, 433 | .wf-active .h6, 434 | .wf-inactive .h6 { 435 | font-weight: 300; } 436 | 437 | h1, .h1, 438 | h2, .h2, 439 | h3, .h3 { 440 | margin-top: 2rem; 441 | margin-bottom: 2rem; } 442 | 443 | h4, .h4, .menu__title, 444 | h5, .h5, 445 | h6, .h6 { 446 | margin-top: 1rem; 447 | margin-bottom: 1rem; } 448 | 449 | h5, 450 | .wf-active h5, 451 | .wf-inactive h5, .h5, 452 | .wf-active .h5, 453 | .wf-inactive .h5, 454 | h6, 455 | .wf-active 456 | h6, 457 | .wf-inactive 458 | h6, .h6, 459 | .wf-active .h6, 460 | .wf-inactive .h6 { 461 | font-weight: 400; } 462 | 463 | h1, .h1 { 464 | font-size: 2.7rem; } 465 | 466 | h2, .h2 { 467 | font-size: 2.3rem; } 468 | 469 | h3, .h3 { 470 | font-size: 1.8rem; } 471 | 472 | h4, .h4, .menu__title { 473 | font-size: 1.45rem; } 474 | 475 | h5, .h5 { 476 | font-size: 1.3rem; } 477 | 478 | h6, .h6 { 479 | font-size: 1rem; } 480 | 481 | p { 482 | margin: 0 0 1rem; } 483 | 484 | small, 485 | .small { 486 | font-size: 0.85rem; 487 | font-weight: 400; } 488 | 489 | .mini { 490 | font-size: 0.7rem; 491 | font-weight: 400; } 492 | 493 | .large { 494 | font-size: 1.3rem; } 495 | 496 | strong, 497 | .strong, 498 | .bold { 499 | font-weight: 600; } 500 | 501 | em, 502 | .italic { 503 | font-style: italic; } 504 | 505 | .light { 506 | font-weight: 300; } 507 | 508 | .text-left { 509 | text-align: left; } 510 | 511 | .text-right { 512 | text-align: right; } 513 | 514 | .text-center { 515 | text-align: center; } 516 | 517 | .text-justify { 518 | text-align: justify; } 519 | 520 | .text-nowrap { 521 | white-space: nowrap; } 522 | 523 | .text-lowercase { 524 | text-transform: lowercase; } 525 | 526 | .text-uppercase { 527 | text-transform: uppercase; } 528 | 529 | .text-capitalize { 530 | text-transform: capitalize; } 531 | 532 | .text-dimmed { 533 | color: #9dabba; } 534 | 535 | .lead { 536 | font-size: 1.3rem; 537 | color: #074354; 538 | line-height: 1.33333; } 539 | 540 | *, 541 | *:before, 542 | *:after { 543 | box-sizing: border-box; } 544 | 545 | html, 546 | body, 547 | .app, 548 | .app > div, 549 | .app > div > div, 550 | .app__content { 551 | margin: 0 0 1em 0; 552 | padding: 0; 553 | width: 100%; } 554 | 555 | .app__content { 556 | padding-top: 3rem; } 557 | 558 | *, 559 | *:before, 560 | *:after { 561 | box-sizing: border-box; } 562 | 563 | .grid { 564 | display: flex; 565 | flex-wrap: wrap; 566 | list-style: none; 567 | margin: 0; 568 | padding: 0; } 569 | 570 | .grid__col { 571 | flex: 1; 572 | min-height: 0; 573 | min-width: 0; } 574 | 575 | .row { 576 | max-width: calc(50em - 4rem); 577 | margin-left: auto; 578 | margin-right: auto; 579 | padding-left: 1rem; 580 | padding-right: 1rem; } 581 | @media (min-width: 40em) { 582 | .row { 583 | padding-left: 2rem; 584 | padding-right: 2rem; } } 585 | 586 | .row--wide { 587 | max-width: 70rem; } 588 | 589 | .row--narrow { 590 | max-width: 28.57143em; } 591 | 592 | .grid--top { 593 | align-items: flex-start; } 594 | 595 | .grid--bottom { 596 | align-items: flex-end; } 597 | 598 | .grid--center { 599 | align-items: center; } 600 | 601 | .grid--justifycenter { 602 | justify-content: center; } 603 | 604 | .grid__col--top { 605 | align-self: flex-start; } 606 | 607 | .grid__col--bottom { 608 | align-self: flex-end; } 609 | 610 | .grid__col--center { 611 | align-self: center; } 612 | 613 | .grid--gutters { 614 | margin: -2rem 0 2rem -2rem; } 615 | .grid--gutters > .grid__col { 616 | padding: 2rem 0 0 2rem; } 617 | 618 | @media (min-width: 40em) { 619 | .grid-small--gutters { 620 | margin: -2rem 0 2rem -2rem; } 621 | .grid-small--gutters > .grid__col { 622 | padding: 2rem 0 0 2rem; } } 623 | 624 | @media (min-width: 50em) { 625 | .grid-medium--gutters { 626 | margin: -2rem 0 2rem -2rem; } 627 | .grid-medium--gutters > .grid__col { 628 | padding: 2rem 0 0 2rem; } } 629 | 630 | @media (min-width: 85em) { 631 | .grid-large--gutters { 632 | margin: -2rem 0 2rem -2rem; } 633 | .grid-large--gutters > .grid__col { 634 | padding: 2rem 0 0 2rem; } } 635 | 636 | .grid--fit > .grid__col { 637 | flex: 1; } 638 | 639 | .grid--full > .grid__col { 640 | flex: 0 0 100%; } 641 | 642 | .grid--third > .grid__col { 643 | flex: 0 0 33.3%; } 644 | 645 | .grid--half > .grid__col { 646 | flex: 0 0 50%; 647 | max-width: 50%; } 648 | 649 | .grid--columns > .grid__col { 650 | max-width: none; } 651 | .grid--columns > .grid__col.grid__col--1 { 652 | flex: 0 0 16%; } 653 | .grid--columns > .grid__col.grid__col--2 { 654 | flex: 0 0 33.3%; } 655 | .grid--columns > .grid__col.grid__col--3 { 656 | flex: 0 0 50%; } 657 | .grid--columns > .grid__col.grid__col--4 { 658 | flex: 0 0 66.6%; } 659 | .grid--columns > .grid__col.grid__col--5 { 660 | flex: 0 0 84%; } 661 | .grid--columns > .grid__col.grid__col--6 { 662 | flex: 0 0 100%; } 663 | 664 | @media (min-width: 40em) { 665 | .grid-small--columns > .grid__col { 666 | max-width: none; } 667 | .grid-small--columns > .grid__col.grid__col--1 { 668 | flex: 0 0 16%; } 669 | .grid-small--columns > .grid__col.grid__col--2 { 670 | flex: 0 0 33.3%; } 671 | .grid-small--columns > .grid__col.grid__col--3 { 672 | flex: 0 0 50%; } 673 | .grid-small--columns > .grid__col.grid__col--4 { 674 | flex: 0 0 66.6%; } 675 | .grid-small--columns > .grid__col.grid__col--5 { 676 | flex: 0 0 84%; } 677 | .grid-small--columns > .grid__col.grid__col--6 { 678 | flex: 0 0 100%; } 679 | .grid-small--fit > .grid__col { 680 | flex: 1; } 681 | .grid-small--full > .grid__col { 682 | flex: 0 0 100%; } 683 | .grid-small--third > .grid__col { 684 | flex: 0 0 33.3%; } 685 | .grid-small--half > .grid__col { 686 | flex: 0 0 50%; 687 | max-width: 50%; } } 688 | 689 | @media (min-width: 50em) { 690 | .grid-medium--columns > .grid__col { 691 | max-width: none; } 692 | .grid-medium--columns > .grid__col.grid__col--1 { 693 | flex: 0 0 16%; } 694 | .grid-medium--columns > .grid__col.grid__col--2 { 695 | flex: 0 0 33.3%; } 696 | .grid-medium--columns > .grid__col.grid__col--3 { 697 | flex: 0 0 50%; } 698 | .grid-medium--columns > .grid__col.grid__col--4 { 699 | flex: 0 0 66.6%; } 700 | .grid-medium--columns > .grid__col.grid__col--5 { 701 | flex: 0 0 84%; } 702 | .grid-medium--columns > .grid__col.grid__col--6 { 703 | flex: 0 0 100%; } 704 | .grid-medium--fit > .grid__col { 705 | flex: 1; } 706 | .grid-medium--full > .grid__col { 707 | flex: 0 0 100%; } 708 | .grid-medium--third > .grid__col { 709 | flex: 0 0 33.3%; } 710 | .grid-medium--half > .grid__col { 711 | flex: 0 0 50%; 712 | max-width: 50%; } } 713 | 714 | @media (min-width: 85em) { 715 | .grid-large--columns > .grid__col { 716 | max-width: none; } 717 | .grid-large--columns > .grid__col.grid__col--1 { 718 | flex: 0 0 16%; } 719 | .grid-large--columns > .grid__col.grid__col--2 { 720 | flex: 0 0 33.3%; } 721 | .grid-large--columns > .grid__col.grid__col--3 { 722 | flex: 0 0 50%; } 723 | .grid-large--columns > .grid__col.grid__col--4 { 724 | flex: 0 0 66.6%; } 725 | .grid-large--columns > .grid__col.grid__col--5 { 726 | flex: 0 0 84%; } 727 | .grid-large--columns > .grid__col.grid__col--6 { 728 | flex: 0 0 100%; } 729 | .grid-large--fit > .grid__col { 730 | flex: 1; } 731 | .grid-large--full > .grid__col { 732 | flex: 0 0 100%; } 733 | .grid-large--third > .grid__col { 734 | flex: 0 0 33.3%; } 735 | .grid-large--half > .grid__col { 736 | flex: 0 0 50%; 737 | max-width: 50%; } } 738 | 739 | .menu { 740 | background: rgba(16, 26, 37, 0.75); 741 | backdrop-filter: saturate(150%) blur(10px); 742 | padding-left: 2rem; 743 | padding-right: 2rem; 744 | display: flex; 745 | align-items: center; 746 | justify-content: space-between; 747 | position: fixed; 748 | width: 100%; 749 | z-index: 1; 750 | min-height: 3rem; } 751 | 752 | .menu__link, 753 | .menu .logo, 754 | .menu__title { 755 | flex-basis: 33.33333%; } 756 | 757 | .menu__link, 758 | .menu__title { 759 | font-size: 0.85rem; } 760 | 761 | .menu .logo { 762 | margin-right: -1rem; } 763 | 764 | .menu__link { 765 | padding-top: .5rem; 766 | padding-bottom: .5rem; 767 | display: inline-block; 768 | transition: .2s ease-out; 769 | opacity: .8; } 770 | .menu__link .icon { 771 | stroke-width: 2; 772 | width: 0.7rem; 773 | height: 0.7rem; 774 | margin-right: 0.25rem; } 775 | 776 | .menu__link:hover { 777 | opacity: 1; } 778 | 779 | .menu__title { 780 | margin: 0; 781 | color: #fff; 782 | text-align: right; } 783 | 784 | .icon { 785 | fill: none; 786 | stroke: #074354; 787 | stroke-width: 1; 788 | stroke-linecap: round; 789 | stroke-linejoin: round; 790 | width: 1rem; 791 | height: 1rem; } 792 | 793 | .button { 794 | display: inline-block; 795 | font-family: inherit; 796 | font-weight: 600; 797 | text-align: center; 798 | white-space: nowrap; 799 | vertical-align: middle; 800 | cursor: pointer; 801 | user-select: none; 802 | border: none; 803 | box-shadow: none; 804 | transition: .2s ease-out; 805 | padding: 0.5rem 2rem; 806 | font-size: 1rem; 807 | line-height: 1.5; 808 | border-radius: 0.15rem; } 809 | .button:hover, .button:focus { 810 | box-shadow: 0 1px 4px rgba(16, 26, 37, 0.4); 811 | transform: translateY(-1px); 812 | outline: 0; } 813 | .button:active, .button.active { 814 | background-image: none; 815 | outline: 0; 816 | transform: translateY(0); 817 | box-shadow: 0 1px 2px rgba(16, 26, 37, 0.3); } 818 | .button.disabled, .button:disabled { 819 | opacity: .45; 820 | box-shadow: none; 821 | cursor: not-allowed; 822 | pointer-events: none; } 823 | .button .icon { 824 | width: 1rem; 825 | height: 1rem; 826 | margin-right: .25rem; 827 | margin-bottom: -1px; } 828 | 829 | a.button.disabled, 830 | fieldset[disabled] a.btn { 831 | pointer-events: none; } 832 | 833 | .button--primary { 834 | color: #074354 !important; 835 | background: #39BA91; } 836 | .button--primary:hover, .button--primary:focus { 837 | color: #074354 !important; 838 | background-color: #46c69e; } 839 | .button--primary:active { 840 | color: #074354 !important; 841 | background: #37b28b; 842 | transition: none; } 843 | .button--primary.disabled:focus, .button--primary:disabled:focus { 844 | background-color: #39BA91; } 845 | .button--primary .icon { 846 | fill: #074354; } 847 | 848 | .button--secondary { 849 | color: #074354 !important; 850 | background: #9dabba; } 851 | .button--secondary:hover, .button--secondary:focus { 852 | color: #074354 !important; 853 | background-color: #acb8c5; } 854 | .button--secondary:active { 855 | color: #074354 !important; 856 | background: #97a6b6; 857 | transition: none; } 858 | .button--secondary.disabled:focus, .button--secondary:disabled:focus { 859 | background-color: #9dabba; } 860 | .button--secondary .icon { 861 | fill: #074354; } 862 | 863 | .button--blue { 864 | color: #39BA91 !important; 865 | background: #074354; } 866 | .button--blue:hover, .button--blue:focus { 867 | color: #39BA91 !important; 868 | background-color: #09566c; } 869 | .button--blue:active { 870 | color: #39BA91 !important; 871 | background: #063b4b; 872 | transition: none; } 873 | .button--blue.disabled:focus, .button--blue:disabled:focus { 874 | background-color: #074354; } 875 | .button--blue .icon { 876 | fill: #39BA91; } 877 | 878 | .button--violet { 879 | color: #074354 !important; 880 | background: #B581CF; } 881 | .button--violet:hover, .button--violet:focus { 882 | color: #074354 !important; 883 | background-color: #c093d6; } 884 | .button--violet:active { 885 | color: #074354 !important; 886 | background: #b17acc; 887 | transition: none; } 888 | .button--violet.disabled:focus, .button--violet:disabled:focus { 889 | background-color: #B581CF; } 890 | .button--violet .icon { 891 | fill: #074354; } 892 | 893 | .button--info { 894 | color: #fff !important; 895 | background: #3E91CE; } 896 | .button--info:hover, .button--info:focus { 897 | color: #fff !important; 898 | background-color: #529dd3; } 899 | .button--info:active { 900 | color: #fff !important; 901 | background: #368ccc; 902 | transition: none; } 903 | .button--info.disabled:focus, .button--info:disabled:focus { 904 | background-color: #3E91CE; } 905 | .button--info .icon { 906 | fill: #fff; } 907 | 908 | .button--success { 909 | color: #fff !important; 910 | background: #388250; } 911 | .button--success:hover, .button--success:focus { 912 | color: #fff !important; 913 | background-color: #40945b; } 914 | .button--success:active { 915 | color: #fff !important; 916 | background: #357b4c; 917 | transition: none; } 918 | .button--success.disabled:focus, .button--success:disabled:focus { 919 | background-color: #388250; } 920 | .button--success .icon { 921 | fill: #fff; } 922 | 923 | .button--warning { 924 | color: #fff !important; 925 | background: #8E8E24; } 926 | .button--warning:hover, .button--warning:focus { 927 | color: #fff !important; 928 | background-color: #a2a229; } 929 | .button--warning:active { 930 | color: #fff !important; 931 | background: #868622; 932 | transition: none; } 933 | .button--warning.disabled:focus, .button--warning:disabled:focus { 934 | background-color: #8E8E24; } 935 | .button--warning .icon { 936 | fill: #fff; } 937 | 938 | .button--danger { 939 | color: #fff !important; 940 | background: #c9726a; } 941 | .button--danger:hover, .button--danger:focus { 942 | color: #fff !important; 943 | background-color: #d0847d; } 944 | .button--danger:active { 945 | color: #fff !important; 946 | background: #c66b63; 947 | transition: none; } 948 | .button--danger.disabled:focus, .button--danger:disabled:focus { 949 | background-color: #c9726a; } 950 | .button--danger .icon { 951 | fill: #fff; } 952 | 953 | .button--link { 954 | font-weight: normal; 955 | color: #39BA91; 956 | border-radius: 0; } 957 | .button--link, .button--link:active, .button--link.active, .button--link:disabled { 958 | background-color: transparent; 959 | box-shadow: none; } 960 | .button--link, .button--link:hover, .button--link:focus, .button--link:active { 961 | border-color: transparent; 962 | box-shadow: none; 963 | background: none; } 964 | 965 | .button--lg { 966 | padding: 1rem 3rem; 967 | font-size: 1.3rem; 968 | line-height: 1.33333; 969 | border-radius: 0.2rem; } 970 | .button--lg .icon { 971 | width: 1.3rem; 972 | height: 1.3rem; } 973 | 974 | .button--sm { 975 | padding: 0.4rem 1.25rem; 976 | font-size: 0.85rem; 977 | line-height: 1.3; 978 | border-radius: 0.1rem; } 979 | .button--sm .icon { 980 | width: 0.85rem; 981 | height: 0.85rem; } 982 | 983 | .button--xs { 984 | padding: 0.15rem 0.75rem; 985 | font-size: 0.7rem; 986 | line-height: 1.2; 987 | border-radius: 0.1rem; } 988 | .button--xs .icon { 989 | width: 0.7rem; 990 | height: 0.7rem; } 991 | 992 | .button-block { 993 | display: block; 994 | width: 100%; } 995 | 996 | .button-block + .button-block { 997 | margin-top: 5px; } 998 | 999 | input[type="submit"].btn-block, 1000 | input[type="reset"].btn-block, 1001 | input[type="button"].btn-block { 1002 | width: 100%; } 1003 | 1004 | .form { 1005 | padding: 1rem; 1006 | background: #9dabba; 1007 | border-radius: 0.15rem; 1008 | margin-bottom: 1rem; } 1009 | @media (min-width: 40em) { 1010 | .form { 1011 | padding: 2rem 2.5rem; } } 1012 | 1013 | .form__control { 1014 | display: block; 1015 | width: 100%; 1016 | appearance: none; 1017 | padding: 0.5rem 0; 1018 | font-family: inherit; 1019 | font-weight: 600; 1020 | font-size: 1rem; 1021 | line-height: 1.5; 1022 | color: #394552; 1023 | text-align: left; 1024 | background: none; 1025 | border: none; 1026 | border-bottom: 2px solid #445261; 1027 | border-radius: 0; 1028 | transition: .2s ease-out; } 1029 | .form__control:focus { 1030 | outline: 0; 1031 | border-color: #394552; } 1032 | .form__control::placeholder { 1033 | color: #445261; 1034 | opacity: 1; } 1035 | .form__control:disabled, .form__control[readonly] { 1036 | background-color: #394552; 1037 | opacity: 1; } 1038 | .form__control:disabled { 1039 | cursor: disabled; } 1040 | 1041 | .form__label { 1042 | position: absolute; 1043 | top: 0.5rem; 1044 | left: 0; 1045 | right: 0; 1046 | transition: .15s ease-out; 1047 | user-select: none; 1048 | cursor: text; 1049 | font-family: inherit; 1050 | font-weight: 400; 1051 | font-size: 1rem; 1052 | line-height: 1.5; 1053 | color: #445261; 1054 | text-align: left; 1055 | transform-origin: left; } 1056 | 1057 | .form__control:focus ~ .form__label { 1058 | transform: translate3d(0, -1.16667rem, 0) scale(0.7); 1059 | color: #394552; } 1060 | 1061 | .form__group { 1062 | margin-bottom: 1rem; 1063 | position: relative; 1064 | margin-top: 1rem; } 1065 | .form__group:last-of-type { 1066 | margin-bottom: 0; } 1067 | .form__group:last-of-type .btn { 1068 | margin-top: 1rem; } 1069 | 1070 | .logo { 1071 | fill: #39BA91; 1072 | color: #074354; 1073 | width: 300px; 1074 | height: 60px; 1075 | display: block; } 1076 | 1077 | .logo--white { 1078 | fill: #fff; 1079 | color: #fff; } 1080 | 1081 | .logo--white--green, .menu .logo { 1082 | fill: #39BA91; 1083 | color: #fff; } 1084 | 1085 | .logo--sm, .menu .logo { 1086 | width: 140px; 1087 | height: 25px; } 1088 | 1089 | .logo--full { 1090 | display: block; 1091 | width: 100%; 1092 | height: auto; } 1093 | 1094 | .logo--dark { 1095 | fill: #101A25; } 1096 | 1097 | .transition, .screenchange-appear.screenchange-appear-active, .screenchange-appear.screenchange-enter-active, 1098 | .screenchange-enter.screenchange-appear-active, 1099 | .screenchange-enter.screenchange-enter-active, .screenchange-leave.screenchange-leave-active, .modal__overlay { 1100 | transition: all .2s ease-out; } 1101 | 1102 | .fade { 1103 | transition: all .2s ease-out; 1104 | opacity: 0; } 1105 | .fade.in { 1106 | opacity: 1; } 1107 | 1108 | .animation-fadein { 1109 | animation: fadein 0.4s ease-out; } 1110 | 1111 | @keyframes fadein { 1112 | 0% { 1113 | opacity: 0; } 1114 | 100% { 1115 | opacity: 1; } } 1116 | 1117 | .screenchange-appear, 1118 | .screenchange-enter { 1119 | opacity: 0.01; 1120 | transform: translate3d(100%, 0, 0); } 1121 | .screenchange-appear.screenchange-appear-active, .screenchange-appear.screenchange-enter-active, 1122 | .screenchange-enter.screenchange-appear-active, 1123 | .screenchange-enter.screenchange-enter-active { 1124 | opacity: 1; 1125 | transform: translate3d(0, 0, 0); } 1126 | 1127 | .screenchange-leave { 1128 | opacity: 1; 1129 | transform: translate3d(0, 0, 0); } 1130 | .screenchange-leave.screenchange-leave-active { 1131 | opacity: 0.01; 1132 | transform: translate3d(-100%, 0, 0); } 1133 | 1134 | .animation-slide-in-from-bottom, .modal__content { 1135 | animation: slide-in-from-bottom 0.7s cubic-bezier(0, 1.02, 0.32, 1.34); } 1136 | .animation-slide-in-from-bottom.paused, .paused.modal__content { 1137 | animation-play-state: paused; } 1138 | 1139 | @keyframes slide-in-from-bottom { 1140 | 0% { 1141 | opacity: 0; 1142 | transform: translateY(50px); } 1143 | 100% { 1144 | opacity: 1; 1145 | transform: translateY(0); } } 1146 | 1147 | .animation-slide-out-to-left { 1148 | animation: slide-out-to-left 0.2s ease-out; } 1149 | .animation-slide-out-to-left.paused { 1150 | animation-play-state: paused; } 1151 | 1152 | @keyframes slide-out-to-left { 1153 | 0% { 1154 | opacity: 0; 1155 | transform: translateX(0); } 1156 | 100% { 1157 | opacity: 1; 1158 | transform: translateX(-100%); } } 1159 | 1160 | .animation-slide-in-from-right { 1161 | animation: slide-out-to-left 0.2s ease-out; } 1162 | .animation-slide-in-from-right.paused { 1163 | animation-play-state: paused; } 1164 | 1165 | @keyframes slide-in-from-right { 1166 | 0% { 1167 | opacity: 0; 1168 | transform: translate3d(100%, 0, 0); } 1169 | 100% { 1170 | opacity: 1; 1171 | transform: translate3d(0, 0, 0); } } 1172 | 1173 | code, 1174 | kbd, 1175 | pre, 1176 | samp { 1177 | font-family: Menlo, Monaco, Consolas, "Courier New", monospace; 1178 | font-size: 0.7rem; 1179 | hyphens: none; } 1180 | 1181 | code { 1182 | padding: 2px 4px; 1183 | color: #E8EBEF; 1184 | background-color: #394552; 1185 | border-radius: 0.15rem; } 1186 | 1187 | kbd { 1188 | padding: 2px 4px; 1189 | color: #E8EBEF; 1190 | background-color: #394552; 1191 | border-radius: 0.1rem; 1192 | box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); } 1193 | kbd kbd { 1194 | padding: 0; 1195 | font-size: 100%; 1196 | font-weight: bold; 1197 | box-shadow: none; } 1198 | 1199 | pre { 1200 | display: block; 1201 | padding: 1rem; 1202 | margin: 0 0 1rem; 1203 | line-height: 1.5; 1204 | word-break: break-all; 1205 | word-wrap: break-word; 1206 | color: #E8EBEF; 1207 | background-color: #394552; 1208 | border-radius: 0.15rem; 1209 | overflow: scroll; 1210 | -webkit-overflow-scrolling: touch; 1211 | max-height: 340px; } 1212 | pre code { 1213 | padding: 0; 1214 | font-size: inherit; 1215 | color: inherit; 1216 | white-space: pre; 1217 | overflow-wrap: normal; 1218 | word-wrap: normal; 1219 | word-break: normal; 1220 | overflow: auto; 1221 | background-color: transparent; 1222 | border-radius: 0; } 1223 | 1224 | .react-syntax-highlighter-line-number { 1225 | opacity: .5; } 1226 | 1227 | .ReactModal__Body--open { 1228 | overflow: hidden; } 1229 | 1230 | .modal__overlay { 1231 | position: fixed; 1232 | left: 0; 1233 | right: 0; 1234 | top: 0; 1235 | bottom: 0; 1236 | padding-top: 4rem; 1237 | padding-bottom: 2rem; 1238 | background: rgba(68, 82, 97, 0.6); 1239 | backdrop-filter: blur(3px); 1240 | overflow-x: hidden; 1241 | overflow-y: auto; 1242 | -webkit-overflow-scrolling: touch; 1243 | display: flex; 1244 | align-items: center; 1245 | justify-content: center; } 1246 | 1247 | .modal__content { 1248 | margin: auto 2rem; 1249 | padding: 1rem; 1250 | max-width: 100%; 1251 | background: #CAD2DA; 1252 | border: 1px solid #acb9c5; 1253 | border-radius: 0.15rem; 1254 | outline: 0; } 1255 | @media (min-width: 40em) { 1256 | .modal__content { 1257 | max-width: 40em; 1258 | min-width: 20em; } } 1259 | .modal__content pre { 1260 | max-height: none; 1261 | background-color: #394552 !important; 1262 | margin-bottom: 0; 1263 | padding: 1rem !important; } 1264 | 1265 | #wrapper { 1266 | padding-left: 250px; 1267 | transition: all 0.4s ease 0s; 1268 | margin-top: 70px; } 1269 | 1270 | #sidebar-wrapper { 1271 | margin-left: -250px; 1272 | left: 250px; 1273 | width: 250px; 1274 | height: 100%; 1275 | overflow-y: auto; 1276 | z-index: 900; 1277 | transition: all 0.4s ease 0s; } 1278 | 1279 | .sidebar-nav { 1280 | position: fixed; 1281 | top: 70px; 1282 | width: 250px; 1283 | margin: 0; 1284 | padding: 2em 0; 1285 | z-index: 1100; 1286 | height: 100vh; 1287 | border-right: 2px solid #00b276; } 1288 | .sidebar-nav ul { 1289 | list-style: none; 1290 | padding: 0; } 1291 | .sidebar-nav .dropdown-menu { 1292 | overflow-y: scroll; 1293 | max-height: 50vh; } 1294 | 1295 | @media (max-width: 930px) { 1296 | #wrapper { 1297 | padding-left: 0; } 1298 | #sidebar-wrapper { 1299 | left: 0; } 1300 | #wrapper.active { 1301 | position: relative; 1302 | left: 250px; } 1303 | #wrapper.active #sidebar-wrapper { 1304 | left: 250px; 1305 | width: 250px; 1306 | transition: all 0.4s ease 0s; } } 1307 | 1308 | /** 1309 | * Colors and backgrounds 1310 | */ 1311 | .input-asset-fixed { 1312 | position: fixed; 1313 | z-index: 100; 1314 | width: 100%; 1315 | border-bottom: 2px solid #00b276 !important; } 1316 | .input-asset-fixed input { 1317 | background: #b2ffe5; } 1318 | .input-asset-fixed ::-webkit-input-placeholder { 1319 | /* WebKit, Blink, Edge */ 1320 | color: #1c00ff; } 1321 | .input-asset-fixed :-moz-placeholder { 1322 | /* Mozilla Firefox 4 to 18 */ 1323 | color: #1c00ff; 1324 | opacity: 1; } 1325 | .input-asset-fixed ::-moz-placeholder { 1326 | /* Mozilla Firefox 19+ */ 1327 | color: #1c00ff; 1328 | opacity: 1; } 1329 | .input-asset-fixed :-ms-input-placeholder { 1330 | /* Internet Explorer 10-11 */ 1331 | color: #1c00ff; } 1332 | .input-asset-fixed .inner-addon .glyphicon-input { 1333 | color: #1c00ff; } 1334 | 1335 | .input-content { 1336 | border: 1px solid rgba(0, 0, 0, 0); 1337 | background: #e5fff6; } 1338 | 1339 | .input-content-panel ::-webkit-input-placeholder { 1340 | /* WebKit, Blink, Edge */ 1341 | color: #1c00ff; } 1342 | 1343 | .input-content-panel :-moz-placeholder { 1344 | /* Mozilla Firefox 4 to 18 */ 1345 | color: #1c00ff; 1346 | opacity: 1; } 1347 | 1348 | .input-content-panel ::-moz-placeholder { 1349 | /* Mozilla Firefox 19+ */ 1350 | color: #1c00ff; 1351 | opacity: 1; } 1352 | 1353 | .input-content-panel :-ms-input-placeholder { 1354 | /* Internet Explorer 10-11 */ 1355 | color: #1c00ff; } 1356 | 1357 | .input-content-panel .inner-addon .glyphicon-input { 1358 | color: #1c00ff; } 1359 | 1360 | /* enable absolute positioning */ 1361 | .inner-addon { 1362 | position: relative; } 1363 | 1364 | /* style icon */ 1365 | .inner-addon .glyphicon-input { 1366 | position: absolute; 1367 | padding: 1em; 1368 | pointer-events: none; } 1369 | 1370 | /* align icon */ 1371 | .left-addon .glyphicon-input { 1372 | left: 0; } 1373 | 1374 | .right-addon .glyphicon-input { 1375 | right: 0; } 1376 | 1377 | /* add padding */ 1378 | .left-addon input { 1379 | padding-left: 3em; } 1380 | 1381 | .right-addon input { 1382 | padding-right: 3em; } 1383 | 1384 | #page-content-wrapper { 1385 | width: 100%; 1386 | max-width: 840px; } 1387 | 1388 | .page-content { 1389 | padding: 0 1em; 1390 | padding-bottom: 5em; 1391 | padding-top: 1em; } 1392 | 1393 | .content-text { 1394 | margin-top: 2em; 1395 | text-align: center; } 1396 | 1397 | .hero, 1398 | .page--result { 1399 | background-color: #EEE; } 1400 | 1401 | .logo-brand > span:first-of-type { 1402 | font-weight: 700; } 1403 | 1404 | .navbar-fixed-bottom { 1405 | margin-left: 250px; } 1406 | 1407 | @media (max-width: 930px) { 1408 | .navbar-fixed-bottom { 1409 | margin-left: 0; } } 1410 | 1411 | /** 1412 | * Layout 1413 | */ 1414 | .row { 1415 | max-width: 100%; 1416 | margin-left: auto; 1417 | margin-right: auto; } 1418 | 1419 | .row--wide { 1420 | max-width: 900px; 1421 | margin-left: auto; 1422 | margin-right: auto; } 1423 | 1424 | .row--narrow { 1425 | max-width: 28.57143em; } 1426 | 1427 | .vertical-align-outer { 1428 | position: absolute; 1429 | display: table; 1430 | width: 100%; 1431 | height: 100%; } 1432 | 1433 | .vertical-align-inner { 1434 | display: table-cell; 1435 | vertical-align: middle; } 1436 | 1437 | #app-container { 1438 | margin-top: 50vh; 1439 | text-align: center; } 1440 | 1441 | .content-header-wrapper { 1442 | width: 100%; } 1443 | 1444 | .content-header { 1445 | width: 100%; 1446 | max-width: 1100px; 1447 | position: fixed; 1448 | height: 70px; 1449 | box-shadow: 0 2px 2px -2px rgba(0, 0, 0, 0.5); 1450 | z-index: 1200; } 1451 | 1452 | /** 1453 | * Colors and backgrounds 1454 | */ 1455 | /*79589F*/ 1456 | /** 1457 | * Sizes 1458 | */ 1459 | html, 1460 | body, 1461 | .app, 1462 | .app > div, 1463 | .app > div > div, 1464 | .app__content { 1465 | margin: 0px !important; } 1466 | 1467 | body { 1468 | background: #445261; 1469 | color: #CAD2DA; 1470 | position: relative; } 1471 | 1472 | h1, 1473 | h2 { 1474 | color: #CAD2DA; } 1475 | 1476 | h2 { 1477 | text-align: left; } 1478 | 1479 | .app__content { 1480 | padding-bottom: 150px; } 1481 | 1482 | .row--wide { 1483 | max-width: 1200px; } 1484 | 1485 | .section p { 1486 | text-align: justify; } 1487 | 1488 | .table-tutorial__wrapper { 1489 | margin: 1em 0; } 1490 | 1491 | .table-tutorial { 1492 | margin: auto; 1493 | border-collapse: collapse; 1494 | border: 1px solid #39BA91; } 1495 | .table-tutorial thead { 1496 | font-size: 1.2em; 1497 | color: #39BA91; 1498 | border-bottom: 1px solid; } 1499 | .table-tutorial tr:first-child td { 1500 | border-right: 1px solid #39BA91; } 1501 | .table-tutorial td { 1502 | border-right: 1px solid #39BA91; 1503 | padding: .5em; } 1504 | 1505 | .logo--github { 1506 | fill: #CAD2DA; } 1507 | 1508 | .logo-xs svg { 1509 | width: 1rem; 1510 | height: 1rem; } 1511 | 1512 | .logo-md svg { 1513 | width: 1.5rem; 1514 | height: 1.5rem; } 1515 | 1516 | .menu--main .logo--github { 1517 | fill: #445261; 1518 | cursor: pointer; } 1519 | 1520 | .logo-circle--wrapper { 1521 | margin: 1em; } 1522 | 1523 | .logo--home { 1524 | fill: #CAD2DA; 1525 | cursor: pointer; } 1526 | 1527 | .img-wrapper { 1528 | text-align: center; 1529 | position: absolute; 1530 | bottom: 3em; } 1531 | .img-wrapper img:hover { 1532 | opacity: .2; 1533 | transition: opacity .2s ease-in-out; } 1534 | 1535 | .hidden { 1536 | display: none; } 1537 | 1538 | footer { 1539 | position: absolute; 1540 | right: 0; 1541 | bottom: 0; 1542 | left: 0; 1543 | padding: 1rem; 1544 | border-top: 1px solid #445261; 1545 | background-color: #394552; 1546 | color: #9dabba; 1547 | text-align: center; } 1548 | 1549 | /** 1550 | * Colors and backgrounds 1551 | */ 1552 | /*79589F*/ 1553 | /** 1554 | * Sizes 1555 | */ 1556 | .menu { 1557 | background: #CAD2DA; 1558 | padding-left: 5px; 1559 | padding-right: 10px; } 1560 | 1561 | .menu .menu-logo { 1562 | fill: #39BA91; 1563 | color: #445261; 1564 | width: 140px; 1565 | height: 25px; 1566 | position: absolute; 1567 | top: 16px; } 1568 | 1569 | .menu .active.menu__links .label { 1570 | border-bottom: 2px solid #445261; } 1571 | 1572 | .menu .active.menu__links .number { 1573 | color: white; } 1574 | 1575 | .menu .menu__links { 1576 | color: #445261; 1577 | padding: 0px 10px 0px 5px; 1578 | display: inline-block; } 1579 | .menu .menu__links .number { 1580 | text-align: center; 1581 | display: inline-block; 1582 | width: 1rem; 1583 | height: 1rem; 1584 | border-radius: 50%; 1585 | font-size: .65rem; 1586 | vertical-align: .1rem; 1587 | background: #445261; 1588 | color: #9dabba; 1589 | font-weight: 600; 1590 | line-height: 1rem; } 1591 | 1592 | .menu .menu__links.checked { 1593 | color: #388250; } 1594 | .menu .menu__links.checked .number { 1595 | background-color: #388250; 1596 | color: #fff; } 1597 | 1598 | .exampleHolder { 1599 | display: flex; 1600 | flex-wrap: wrap; } 1601 | .exampleHolder .sideHolder { 1602 | width: 50%; } 1603 | @media (max-width: 700px) { 1604 | .exampleHolder .sideHolder { 1605 | width: 100%; } } 1606 | 1607 | /** 1608 | * Colors and backgrounds 1609 | */ 1610 | /*79589F*/ 1611 | /** 1612 | * Sizes 1613 | */ 1614 | .code-example { 1615 | max-width: 700px; 1616 | margin: 0 auto; } 1617 | 1618 | .code-output { 1619 | position: relative; 1620 | text-align: left; 1621 | margin: 45px; } 1622 | .code-output pre { 1623 | overflow: auto; 1624 | height: 100%; 1625 | border: 1px solid #39BA91; } 1626 | .code-output pre code { 1627 | white-space: pre-wrap; } 1628 | .code-output .error { 1629 | border: 1px solid #c9726a; } 1630 | .code-output a { 1631 | position: absolute; 1632 | bottom: 0; 1633 | z-index: 1; } 1634 | 1635 | .code-example__header { 1636 | text-align: left; 1637 | margin: 1rem 0; 1638 | border-bottom: 2px solid #9dabba; } 1639 | 1640 | .code-example__body { 1641 | padding: 1em; 1642 | text-align: left; } 1643 | .code-example__body pre { 1644 | background: #445261; 1645 | overflow: auto; 1646 | padding: 0; 1647 | max-height: 400px; } 1648 | .code-example__body .c { 1649 | color: #E8EBEF; } 1650 | .code-example__body .ci { 1651 | color: #E8EBEF; 1652 | padding-left: 25px; } 1653 | .code-example__body .ci2 { 1654 | color: #E8EBEF; 1655 | padding-left: 50px; } 1656 | .code-example__body .comment { 1657 | color: #39BA91; } 1658 | 1659 | .code--highlight { 1660 | background: #394552; 1661 | color: white; 1662 | padding: .5em; 1663 | font-size: .8em; 1664 | border: 1px solid #39BA91; } 1665 | 1666 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | 3 | services: 4 | 5 | mongodb: 6 | image: mongo:3.6 7 | ports: 8 | - "27017" 9 | command: mongod 10 | 11 | bigchaindb: 12 | depends_on: 13 | - mongodb 14 | - tendermint 15 | image: bigchaindb/bigchaindb:master 16 | environment: 17 | BIGCHAINDB_DATABASE_HOST: mongodb 18 | BIGCHAINDB_DATABASE_PORT: 27017 19 | BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984 20 | BIGCHAINDB_WSSERVER_HOST: 0.0.0.0 21 | BIGCHAINDB_TENDERMINT_HOST: tendermint 22 | BIGCHAINDB_TENDERMINT_PORT: 26657 23 | ports: 24 | - "9984:9984" 25 | - "9985:9985" 26 | - "26658" 27 | healthcheck: 28 | test: ["CMD", "bash", "-c", "curl http://bigchaindb:9984 && curl http://tendermint:26657/abci_query"] 29 | interval: 3s 30 | timeout: 5s 31 | retries: 3 32 | command: -l DEBUG start 33 | 34 | tendermint: 35 | image: tendermint/tendermint:0.22.3 36 | entrypoint: '' 37 | ports: 38 | - "26656" 39 | - "26657" 40 | command: sh -c "tendermint init && tendermint node --consensus.create_empty_blocks=false --proxy_app=tcp://bigchaindb:26658" 41 | 42 | client: 43 | build: 44 | context: ./ 45 | dockerfile: ./Dockerfile 46 | ports: 47 | - 80:80 48 | -------------------------------------------------------------------------------- /media/repo-banner@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/media/repo-banner@2x.png -------------------------------------------------------------------------------- /media/repo-banner@2x.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/media/repo-banner@2x.sketch -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | events { 2 | 3 | } 4 | http { 5 | error_log /dev/stdout info; 6 | access_log /dev/stdout; 7 | include mime.types; 8 | server { 9 | listen 80 default_server; 10 | server_name _; 11 | root /app/dist; 12 | location /crab/public { 13 | alias /app/dist/public; 14 | } 15 | location /crab { 16 | alias /app/dist; 17 | index index.html; 18 | try_files $uri /index.html; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bigchaindb-tutorial", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "webpack --mode development", 8 | "build": "webpack --mode production", 9 | "production": "NODE_ENV=production webpack --mode production", 10 | "serve": "webpack-dev-server --host 0.0.0.0" 11 | }, 12 | "author": "", 13 | "license": "ISC", 14 | "dependencies": { 15 | "bigchaindb-orm": "^3.0.1", 16 | "bip39": "^2.5.0", 17 | "classnames": "^2.2.5", 18 | "dotenv-webpack": "^1.5.4", 19 | "react": "^16.4.1", 20 | "react-dom": "^16.4.1", 21 | "react-router-dom": "^4.3.1", 22 | "react-syntax-highlighter": "^7.0.4" 23 | }, 24 | "devDependencies": { 25 | "@babel/core": "^7.0.0-beta.51", 26 | "@babel/preset-env": "^7.0.0-beta.51", 27 | "@babel/preset-react": "^7.0.0-beta.51", 28 | "babel-cli": "^6.26.0", 29 | "babel-loader": "^8.0.0-beta.4", 30 | "babel-plugin-react-css-modules": "^3.4.2", 31 | "css-loader": "^0.28.11", 32 | "file-loader": "^1.1.11", 33 | "image-webpack-loader": "^4.3.1", 34 | "jsx": "^0.9.89", 35 | "mini-css-extract-plugin": "^0.4.1", 36 | "node-sass": "^4.9.0", 37 | "sass-loader": "^7.0.3", 38 | "stylelint-config-bigchaindb": "^1.1.3", 39 | "stylelint-config-standard": "^17.0.0", 40 | "webpack": "^4.14.0", 41 | "webpack-cli": "^3.0.8", 42 | "webpack-dev-server": "^3.1.4", 43 | "html-webpack-plugin": "^3.2.0" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /public/img/0446455ec9abf92713b955a3332a77cb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/public/img/0446455ec9abf92713b955a3332a77cb.png -------------------------------------------------------------------------------- /public/img/09f2865dd7e1c6e3813ef4586211960e.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/public/img/09f2865dd7e1c6e3813ef4586211960e.gif -------------------------------------------------------------------------------- /public/img/2f257980b243711d9f2b338cd837de84.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/public/img/2f257980b243711d9f2b338cd837de84.gif -------------------------------------------------------------------------------- /public/img/8cdd213b0f845e18df6dd221e2707291.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/public/img/8cdd213b0f845e18df6dd221e2707291.png -------------------------------------------------------------------------------- /public/img/c2dc07db85fa20cb71725b5e36d053be.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/public/img/c2dc07db85fa20cb71725b5e36d053be.gif -------------------------------------------------------------------------------- /public/styles.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{font-size:18px;-webkit-tap-highlight-color:rgba(0,0,0,0)}@media (min-width:85em){html{font-size:20px}}body{font-family:europa,Avenir Next,Avenir,Helvetica Neue,Helvetica,Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#445261;background-color:#e8ebef;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-font-feature-settings:"liga","kern";font-feature-settings:"kern" 1,"liga" 1,"calt" 1,"pnum" 1,"tnum" 0,"onum" 0,"lnum" 0,"dlig" 1}a{color:#39ba91;text-decoration:none;transition:.2s ease-out}a:focus,a:hover{color:#5acca8;outline:0}a .icon{stroke:#39ba91}.h1,.h2,.h3,.h4,.h5,.h6,.menu__title,h1,h2,h3,h4,h5,h6{font-family:inherit;line-height:1.2;color:#074354;font-feature-settings:"kern" 1,"liga" 1,"calt" 1,"pnum" 1,"tnum" 0,"onum" 0,"lnum" 0,"dlig" 1}.wf-loading .h1,.wf-loading .h2,.wf-loading .h3,.wf-loading .h4,.wf-loading .h5,.wf-loading .h6,.wf-loading .menu__title,.wf-loading h1,.wf-loading h2,.wf-loading h3,.wf-loading h4,.wf-loading h5,.wf-loading h6{font-weight:400}.h1,.h2,.h3,.h4,.h5,.h6,.menu__title,.wf-active .h1,.wf-active .h2,.wf-active .h3,.wf-active .h4,.wf-active .h5,.wf-active .h6,.wf-active .menu__title,.wf-active h1,.wf-active h2,.wf-active h3,.wf-active h4,.wf-active h5,.wf-active h6,.wf-inactive .h1,.wf-inactive .h2,.wf-inactive .h3,.wf-inactive .h4,.wf-inactive .h5,.wf-inactive .h6,.wf-inactive .menu__title,.wf-inactive h1,.wf-inactive h2,.wf-inactive h3,.wf-inactive h4,.wf-inactive h5,.wf-inactive h6,h1,h2,h3,h4,h5,h6{font-weight:300}.h1,.h2,.h3,h1,h2,h3{margin-top:2rem;margin-bottom:2rem}.h4,.h5,.h6,.menu__title,h4,h5,h6{margin-top:1rem;margin-bottom:1rem}.h5,.h6,.wf-active .h5,.wf-active .h6,.wf-active h5,.wf-active h6,.wf-inactive .h5,.wf-inactive .h6,.wf-inactive h5,.wf-inactive h6,h5,h6{font-weight:400}.h1,h1{font-size:2.7rem}.h2,h2{font-size:2.3rem}.h3,h3{font-size:1.8rem}.h4,.menu__title,h4{font-size:1.45rem}.h5,h5{font-size:1.3rem}.h6,h6{font-size:1rem}p{margin:0 0 1rem}.small,small{font-size:.85rem;font-weight:400}.mini{font-size:.7rem;font-weight:400}.large{font-size:1.3rem}.bold,.strong,strong{font-weight:600}.italic,em{font-style:italic}.light{font-weight:300}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-dimmed{color:#9dabba}.lead{font-size:1.3rem;color:#074354;line-height:1.33333}.app,.app>div,.app>div>div,.app__content,body,html{margin:0 0 1em;padding:0;width:100%}.app__content{padding-top:3rem}*,:after,:before{box-sizing:border-box}.grid{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}.grid__col{flex:1;min-height:0;min-width:0}.row{max-width:calc(50em - 4rem);padding-left:1rem;padding-right:1rem}@media (min-width:40em){.row{padding-left:2rem;padding-right:2rem}}.row--wide{max-width:70rem}.grid--top{align-items:flex-start}.grid--bottom{align-items:flex-end}.grid--center{align-items:center}.grid--justifycenter{justify-content:center}.grid__col--top{align-self:flex-start}.grid__col--bottom{align-self:flex-end}.grid__col--center{align-self:center}.grid--gutters{margin:-2rem 0 2rem -2rem}.grid--gutters>.grid__col{padding:2rem 0 0 2rem}@media (min-width:40em){.grid-small--gutters{margin:-2rem 0 2rem -2rem}.grid-small--gutters>.grid__col{padding:2rem 0 0 2rem}}@media (min-width:50em){.grid-medium--gutters{margin:-2rem 0 2rem -2rem}.grid-medium--gutters>.grid__col{padding:2rem 0 0 2rem}}@media (min-width:85em){.grid-large--gutters{margin:-2rem 0 2rem -2rem}.grid-large--gutters>.grid__col{padding:2rem 0 0 2rem}}.grid--fit>.grid__col{flex:1}.grid--full>.grid__col{flex:0 0 100%}.grid--third>.grid__col{flex:0 0 33.3%}.grid--half>.grid__col{flex:0 0 50%;max-width:50%}.grid--columns>.grid__col{max-width:none}.grid--columns>.grid__col.grid__col--1{flex:0 0 16%}.grid--columns>.grid__col.grid__col--2{flex:0 0 33.3%}.grid--columns>.grid__col.grid__col--3{flex:0 0 50%}.grid--columns>.grid__col.grid__col--4{flex:0 0 66.6%}.grid--columns>.grid__col.grid__col--5{flex:0 0 84%}.grid--columns>.grid__col.grid__col--6{flex:0 0 100%}@media (min-width:40em){.grid-small--columns>.grid__col{max-width:none}.grid-small--columns>.grid__col.grid__col--1{flex:0 0 16%}.grid-small--columns>.grid__col.grid__col--2{flex:0 0 33.3%}.grid-small--columns>.grid__col.grid__col--3{flex:0 0 50%}.grid-small--columns>.grid__col.grid__col--4{flex:0 0 66.6%}.grid-small--columns>.grid__col.grid__col--5{flex:0 0 84%}.grid-small--columns>.grid__col.grid__col--6{flex:0 0 100%}.grid-small--fit>.grid__col{flex:1}.grid-small--full>.grid__col{flex:0 0 100%}.grid-small--third>.grid__col{flex:0 0 33.3%}.grid-small--half>.grid__col{flex:0 0 50%;max-width:50%}}@media (min-width:50em){.grid-medium--columns>.grid__col{max-width:none}.grid-medium--columns>.grid__col.grid__col--1{flex:0 0 16%}.grid-medium--columns>.grid__col.grid__col--2{flex:0 0 33.3%}.grid-medium--columns>.grid__col.grid__col--3{flex:0 0 50%}.grid-medium--columns>.grid__col.grid__col--4{flex:0 0 66.6%}.grid-medium--columns>.grid__col.grid__col--5{flex:0 0 84%}.grid-medium--columns>.grid__col.grid__col--6{flex:0 0 100%}.grid-medium--fit>.grid__col{flex:1}.grid-medium--full>.grid__col{flex:0 0 100%}.grid-medium--third>.grid__col{flex:0 0 33.3%}.grid-medium--half>.grid__col{flex:0 0 50%;max-width:50%}}@media (min-width:85em){.grid-large--columns>.grid__col{max-width:none}.grid-large--columns>.grid__col.grid__col--1{flex:0 0 16%}.grid-large--columns>.grid__col.grid__col--2{flex:0 0 33.3%}.grid-large--columns>.grid__col.grid__col--3{flex:0 0 50%}.grid-large--columns>.grid__col.grid__col--4{flex:0 0 66.6%}.grid-large--columns>.grid__col.grid__col--5{flex:0 0 84%}.grid-large--columns>.grid__col.grid__col--6{flex:0 0 100%}.grid-large--fit>.grid__col{flex:1}.grid-large--full>.grid__col{flex:0 0 100%}.grid-large--third>.grid__col{flex:0 0 33.3%}.grid-large--half>.grid__col{flex:0 0 50%;max-width:50%}}.menu{background:rgba(16,26,37,.75);backdrop-filter:saturate(150%) blur(10px);padding-left:2rem;padding-right:2rem;display:flex;align-items:center;justify-content:space-between;position:fixed;width:100%;z-index:1;min-height:3rem}.menu .logo,.menu__link,.menu__title{flex-basis:33.33333%}.menu__link,.menu__title{font-size:.85rem}.menu .logo{margin-right:-1rem}.menu__link{padding-top:.5rem;padding-bottom:.5rem;display:inline-block;transition:.2s ease-out;opacity:.8}.menu__link .icon{stroke-width:2;width:.7rem;height:.7rem;margin-right:.25rem}.menu__link:hover{opacity:1}.menu__title{margin:0;color:#fff;text-align:right}.icon{fill:none;stroke:#074354;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;width:1rem;height:1rem}.button{display:inline-block;font-family:inherit;font-weight:600;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border:none;box-shadow:none;transition:.2s ease-out;padding:.5rem 2rem;font-size:1rem;line-height:1.5;border-radius:.15rem}.button:focus,.button:hover{box-shadow:0 1px 4px rgba(16,26,37,.4);transform:translateY(-1px);outline:0}.button.active,.button:active{background-image:none;outline:0;transform:translateY(0);box-shadow:0 1px 2px rgba(16,26,37,.3)}.button.disabled,.button:disabled{opacity:.45;box-shadow:none;cursor:not-allowed;pointer-events:none}.button .icon{width:1rem;height:1rem;margin-right:.25rem;margin-bottom:-1px}a.button.disabled,fieldset[disabled] a.btn{pointer-events:none}.button--primary{color:#074354!important;background:#39ba91}.button--primary:focus,.button--primary:hover{color:#074354!important;background-color:#46c69e}.button--primary:active{color:#074354!important;background:#37b28b;transition:none}.button--primary.disabled:focus,.button--primary:disabled:focus{background-color:#39ba91}.button--primary .icon{fill:#074354}.button--secondary{color:#074354!important;background:#9dabba}.button--secondary:focus,.button--secondary:hover{color:#074354!important;background-color:#acb8c5}.button--secondary:active{color:#074354!important;background:#97a6b6;transition:none}.button--secondary.disabled:focus,.button--secondary:disabled:focus{background-color:#9dabba}.button--secondary .icon{fill:#074354}.button--blue{color:#39ba91!important;background:#074354}.button--blue:focus,.button--blue:hover{color:#39ba91!important;background-color:#09566c}.button--blue:active{color:#39ba91!important;background:#063b4b;transition:none}.button--blue.disabled:focus,.button--blue:disabled:focus{background-color:#074354}.button--blue .icon{fill:#39ba91}.button--violet{color:#074354!important;background:#b581cf}.button--violet:focus,.button--violet:hover{color:#074354!important;background-color:#c093d6}.button--violet:active{color:#074354!important;background:#b17acc;transition:none}.button--violet.disabled:focus,.button--violet:disabled:focus{background-color:#b581cf}.button--violet .icon{fill:#074354}.button--info{color:#fff!important;background:#3e91ce}.button--info:focus,.button--info:hover{color:#fff!important;background-color:#529dd3}.button--info:active{color:#fff!important;background:#368ccc;transition:none}.button--info.disabled:focus,.button--info:disabled:focus{background-color:#3e91ce}.button--info .icon{fill:#fff}.button--success{color:#fff!important;background:#388250}.button--success:focus,.button--success:hover{color:#fff!important;background-color:#40945b}.button--success:active{color:#fff!important;background:#357b4c;transition:none}.button--success.disabled:focus,.button--success:disabled:focus{background-color:#388250}.button--success .icon{fill:#fff}.button--warning{color:#fff!important;background:#8e8e24}.button--warning:focus,.button--warning:hover{color:#fff!important;background-color:#a2a229}.button--warning:active{color:#fff!important;background:#868622;transition:none}.button--warning.disabled:focus,.button--warning:disabled:focus{background-color:#8e8e24}.button--warning .icon{fill:#fff}.button--danger{color:#fff!important;background:#c9726a}.button--danger:focus,.button--danger:hover{color:#fff!important;background-color:#d0847d}.button--danger:active{color:#fff!important;background:#c66b63;transition:none}.button--danger.disabled:focus,.button--danger:disabled:focus{background-color:#c9726a}.button--danger .icon{fill:#fff}.button--link{font-weight:400;color:#39ba91;border-radius:0}.button--link,.button--link.active,.button--link:active,.button--link:disabled{background-color:transparent;box-shadow:none}.button--link,.button--link:active,.button--link:focus,.button--link:hover{border-color:transparent;box-shadow:none;background:none}.button--lg{padding:1rem 3rem;font-size:1.3rem;line-height:1.33333;border-radius:.2rem}.button--lg .icon{width:1.3rem;height:1.3rem}.button--sm{padding:.4rem 1.25rem;font-size:.85rem;line-height:1.3;border-radius:.1rem}.button--sm .icon{width:.85rem;height:.85rem}.button--xs{padding:.15rem .75rem;font-size:.7rem;line-height:1.2;border-radius:.1rem}.button--xs .icon{width:.7rem;height:.7rem}.button-block{display:block;width:100%}.button-block+.button-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.form{padding:1rem;background:#9dabba;border-radius:.15rem;margin-bottom:1rem}@media (min-width:40em){.form{padding:2rem 2.5rem}}.form__control{display:block;width:100%;appearance:none;padding:.5rem 0;font-family:inherit;font-weight:600;font-size:1rem;line-height:1.5;color:#394552;text-align:left;background:none;border:none;border-bottom:2px solid #445261;border-radius:0;transition:.2s ease-out}.form__control:focus{outline:0;border-color:#394552}.form__control::placeholder{color:#445261;opacity:1}.form__control:disabled,.form__control[readonly]{background-color:#394552;opacity:1}.form__control:disabled{cursor:disabled}.form__label{position:absolute;top:.5rem;left:0;right:0;transition:.15s ease-out;user-select:none;cursor:text;font-family:inherit;font-weight:400;font-size:1rem;line-height:1.5;color:#445261;text-align:left;transform-origin:left}.form__control:focus~.form__label{transform:translate3d(0,-1.16667rem,0) scale(.7);color:#394552}.form__group{margin-bottom:1rem;position:relative;margin-top:1rem}.form__group:last-of-type{margin-bottom:0}.form__group:last-of-type .btn{margin-top:1rem}.logo{fill:#39ba91;color:#074354;width:300px;height:60px;display:block}.logo--white{fill:#fff;color:#fff}.logo--white--green,.menu .logo{fill:#39ba91;color:#fff}.logo--sm,.menu .logo{width:140px;height:25px}.logo--full{display:block;width:100%;height:auto}.logo--dark{fill:#101a25}.fade,.modal__overlay,.screenchange-appear.screenchange-appear-active,.screenchange-appear.screenchange-enter-active,.screenchange-enter.screenchange-appear-active,.screenchange-enter.screenchange-enter-active,.screenchange-leave.screenchange-leave-active,.transition{transition:all .2s ease-out}.fade{opacity:0}.fade.in{opacity:1}.animation-fadein{animation:fadein .4s ease-out}@keyframes fadein{0%{opacity:0}to{opacity:1}}.screenchange-appear,.screenchange-enter{opacity:.01;transform:translate3d(100%,0,0)}.screenchange-appear.screenchange-appear-active,.screenchange-appear.screenchange-enter-active,.screenchange-enter.screenchange-appear-active,.screenchange-enter.screenchange-enter-active,.screenchange-leave{opacity:1;transform:translateZ(0)}.screenchange-leave.screenchange-leave-active{opacity:.01;transform:translate3d(-100%,0,0)}.animation-slide-in-from-bottom,.modal__content{animation:slide-in-from-bottom .7s cubic-bezier(0,1.02,.32,1.34)}.animation-slide-in-from-bottom.paused,.paused.modal__content{animation-play-state:paused}@keyframes slide-in-from-bottom{0%{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}.animation-slide-out-to-left{animation:slide-out-to-left .2s ease-out}.animation-slide-out-to-left.paused{animation-play-state:paused}@keyframes slide-out-to-left{0%{opacity:0;transform:translateX(0)}to{opacity:1;transform:translateX(-100%)}}.animation-slide-in-from-right{animation:slide-out-to-left .2s ease-out}.animation-slide-in-from-right.paused{animation-play-state:paused}@keyframes slide-in-from-right{0%{opacity:0;transform:translate3d(100%,0,0)}to{opacity:1;transform:translateZ(0)}}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace;font-size:.7rem;hyphens:none}code{border-radius:.15rem}code,kbd{padding:2px 4px;color:#e8ebef;background-color:#394552}kbd{border-radius:.1rem;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:1rem;margin:0 0 1rem;line-height:1.5;word-break:break-all;word-wrap:break-word;color:#e8ebef;background-color:#394552;border-radius:.15rem;overflow:scroll;-webkit-overflow-scrolling:touch;max-height:340px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre;overflow-wrap:normal;word-wrap:normal;word-break:normal;overflow:auto;background-color:transparent;border-radius:0}.react-syntax-highlighter-line-number{opacity:.5}.ReactModal__Body--open{overflow:hidden}.modal__overlay{position:fixed;left:0;right:0;top:0;bottom:0;padding-top:4rem;padding-bottom:2rem;background:rgba(68,82,97,.6);backdrop-filter:blur(3px);overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;display:flex;align-items:center;justify-content:center}.modal__content{margin:auto 2rem;padding:1rem;max-width:100%;background:#cad2da;border:1px solid #acb9c5;border-radius:.15rem;outline:0}@media (min-width:40em){.modal__content{max-width:40em;min-width:20em}}.modal__content pre{max-height:none;background-color:#394552!important;margin-bottom:0;padding:1rem!important}#wrapper{padding-left:250px;margin-top:70px}#sidebar-wrapper,#wrapper{transition:all .4s ease 0s}#sidebar-wrapper{margin-left:-250px;left:250px;width:250px;height:100%;overflow-y:auto;z-index:900}.sidebar-nav{position:fixed;top:70px;width:250px;margin:0;padding:2em 0;z-index:1100;height:100vh;border-right:2px solid #00b276}.sidebar-nav ul{list-style:none;padding:0}.sidebar-nav .dropdown-menu{overflow-y:scroll;max-height:50vh}@media (max-width:930px){#wrapper{padding-left:0}#sidebar-wrapper{left:0}#wrapper.active{position:relative;left:250px}#wrapper.active #sidebar-wrapper{left:250px;width:250px;transition:all .4s ease 0s}}.input-asset-fixed{position:fixed;z-index:100;width:100%;border-bottom:2px solid #00b276!important}.input-asset-fixed input{background:#b2ffe5}.input-asset-fixed ::-webkit-input-placeholder{color:#1c00ff}.input-asset-fixed :-moz-placeholder,.input-asset-fixed ::-moz-placeholder{color:#1c00ff;opacity:1}.input-asset-fixed :-ms-input-placeholder{color:#1c00ff}.input-asset-fixed .inner-addon .glyphicon-input{color:#1c00ff}.input-content{border:1px solid transparent;background:#e5fff6}.input-content-panel ::-webkit-input-placeholder{color:#1c00ff}.input-content-panel :-moz-placeholder,.input-content-panel ::-moz-placeholder{color:#1c00ff;opacity:1}.input-content-panel :-ms-input-placeholder{color:#1c00ff}.input-content-panel .inner-addon .glyphicon-input{color:#1c00ff}.inner-addon{position:relative}.inner-addon .glyphicon-input{position:absolute;padding:1em;pointer-events:none}.left-addon .glyphicon-input{left:0}.right-addon .glyphicon-input{right:0}.left-addon input{padding-left:3em}.right-addon input{padding-right:3em}#page-content-wrapper{width:100%;max-width:840px}.page-content{padding:0 1em;padding-bottom:5em;padding-top:1em}.content-text{margin-top:2em;text-align:center}.hero,.page--result{background-color:#eee}.logo-brand>span:first-of-type{font-weight:700}.navbar-fixed-bottom{margin-left:250px}@media (max-width:930px){.navbar-fixed-bottom{margin-left:0}}.row{max-width:100%}.row,.row--wide{margin-left:auto;margin-right:auto}.row--wide{max-width:900px}.row--narrow{max-width:28.57143em}.vertical-align-outer{position:absolute;display:table;width:100%;height:100%}.vertical-align-inner{display:table-cell;vertical-align:middle}#app-container{margin-top:50vh;text-align:center}.content-header-wrapper{width:100%}.content-header{width:100%;max-width:1100px;position:fixed;height:70px;box-shadow:0 2px 2px -2px rgba(0,0,0,.5);z-index:1200}.app,.app>div,.app>div>div,.app__content,body,html{margin:0!important}body{background:#445261;position:relative}body,h1,h2{color:#cad2da}h2{text-align:left}.app__content{padding-bottom:150px}.row--wide{max-width:1200px}.section p{text-align:justify}.table-tutorial__wrapper{margin:1em 0}.table-tutorial{margin:auto;border-collapse:collapse;border:1px solid #39ba91}.table-tutorial thead{font-size:1.2em;color:#39ba91;border-bottom:1px solid}.table-tutorial td,.table-tutorial tr:first-child td{border-right:1px solid #39ba91}.table-tutorial td{padding:.5em}.logo--github{fill:#cad2da}.logo-xs svg{width:1rem;height:1rem}.logo-md svg{width:1.5rem;height:1.5rem}.menu--main .logo--github{fill:#445261;cursor:pointer}.logo-circle--wrapper{margin:1em}.logo--home{fill:#cad2da;cursor:pointer}.img-wrapper{text-align:center;position:absolute;bottom:3em}.img-wrapper img:hover{opacity:.2;transition:opacity .2s ease-in-out}.hidden{display:none}footer{position:absolute;right:0;bottom:0;left:0;padding:1rem;border-top:1px solid #445261;background-color:#394552;color:#9dabba;text-align:center}.menu{background:#cad2da;padding-left:5px;padding-right:10px}.menu .menu-logo{fill:#39ba91;color:#445261;width:140px;height:25px;position:absolute;top:16px}.menu .active.menu__links .label{border-bottom:2px solid #445261}.menu .active.menu__links .number{color:#fff}.menu .menu__links{color:#445261;padding:0 10px 0 5px;display:inline-block}.menu .menu__links .number{text-align:center;display:inline-block;width:1rem;height:1rem;border-radius:50%;font-size:.65rem;vertical-align:.1rem;background:#445261;color:#9dabba;font-weight:600;line-height:1rem}.menu .menu__links.checked{color:#388250}.menu .menu__links.checked .number{background-color:#388250;color:#fff}.exampleHolder{display:flex;flex-wrap:wrap}.exampleHolder .sideHolder{width:50%}@media (max-width:700px){.exampleHolder .sideHolder{width:100%}}.code-example{max-width:700px;margin:0 auto}.code-output{position:relative;text-align:left;margin:45px}.code-output pre{overflow:auto;height:100%;border:1px solid #39ba91}.code-output pre code{white-space:pre-wrap}.code-output .error{border:1px solid #c9726a}.code-output a{position:absolute;bottom:0;z-index:1}.code-example__header{text-align:left;margin:1rem 0;border-bottom:2px solid #9dabba}.code-example__body{padding:1em;text-align:left}.code-example__body pre{background:#445261;overflow:auto;padding:0;max-height:400px}.code-example__body .c{color:#e8ebef}.code-example__body .ci{color:#e8ebef;padding-left:25px}.code-example__body .ci2{color:#e8ebef;padding-left:50px}.code-example__body .comment{color:#39ba91}.code--highlight{background:#394552;color:#fff;padding:.5em;font-size:.8em;border:1px solid #39ba91} -------------------------------------------------------------------------------- /src/app/components/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { BrowserRouter as Router, Route, Link, Redirect } from 'react-router-dom' 3 | 4 | import ScrollToTop from './ScrollToTop' 5 | import Home from './Home' 6 | import Create from './Create' 7 | import Retrieve from './Retrieve' 8 | import Append from './Append' 9 | import Burn from './Burn' 10 | 11 | import Steps from './Steps' 12 | import Footer from './Footer' 13 | 14 | const App = () => ( 15 |
16 | window.scrollTo(0, 0)} basename={'/crab'}> 17 |
18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 | 34 |
35 |
36 |
37 |
38 | ) 39 | 40 | export default App 41 | -------------------------------------------------------------------------------- /src/app/components/Append.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Link } from 'react-router-dom' 3 | 4 | import TutorialStep from './TutorialStep' 5 | import Code from './Code' 6 | import Output from './Output' 7 | 8 | import getErrorMessage from '../getErrorMessage' 9 | import bdborm from '../initdb' 10 | 11 | import Loading from '../img/loading.gif' 12 | 13 | class Append extends TutorialStep { 14 | constructor(props) { 15 | super(props) 16 | this.appendCrab = this.appendCrab.bind(this) 17 | } 18 | appendCrab() { 19 | if (this.state.loading === true) { 20 | return 21 | } 22 | this.setState({ 23 | loading: true, 24 | output: null, 25 | error: null, 26 | }) 27 | 28 | bdborm.models.crab 29 | .retrieve(this.state.crab.id) 30 | .then(crabs => { 31 | if (crabs.length) { 32 | return crabs[0].append({ 33 | toPublicKey: this.state.keypair.publicKey, 34 | keypair: this.state.keypair, 35 | data: { color: 'red' } 36 | }) 37 | } 38 | }) 39 | .then((appendedCrab) => { 40 | this.setState({ 41 | loading: false, 42 | output: JSON.stringify(appendedCrab.data, null, 2) 43 | }) 44 | }) 45 | .catch(err => { 46 | getErrorMessage(err).then((errMessage) => { 47 | this.setState({ 48 | loading: false, 49 | error: errMessage 50 | }) 51 | }) 52 | }) 53 | } 54 | render() { 55 | return ( 56 |
57 |
58 |
59 |
60 |

Append/Update

61 |

62 | Since blockchains do not allow tampering with the past data, 63 | it is not possible to update an existing value by overwriting it. 64 | The way to go is to .append(update) the update to the asset. 65 | This will trigger a TRANSFER transaction with the update attached as 66 | data. For a simple update without ownership change, you can simply 67 | use your own public key in toPublicKey. 68 |

69 |

70 | The OrmObject will update the instance for you and append the latest 71 | state to the history of transactions. 72 |

73 |
74 |
75 |
76 |
77 | 78 | 84 |
85 |
86 | 87 | 88 | Next step: burn 89 | 90 | 91 |
92 |
93 |
94 |
95 | ) 96 | } 97 | } 98 | 99 | export default Append 100 | -------------------------------------------------------------------------------- /src/app/components/Burn.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Link } from 'react-router-dom' 3 | 4 | import TutorialStep from './TutorialStep' 5 | import Code from './Code' 6 | import Output from './Output' 7 | 8 | import getErrorMessage from '../getErrorMessage' 9 | import bdborm from '../initdb' 10 | 11 | import Loading from '../img/loading.gif' 12 | 13 | class Burn extends TutorialStep { 14 | constructor(props) { 15 | super(props) 16 | this.burnCrab = this.burnCrab.bind(this) 17 | } 18 | burnCrab() { 19 | if (this.state.loading === true) { 20 | return 21 | } 22 | this.setState({ 23 | loading: true, 24 | output: null, 25 | error: null, 26 | }) 27 | bdborm.models.crab 28 | .retrieve(this.state.crab.id) 29 | .then(crabs => { 30 | if (crabs.length) { 31 | return crabs[0].burn( 32 | { 33 | keypair: this.state.keypair 34 | }) 35 | } 36 | }) 37 | .then((burnedCrab) => { 38 | this.setState({ 39 | output: JSON.stringify( 40 | burnedCrab.data, null, 2), 41 | loading: false 42 | }) 43 | localStorage.clear() 44 | }) 45 | .catch(err => { 46 | getErrorMessage(err).then((errMessage) => { 47 | this.setState({ 48 | error: errMessage, 49 | loading: false, 50 | }) 51 | }) 52 | }) 53 | } 54 | render() { 55 | return ( 56 |
57 |
58 |
59 |
60 |

Burn/Delete

61 |

62 | When the lifecyle of our asset is over, we would typically delete it. 63 | But then again, deleting from an immutable ledger is not possible. 64 | One way of simulating a delete action is to .burn() the asset: 65 | assign the ownership to a randomized public key. This safeguards you from 66 | polynomial attackers. The OrmObject will assign a random publicKey 67 | and even attaches a simple state update that the object is BURNED. 68 |

69 |
70 |
71 |
72 |
73 | 74 | 80 |
81 |
82 | 83 | 84 | Yaay, Finished 85 | 86 | 87 |
88 |
89 |
90 |
91 | ) 92 | } 93 | } 94 | 95 | export default Burn 96 | -------------------------------------------------------------------------------- /src/app/components/Code.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | import SyntaxHighlighter, { registerLanguage } from "react-syntax-highlighter/light"; 4 | import js from 'react-syntax-highlighter/languages/hljs/javascript'; 5 | import zenburn from 'react-syntax-highlighter/styles/hljs/zenburn'; 6 | 7 | registerLanguage('javascript', js); 8 | 9 | class Code extends React.Component { 10 | renderCode(code) { 11 | return ( 12 |
13 |
14 | JavaScript 15 |
16 |
17 | 21 | {code} 22 | 23 |
24 |
25 | ) 26 | } 27 | 28 | home() { 29 | const code = `// import bigchaindb-orm 30 | import Orm from 'bigchaindb-orm' 31 | // connect to BigchainDB 32 | const bdbOrm = new Orm( 33 | "https://test.bigchaindb.com/api/v1/", 34 | { 35 | app_id: "Get one from testnet.bigchaindb.com", 36 | app_key: "Get one from testnet.bigchaindb.com" 37 | } 38 | ) 39 | // define(,) 40 | // : represents the name of model you want to store 41 | // : any information you want to pass about the model (can be string or object) 42 | // note: cannot be changed once set! 43 | bdbOrm.define("crabModel", "https://schema.org/v1/crab") 44 | // create a public and private key for Alice 45 | const aliceKeypair = new bdbOrm.driver.Ed25519Keypair() 46 | ` 47 | return this.renderCode(code) 48 | } 49 | 50 | create() { 51 | const code = `// from the defined models in our bdbOrm 52 | // we create a crab with Alice as owner 53 | bdbOrm.models.crabModel 54 | .create({ 55 | keypair: aliceKeypair, 56 | data: { 57 | breed: 'coconut crab', 58 | color: 'blue' 59 | } 60 | }) 61 | .then(crab => { 62 | // crab is an object with all data & functions 63 | // crab.id equals the id of the asset 64 | // crab.data is latest version 65 | // crab.transactionHistory gives the full history 66 | console.log(crab) 67 | }) 68 | ` 69 | return this.renderCode(code) 70 | } 71 | 72 | retrieve() { 73 | const code = `// get all crabs with retrieve() 74 | // or get a specific crab with retrieve(crab.id) 75 | bdbOrm.models.crabModel 76 | .retrieve(crab.id) 77 | .then(crabs => { 78 | // crabs is an array of crabModel 79 | console.log(crabs.map(crab => crab.data)) 80 | }) 81 | ` 82 | return this.renderCode(code) 83 | } 84 | 85 | append() { 86 | const code = `// update our retrieved crab 87 | crab.append( 88 | { 89 | toPublicKey: aliceKeypair.publicKey, 90 | keypair: aliceKeypair, 91 | data: { color: 'red' } 92 | }) 93 | .then(updatedCrab => { 94 | // updatedCrab contains the last (unspent) state 95 | // of our crab so any actions 96 | // need to be done to updatedCrab 97 | console.log(updatedCrab.data) 98 | }) 99 | ` 100 | return this.renderCode(code) 101 | } 102 | 103 | burn() { 104 | const code = `// burn our retrieved crab 105 | crab.burn( 106 | { 107 | keypair: aliceKeypair 108 | }) 109 | .then(burnedCrab => { 110 | // crab is now tagged as "burned", 111 | // the new publicKey is randomized 112 | // and the corresponding privateKey "lost" 113 | console.log(burnedCrab.data) 114 | }) 115 | ` 116 | return this.renderCode(code) 117 | } 118 | 119 | render() { 120 | switch (this.props.step) { 121 | case 'home': 122 | return this.home() 123 | case 'create': 124 | return this.create() 125 | case 'retrieve': 126 | return this.retrieve() 127 | case 'append': 128 | return this.append() 129 | case 'burn': 130 | return this.burn() 131 | default: 132 | return this.home() 133 | } 134 | } 135 | } 136 | 137 | export default Code 138 | -------------------------------------------------------------------------------- /src/app/components/Create.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Link } from 'react-router-dom' 3 | 4 | import Code from './Code' 5 | import Output from './Output' 6 | 7 | import getErrorMessage from '../getErrorMessage' 8 | import bdborm from '../initdb' 9 | 10 | import Loading from '../img/loading.gif' 11 | 12 | class Create extends React.Component { 13 | constructor(props) { 14 | super(props) 15 | const keypair = JSON.parse(localStorage.getItem('keypair')) 16 | this.state = { 17 | output: null, 18 | error: null, 19 | crab: null, 20 | keypair: keypair || new bdborm.driver.Ed25519Keypair() 21 | } 22 | localStorage.setItem('keypair', JSON.stringify(this.state.keypair)) 23 | this.createCrab = this.createCrab.bind(this) 24 | } 25 | createCrab() { 26 | if (this.state.loading === true) { 27 | return 28 | } 29 | this.setState({ 30 | loading: true, 31 | output: null, 32 | error: null, 33 | }) 34 | bdborm.models.crab 35 | .create({ 36 | keypair: this.state.keypair, 37 | data: { 38 | breed: 'coconut crab', 39 | color: 'blue' 40 | } 41 | }) 42 | .then(crab => { 43 | this.setState({ 44 | output: JSON.stringify(crab, null, 2), 45 | crab, 46 | loading: false 47 | }) 48 | localStorage.setItem('crabid', crab.id) 49 | }) 50 | .catch(err => { 51 | getErrorMessage(err).then((errMessage) => { 52 | this.setState({ 53 | error: errMessage, 54 | loading: false 55 | }) 56 | }) 57 | }) 58 | } 59 | render() { 60 | return ( 61 |
62 |
63 |
64 |
65 |

Create

66 |

67 | Say you wanted to create an asset of crabModel, 68 | simply invoke the .create() function for your model. You can add 69 | some specific data related to the instance you created. 70 | This could be useful to track the state or any attribute of your asset. 71 | Of course, you will also need to provide the keypair for signing the transaction. 72 |

73 |

74 | Once the create is triggered, a transaction is sent to the network and returns 75 | a promise that resolves into an OrmObject once the transaction is approved. 76 | This object contains some useful attributes and functions that we'll explore in the 77 | next steps. 78 |

79 |
80 |
81 |
82 |
83 | 84 | 90 |
91 |
92 | 93 | 102 | Next step: retrieve 103 | 104 | 105 |
106 |
107 |
108 |
109 | ) 110 | } 111 | } 112 | 113 | export default Create 114 | -------------------------------------------------------------------------------- /src/app/components/Footer.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | class Footer extends React.Component { 4 | render() { 5 | return ( 6 |
7 | © 2017 BigchainDB GmbH 8 |
9 | ) 10 | } 11 | } 12 | 13 | export default Footer 14 | -------------------------------------------------------------------------------- /src/app/components/Home.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Link } from 'react-router-dom' 3 | import { GithubLogo } from './Icons' 4 | 5 | import Code from './Code' 6 | 7 | const Home = () => ( 8 |
9 |
10 |
11 |

The CRAB tutorial

12 | Create, Retrieve, Append and Burn: 13 | Basic operations for a blockchain database. 14 |
15 |

Introduction

16 |

17 | This tutorial illustrates how BigchainDB is used 18 | as a database that is accessible from the browser. 19 | The basic operations covered are much like 20 | your standard database operations, but with a blockchain tweak: 21 |

22 |

23 | The following table gives a sneak preview of what to expect 24 | from this tutorial and the difference between regular databases and 25 | blockchain databases, such as BigchainDB: 26 |

27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 42 | 43 | 44 | 47 | 50 | 51 | 52 | 55 | 58 | 59 | 60 | 63 | 66 | 67 |
Database: CRUDBigchainDB: CRAB
37 | CREATE 38 | 40 | CREATE 41 |
45 | READ 46 | 48 | RETRIEVE 49 |
53 | UPDATE* 54 | 56 | APPEND* 57 |
61 | DELETE* 62 | 64 | BURN* 65 |
68 |
69 |

70 | The differences are marked with an asterix (*). 71 | Since Blockchains are immutable and append-only, operations such as 72 | UPDATE and DELETE are not directly supported. 73 | Instead, they are represented by state changes: APPEND and BURN. 74 | Think of it as a fully versioned database, 75 | where all actions on records are immutably recorded. 76 |

77 |

78 | Oh crab, that sounds a bit weird?! 79 | No worries, we got you covered... 80 | In the following, we'll explore the CRAB approach to blockchain 81 | databases with an hands-on interactive example. 82 |

83 |

84 | All code can be found by clicking the github button on the navigation bar. 85 |

86 |
87 |
88 |
89 |
90 |
91 |
92 |

Install and Setup

93 |

94 | First things first, we need to set you up. 95 | The BigchainDB-ORM module 96 | we're going to install is supported for NodeJS (version >= 6) as well as the browser. 97 | You can simply install the ORM using: 98 |

99 |
100 | npm install bigchaindb-orm 101 |
102 |

103 | Next, we need to import the ORM module and connect to a BigchainDB node. 104 | In the example given below, we connect to 105 | the BigchainDB Test network where we already created account and received credentials. 106 |

107 |

108 | Finally, we need to define our model with a schema that 109 | will be used for each instance of the model. In BigchainDB terms, this means 110 | that each instance of that model is an asset. 111 | The schema URI is set in the asset field 112 | of the CREATE transaction. 113 | For this tutorial, our model happens to be a crabModel. 114 |

115 |

116 | Also, we create a keypair for our user Alice. 117 | Below is a snippet of how we set things up in this tutorial. 118 |

119 |
120 |
121 | 122 |
123 | 124 | First step: Create an asset 125 | 126 |
127 |
128 | ) 129 | 130 | export default Home 131 | -------------------------------------------------------------------------------- /src/app/components/Icons.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | export const Logo = () => { 4 | return ( 5 | 6 | 7 | 9 | 11 | 12 | 13 | ) 14 | } 15 | 16 | 17 | export const GithubLogo = () => ( 18 | GitHub icon 21 | 23 | 24 | ) 25 | -------------------------------------------------------------------------------- /src/app/components/Output.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import classnames from 'classnames' 3 | 4 | import Crab from '../img/tumblr_m9wlwqH8Xf1rfjowdo1_500.gif' 5 | import Flame from '../img/flame-gif-6.gif' 6 | 7 | class Output extends React.Component { 8 | getCrabReward() { 9 | if (this.props.append) { 10 | return ( 11 |
16 | 17 | 18 |
19 | ) 20 | } else if (this.props.burn) { 21 | return ( 22 |
27 | 28 | 29 | 30 |
31 | ) 32 | } 33 | return ( 34 |
39 | 40 |
41 | ) 42 | } 43 | 44 | render() { 45 | return ( 46 |
47 | 60 |
61 | ) 62 | } 63 | } 64 | 65 | export default Output 66 | -------------------------------------------------------------------------------- /src/app/components/Retrieve.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Link } from 'react-router-dom' 3 | 4 | import Code from './Code' 5 | import Output from './Output' 6 | import TutorialStep from './TutorialStep' 7 | 8 | import getErrorMessage from '../getErrorMessage' 9 | import bdborm from '../initdb' 10 | 11 | import Loading from '../img/loading.gif' 12 | 13 | class Read extends TutorialStep { 14 | constructor(props) { 15 | super(props) 16 | this.retrieveCrab = this.retrieveCrab.bind(this) 17 | } 18 | retrieveCrab() { 19 | if (this.state.loading === true) { 20 | return 21 | } 22 | this.setState({ 23 | loading: true, 24 | output: null, 25 | error: null, 26 | }) 27 | bdborm.models.crab 28 | .retrieve(this.state.crab.id) 29 | .then(crabs => { 30 | const crabIds = crabs.map(crab => crab.data) 31 | this.setState({ 32 | output: JSON.stringify(crabIds, null, 2), 33 | loading: false, 34 | }) 35 | }) 36 | .catch(err => { 37 | getErrorMessage(err).then((errMessage) => { 38 | this.setState({ 39 | error: errMessage, 40 | loading: false, 41 | }) 42 | }) 43 | }) 44 | } 45 | render() { 46 | return ( 47 |
48 |
49 |
50 |
51 |

Retrieve

52 |

53 | The .retrieve(query) function is useful when we want 54 | to fetch existing assets from the network. When no query is provided, you will 55 | retrieve all assets as OrmObject of the model. 56 | If you don't want to retrieve all assets, you can filter your request by using the 57 | query language 58 | in BigchainDB. 59 |

60 |
61 |
62 |
63 |
64 | 65 | 71 |
72 |
73 | 74 | 83 | Next step: append 84 | 85 | 86 |
87 |
88 |
89 |
90 | ) 91 | } 92 | } 93 | 94 | export default Read 95 | -------------------------------------------------------------------------------- /src/app/components/ScrollToTop.jsx: -------------------------------------------------------------------------------- 1 | import { Component } from 'react' 2 | import { withRouter } from 'react-router-dom' 3 | 4 | class ScrollToTop extends Component { 5 | componentDidUpdate(prevProps) { 6 | if (this.props.location !== prevProps.location) { 7 | window.scrollTo(0, 0) 8 | } 9 | } 10 | 11 | render() { 12 | return this.props.children 13 | } 14 | } 15 | 16 | export default withRouter(ScrollToTop) 17 | -------------------------------------------------------------------------------- /src/app/components/Steps.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { NavLink } from 'react-router-dom' 3 | 4 | import { GithubLogo } from './Icons' 5 | import Logo from '../img/BDB@2ds.png' 6 | 7 | class Steps extends React.Component { 8 | render() { 9 | return ( 10 |
11 |
12 | 13 | 14 | 15 |
16 | 18 | {(menuChecked(0) ? '✓' : '0')} Start 19 | 20 | 22 | {(menuChecked(1) ? '✓' : '1')} Create 23 | 24 | 26 | {(menuChecked(2) ? '✓' : '2')} Retrieve 27 | 28 | 30 | {(menuChecked(3) ? '✓' : '3')} Append 31 | 32 | 34 | {(menuChecked(4) ? '✓' : '4')} Burn 35 | 36 |
37 | 38 | 39 | 40 |
41 |
42 | ) 43 | } 44 | } 45 | 46 | function menuChecked(position) { 47 | switch (window.location.pathname) { 48 | case '/crab/': 49 | if (position >= 0) return false 50 | return true 51 | case '/crab/create': 52 | if (position >= 1) return false 53 | return true 54 | case '/crab/retrieve': 55 | if (position >= 2) return false 56 | return true 57 | case '/crab/append': 58 | if (position >= 3) return false 59 | return true 60 | case '/crab/burn': 61 | if (position >= 4) return false 62 | return true 63 | default: 64 | return true 65 | } 66 | } 67 | 68 | export default Steps 69 | -------------------------------------------------------------------------------- /src/app/components/TutorialStep.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | 4 | class TutorialStep extends React.Component { 5 | constructor(props) { 6 | super(props) 7 | let localState = { 8 | loading: false, 9 | crab: null, 10 | keypair: null, 11 | } 12 | if (!props.location.state) { 13 | const crabId = localStorage.getItem('crabid') 14 | const keypair = JSON.parse(localStorage.getItem('keypair')) 15 | if (crabId && keypair) { 16 | localState.crab = { id: crabId } 17 | localState.keypair = keypair 18 | } 19 | } else { 20 | localState = this.props.location.state 21 | } 22 | this.state = { 23 | ...localState, 24 | output: null 25 | } 26 | if (!this.state.crab || !this.state.keypair) { 27 | this.props.history.push('/create') 28 | } 29 | } 30 | } 31 | 32 | export default TutorialStep 33 | -------------------------------------------------------------------------------- /src/app/getErrorMessage.js: -------------------------------------------------------------------------------- 1 | export default (err) => { 2 | let errMessage = 'Something went wrong!' 3 | if (err.message) { 4 | errMessage += `\n\n${err.message}` 5 | } 6 | if (err.status) { 7 | errMessage += `\n\nstatus: ${err.status}\n${err.statusText}` 8 | } 9 | if (err.json) { 10 | return err.json() 11 | .then(errObject => { 12 | if (errObject.message) { 13 | errMessage += `\n\n: ${errObject.message}` 14 | } 15 | return errMessage 16 | }) 17 | } else { 18 | return Promise.resolve(errMessage) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/app/img/BDB@2ds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/src/app/img/BDB@2ds.png -------------------------------------------------------------------------------- /src/app/img/flame-gif-6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/src/app/img/flame-gif-6.gif -------------------------------------------------------------------------------- /src/app/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/src/app/img/loading.gif -------------------------------------------------------------------------------- /src/app/img/tumblr_m9wlwqH8Xf1rfjowdo1_500.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bigchaindb/tutorial-crab/1ae0a34a298f9589d5a07eb0d8b78ea0fa875790/src/app/img/tumblr_m9wlwqH8Xf1rfjowdo1_500.gif -------------------------------------------------------------------------------- /src/app/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { render } from 'react-dom' 3 | 4 | import App from './components/App' 5 | 6 | import styles from './styles/main' 7 | 8 | render(, document.getElementById('app')) 9 | -------------------------------------------------------------------------------- /src/app/initdb.js: -------------------------------------------------------------------------------- 1 | import Orm from 'bigchaindb-orm' 2 | 3 | console.log(process.env.BDB_URL) 4 | const orm = new Orm(process.env.BDB_URL, { 'app_id': 'crabby', 'app_key': 'as' }) 5 | orm.define('crab', 'https://example.com/v1/crab') 6 | 7 | export default orm; 8 | -------------------------------------------------------------------------------- /src/app/styles/App.scss: -------------------------------------------------------------------------------- 1 | @import './bigchaindb/variables'; 2 | 3 | html, body, .app, .app > div, .app > div > div, .app__content { 4 | margin: 0px !important; 5 | } 6 | 7 | body { 8 | background: $brand-main-gray; 9 | color: $brand-main-gray-light; 10 | position: relative; 11 | } 12 | 13 | h1, 14 | h2 { 15 | color: $brand-main-gray-light; 16 | } 17 | 18 | h2 { 19 | text-align: left; 20 | } 21 | 22 | .app__content { 23 | padding-bottom: 150px; 24 | } 25 | 26 | .row--wide { 27 | max-width: 1200px; 28 | } 29 | 30 | .section { 31 | p { 32 | text-align: justify; 33 | } 34 | } 35 | 36 | .table-tutorial__wrapper { 37 | margin: 1em 0; 38 | } 39 | 40 | .table-tutorial { 41 | margin: auto; 42 | border-collapse: collapse; 43 | border: 1px solid $brand-main-green; 44 | 45 | thead { 46 | font-size: 1.2em; 47 | color: $brand-main-green; 48 | border-bottom: 1px solid; 49 | } 50 | 51 | tr:first-child td { 52 | border-right: 1px solid $brand-main-green; 53 | } 54 | 55 | td { 56 | border-right: 1px solid $brand-main-green; 57 | padding: .5em; 58 | } 59 | } 60 | 61 | .logo--github { 62 | fill: $brand-main-gray-light; 63 | } 64 | 65 | .logo-xs svg { 66 | width: $font-size-base; 67 | height: $font-size-base; 68 | } 69 | 70 | .logo-md svg { 71 | width: 1.5 * $font-size-base; 72 | height: 1.5 * $font-size-base; 73 | } 74 | 75 | .menu--main .logo--github { 76 | fill: $brand-main-gray; 77 | cursor: pointer; 78 | } 79 | 80 | .logo-circle--wrapper { 81 | margin: 1em; 82 | } 83 | 84 | .logo--home { 85 | fill: $brand-main-gray-light; 86 | cursor: pointer; 87 | } 88 | 89 | .img-wrapper { 90 | text-align: center; 91 | position: absolute; 92 | bottom: 3em; 93 | 94 | img:hover { 95 | opacity: .2; 96 | transition: opacity .2s ease-in-out; 97 | } 98 | } 99 | 100 | .hidden { 101 | display: none; 102 | } 103 | 104 | footer { 105 | position: absolute; 106 | right: 0; 107 | bottom: 0; 108 | left: 0; 109 | padding: 1rem; 110 | border-top: 1px solid #445261; 111 | background-color: #394552; 112 | color: #9dabba; 113 | text-align: center; 114 | } 115 | -------------------------------------------------------------------------------- /src/app/styles/Code.scss: -------------------------------------------------------------------------------- 1 | @import 'bigchaindb/variables'; 2 | 3 | $code--text: $brand-main-gray-lighter; 4 | 5 | .code-example { 6 | max-width: 700px; 7 | margin: 0 auto; 8 | } 9 | 10 | .code-output { 11 | position: relative; 12 | text-align: left; 13 | margin: 45px; 14 | 15 | pre { 16 | overflow: auto; 17 | height: 100%; 18 | border: 1px solid $brand-main-green; 19 | 20 | code { 21 | white-space: pre-wrap; 22 | } 23 | } 24 | 25 | .error { 26 | border: 1px solid $brand-danger; 27 | } 28 | 29 | a { 30 | position: absolute; 31 | bottom: 0; 32 | z-index: 1; 33 | } 34 | } 35 | 36 | .code-example__header { 37 | text-align: left; 38 | margin: 1rem 0; 39 | border-bottom: 2px solid #9dabba; 40 | } 41 | 42 | .code-example__body { 43 | padding: 1em; 44 | text-align: left; 45 | 46 | pre { 47 | background: $brand-main-gray; 48 | overflow: auto; 49 | padding: 0; 50 | max-height: 400px; 51 | } 52 | 53 | .c { 54 | color: $code--text; 55 | } 56 | 57 | .ci { 58 | color: $code--text; 59 | padding-left: 25px; 60 | } 61 | 62 | .ci2 { 63 | color: $code--text; 64 | padding-left: 50px; 65 | } 66 | 67 | .comment { 68 | color: $brand-main-green; 69 | } 70 | } 71 | 72 | 73 | .code--highlight { 74 | background: $gray-dark; 75 | color: $ascribe-white; 76 | padding: .5em; 77 | font-size: .8em; 78 | border: 1px solid $brand-main-green; 79 | } 80 | -------------------------------------------------------------------------------- /src/app/styles/Layout.scss: -------------------------------------------------------------------------------- 1 | .exampleHolder { 2 | display: flex; 3 | flex-wrap: wrap; 4 | 5 | 6 | .sideHolder { 7 | width: 50%; 8 | } 9 | 10 | @media (max-width: 700px) { 11 | .sideHolder { 12 | width: 100%; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/app/styles/Steps.scss: -------------------------------------------------------------------------------- 1 | @import 'bigchaindb/variables'; 2 | 3 | .menu { 4 | background: $brand-main-gray-light; 5 | padding-left: 5px; 6 | padding-right: 10px; 7 | } 8 | 9 | .menu .menu-logo { 10 | fill: $brand-main-green; 11 | color: $brand-main-gray; 12 | width: 140px; 13 | height: 25px; 14 | position: absolute; 15 | top: 16px; 16 | } 17 | 18 | .menu .active.menu__links { 19 | .label { 20 | border-bottom: 2px solid $brand-main-gray; 21 | } 22 | 23 | .number { 24 | color: $ascribe-white; 25 | } 26 | } 27 | 28 | .menu .menu__links { 29 | color: $brand-main-gray; 30 | padding: 0px 10px 0px 5px; 31 | display: inline-block; 32 | 33 | .number { 34 | text-align: center; 35 | display: inline-block; 36 | width: 1rem; 37 | height: 1rem; 38 | border-radius: 50%; 39 | font-size: .65rem; 40 | vertical-align: .1rem; 41 | background: $brand-main-gray; 42 | color: #9dabba; 43 | font-weight: 600; 44 | line-height: 1rem; 45 | } 46 | } 47 | 48 | .menu .menu__links.checked { 49 | color: #388250; 50 | 51 | .number { 52 | background-color: #388250; 53 | color: #fff; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_account.scss: -------------------------------------------------------------------------------- 1 | .account-wrapper:first-child { 2 | border-top: 1px solid darken(aquamarine, 40%); 3 | } 4 | 5 | .list-row, 6 | .list-item { 7 | font-size: .9em; 8 | text-transform: uppercase; 9 | padding: 1em; 10 | border-bottom: 1px solid darken(aquamarine, 40%); 11 | color: lighten($fg-color, 30%); 12 | } 13 | 14 | .list-row { 15 | &:hover { 16 | background-color: lighten(aquamarine, 20%); 17 | cursor: pointer; 18 | } 19 | } 20 | 21 | .list-row.active { 22 | background: lighten(aquamarine, 10%); 23 | .list-row-name, 24 | .list-row-detail { 25 | color: #109; 26 | } 27 | } 28 | 29 | .list-row-name { 30 | font-weight: bold; 31 | } 32 | 33 | .list-row-detail { 34 | font-size: 0.8em; 35 | color: lighten($fg-color, 50%); 36 | } 37 | 38 | .list-row-name, 39 | .list-row-detail { 40 | text-overflow: ellipsis; 41 | overflow: hidden; 42 | color: darken(aquamarine, 50%) 43 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_animations.scss: -------------------------------------------------------------------------------- 1 | 2 | $timing-default: ease-out; 3 | $timing-bounce: cubic-bezier(0,1.02,.32,1.34); // easeOutBack, modified: http://cubic-bezier.com/#0,1.02,.32,1.34 4 | 5 | // 6 | // Transitions 7 | // 8 | @mixin transition { 9 | transition: all .2s ease-out; 10 | } 11 | 12 | .transition { 13 | @include transition; 14 | } 15 | 16 | .fade { 17 | @include transition; 18 | opacity: 0; 19 | 20 | &.in { 21 | opacity: 1; 22 | } 23 | } 24 | 25 | .animation-fadein { 26 | animation: fadein .4s $timing-default; 27 | } 28 | 29 | @keyframes fadein { 30 | 0% { 31 | opacity: 0; 32 | } 33 | 100% { 34 | opacity: 1; 35 | } 36 | } 37 | 38 | 39 | // React TransitionGroup transitions 40 | .screenchange-appear, 41 | .screenchange-enter { 42 | opacity: 0.01; 43 | transform: translate3d(100%,0,0); 44 | 45 | &.screenchange-appear-active, 46 | &.screenchange-enter-active { 47 | @extend .transition; 48 | opacity: 1; 49 | transform: translate3d(0,0,0); 50 | } 51 | } 52 | 53 | .screenchange-leave { 54 | opacity: 1; 55 | transform: translate3d(0,0,0); 56 | 57 | &.screenchange-leave-active { 58 | @extend .transition; 59 | opacity: 0.01; 60 | transform: translate3d(-100%,0,0); 61 | } 62 | } 63 | 64 | 65 | // 66 | // Custom animations 67 | // 68 | 69 | // smooooothly slide in from bottom 70 | @mixin animation-slide-in-from-bottom { 71 | animation: slide-in-from-bottom .7s $timing-bounce; 72 | } 73 | 74 | .animation-slide-in-from-bottom { 75 | @include animation-slide-in-from-bottom; 76 | 77 | &.paused { 78 | animation-play-state: paused; 79 | } 80 | } 81 | 82 | @keyframes slide-in-from-bottom { 83 | 0% { 84 | opacity: 0; 85 | transform: translateY(50px); 86 | } 87 | 100% { 88 | opacity: 1; 89 | transform: translateY(0); 90 | } 91 | } 92 | 93 | @mixin animation-slide-out-to-left { 94 | animation: slide-out-to-left .2s $timing-default; 95 | } 96 | 97 | .animation-slide-out-to-left { 98 | @include animation-slide-out-to-left; 99 | 100 | &.paused { 101 | animation-play-state: paused; 102 | } 103 | } 104 | 105 | @keyframes slide-out-to-left { 106 | 0% { 107 | opacity: 0; 108 | transform: translateX(0); 109 | } 110 | 100% { 111 | opacity: 1; 112 | transform: translateX(-100%); 113 | } 114 | } 115 | 116 | @mixin animation-slide-in-from-right { 117 | animation: slide-out-to-left .2s $timing-default; 118 | } 119 | 120 | .animation-slide-in-from-right { 121 | @include animation-slide-in-from-right; 122 | 123 | &.paused { 124 | animation-play-state: paused; 125 | } 126 | } 127 | 128 | @keyframes slide-in-from-right { 129 | 0% { 130 | opacity: 0; 131 | transform: translate3d(100%,0,0); 132 | } 133 | 100% { 134 | opacity: 1; 135 | transform: translate3d(0,0,0); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_asset.scss: -------------------------------------------------------------------------------- 1 | .asset-container { 2 | border-bottom: 1px solid lighten($fg-color, 50%); 3 | border-left: 5px solid transparent; 4 | padding: 1em; 5 | } 6 | 7 | .asset-container-actions { 8 | margin-top: 1em 9 | } 10 | 11 | .asset-container-id, 12 | .asset-container-timestamp { 13 | font-size: 0.8em; 14 | text-transform: uppercase; 15 | } 16 | 17 | .asset-container-id { 18 | margin-bottom: 1em; 19 | overflow: hidden; 20 | font-size: 0.75em; 21 | font-style: italic; 22 | text-overflow: ellipsis; 23 | } 24 | 25 | .asset-container-timestamp { 26 | color: lighten($fg-color, 50%); 27 | margin-bottom: -.6em; 28 | text-align: right; 29 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_buttons.scss: -------------------------------------------------------------------------------- 1 | .button { 2 | display: inline-block; 3 | font-family: $btn-font-family; 4 | font-weight: $btn-font-weight; 5 | text-align: center; 6 | white-space: nowrap; 7 | vertical-align: middle; 8 | cursor: pointer; 9 | user-select: none; 10 | border: none; 11 | box-shadow: none; 12 | transition: .2s ease-out; 13 | @include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $line-height, $btn-border-radius); 14 | 15 | &:hover, 16 | &:focus { 17 | box-shadow: 0 1px 4px rgba($brand-main-blue-dark, .4); 18 | transform: translateY(-1px); 19 | outline: 0; 20 | } 21 | 22 | &:active, 23 | &.active { 24 | background-image: none; 25 | outline: 0; 26 | transform: translateY(0); 27 | box-shadow: 0 1px 2px rgba($brand-main-blue-dark, .3); 28 | } 29 | &.disabled, 30 | &:disabled { 31 | opacity: .45; 32 | box-shadow: none; 33 | cursor: not-allowed; 34 | pointer-events: none; 35 | } 36 | 37 | .icon { 38 | width: $font-size-base; 39 | height: $font-size-base; 40 | margin-right: .25rem; 41 | margin-bottom: -1px; 42 | } 43 | } 44 | 45 | // Future-proof disabling of clicks on `` elements 46 | a.button.disabled, 47 | fieldset[disabled] a.btn { 48 | pointer-events: none; 49 | } 50 | 51 | // 52 | // Alternate buttons 53 | // 54 | .button--primary { 55 | @include button-variant($btn-primary-color, $btn-primary-bg); 56 | } 57 | .button--secondary { 58 | @include button-variant($btn-secondary-color, $btn-secondary-bg); 59 | } 60 | .button--blue { 61 | @include button-variant($btn-blue-color, $btn-blue-bg); 62 | } 63 | .button--violet { 64 | @include button-variant($btn-violet-color, $btn-violet-bg); 65 | } 66 | .button--info { 67 | @include button-variant($btn-info-color, $btn-info-bg); 68 | } 69 | .button--success { 70 | @include button-variant($btn-success-color, $btn-success-bg); 71 | } 72 | .button--warning { 73 | @include button-variant($btn-warning-color, $btn-warning-bg); 74 | } 75 | .button--danger { 76 | @include button-variant($btn-danger-color, $btn-danger-bg); 77 | } 78 | 79 | 80 | // 81 | // Link buttons 82 | // 83 | // Make a button look and behave like a link 84 | .button--link { 85 | font-weight: normal; 86 | color: $link-color; 87 | border-radius: 0; 88 | &, 89 | &:active, 90 | &.active, 91 | &:disabled { 92 | background-color: transparent; 93 | box-shadow: none; 94 | } 95 | &, 96 | &:hover, 97 | &:focus, 98 | &:active { 99 | border-color: transparent; 100 | box-shadow: none; 101 | background: none; 102 | } 103 | &:disabled { 104 | } 105 | } 106 | 107 | 108 | // 109 | // Button Sizes 110 | // 111 | .button--lg { 112 | // line-height: ensure even-numbered height of button next to large input 113 | @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $line-height-lg, $btn-border-radius-lg); 114 | 115 | .icon { 116 | width: $font-size-lg; 117 | height: $font-size-lg; 118 | } 119 | } 120 | .button--sm { 121 | // line-height: ensure proper height of button next to small input 122 | @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $line-height-sm, $btn-border-radius-sm); 123 | 124 | .icon { 125 | width: $font-size-sm; 126 | height: $font-size-sm; 127 | } 128 | } 129 | .button--xs { 130 | // line-height: ensure proper height of button next to small input 131 | @include button-size($btn-padding-y-xs, $btn-padding-x-xs, $font-size-xs, $line-height-xs, $btn-border-radius-xs); 132 | 133 | .icon { 134 | width: $font-size-xs; 135 | height: $font-size-xs; 136 | } 137 | } 138 | 139 | // 140 | // Block button 141 | // 142 | .button-block { 143 | display: block; 144 | width: 100%; 145 | } 146 | 147 | // Vertically space out multiple block buttons 148 | .button-block + .button-block { 149 | margin-top: 5px; 150 | } 151 | 152 | // Specificity overrides 153 | input[type="submit"], 154 | input[type="reset"], 155 | input[type="button"] { 156 | &.btn-block { 157 | width: 100%; 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_card.scss: -------------------------------------------------------------------------------- 1 | .card { 2 | max-width: $row--wide; 3 | background: $bg-color; 4 | box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4); 5 | padding: 20px 40px; 6 | margin: 0 auto 40px; 7 | overflow: hidden; 8 | 9 | .desc { 10 | font-size: 35px; 11 | line-height: 150%; 12 | margin: 0 0 25px 0; 13 | 14 | @media (max-width: 600px) { 15 | font-size: 20px; 16 | } 17 | 18 | strong { 19 | background-color: black; 20 | color: $fg-color; 21 | padding: 4px 20px; 22 | } 23 | } 24 | } 25 | 26 | .card--summary { 27 | .desc { 28 | float: left; 29 | width: 60%; 30 | @media (max-width: 600px) { 31 | float: none; 32 | width: 100%; 33 | display: block; 34 | margin-left: auto; 35 | margin-right: auto; 36 | } 37 | } 38 | 39 | .preview { 40 | margin-top: -10px; 41 | float: right; 42 | width: 30%; 43 | max-width: 400px; 44 | @media (max-width: 600px) { 45 | float: none; 46 | width: 100%; 47 | margin-bottom: 30px; 48 | } 49 | } 50 | } 51 | 52 | .card { 53 | .disclaimer { 54 | padding-top: 30px; 55 | text-align: right; 56 | font-size: 12px; 57 | } 58 | } 59 | 60 | .card--claim { 61 | box-shadow: none; 62 | background-color: transparent; 63 | .desc { 64 | font-size: 20px; 65 | text-align: center; 66 | a { 67 | color: inherit; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_code.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------- 4 | // bigchain.io 5 | // 6 | code, 7 | kbd, 8 | pre, 9 | samp { 10 | font-family: $font-family-monospace; 11 | font-size: $font-size-xs; 12 | hyphens: none; 13 | } 14 | 15 | // Inline code 16 | code { 17 | padding: 2px 4px; 18 | color: $code-color; 19 | background-color: $code-bg; 20 | border-radius: $border-radius; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | color: $kbd-color; 27 | background-color: $kbd-bg; 28 | border-radius: $border-radius-sm; 29 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 30 | kbd { 31 | padding: 0; 32 | font-size: 100%; 33 | font-weight: bold; 34 | box-shadow: none; 35 | } 36 | } 37 | 38 | // Blocks of code 39 | pre { 40 | display: block; 41 | padding: $spacer; 42 | margin: 0 0 $spacer; 43 | line-height: $line-height; 44 | word-break: break-all; 45 | word-wrap: break-word; 46 | color: $pre-color; 47 | background-color: $pre-bg; 48 | border-radius: $border-radius; 49 | 50 | // make 'em scrollable 51 | overflow: scroll; 52 | -webkit-overflow-scrolling: touch; 53 | max-height: $pre-scrollable-max-height; 54 | 55 | // Account for some code outputs that place code tags in pre tags 56 | code { 57 | padding: 0; 58 | font-size: inherit; 59 | color: inherit; 60 | white-space: pre; 61 | overflow-wrap: normal; 62 | word-wrap: normal; 63 | word-break: normal; 64 | overflow: auto; 65 | background-color: transparent; 66 | border-radius: 0; 67 | } 68 | } 69 | 70 | .react-syntax-highlighter-line-number { 71 | opacity: .5; 72 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_forms.scss: -------------------------------------------------------------------------------- 1 | .form { 2 | padding: $spacer; 3 | background: $gray-light; 4 | border-radius: $border-radius; 5 | margin-bottom: $spacer; 6 | 7 | @media ($screen-sm) { 8 | padding: ($spacer * 2) ($spacer * 2.5); 9 | } 10 | } 11 | 12 | .form__control { 13 | display: block; 14 | width: 100%; 15 | appearance: none; 16 | padding: $input-padding-x $input-padding-y; 17 | font-family: $input-font; 18 | font-weight: $font-weight-bold; 19 | font-size: $font-size-base; 20 | line-height: $line-height; 21 | color: $input-color; 22 | text-align: left; 23 | background: none; 24 | border: none; 25 | border-bottom: 2px solid $input-border-color; 26 | border-radius: 0; 27 | transition: .2s ease-out; 28 | 29 | &:focus { 30 | outline: 0; 31 | border-color: $input-border-focus; 32 | } 33 | 34 | // Placeholder 35 | &::placeholder { 36 | color: $input-color-placeholder; 37 | 38 | // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526. 39 | opacity: 1; 40 | } 41 | 42 | // Disabled and read-only inputs 43 | // 44 | // HTML5 says that controls under a fieldset > legend:first-child won't be 45 | // disabled if the fieldset is disabled. Due to implementation difficulty, we 46 | // don't honor that edge case; we style them as disabled anyway. 47 | &:disabled, 48 | &[readonly] { 49 | background-color: $input-bg-disabled; 50 | 51 | // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655. 52 | opacity: 1; 53 | } 54 | &:disabled { 55 | cursor: disabled; 56 | } 57 | } 58 | 59 | 60 | // 61 | // Floating placeholder labels 62 | // 63 | .form__label { 64 | position: absolute; 65 | top: $input-padding-x; 66 | left: $input-padding-y; 67 | right: $input-padding-y; 68 | transition: .15s ease-out; 69 | user-select: none; 70 | cursor: text; 71 | 72 | // style like placeholder 73 | font-family: $input-font; 74 | font-weight: $input-font-weight; 75 | font-size: $font-size-base; 76 | line-height: $line-height; 77 | color: $input-color-placeholder; 78 | text-align: left; 79 | transform-origin: left; 80 | } 81 | 82 | .form__control { 83 | // the active state 84 | &:focus ~ .form__label { 85 | transform: translate3d(0, -(($spacer / 1.5) + $input-padding-x), 0) scale(.7); 86 | color: $input-border-focus; 87 | } 88 | } 89 | 90 | 91 | // 92 | // Form groups 93 | // 94 | .form__group { 95 | margin-bottom: $spacer; 96 | position: relative; 97 | // make room for floating labels 98 | margin-top: $spacer; 99 | 100 | &:last-of-type { 101 | margin-bottom: 0; 102 | 103 | .btn { 104 | margin-top: $spacer; 105 | } 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_grid.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Grid 3 | // -------------- 4 | // bigchaindb.com 5 | // 6 | // adapted from github.com/kremalicious/kremalicious3/blob/master/_src/_assets/styl/grid.styl 7 | // 8 | 9 | 10 | // 11 | // More sane box model 12 | // 13 | *, 14 | *:before, 15 | *:after { 16 | box-sizing: border-box; 17 | } 18 | 19 | 20 | // 21 | // Base 22 | // 23 | .grid { 24 | display: flex; 25 | flex-wrap: wrap; 26 | list-style: none; 27 | margin: 0; 28 | padding: 0; 29 | } 30 | 31 | .grid__col { 32 | flex: 1; 33 | // Firefox grid fix for whatever reason 34 | min-height: 0; 35 | min-width: 0; 36 | } 37 | 38 | .row { 39 | max-width: calc(50em - #{$gutter-space * 2}); 40 | margin-left: auto; 41 | margin-right: auto; 42 | padding-left: ($gutter-space / 2); 43 | padding-right: ($gutter-space / 2); 44 | 45 | @media ($screen-sm) { 46 | padding-left: $gutter-space; 47 | padding-right: $gutter-space; 48 | } 49 | } 50 | 51 | .row--wide { 52 | max-width: 70rem; 53 | } 54 | 55 | .row--narrow { 56 | max-width: ($screen-md-min / 1.75); 57 | } 58 | 59 | 60 | // 61 | // Alignment per row 62 | // 63 | .grid--top { 64 | align-items: flex-start; 65 | } 66 | 67 | .grid--bottom { 68 | align-items: flex-end; 69 | } 70 | 71 | .grid--center { 72 | align-items: center; 73 | } 74 | 75 | .grid--justifycenter { 76 | justify-content: center; 77 | } 78 | 79 | 80 | // 81 | // Alignment per cell 82 | // 83 | .grid__col--top { 84 | align-self: flex-start; 85 | } 86 | 87 | .grid__col--bottom { 88 | align-self: flex-end; 89 | } 90 | 91 | .grid__col--center { 92 | align-self: center; 93 | } 94 | 95 | 96 | // 97 | // Gutters 98 | // 99 | @mixin grid-gutters() { 100 | margin: -($gutter-space) 0 $gutter-space (-($gutter-space)); 101 | 102 | > .grid__col { 103 | padding: $gutter-space 0 0 $gutter-space; 104 | } 105 | } 106 | 107 | .grid--gutters { 108 | @include grid-gutters(); 109 | } 110 | 111 | @media ($screen-sm) { 112 | .grid-small--gutters { 113 | @include grid-gutters(); 114 | } 115 | } 116 | 117 | @media ($screen-md) { 118 | .grid-medium--gutters { 119 | @include grid-gutters(); 120 | } 121 | } 122 | 123 | @media ($screen-lg) { 124 | .grid-large--gutters { 125 | @include grid-gutters(); 126 | } 127 | } 128 | 129 | 130 | // 131 | // Columns 132 | // 133 | @mixin grid-columns() { 134 | > .grid__col { 135 | max-width: none; 136 | 137 | &.grid__col--1 { flex: 0 0 16%; } 138 | &.grid__col--2 { flex: 0 0 33.3%; } 139 | &.grid__col--3 { flex: 0 0 50%; } 140 | &.grid__col--4 { flex: 0 0 66.6%; } 141 | &.grid__col--5 { flex: 0 0 84%; } 142 | &.grid__col--6 { flex: 0 0 100%; } 143 | } 144 | } 145 | 146 | .grid--fit { 147 | > .grid__col { flex: 1; } 148 | } 149 | 150 | .grid--full { 151 | > .grid__col { flex: 0 0 100%; } 152 | } 153 | 154 | .grid--third { 155 | > .grid__col { flex: 0 0 33.3%; } 156 | } 157 | 158 | .grid--half { 159 | > .grid__col { 160 | flex: 0 0 50%; 161 | max-width: 50%; // IE 11 workaround for bug (flex-basis doesn't account for box-sizing:border-box) 162 | } 163 | } 164 | 165 | .grid--columns { 166 | @include grid-columns(); 167 | } 168 | 169 | @media ($screen-sm) { 170 | .grid-small--columns { 171 | @include grid-columns(); 172 | } 173 | 174 | .grid-small--fit { 175 | > .grid__col { flex: 1; } 176 | } 177 | 178 | .grid-small--full { 179 | > .grid__col { flex: 0 0 100%; } 180 | } 181 | 182 | .grid-small--third { 183 | > .grid__col { flex: 0 0 33.3%; } 184 | } 185 | 186 | .grid-small--half { 187 | > .grid__col { 188 | flex: 0 0 50%; 189 | max-width: 50%; // IE 11 workaround for bug (flex-basis doesn't account for box-sizing:border-box) 190 | } 191 | } 192 | } 193 | 194 | @media ($screen-md) { 195 | .grid-medium--columns { 196 | @include grid-columns(); 197 | } 198 | 199 | .grid-medium--fit { 200 | > .grid__col { flex: 1; } 201 | } 202 | 203 | .grid-medium--full { 204 | > .grid__col { flex: 0 0 100%; } 205 | } 206 | 207 | .grid-medium--third { 208 | > .grid__col { flex: 0 0 33.3%; } 209 | } 210 | 211 | .grid-medium--half { 212 | > .grid__col { 213 | flex: 0 0 50%; 214 | max-width: 50%; // IE 11 workaround for bug (flex-basis doesn't account for box-sizing:border-box) 215 | } 216 | } 217 | } 218 | 219 | @media ($screen-lg) { 220 | .grid-large--columns { 221 | @include grid-columns(); 222 | } 223 | 224 | .grid-large--fit { 225 | > .grid__col { flex: 1; } 226 | } 227 | 228 | .grid-large--full { 229 | > .grid__col { flex: 0 0 100%; } 230 | } 231 | 232 | .grid-large--third { 233 | > .grid__col { flex: 0 0 33.3%; } 234 | } 235 | 236 | .grid-large--half { 237 | > .grid__col { 238 | flex: 0 0 50%; 239 | max-width: 50%; // IE 11 workaround for bug (flex-basis doesn't account for box-sizing:border-box) 240 | } 241 | } 242 | } 243 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_icons.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | fill: none; 3 | stroke: $brand-main-blue; 4 | stroke-width: 1; 5 | stroke-linecap: round; 6 | stroke-linejoin: round; 7 | width: $font-size-base; 8 | height: $font-size-base; 9 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_layout.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // More sane box model 4 | // 5 | *, 6 | *:before, 7 | *:after { 8 | box-sizing: border-box; 9 | } 10 | 11 | 12 | // 13 | // Body reset 14 | // 15 | html, 16 | body, 17 | .app, 18 | .app > div, 19 | .app > div > div, 20 | .app__content { 21 | margin: 0 0 1em 0; 22 | padding: 0; 23 | width: 100%; 24 | //min-height: 100vh; 25 | } 26 | 27 | .app__content { 28 | padding-top: $menu-height; 29 | } 30 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_logo.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Logo 3 | // --- 4 | // bigchain.io 5 | // 6 | 7 | // default logo 8 | .logo { 9 | fill: $brand-main-green; 10 | color: $brand-main-blue; // the fill="currentColor" trick 11 | width: 300px; 12 | height: 60px; 13 | display: block; 14 | } 15 | 16 | 17 | // 18 | // Color modifiers 19 | // 20 | .logo--white { 21 | fill: #fff; 22 | color: #fff; 23 | } 24 | 25 | .logo--white--green { 26 | fill:$brand-main-green; 27 | color: #fff; 28 | } 29 | 30 | 31 | // 32 | // size modifiers 33 | // 34 | .logo--sm { 35 | width: 140px; 36 | height: 25px; 37 | } 38 | 39 | .logo--full { 40 | display: block; 41 | width: 100%; 42 | height: auto; 43 | } 44 | 45 | 46 | // 47 | // color modifiers 48 | // 49 | .logo--dark { 50 | fill: $brand-main-blue-dark; 51 | } 52 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_menu.scss: -------------------------------------------------------------------------------- 1 | .menu { 2 | background: rgba($brand-main-blue-dark, .75); 3 | backdrop-filter: saturate(150%) blur(10px); 4 | padding-left: 2rem; 5 | padding-right: 2rem; 6 | display: flex; 7 | align-items: center; 8 | justify-content: space-between; 9 | 10 | position: fixed; 11 | width: 100%; 12 | z-index: 1; 13 | min-height: $menu-height; 14 | 15 | .logo { 16 | @extend .logo--sm, .logo--white--green; 17 | } 18 | } 19 | 20 | .menu__link, 21 | .menu .logo, 22 | .menu__title { 23 | flex-basis: (100%/3); 24 | } 25 | 26 | .menu__link, 27 | .menu__title { 28 | font-size: $font-size-sm; 29 | } 30 | 31 | .menu .logo { 32 | @extend .logo--sm; 33 | margin-right: -$spacer; 34 | } 35 | 36 | .menu__link { 37 | padding-top: .5rem; 38 | padding-bottom: .5rem; 39 | display: inline-block; 40 | transition: .2s ease-out; 41 | opacity: .8; 42 | 43 | .icon { 44 | stroke-width: 2; 45 | width: $font-size-xs; 46 | height: $font-size-xs; 47 | margin-right: $spacer / 4; 48 | } 49 | } 50 | 51 | .menu__link:hover { 52 | opacity: 1; 53 | } 54 | 55 | .menu__title { 56 | @extend .h4; 57 | margin: 0; 58 | color: #fff; 59 | text-align: right; 60 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_mixins.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Button variants 3 | // 4 | @mixin button-variant($color, $background) { 5 | $active-background: lighten($background, 5%); 6 | color: $color !important; 7 | background: $background; 8 | 9 | &:hover, 10 | &:focus { 11 | color: $color !important; 12 | background-color: $active-background; 13 | } 14 | &:active { 15 | color: $color !important; 16 | background: darken($background, 2%); 17 | transition: none; 18 | } 19 | &.disabled, 20 | &:disabled { 21 | &:focus { 22 | background-color: $background; 23 | } 24 | } 25 | 26 | .icon { fill: $color; } 27 | } 28 | 29 | // Button sizes 30 | @mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { 31 | padding: $padding-y $padding-x; 32 | font-size: $font-size; 33 | line-height: $line-height; 34 | border-radius: $border-radius; 35 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_modal.scss: -------------------------------------------------------------------------------- 1 | .ReactModal__Body--open { 2 | overflow: hidden; 3 | } 4 | 5 | .modal__overlay { 6 | @extend .transition; 7 | position: fixed; 8 | left: 0; right: 0; top: 0; bottom: 0; 9 | padding-top: $menu-height + $spacer; 10 | padding-bottom: $spacer * 2; 11 | background: rgba($brand-main-gray, .6); 12 | backdrop-filter: blur(3px); 13 | overflow-x: hidden; 14 | overflow-y: auto; 15 | -webkit-overflow-scrolling: touch; 16 | 17 | display: flex; 18 | align-items: center; 19 | justify-content: center; 20 | } 21 | 22 | .modal__content { 23 | @extend .animation-slide-in-from-bottom; 24 | margin: auto $spacer * 2; 25 | padding: $spacer; 26 | max-width: 100%; 27 | background: $brand-main-gray-light; 28 | border: 1px solid darken($brand-main-gray-light, 10%); 29 | border-radius: $border-radius; 30 | outline: 0; 31 | 32 | @media ($screen-sm) { 33 | max-width: $screen-sm-min; 34 | min-width: $screen-sm-min / 2; 35 | } 36 | 37 | // sledghammer overwrites for react-syntax-highlighter 38 | pre { 39 | max-height: none; 40 | background-color: $code-bg !important; 41 | margin-bottom: 0; 42 | padding: $spacer !important; 43 | } 44 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /** 4 | * 1. Set default font family to sans-serif. 5 | * 2. Prevent iOS and IE text size adjust after device orientation change, 6 | * without disabling user zoom. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove default margin. 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Correct `block` display not defined for any HTML5 element in IE 8/9. 28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11 29 | * and Firefox. 30 | * Correct `block` display not defined for `main` in IE 11. 31 | */ 32 | 33 | article, 34 | aside, 35 | details, 36 | figcaption, 37 | figure, 38 | footer, 39 | header, 40 | hgroup, 41 | main, 42 | menu, 43 | nav, 44 | section, 45 | summary { 46 | display: block; 47 | } 48 | 49 | /** 50 | * 1. Correct `inline-block` display not defined in IE 8/9. 51 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. 52 | */ 53 | 54 | audio, 55 | canvas, 56 | progress, 57 | video { 58 | display: inline-block; /* 1 */ 59 | vertical-align: baseline; /* 2 */ 60 | } 61 | 62 | /** 63 | * Prevent modern browsers from displaying `audio` without controls. 64 | * Remove excess height in iOS 5 devices. 65 | */ 66 | 67 | audio:not([controls]) { 68 | display: none; 69 | height: 0; 70 | } 71 | 72 | /** 73 | * Address `[hidden]` styling not present in IE 8/9/10. 74 | * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. 75 | */ 76 | 77 | [hidden], 78 | template { 79 | display: none; 80 | } 81 | 82 | /* Links 83 | ========================================================================== */ 84 | 85 | /** 86 | * Remove the gray background color from active links in IE 10. 87 | */ 88 | 89 | a { 90 | background-color: transparent; 91 | } 92 | 93 | /** 94 | * Improve readability of focused elements when they are also in an 95 | * active/hover state. 96 | */ 97 | 98 | a:active, 99 | a:hover { 100 | outline: 0; 101 | } 102 | 103 | /* Text-level semantics 104 | ========================================================================== */ 105 | 106 | /** 107 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome. 108 | */ 109 | 110 | abbr[title] { 111 | border-bottom: 1px dotted; 112 | } 113 | 114 | /** 115 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. 116 | */ 117 | 118 | b, 119 | strong { 120 | font-weight: bold; 121 | } 122 | 123 | /** 124 | * Address styling not present in Safari and Chrome. 125 | */ 126 | 127 | dfn { 128 | font-style: italic; 129 | } 130 | 131 | /** 132 | * Address variable `h1` font-size and margin within `section` and `article` 133 | * contexts in Firefox 4+, Safari, and Chrome. 134 | */ 135 | 136 | h1 { 137 | font-size: 2em; 138 | margin: 0.67em 0; 139 | } 140 | 141 | /** 142 | * Address styling not present in IE 8/9. 143 | */ 144 | 145 | mark { 146 | background: #ff0; 147 | color: #000; 148 | } 149 | 150 | /** 151 | * Address inconsistent and variable font size in all browsers. 152 | */ 153 | 154 | small { 155 | font-size: 80%; 156 | } 157 | 158 | /** 159 | * Prevent `sub` and `sup` affecting `line-height` in all browsers. 160 | */ 161 | 162 | sub, 163 | sup { 164 | font-size: 75%; 165 | line-height: 0; 166 | position: relative; 167 | vertical-align: baseline; 168 | } 169 | 170 | sup { 171 | top: -0.5em; 172 | } 173 | 174 | sub { 175 | bottom: -0.25em; 176 | } 177 | 178 | /* Embedded content 179 | ========================================================================== */ 180 | 181 | /** 182 | * Remove border when inside `a` element in IE 8/9/10. 183 | */ 184 | 185 | img { 186 | border: 0; 187 | } 188 | 189 | /** 190 | * Correct overflow not hidden in IE 9/10/11. 191 | */ 192 | 193 | svg:not(:root) { 194 | overflow: hidden; 195 | } 196 | 197 | /* Grouping content 198 | ========================================================================== */ 199 | 200 | /** 201 | * Address margin not present in IE 8/9 and Safari. 202 | */ 203 | 204 | figure { 205 | margin: 1em 40px; 206 | } 207 | 208 | /** 209 | * Address differences between Firefox and other browsers. 210 | */ 211 | 212 | hr { 213 | box-sizing: content-box; 214 | height: 0; 215 | } 216 | 217 | /** 218 | * Contain overflow in all browsers. 219 | */ 220 | 221 | pre { 222 | overflow: auto; 223 | } 224 | 225 | /** 226 | * Address odd `em`-unit font size rendering in all browsers. 227 | */ 228 | 229 | code, 230 | kbd, 231 | pre, 232 | samp { 233 | font-family: monospace, monospace; 234 | font-size: 1em; 235 | } 236 | 237 | /* Forms 238 | ========================================================================== */ 239 | 240 | /** 241 | * Known limitation: by default, Chrome and Safari on OS X allow very limited 242 | * styling of `select`, unless a `border` property is set. 243 | */ 244 | 245 | /** 246 | * 1. Correct color not being inherited. 247 | * Known issue: affects color of disabled elements. 248 | * 2. Correct font properties not being inherited. 249 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. 250 | */ 251 | 252 | button, 253 | input, 254 | optgroup, 255 | select, 256 | textarea { 257 | color: inherit; /* 1 */ 258 | font: inherit; /* 2 */ 259 | margin: 0; /* 3 */ 260 | } 261 | 262 | /** 263 | * Address `overflow` set to `hidden` in IE 8/9/10/11. 264 | */ 265 | 266 | button { 267 | overflow: visible; 268 | } 269 | 270 | /** 271 | * Address inconsistent `text-transform` inheritance for `button` and `select`. 272 | * All other form control elements do not inherit `text-transform` values. 273 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. 274 | * Correct `select` style inheritance in Firefox. 275 | */ 276 | 277 | button, 278 | select { 279 | text-transform: none; 280 | } 281 | 282 | /** 283 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` 284 | * and `video` controls. 285 | * 2. Correct inability to style clickable `input` types in iOS. 286 | * 3. Improve usability and consistency of cursor style between image-type 287 | * `input` and others. 288 | */ 289 | 290 | button, 291 | html input[type="button"], /* 1 */ 292 | input[type="reset"], 293 | input[type="submit"] { 294 | -webkit-appearance: button; /* 2 */ 295 | cursor: pointer; /* 3 */ 296 | } 297 | 298 | /** 299 | * Re-set default cursor for disabled elements. 300 | */ 301 | 302 | button[disabled], 303 | html input[disabled] { 304 | cursor: default; 305 | } 306 | 307 | /** 308 | * Remove inner padding and border in Firefox 4+. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | input::-moz-focus-inner { 313 | border: 0; 314 | padding: 0; 315 | } 316 | 317 | /** 318 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in 319 | * the UA stylesheet. 320 | */ 321 | 322 | input { 323 | line-height: normal; 324 | } 325 | 326 | /** 327 | * It's recommended that you don't attempt to style these elements. 328 | * Firefox's implementation doesn't respect box-sizing, padding, or width. 329 | * 330 | * 1. Address box sizing set to `content-box` in IE 8/9/10. 331 | * 2. Remove excess padding in IE 8/9/10. 332 | */ 333 | 334 | input[type="checkbox"], 335 | input[type="radio"] { 336 | box-sizing: border-box; /* 1 */ 337 | padding: 0; /* 2 */ 338 | } 339 | 340 | /** 341 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain 342 | * `font-size` values of the `input`, it causes the cursor style of the 343 | * decrement button to change from `default` to `text`. 344 | */ 345 | 346 | input[type="number"]::-webkit-inner-spin-button, 347 | input[type="number"]::-webkit-outer-spin-button { 348 | height: auto; 349 | } 350 | 351 | /** 352 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome. 353 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. 354 | */ 355 | 356 | input[type="search"] { 357 | -webkit-appearance: textfield; /* 1 */ 358 | box-sizing: content-box; /* 2 */ 359 | } 360 | 361 | /** 362 | * Remove inner padding and search cancel button in Safari and Chrome on OS X. 363 | * Safari (but not Chrome) clips the cancel button when the search input has 364 | * padding (and `textfield` appearance). 365 | */ 366 | 367 | input[type="search"]::-webkit-search-cancel-button, 368 | input[type="search"]::-webkit-search-decoration { 369 | -webkit-appearance: none; 370 | } 371 | 372 | /** 373 | * Define consistent border, margin, and padding. 374 | */ 375 | 376 | fieldset { 377 | border: 1px solid #c0c0c0; 378 | margin: 0 2px; 379 | padding: 0.35em 0.625em 0.75em; 380 | } 381 | 382 | /** 383 | * 1. Correct `color` not being inherited in IE 8/9/10/11. 384 | * 2. Remove padding so people aren't caught out if they zero out fieldsets. 385 | */ 386 | 387 | legend { 388 | border: 0; /* 1 */ 389 | padding: 0; /* 2 */ 390 | } 391 | 392 | /** 393 | * Remove default vertical scrollbar in IE 8/9/10/11. 394 | */ 395 | 396 | textarea { 397 | overflow: auto; 398 | } 399 | 400 | /** 401 | * Don't inherit the `font-weight` (applied by a rule above). 402 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. 403 | */ 404 | 405 | optgroup { 406 | font-weight: bold; 407 | } 408 | 409 | /* Tables 410 | ========================================================================== */ 411 | 412 | /** 413 | * Remove most spacing between table cells. 414 | */ 415 | 416 | table { 417 | border-collapse: collapse; 418 | border-spacing: 0; 419 | } 420 | 421 | td, 422 | th { 423 | padding: 0; 424 | } 425 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_search.scss: -------------------------------------------------------------------------------- 1 | .searchbar { 2 | margin: 0 auto; 3 | } 4 | 5 | .searchbar input[type="url"] { 6 | width: 80%; 7 | display: inline-block; 8 | @media (max-width: 480px) { 9 | width: 70%; 10 | } 11 | } 12 | 13 | .searchbar input[type="submit"] { 14 | width: calc(20% - 15px); 15 | padding-left: 0; 16 | padding-right: 0; 17 | margin-left: 15px; 18 | margin-right: 0; 19 | display: inline-block; 20 | @media (max-width: 480px) { 21 | width: 30%; 22 | margin-left: 0px; 23 | } 24 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_sidebar.scss: -------------------------------------------------------------------------------- 1 | #wrapper { 2 | padding-left: $sidebar--wide; 3 | transition: all 0.4s ease 0s; 4 | margin-top: $navbar-height; 5 | } 6 | 7 | #sidebar-wrapper { 8 | margin-left: -$sidebar--wide; 9 | left: $sidebar--wide; 10 | width: $sidebar--wide; 11 | height: 100%; 12 | overflow-y: auto; 13 | z-index: 900; 14 | transition: all 0.4s ease 0s; 15 | } 16 | 17 | .sidebar-nav { 18 | position: fixed; 19 | top: $navbar-height; 20 | width: $sidebar--wide; 21 | margin: 0; 22 | padding: 2em 0; 23 | z-index: 1100; 24 | height: 100vh; 25 | border-right: 2px solid darken(aquamarine, 40%); 26 | ul { 27 | list-style: none; 28 | padding: 0; 29 | } 30 | .dropdown-menu { 31 | overflow-y: scroll; 32 | max-height: 50vh; 33 | } 34 | 35 | } 36 | 37 | @media (max-width: 930px) { 38 | 39 | #wrapper { 40 | padding-left: 0; 41 | } 42 | 43 | #sidebar-wrapper { 44 | left: 0; 45 | } 46 | 47 | #wrapper.active { 48 | position: relative; 49 | left: $sidebar--wide; 50 | } 51 | 52 | #wrapper.active #sidebar-wrapper { 53 | left: $sidebar--wide; 54 | width: $sidebar--wide; 55 | transition: all 0.4s ease 0s; 56 | } 57 | 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_style.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Colors and backgrounds 3 | */ 4 | 5 | $row: 100%; 6 | $row--wide: 900px; 7 | $gutter: 20px; 8 | $small: 12px; 9 | 10 | $color--brand: #c90000; 11 | $color--background-secondary: #EEE; 12 | 13 | .input-asset-fixed { 14 | position: fixed; 15 | z-index: 100; 16 | width: 100%; 17 | border-bottom: 2px solid darken(aquamarine, 40%) !important; 18 | input { 19 | background: lighten(aquamarine, 10%); 20 | } 21 | ::-webkit-input-placeholder { /* WebKit, Blink, Edge */ 22 | color: lighten(#109, 20%); 23 | } 24 | :-moz-placeholder { /* Mozilla Firefox 4 to 18 */ 25 | color: lighten(#109, 20%); 26 | opacity: 1; 27 | } 28 | ::-moz-placeholder { /* Mozilla Firefox 19+ */ 29 | color: lighten(#109, 20%); 30 | opacity: 1; 31 | } 32 | :-ms-input-placeholder { /* Internet Explorer 10-11 */ 33 | color: lighten(#109, 20%); 34 | } 35 | .inner-addon .glyphicon-input { 36 | color: lighten(#109, 20%); 37 | } 38 | } 39 | 40 | .input-content { 41 | border: 1px solid rgba(0, 0, 0, 0); 42 | background: lighten(aquamarine, 20%); 43 | } 44 | 45 | .input-content-panel { 46 | ::-webkit-input-placeholder { /* WebKit, Blink, Edge */ 47 | color: lighten(#109, 20%); 48 | } 49 | :-moz-placeholder { /* Mozilla Firefox 4 to 18 */ 50 | color: lighten(#109, 20%); 51 | opacity: 1; 52 | } 53 | ::-moz-placeholder { /* Mozilla Firefox 19+ */ 54 | color: lighten(#109, 20%); 55 | opacity: 1; 56 | } 57 | :-ms-input-placeholder { /* Internet Explorer 10-11 */ 58 | color: lighten(#109, 20%); 59 | } 60 | .inner-addon .glyphicon-input { 61 | color: lighten(#109, 20%); 62 | } 63 | } 64 | 65 | /* enable absolute positioning */ 66 | .inner-addon { 67 | position: relative; 68 | } 69 | 70 | /* style icon */ 71 | .inner-addon .glyphicon-input { 72 | position: absolute; 73 | padding: 1em; 74 | pointer-events: none; 75 | } 76 | 77 | /* align icon */ 78 | .left-addon .glyphicon-input { 79 | left: 0; 80 | } 81 | .right-addon .glyphicon-input { 82 | right: 0; 83 | } 84 | 85 | /* add padding */ 86 | .left-addon input { 87 | padding-left: 3em; 88 | } 89 | .right-addon input { 90 | padding-right: 3em; 91 | } 92 | 93 | #page-content-wrapper { 94 | width: 100%; 95 | max-width: 840px; 96 | } 97 | 98 | .page-content { 99 | padding: 0 1em; 100 | padding-bottom: 5em; 101 | padding-top: 1em; 102 | } 103 | 104 | .content-text { 105 | margin-top: 2em; 106 | text-align: center; 107 | } 108 | 109 | .hero, 110 | .page--result { 111 | background-color: $color--background-secondary; 112 | } 113 | 114 | .logo-brand { 115 | > span:first-of-type { 116 | font-weight: 700; 117 | } 118 | } 119 | 120 | .navbar-fixed-bottom { 121 | margin-left: $sidebar--wide; 122 | } 123 | 124 | @media (max-width: 930px) { 125 | .navbar-fixed-bottom { 126 | margin-left: 0; 127 | } 128 | } 129 | 130 | /** 131 | * Layout 132 | */ 133 | 134 | .row { 135 | max-width: $row; 136 | margin-left: auto; 137 | margin-right: auto; 138 | } 139 | 140 | .row--wide { 141 | max-width: $row--wide; 142 | margin-left: auto; 143 | margin-right: auto; 144 | } 145 | 146 | .row--narrow { 147 | max-width: ($screen-md-min / 1.75); 148 | } 149 | 150 | .vertical-align-outer { 151 | position: absolute; 152 | display: table; 153 | width: 100%; 154 | height: 100%; 155 | } 156 | 157 | .vertical-align-inner { 158 | display: table-cell; 159 | vertical-align: middle; 160 | } 161 | 162 | #app-container { 163 | margin-top: 50vh; 164 | text-align: center; 165 | } 166 | 167 | #container { 168 | 169 | } 170 | 171 | .content-header-wrapper { 172 | width: 100%; 173 | } 174 | 175 | .content-header { 176 | width: 100%; 177 | max-width: $content--max-width; 178 | position: fixed; 179 | height: 70px; 180 | box-shadow: 0 2px 2px -2px rgba(0, 0, 0, .5); 181 | z-index: 1200; 182 | } 183 | -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_transaction.scss: -------------------------------------------------------------------------------- 1 | .transaction-container { 2 | 3 | } 4 | 5 | .transaction-container-actions { 6 | margin-top: 1em 7 | } 8 | 9 | .transaction-header { 10 | background: lighten(aquamarine, 20%); 11 | border-bottom: 1px solid darken(aquamarine, 40%); 12 | border-top: 1px solid darken(aquamarine, 40%); 13 | margin-bottom: 1em; 14 | } 15 | 16 | .transaction-header, 17 | .transaction-body { 18 | padding: 0.4em 1em; 19 | } 20 | 21 | .transaction-link { 22 | cursor: pointer; 23 | &:hover { 24 | text-decoration: underline; 25 | } 26 | } 27 | 28 | .transaction-row-label, 29 | .transaction-row-value { 30 | text-overflow: ellipsis; 31 | overflow-x: hidden; 32 | } 33 | 34 | .transaction-flow-row { 35 | margin: 1em; 36 | } 37 | 38 | .transaction-flow-col { 39 | padding: 0; 40 | } 41 | 42 | .transaction-flow-title { 43 | margin-bottom: 1em; 44 | text-align: center; 45 | } 46 | 47 | .transaction-flow-body { 48 | text-overflow: ellipsis; 49 | overflow-x: hidden; 50 | padding-right: 2em 51 | } 52 | 53 | .transaction-flow-glyph-right { 54 | position: absolute; 55 | left: -15px; 56 | } 57 | 58 | .transaction-list-null { 59 | margin-top: 60px; 60 | text-align: center; 61 | } 62 | 63 | .transaction-panel { 64 | border-bottom: 1px solid darken(aquamarine, 40%); 65 | border-left: 1px solid rgba(0, 0, 0, 0); 66 | border-right: 1px solid rgba(0, 0, 0, 0); 67 | border-top: 1px solid rgba(0, 0, 0, 0); 68 | &:hover { 69 | background: white; 70 | border: 1px solid darken(aquamarine, 40%); 71 | } 72 | &.hit { 73 | background: lighten(red, 40%) !important; 74 | border: 1px solid lighten(red, 20%); 75 | } 76 | margin-bottom: 1em; 77 | max-width: 800px; 78 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_typography.scss: -------------------------------------------------------------------------------- 1 | html { 2 | font-size: $font-size-root; 3 | -webkit-tap-highlight-color: rgba(0,0,0,0); 4 | 5 | @media ($screen-lg) { 6 | font-size: $font-size-root-lg; 7 | } 8 | } 9 | 10 | body { 11 | font-family: $font-family-base; 12 | font-size: $font-size-base; 13 | font-weight: $font-weight-base; 14 | line-height: $line-height; 15 | color: $text-color; 16 | background-color: $body-bg; 17 | 18 | // handling long text, like URLs 19 | overflow-wrap: break-word; 20 | word-wrap: break-word; 21 | word-break: break-word; 22 | 23 | text-rendering: optimizeLegibility; 24 | // Controversial! But prevents text flickering in 25 | // Safari/Firefox when animations are running 26 | -webkit-font-smoothing: antialiased; 27 | -moz-osx-font-smoothing: grayscale; 28 | -moz-font-feature-settings: 'liga', 'kern'; 29 | 30 | // remove old style numerals 31 | font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "pnum" 1, "tnum" 0, "onum" 0, "lnum" 0, "dlig" 1; 32 | } 33 | 34 | 35 | // 36 | // Links 37 | // 38 | a { 39 | color: $link-color; 40 | text-decoration: none; 41 | transition: .2s ease-out; 42 | 43 | &:hover, 44 | &:focus { 45 | color: $link-hover-color; 46 | outline: 0; 47 | } 48 | 49 | &:active { } 50 | 51 | .icon { 52 | stroke: $link-color; 53 | } 54 | } 55 | 56 | 57 | // 58 | // Headings 59 | // 60 | h1, h2, h3, h4, h5, h6, 61 | .h1, .h2, .h3, .h4, .h5, .h6 { 62 | font-family: $headings-font-family; 63 | line-height: $headings-line-height; 64 | color: $headings-color; 65 | 66 | // remove old style numerals 67 | font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "pnum" 1, "tnum" 0, "onum" 0, "lnum" 0, "dlig" 1; 68 | 69 | .wf-loading & { 70 | font-weight: $font-weight-normal; 71 | } 72 | 73 | &, 74 | .wf-active &, 75 | .wf-inactive & { 76 | font-weight: $headings-font-weight; 77 | } 78 | } 79 | 80 | 81 | h1, .h1, 82 | h2, .h2, 83 | h3, .h3 { 84 | margin-top: ($spacer * 2); 85 | margin-bottom: ($spacer * 2); 86 | } 87 | 88 | h4, .h4, 89 | h5, .h5, 90 | h6, .h6 { 91 | margin-top: $spacer; 92 | margin-bottom: $spacer; 93 | } 94 | 95 | h5, .h5, 96 | h6, .h6 { 97 | &, 98 | .wf-active &, 99 | .wf-inactive & { 100 | font-weight: $font-weight-normal; 101 | } 102 | } 103 | 104 | h1, .h1 { font-size: $font-size-h1; } 105 | h2, .h2 { font-size: $font-size-h2; } 106 | h3, .h3 { font-size: $font-size-h3; } 107 | h4, .h4 { font-size: $font-size-h4; } 108 | h5, .h5 { font-size: $font-size-h5; } 109 | h6, .h6 { font-size: $font-size-h6; } 110 | 111 | 112 | // 113 | // Body text 114 | // 115 | p { 116 | margin: 0 0 $spacer; 117 | } 118 | 119 | 120 | // 121 | // Emphasis & misc 122 | // 123 | small, 124 | .small { 125 | font-size: $font-size-sm; 126 | font-weight: $font-weight-normal; 127 | } 128 | 129 | .mini { 130 | font-size: $font-size-xs; 131 | font-weight: $font-weight-normal; 132 | } 133 | 134 | .large { 135 | font-size: $font-size-lg; 136 | } 137 | 138 | strong, 139 | .strong, 140 | .bold { 141 | font-weight: $font-weight-bold; 142 | } 143 | 144 | em, 145 | .italic { 146 | font-style: italic; 147 | } 148 | 149 | .light { 150 | font-weight: $font-weight-light; 151 | } 152 | 153 | // Alignment 154 | .text-left { text-align: left; } 155 | .text-right { text-align: right; } 156 | .text-center { text-align: center; } 157 | .text-justify { text-align: justify; } 158 | .text-nowrap { white-space: nowrap; } 159 | 160 | // Transformation 161 | .text-lowercase { text-transform: lowercase; } 162 | .text-uppercase { text-transform: uppercase; } 163 | .text-capitalize { text-transform: capitalize; } 164 | 165 | .text-dimmed { color: $gray-light } 166 | 167 | 168 | .lead { 169 | font-size: $font-size-lg; 170 | color: $headings-color; 171 | line-height: $line-height-lg; 172 | } -------------------------------------------------------------------------------- /src/app/styles/bigchaindb/_variables.scss: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Global variables 4 | // 5 | // taken straight out of 6 | // https://github.com/ascribe/bigchain-website/blob/master/_src/_assets/styles/bigchain/_variables.scss 7 | // 8 | 9 | // 10 | // Colors 11 | // 12 | $brand-main-green: #39BA91 !default; 13 | $brand-main-blue: #074354 !default; 14 | $brand-main-gray: #445261 !default; 15 | $brand-main-blue-dark: #101A25 !default; 16 | 17 | $brand-main-violet: #B581CF !default; 18 | $brand-main-blue-light: #BFE6EC !default; 19 | $brand-main-gray-light: #CAD2DA !default; 20 | $brand-main-gray-lighter: #E8EBEF !default; 21 | 22 | $gray: $brand-main-gray !default; 23 | $gray-light: lighten($brand-main-gray, 35%) !default; 24 | $gray-dark: darken($brand-main-gray, 5%) !default; 25 | 26 | $brand-primary: $brand-main-green !default; 27 | 28 | // alerts 29 | $brand-success: #388250 !default; 30 | $brand-info: #3E91CE !default; 31 | $brand-warning: #8E8E24 !default; 32 | $brand-danger: #c9726a !default; 33 | 34 | 35 | // 36 | // Typography 37 | // 38 | $font-family-base: 'europa', 'Avenir Next', 'Avenir', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif !default; 39 | $font-family-monospace: Menlo, Monaco, Consolas, 'Courier New', monospace !default; 40 | 41 | $font-weight-light: 300 !default; 42 | $font-weight-normal: 400 !default; 43 | $font-weight-bold: 600 !default; 44 | $font-weight-base: $font-weight-normal !default; 45 | 46 | $font-size-root: 18px !default; 47 | $font-size-root-lg: 20px !default; 48 | 49 | $font-size-base: 1rem !default; 50 | $font-size-lg: 1.3rem !default; 51 | $font-size-sm: 0.85rem !default; 52 | $font-size-xs: 0.7rem !default; 53 | 54 | $font-size-h1: 2.7rem !default; 55 | $font-size-h2: 2.3rem !default; 56 | $font-size-h3: 1.8rem !default; 57 | $font-size-h4: 1.45rem !default; 58 | $font-size-h5: $font-size-lg !default; 59 | $font-size-h6: $font-size-base !default; 60 | 61 | $line-height: 1.5 !default; 62 | 63 | $headings-font-family: inherit !default; 64 | $headings-font-weight: $font-weight-light !default; 65 | $headings-line-height: 1.2 !default; 66 | $headings-color: $brand-main-blue !default; 67 | 68 | 69 | // 70 | // Scaffolding 71 | // 72 | $body-bg: $brand-main-gray-lighter !default; 73 | $text-color: $brand-main-gray !default; 74 | 75 | $link-color: $brand-primary !default; 76 | $link-hover-color: lighten($brand-primary, 10%) !default; 77 | $link-hover-bg: rgba($brand-primary, .8) !default; 78 | 79 | $menu-height: 3rem !default; 80 | 81 | 82 | // 83 | // Responsive breakpoints 84 | // 85 | $screen-sm-min: 40em !default; 86 | $screen-md-min: 50em !default; 87 | $screen-lg-min: 85em !default; 88 | 89 | $screen-sm: 'min-width: #{$screen-sm-min}'; 90 | $screen-md: 'min-width: #{$screen-md-min}'; 91 | $screen-lg: 'min-width: #{$screen-lg-min}'; 92 | 93 | 94 | // 95 | // Components 96 | // 97 | $spacer: 1rem !default; 98 | $line-height-lg: (4 / 3) !default; 99 | $line-height-sm: 1.3 !default; 100 | $line-height-xs: 1.2 !default; 101 | 102 | $border-radius: .15rem !default; 103 | $border-radius-lg: .2rem !default; 104 | $border-radius-sm: .1rem !default; 105 | $border-radius-xs: .1rem !default; 106 | 107 | $component-active-color: $brand-main-blue !default; 108 | $component-active-bg: $brand-primary !default; 109 | 110 | 111 | // 112 | // Code 113 | // 114 | $code-color: $brand-main-gray-lighter !default; 115 | $code-bg: $gray-dark !default; 116 | 117 | $kbd-color: $code-color !default; 118 | $kbd-bg: $code-bg !default; 119 | 120 | $pre-bg: $code-bg !default; 121 | $pre-color: $code-color !default; 122 | $pre-scrollable-max-height: 340px !default; 123 | 124 | 125 | // 126 | // Buttons 127 | // 128 | $btn-font-family: inherit; 129 | $btn-font-weight: $font-weight-bold !default; 130 | 131 | $btn-padding-x: 2rem !default; 132 | $btn-padding-y: .5rem !default; 133 | 134 | $btn-primary-color: $brand-main-blue !default; 135 | $btn-primary-bg: $brand-primary !default; 136 | 137 | $btn-secondary-color: $brand-main-blue !default; 138 | $btn-secondary-bg: $gray-light !default; 139 | 140 | $btn-blue-color: $brand-primary !default; 141 | $btn-blue-bg: $brand-main-blue !default; 142 | 143 | $btn-violet-color: $brand-main-blue !default; 144 | $btn-violet-bg: $brand-main-violet !default; 145 | 146 | $btn-info-color: #fff !default; 147 | $btn-info-bg: $brand-info !default; 148 | 149 | $btn-success-color: #fff !default; 150 | $btn-success-bg: $brand-success !default; 151 | 152 | $btn-warning-color: #fff !default; 153 | $btn-warning-bg: $brand-warning !default; 154 | 155 | $btn-danger-color: #fff !default; 156 | $btn-danger-bg: $brand-danger !default; 157 | 158 | $btn-link-disabled-color: $gray-light !default; 159 | 160 | $btn-padding-x-xs: .75rem !default; 161 | $btn-padding-y-xs: .15rem !default; 162 | 163 | $btn-padding-x-sm: 1.25rem !default; 164 | $btn-padding-y-sm: .4rem !default; 165 | 166 | $btn-padding-x-lg: 3rem !default; 167 | $btn-padding-y-lg: 1rem !default; 168 | 169 | // Allows for customizing button radius independently from global border radius 170 | $btn-border-radius: $border-radius !default; 171 | $btn-border-radius-lg: $border-radius-lg !default; 172 | $btn-border-radius-sm: $border-radius-sm !default; 173 | $btn-border-radius-xs: $border-radius-xs !default; 174 | 175 | 176 | // 177 | // Forms 178 | // 179 | $input-font: inherit !default; 180 | $input-font-weight: $font-weight-normal !default; 181 | 182 | $input-padding-x: .5rem !default; 183 | $input-padding-y: 0 !default; 184 | 185 | $input-bg: transparent !default; 186 | $input-bg-disabled: $gray-dark !default; 187 | 188 | $input-color: $gray-dark !default; 189 | $input-border-color: $gray !default; 190 | 191 | $input-border-focus: $gray-dark !default; 192 | $input-color-placeholder: $gray !default; 193 | 194 | 195 | 196 | // 197 | // Old stuff 198 | // 199 | 200 | /** 201 | * Colors and backgrounds 202 | */ 203 | 204 | /*79589F*/ 205 | $ascribe-black: #222; 206 | $ascribe-dark-blue: #003C69; 207 | $ascribe-blue: #65CFE9; 208 | $ascribe-light-blue: #D3DEE4; 209 | $ascribe-pink: #D10074; 210 | $ascribe-white: white; 211 | 212 | $color--brand: #c90000; 213 | $color--background: #FAFAFA; 214 | $color--background-secondary: #FAFAFA; 215 | 216 | $bg-color: #FAFAFA; 217 | $fg-color: black; 218 | $bg-color--hover: lighten($fg-color, 20%); 219 | 220 | /** 221 | * Sizes 222 | */ 223 | 224 | $ascribe--spinner-color: $ascribe-blue; 225 | 226 | $ascribe--spinner-size-lg: 50px; 227 | $ascribe--spinner-size-md: 30px; 228 | $ascribe--spinner-size-sm: 15px; 229 | 230 | $navbar-height: 70px; 231 | $header-height: 70px; 232 | 233 | $row: 700px; 234 | $row--wide: 900px; 235 | $gutter: 20px; 236 | $small: 12px; 237 | 238 | $content--max-width: 1100px; 239 | $sidebar--wide: 250px; 240 | 241 | // 242 | // Grid 243 | // 244 | $gutter-space: ($spacer * 2) !default; 245 | -------------------------------------------------------------------------------- /src/app/styles/main.scss: -------------------------------------------------------------------------------- 1 | // 2 | // BigchainDB stuff 3 | // 4 | @import './bigchaindb/_normalize.css'; 5 | @import './bigchaindb/variables'; 6 | @import './bigchaindb/mixins'; 7 | @import './bigchaindb/typography'; 8 | @import './bigchaindb/layout'; 9 | @import './bigchaindb/grid'; 10 | @import './bigchaindb/menu'; 11 | @import './bigchaindb/icons'; 12 | @import './bigchaindb/buttons'; 13 | @import './bigchaindb/forms'; 14 | @import './bigchaindb/logo'; 15 | @import './bigchaindb/animations'; 16 | @import './bigchaindb/code'; 17 | @import './bigchaindb/modal'; 18 | @import './bigchaindb/sidebar'; 19 | @import './bigchaindb/style'; 20 | 21 | // 22 | // Page specific 23 | // 24 | @import './App'; 25 | @import './Steps'; 26 | @import './Layout'; 27 | @import './Code'; 28 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | BigchainDB CRAB tutorial 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 36 | 37 | 38 |
39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | const MiniCssExtractPlugin = require("mini-css-extract-plugin"); 4 | const Dotenv = require('dotenv-webpack') 5 | const HtmlWebPackPlugin = require("html-webpack-plugin"); 6 | 7 | const CONTENT_DIR = path.resolve(__dirname, 'dist') 8 | const BASE_DIR = path.resolve(__dirname) 9 | const PRODUCTION = process.env.NODE_ENV === 'production' 10 | 11 | module.exports = { 12 | entry: './src/app/index.jsx', 13 | output: { 14 | publicPath: '/crab/', 15 | filename: 'public/bundle.js' 16 | }, 17 | resolve: { 18 | extensions: ['.js', '.jsx', '.scss', '.css'] 19 | }, 20 | module: { 21 | rules: [ 22 | { 23 | test: /\.(js|jsx)$/, 24 | exclude: /node_modules/, 25 | use: { 26 | loader: "babel-loader" 27 | } 28 | }, 29 | { 30 | test: /\.scss$/, 31 | use: [ 32 | MiniCssExtractPlugin.loader, 33 | { loader: 'css-loader', options: { sourceMap: true, importLoaders: 1 } }, 34 | { loader: 'sass-loader', options: { sourceMap: true } }, 35 | ] 36 | }, 37 | { 38 | test: /\.(jpe?g|png|gif|svg)$/i, 39 | loaders: [ 40 | 'file-loader?hash=sha512&digest=hex&name=public/img/[hash].[ext]', 41 | 'image-webpack-loader?bypassOnDebug' 42 | ] 43 | } 44 | ] 45 | }, 46 | plugins: [ 47 | new MiniCssExtractPlugin({ 48 | filename: "public/styles.css", 49 | chunkFilename: "[id].css" 50 | }), 51 | new Dotenv({ 52 | path: PRODUCTION ? './.env' : './.env.local', // Path to .env file (this is the default) 53 | safe: false // load .env.example (defaults to "false" which does not use dotenv-safe) 54 | }), 55 | new HtmlWebPackPlugin({ 56 | template: "./src/index.html", 57 | filename: "./index.html" 58 | }) 59 | ], 60 | devServer: { 61 | contentBase: [CONTENT_DIR], 62 | inline: true, 63 | port: 4000, 64 | historyApiFallback: { 65 | index: 'index.html' 66 | } 67 | }, 68 | } 69 | --------------------------------------------------------------------------------