Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
byteface committed Jun 17, 2020
1 parent 07434af commit 0b4e57b
Show file tree
Hide file tree
Showing 9 changed files with 940 additions and 263 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,24 @@ from html5print import HTMLBeautifier
print(HTMLBeautifier.beautify(output, 4))
```

### common errors
If you incorrectly type the code it will obviously not work. So there are a bunch of common ones I've noticed :

##### TODO - catch these and raise a friendly error that tells you what to fix
### Common Errors
If you incorrectly type code it will obviously not work. So there are a bunch of common ones I've noticed when creating large domonic templates. :

IndexError: list index out of range
- You most likely didn't put a underscore on an attribute.

SyntaxError: invalid syntax
- You most likely are missing a comma somewhere between params
- You are Missing a comma between attributes

SyntaxError: positional argument follows keyword argument
- You have to pass attributes LAST. and strings and objects first. *see docs*

TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'dict'
- You are Missing a comma between attributes. before the **{}

##### TODO - catch these and raise a friendly custom ParseError that tells you what to fix



### run tests
```bash
Expand Down
15 changes: 15 additions & 0 deletions archive/bs5_test_carousel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<head><meta charset="utf-8" /><meta name="viewport" content="_width=device-width, initial-scale=1" /><meta name="description" content="" /><meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors" /><meta name="generator" content="Hugo 0.72.0" /><title>Carousel Template · Bootstrap</title><link rel="canonical" href="https://v5.getbootstrap.com/docs/5.0/examples/carousel/" /><link href="/docs/5.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1234" crossorigin="anonymous" /><link rel="apple-touch-icon" href="/docs/5.0/assets/img/favicons/apple-touch-icon.png" sizes="180x180" /><link rel="icon" href="/docs/5.0/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png" /><link rel="icon" href="/docs/5.0/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png" /><link rel="manifest" href="/docs/5.0/assets/img/favicons/manifest.json" /><link rel="mask-icon" href="/docs/5.0/assets/img/favicons/safari-pinned-tab.svg" color="#7952b3" /><link rel="icon" href="/docs/5.0/assets/img/favicons/favicon.ico" /><meta name="theme-color" content="#7952b3" /><style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style><link href="carousel.css" rel="stylesheet" /></head><body><header><a class="navbar-brand" href="#">Carousel</a><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button><li class="nav-item active"><a class="nav-link" aria-current="page" href="#">Home</a></li><li class="nav-item"><a class="nav-link" href="#">Link</a></li><li class="nav-item"><a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a></li><input class="form-control mr-2" type="search" placeholder="Search" aria-label="Search" /></header><main><li data-target="#myCarousel" data-slide-to="0" class="active"></li><li data-target="#myCarousel" data-slide-to="1"></li><li data-target="#myCarousel" data-slide-to="2"></li><svg _class="bd-placeholder-img", _width="100%", _height="100%" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice", _role="img" focusable="false",<rect _width="100%", _height="100%" fill="#777")</svg><h1>Example headline.</h1><p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p><p><a class="btn btn-lg btn-primary" href="#" role="button">Sign up today</a></p><svg _class="bd-placeholder-img", _width="100%", _height="100%" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice", _role="img" focusable="false",<rect _width="100%", _height="100%" fill="#777")</svg><h1>Another example headline.</h1><p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p><p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p><svg _class="bd-placeholder-img", _width="100%", _height="100%" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice", _role="img" focusable="false",<rect _width="100%", _height="100%" fill="#777")</svg><h1>One more for good measure.</h1><p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p><p><a class="btn btn-lg btn-primary" href="#" role="button">Browse gallery</a></p><span aria-hidden="true" class="carousel-control-prev-icon"></span><span class="sr-only">Previous</span><span class="carousel-control-next-icon" aria-hidden="true"></span><span class="sr-only">Next</span><svg _class="bd-placeholder-img rounded-circle", _width="140", _height="140" xmlns="http://www.w3.org/2000/svg" aria-label="Placeholder: 140x140" preserveAspectRatio="xMidYMid slice", _role="img" focusable="false",title(Placeholder)<rect _width="100%", _height="100%" fill="#777")<text x="50%" y="50%" fill="#777" dy=".3em">140x140</text></svg><h2>Heading</h2><p>Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.</p><p><a class="btn btn-secondary" href="#" role="button">View details &raquo;</a></p><svg _class="bd-placeholder-img rounded-circle", _width="140", _height="140" xmlns="http://www.w3.org/2000/svg" aria-label="Placeholder: 140x140" preserveAspectRatio="xMidYMid slice", _role="img" focusable="false",title(Placeholder)<rect _width="100%", _height="100%" fill="#777")<text x="50%" y="50%" fill="#777" dy=".3em">140x140</text></svg><h2>Heading</h2><p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.</p><p><a class="btn btn-secondary" href="#" role="button">View details &raquo;</a></p><svg _class="bd-placeholder-img rounded-circle", _width="140", _height="140" xmlns="http://www.w3.org/2000/svg" aria-label="Placeholder: 140x140" preserveAspectRatio="xMidYMid slice", _role="img" focusable="false",title(Placeholder)<rect _width="100%", _height="100%" fill="#777")<text x="50%" y="50%" fill="#777" dy=".3em">140x140</text></svg><h2>Heading</h2><p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p><p><a class="btn btn-secondary" href="#" role="button">View details &raquo;</a></p><hr class="featurette-divider" /><h2 class="featurette-heading">First featurette heading.<span class="text-muted"></span>It’ll blow your mind.</h2><p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p><div class="col-md-5"><svg _class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto", _width="500", _height="500" xmlns="http://www.w3.org/2000/svg" aria-label="Placeholder: 500x500" preserveAspectRatio="xMidYMid slice", _role="img" focusable="false",title(Placeholder)<rect _width="100%", _height="100%" fill="#eee")<text x="50%" y="50%" fill="#aaa" dy=".3em">500x500</text></svg></div><hr class="featurette-divider" /><h2 class="featurette-heading">Oh yeah, it’s that good.<span class="text-muted"></span>See for yourself.</h2><p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p><svg _class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto", _width="500", _height="500" xmlns="http://www.w3.org/2000/svg" aria-label="Placeholder: 500x500" preserveAspectRatio="xMidYMid slice", _role="img" focusable="false",title(Placeholder)<rect _width="100%", _height="100%" fill="#eee")<text x="50%" y="50%" fill="#aaa" dy=".3em">500x500</text></svg><hr class="featurette-divider" /><h2 class="featurette-heading">Checkmate.And lastly, this one.<span class="text-muted"></span></h2><p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p><div class="col-md-5"><svg _class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto", _width="500", _height="500" xmlns="http://www.w3.org/2000/svg" aria-label="Placeholder: 500x500" preserveAspectRatio="xMidYMid slice", _role="img" focusable="false",title(Placeholder)<rect _width="100%", _height="100%" fill="#eee")<text x="50%" y="50%" fill="#aaa" dy=".3em">500x500</text></svg></div><hr class="featurette-divider" /><p class="float-right">Back to top<a href="#"></a></p><p>&copy; 2017-2020 Company, Inc. &middot;<a href="#">Privacy</a>&middot;<a href="#">Terms</a></p><script src="/docs/5.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-12345" crossorigin="anonymous"></script></main></body>
15 changes: 15 additions & 0 deletions bs5_test_dashboard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><meta name="description" content="" /><meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors" /><meta name="generator" content="Hugo 0.72.0" /><title>Dashboard Template · Bootstrap</title><link rel="canonical" href="https://v5.getbootstrap.com/docs/5.0/examples/dashboard/" /><link href="/docs/5.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1234" crossorigin="anonymous" /><link rel="apple-touch-icon" href="/docs/5.0/assets/img/favicons/apple-touch-icon.png" sizes="180x180" /><link rel="icon" href="/docs/5.0/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png" /><link rel="icon" href="/docs/5.0/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png" /><link rel="manifest" href="/docs/5.0/assets/img/favicons/manifest.json" /><link rel="mask-icon" href="/docs/5.0/assets/img/favicons/safari-pinned-tab.svg" color="#7952b3" /><link rel="icon" href="/docs/5.0/assets/img/favicons/favicon.ico" /><meta name="theme-color" content="#7952b3" /><style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style><link href="dashboard.css" rel="stylesheet" /></head><body><a class="navbar-brand col-md-3 col-lg-2 mr-0 px-3" href="#">Company name</a><button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-toggle="collapse" data-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button><li class="nav-item text-nowrap"><a class="nav-link" href="#">Sign out</a></li><li class="nav-item"><a class="nav-link active" aria-current="page" href="#"><span data-feather="home"></span>Dashboard</a></li><li class="nav-item"><a class="nav-link" href="#"><span data-feather="file"></span>Orders</a></li><li class="nav-item"><a class="nav-link" href="#"><span data-feather="shopping-cart"></span>Products</a></li><li class="nav-item"><a class="nav-link" href="#"><span data-feather="users"></span>Customers</a></li><li class="nav-item"><a class="nav-link" href="#"><span data-feather="bar-chart-2"></span>Reports</a></li><li class="nav-item"><a class="nav-link" href="#"><span data-feather="layers"></span>Integrations</a></li><span>Saved reports</span><a class="link-secondary" href="#"><span data-feather="plus-circle" aria-label="Add a new report"></span></a><li class="nav-item"><a class="nav-link" href="#"><span data-feather="file-text"></span>Current month</a></li><li class="nav-item"><a class="nav-link" href="#"><span data-feather="file-text"></span>Last quarter</a></li><li class="nav-item"><a class="nav-link" href="#"><span data-feather="file-text"></span>Social engagement</a></li><li class="nav-item"><a class="nav-link" href="#"><span data-feather="file-text"></span>Year-end sale</a></li><h1 class="h2">Dashboard</h1><button type="button" class="btn btn-sm btn-outline-secondary">Share</button><button type="button" class="btn btn-sm btn-outline-secondary">Export</button><button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle"><span data-feather="calendar"></span>This week</button><canvas class="my-4 w-100" id="myChart" width="900" height="380"></canvas><h2>Section title</h2><thead><tr><th> #</th><th>Header</th><th>Header</th><th>Header</th><th>Header</th></tr></thead><tbody><tr><td>1, 001</td><td>Lorem</td><td>ipsum</td><td>dolor</td><td>sit</td></tr><tr><td>1, 002</td><td>amet</td><td>consectetur</td><td>adipiscing</td><td>elit</td></tr><tr><td>1, 003</td><td>Integer</td><td>nec</td><td>odio</td><td>Praesent</td></tr><tr><td>1, 003</td><td>libero</td><td>Sed</td><td>cursus</td><td>ante</td></tr><tr><td>1, 004</td><td>dapibus</td><td>diam</td><td>Sed</td><td>nisi</td></tr><tr><td>1, 005</td><td>Nulla</td><td>quis</td><td>sem</td><td>at</td></tr><tr><td>1, 006</td><td>nibh</td><td>elementum</td><td>imperdiet</td><td>Duis</td></tr><tr><td>1, 007</td><td>sagittis</td><td>ipsum</td><td>Praesent</td><td>mauris</td></tr><tr><td>1, 008</td><td>Fusce</td><td>nec</td><td>tellus</td><td>sed</td></tr><tr><td>1, 009</td><td>augue</td><td>semper</td><td>porta</td><td>Mauris</td></tr><tr><td>1, 010</td><td>massa</td><td>Vestibulum</td><td>lacinia</td><td>arcu</td></tr><tr><td>1, 011</td><td>eget</td><td>nulla</td><td>Class</td><td>aptent</td></tr><tr><td>1, 012</td><td>taciti</td><td>sociosqu</td><td>ad</td><td>litora</td></tr><tr><td>1, 013</td><td>torquent</td><td>per</td><td>conubia</td><td>nostra</td></tr><tr><td>1, 014</td><td>per</td><td>inceptos</td><td>himenaeos</td><td>Curabitur</td></tr><tr><td>1, 015</td><td>sodales</td><td>ligula</td><td> in </td><td>libero</td></tr></tbody></body><script src="/docs/5.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-1234" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.24.1/feather.min.js" integrity="sha384-1234" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js" integrity="sha384-1234" crossorigin="anonymous"></script><script src="dashboard.js"></script>
Loading

0 comments on commit 0b4e57b

Please sign in to comment.