[WIP] feat: add base templating logic
This commit is contained in:
6
templates/folder.tpl
Normal file
6
templates/folder.tpl
Normal file
@ -0,0 +1,6 @@
|
||||
<article class="col-4">
|
||||
<h4 class="text-truncate">{{ title }}</h4>
|
||||
<a href="{{ ref }}">
|
||||
<img class="img-thumbnail" src="{{ src }}" height="128" />
|
||||
</a>
|
||||
</article>
|
3
templates/footer.tpl
Normal file
3
templates/footer.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
<footer class="navbar navbar-dark bg-secondary" role="contentinfo">
|
||||
<p>Copyright info goes here</p>
|
||||
</footer>
|
9
templates/head.tpl
Normal file
9
templates/head.tpl
Normal file
@ -0,0 +1,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Thibaud Gasser">
|
||||
<title>My test page</title>
|
||||
<link rel="stylesheet" href="{{ staticdir }}/css/bootstrap.min.css">
|
||||
<script defer src="{{ staticdir }}/js/jquery-3.3.1.slim.min.js"></script>
|
||||
<script defer src="{{ staticdir }}/js/popper.min.js"></script>
|
||||
<script defer src="{{ staticdir }}/js/bootstrap.min.js"></script>
|
17
templates/header.tpl
Normal file
17
templates/header.tpl
Normal file
@ -0,0 +1,17 @@
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light" role="navigation">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="#">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Info</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">About</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="form-inline my-2 my-lg-0">
|
||||
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
|
||||
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
|
||||
</form>
|
||||
</nav>
|
22
templates/main.tpl
Normal file
22
templates/main.tpl
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
{% include "head.tpl" %}
|
||||
</head>
|
||||
<body>
|
||||
{% include "header.tpl" %}
|
||||
<main role="main">
|
||||
<section class="jumbotron">
|
||||
<h1 class="display-4">Hello there!</h1>
|
||||
<p class="lead">General info about the page goes here</p>
|
||||
<p><a class="btn btn-primary btn-lg" href="#">Learn more</a></p>
|
||||
</section>
|
||||
<section class="container">
|
||||
<div class="row">
|
||||
{{ content }}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
{% include "footer.tpl" %}
|
||||
</body>
|
||||
</html>
|
9
templates/video.tpl
Normal file
9
templates/video.tpl
Normal file
@ -0,0 +1,9 @@
|
||||
<article class="col-4">
|
||||
<h4 class="text-truncate">{{ title }}</h4>
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
|
||||
<video class="embed-responsive-item" controls>
|
||||
<source src="{{ src }}" type="{{ mime }}"/>
|
||||
</video>
|
||||
</div>
|
||||
</article>
|
Reference in New Issue
Block a user