mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-05 01:24:38 +08:00
Added plaintext & basic PDF page Export
This commit is contained in:
@ -161,6 +161,12 @@ form.search-box {
|
||||
padding: $-xs 0;
|
||||
color: #555;
|
||||
text-align: left !important;
|
||||
&.wide {
|
||||
min-width: 220px;
|
||||
}
|
||||
.text-muted {
|
||||
color: #999;
|
||||
}
|
||||
a {
|
||||
display: block;
|
||||
padding: $-xs $-m;
|
||||
|
@ -27,8 +27,8 @@ $-xs: 6px;
|
||||
$-xxs: 3px;
|
||||
|
||||
// Fonts
|
||||
$heading: 'Roboto', Helvetica, Arial, sans-serif;
|
||||
$text: 'Roboto', Helvetica, Arial, sans-serif;
|
||||
$heading: 'Roboto', 'DejaVu Sans', Helvetica, Arial, sans-serif;
|
||||
$text: 'Roboto', 'DejaVu Sans', Helvetica, Arial, sans-serif;
|
||||
$fs-m: 15px;
|
||||
$fs-s: 14px;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
@import "reset";
|
||||
//@import "reset";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
@import "html";
|
||||
|
33
resources/views/pages/export.blade.php
Normal file
33
resources/views/pages/export.blade.php
Normal file
@ -0,0 +1,33 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>{{ $page->name }}</title>
|
||||
|
||||
<style>
|
||||
{!! $css !!}
|
||||
</style>
|
||||
@yield('head')
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="page-show">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="page-content">
|
||||
|
||||
@include('pages/page-display')
|
||||
|
||||
<hr>
|
||||
|
||||
<p class="text-muted small">
|
||||
Created {{$page->created_at->toDayDateTimeString()}} @if($page->createdBy) by {{$page->createdBy->name}} @endif
|
||||
<br>
|
||||
Last Updated {{$page->updated_at->toDayDateTimeString()}} @if($page->updatedBy) by {{$page->updatedBy->name}} @endif
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,32 +1,24 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ $page->name }}</title>
|
||||
@extends('pages/export')
|
||||
|
||||
@section('head')
|
||||
<style>
|
||||
{!! $css !!}
|
||||
body {
|
||||
font-size: 15px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
table {
|
||||
max-width: 800px !important;
|
||||
font-size: 0.8em;
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
table td {
|
||||
width: auto !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" id="page-show" ng-non-bindable>
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="page-content">
|
||||
|
||||
@include('pages/page-display')
|
||||
|
||||
<hr>
|
||||
|
||||
<p class="text-muted small">
|
||||
Created {{$page->created_at->diffForHumans()}} @if($page->createdBy) by {{$page->createdBy->name}} @endif
|
||||
<br>
|
||||
Last Updated {{$page->updated_at->diffForHumans()}} @if($page->updatedBy) by {{$page->updatedBy->name}} @endif
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@stop
|
@ -20,9 +20,11 @@
|
||||
<div class="col-sm-6 faded">
|
||||
<div class="action-buttons">
|
||||
<span dropdown class="dropdown-container">
|
||||
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>Export Page</div>
|
||||
<ul>
|
||||
<li><a href="{{$page->getUrl() . '/export/html'}}" target="_blank">Contained HTML File</a></li>
|
||||
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>Export</div>
|
||||
<ul class="wide">
|
||||
<li><a href="{{$page->getUrl() . '/export/html'}}" target="_blank">Contained Web File <span class="text-muted pull-right">.html</span></a></li>
|
||||
<li><a href="{{$page->getUrl() . '/export/pdf'}}" target="_blank">PDF File <span class="text-muted pull-right">.pdf</span></a></li>
|
||||
<li><a href="{{$page->getUrl() . '/export/plaintext'}}" target="_blank">Plain Text File <span class="text-muted pull-right">.txt</span></a></li>
|
||||
</ul>
|
||||
</span>
|
||||
@if($currentUser->can('page-update'))
|
||||
|
Reference in New Issue
Block a user