Skip to content

Commit aaae870

Browse files
Merge pull request #57 from thethunderturner/feature/pdf-js
Feature: PDF.js
2 parents 742461c + ba26780 commit aaae870

File tree

14 files changed

+530
-35
lines changed

14 files changed

+530
-35
lines changed

.github/workflows/fix-php-code-styling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
paths:
66
- '**.php'
77
push:
8-
branches: [3.x, 4.x]
8+
branches: [3.x, 4.x]
99

1010
permissions:
1111
contents: write

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ You can use the package by adding it to the plugins list of your panel.
8585
]);
8686
```
8787

88-
You also need a [custome theme](https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme) in order to compile some of the tailwind classes. You need to add the path of the blade views in the content array of `tailwind.config.js` of your theme like so:
88+
You also need a [custom theme](https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme) in order to compile some of the tailwind classes. You need to add the path of the blade views in the content array of `tailwind.config.js` of your theme like so:
8989
```js
9090
export default {
9191
presets: [preset],
9292
content: [
9393
// ...
94-
'./vendor/thethunderturner/filament-latex/resources/views/**/*.blade.php',
94+
'./vendor/thethunderturner/filament-latex/{resources,src}/{views,}/**/*.{blade.php,php}',
9595
],
9696
}
9797
```

config/filament-latex.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php
22

33
return [
4+
'navigation-icon' => null,
5+
46
/**
57
* Parser Settings
68
*
@@ -13,4 +15,10 @@
1315
'compilation-timeout' => 60, // The maximum time in seconds to wait for the compilation to finish.
1416
'strict-compilation' => false, // Options: strict, non-strict. Strict mode will throw exceptions on compilation errors, otherwise it will not.
1517
'avatar-columns' => false, // If true, the avatar columns will be shown instead of the names of the author and collaborators.
18+
19+
/**
20+
* PDF Settings
21+
*/
22+
'paginate' => false, // If true, the PDF will be paginated (using next/prev buttons)
23+
'pdf-js' => true, // If true, the PDF will be displayed using PDF.js. If false, filament will use the browser's default PDF viewer.
1624
];

package-lock.json

Lines changed: 196 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"@codemirror/commands": "^6.7.1",
1616
"@codemirror/state": "^6.4.1",
1717
"@codemirror/view": "^6.35.0",
18-
"codemirror": "^6.0.1"
18+
"codemirror": "^6.0.1",
19+
"pdfjs-dist": "^4.9.155"
1920
}
2021
}

resources/dist/filament-latex.js

Lines changed: 78 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)