Написати компонент, що може створювати форму з динамічними правилами валідації на базі заданого конфігураційного об’єкта. Об’єкт має наступний вигляд:
{
code: 'Person',
attributes: [
{| license: cc-by-4.0 | |
| height: 500 | |
| scrolling: no | |
| border: no |
| // create a bookmark and use this code as the URL, you can now toggle the css on/off | |
| // thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
| javascript: (function() { | |
| var elements = document.body.getElementsByTagName('*'); | |
| var items = []; | |
| for (var i = 0; i < elements.length; i++) { | |
| if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
| items.push(elements[i]); | |
| } | |
| } |
| <?php | |
| /* | |
| * Virtual Themed Page class | |
| * | |
| * This class implements virtual pages for a plugin. | |
| * | |
| * It is designed to be included then called for each part of the plugin | |
| * that wants virtual pages. | |
| * | |
| * It supports multiple virtual pages and content generation functions. |
| <?php | |
| namespace GM\VirtualPages; | |
| /** | |
| * @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com> | |
| * @license http://opensource.org/licenses/MIT MIT | |
| */ | |
| class Controller implements ControllerInterface { | |
| private $pages; |
| <?xml version="1.0"?> | |
| <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
| <fontconfig> | |
| <!-- | |
| Documented at | |
| http://linux.die.net/man/5/fonts-conf | |
| To check font mapping run the command at terminal | |
| $ fc-match 'helvetica Neue' |
| { | |
| "presets": [ "react", "es2015" ], | |
| "plugins": [ | |
| "transform-es2015-modules-commonjs", | |
| "transform-react-constant-elements" | |
| ] | |
| } |
| states = Array[ ["AK", "Alaska"], | |
| ["AL", "Alabama"], | |
| ["AR", "Arkansas"], | |
| ["AS", "American Samoa"], | |
| ["AZ", "Arizona"], | |
| ["CA", "California"], | |
| ["CO", "Colorado"], | |
| ["CT", "Connecticut"], | |
| ["DC", "District of Columbia"], | |
| ["DE", "Delaware"], |
| Fix to iOS iframe height issue | |
| <iframe id="stupid-iframe" height="200" src="a-file.html"></iframe> | |
| <html> | |
| <body> | |
| <div class="iframe-wrapper" style="width: 100%; height: 200px; overflow: auto; -webkit-overflow-scrolling: touch;"> | |
| </div> | |
| </body> |