Skip to content

Commit

Permalink
add bootstrap to docs site
Browse files Browse the repository at this point in the history
  • Loading branch information
preaction committed Nov 24, 2018
1 parent c4b18e5 commit ffea76f
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
Binary file modified eg/doc-site/docs.db
Binary file not shown.
65 changes: 65 additions & 0 deletions eg/doc-site/myapp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
pages => {
'x-id-field' => 'path',
'x-list-columns' => [qw( path )],
'x-view-item-url' => '/{path}',
properties => {
id => {
readOnly => 1,
},
markdown => {
format => 'markdown',
'x-html-field' => 'html',
Expand All @@ -49,12 +53,73 @@
<html>
<head>
<link rel="stylesheet" href="/yancy/bootstrap.css">
<style>
pre {
border: 1px solid #ccc;
border-radius: 5px;
background: #f6f6f6;
padding: 0.6em;
}
h1 { font-size: 2.00rem }
h2 { font-size: 1.75rem }
h3 { font-size: 1.50rem }
h1, h2, h3 {
position: relative;
}
h1 .permalink, h2 .permalink, h3 .permalink {
position: absolute;
top: auto;
left: -0.7em;
color: #ddd;
}
h1:hover .permalink, h2:hover .permalink, h3:hover .permalink {
color: #212529;
}
.crumbs .more {
font-size: small;
}
</style>
<title><%= title %></title>
</head>
<body>
<header>
<nav class="navbar navbar-dark bg-dark navbar-expand-sm sticky-top">
<a class="navbar-brand" href="/">Yancy</a>
<div class="collapse navbar-collapse" id="navbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/perldoc">
Documentation
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://metacpan.org/pod/Yancy">
CPAN
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/preaction/Yancy">
GitHub
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://kiwiirc.com/nextclient/#irc://irc.perl.org/#yancy?nick=www-guest-?">
Chat
</a>
</li>
</ul>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</nav>
</header>
<main class="container">
<%= content %>
</main>
%= javascript '/yancy/jquery.js'
%= javascript '/yancy/popper.js'
%= javascript '/yancy/bootstrap.js'
</body>
</html>
Expand Down

0 comments on commit ffea76f

Please sign in to comment.