A hosting service for Jekyll Blogs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
2.2 KiB

% layout 'standard', title => 'Dashboard', sb_active => 'dashboard';
%= include 'dashboard/_blog_nav'
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="<%= $c->url_for( 'show_dashboard_blog' ) %>">Info</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="<%= $c->url_for( 'show_dashboard_blog_posts' ) %>">Posts</a>
</li>
<li class="nav-item">
<a class="nav-link" href="<%= $c->url_for( 'show_dashboard_blog_settings' ) %>">Settings</a>
</li>
<li class="nav-item">
<a class="nav-link" href="<%= $c->url_for( 'show_dashboard_blog_hooks' ) %>">Hooks</a>
</li>
</ul>
% if ( my $confirmation = flash 'confirmation' ) {
<div style="margin-top: 2em" class="alert alert-success" role="alert">
<%== $confirmation %>
</div>
% }
% if ( $c->stash->{success} ) {
<div style="margin-top: 2em" class="alert alert-success" role="alert">
<%= $c->stash->{success_message} %>
</div>
% }
% if ( $c->stash->{errors} ) {
<div style="margin-top: 2em" class="alert alert-danger" role="alert">
There were errors with your request that could not be resolved:
<ul>
% for my $error ( @{$c->stash->{errors}} ) {
<li><%= $error %></li>
% }
</ul>
</div>
% }
% if ( $blog_posts ) {
<table style="border: 1px solid #ccc" class="table mt-5">
<tbody>
<tr>
<th class="text-nowrap">Title</th>
<th class="text-nowrap">Date</th>
<th class="text-nowrap">Edit</th>
</tr>
</thead>
<tbody>
% for my $post ( @{$blog_posts} ) {
<tr>
<td><a href="<%= $c->url_for( 'show_dashboard_blog', { id => $blog->id } ) %>"><%= $post->headers->{title} %></a></td>
<td><a href="<%= $c->url_for( 'show_dashboard_blog', { id => $blog->id } ) %>"><%= $post->headers->{date} %></a></td>
<td><a href="<%= $c->url_for( 'show_dashboard_blog_post', { id => $blog->id, mdfile => $post->filename } ) %>">Edit Post</a></td>
</tr>
% }
</tbody>
</table>
% }