Browse Source

move editor folder to editor-files, remove appcache

* it sometimes confuses web servers to have a folder named "editor" while also serving routes with the same name
* dropped appcache stuff since it wasn't working super well
* add nginx config to the readme
pull/41/head
Aaron Parecki 9 years ago
parent
commit
904782f973
  1. 40
      README.md
  2. 14
      controllers/editor.php
  3. 0
      public/editor-files/editor.js
  4. 0
      public/editor-files/font-awesome/css/font-awesome.css
  5. 0
      public/editor-files/font-awesome/css/font-awesome.min.css
  6. 0
      public/editor-files/font-awesome/fonts/FontAwesome.otf
  7. 0
      public/editor-files/font-awesome/fonts/fontawesome-webfont.eot
  8. 0
      public/editor-files/font-awesome/fonts/fontawesome-webfont.svg
  9. 0
      public/editor-files/font-awesome/fonts/fontawesome-webfont.ttf
  10. 0
      public/editor-files/font-awesome/fonts/fontawesome-webfont.woff
  11. 0
      public/editor-files/font-awesome/fonts/fontawesome-webfont.woff2
  12. 0
      public/editor-files/handlebars.min.js
  13. 0
      public/editor-files/jquery-1.11.3.min.js
  14. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  15. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png
  16. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png
  17. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png
  18. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png
  19. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png
  20. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png
  21. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  22. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  23. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png
  24. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png
  25. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png
  26. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png
  27. 0
      public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png
  28. 0
      public/editor-files/jquery-ui-1.11.4.custom/index.html
  29. 0
      public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.css
  30. 0
      public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.js
  31. 0
      public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.css
  32. 0
      public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.js
  33. 0
      public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.css
  34. 0
      public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css
  35. 0
      public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.css
  36. 0
      public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css
  37. 0
      public/editor-files/jquery.fileupload.js
  38. 0
      public/editor-files/jquery.iframetransport.js
  39. 0
      public/editor-files/localforage/localforage.js
  40. 0
      public/editor-files/medium-editor/css/medium-editor-insert-plugin-frontend.min.css
  41. 0
      public/editor-files/medium-editor/css/medium-editor-insert-plugin.min.css
  42. 0
      public/editor-files/medium-editor/css/medium-editor.min.css
  43. 0
      public/editor-files/medium-editor/css/themes/bootstrap.min.css
  44. 0
      public/editor-files/medium-editor/css/themes/default.min.css
  45. 0
      public/editor-files/medium-editor/css/themes/flat.min.css
  46. 0
      public/editor-files/medium-editor/css/themes/mani.min.css
  47. 0
      public/editor-files/medium-editor/css/themes/roman.min.css
  48. 0
      public/editor-files/medium-editor/js/medium-editor-insert-plugin.min.js
  49. 0
      public/editor-files/medium-editor/js/medium-editor.min.js
  50. 0
      public/editor-files/quill-logo-36.png
  51. 0
      public/editor-files/style.css
  52. 34
      views/editor.php
  53. 28
      views/partials/appcache.php

40
README.md

@ -6,6 +6,46 @@ Work in progress. Do not use!
https://quill.p3k.io/ https://quill.p3k.io/
### Web Server Configuration
Set the document root to the "public" folder of this repo, and ensure all requests are routed through `public/index.php` if they don't match a file.
#### nginx
```
server {
listen 80;
server_name quill.dev;
root /path/to/Quill/public;
error_log logs/quill.error.log notice;
try_files $uri /index.php?$args;
location /index.php {
fastcgi_pass php-pool;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
```
#### Apache htaccess
```
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]
```
### Contributing ### Contributing
By submitting code to this project, you agree to irrevocably release it under the same license as this project. By submitting code to this project, you agree to irrevocably release it under the same license as this project.

14
controllers/editor.php

@ -1,9 +1,10 @@
<?php <?php
$app->get('/editor', function() use($app) { $app->get('/editor', function() use($app) {
// Don't require login because appcache caches the whole page
$html = $app->render('editor.php');
$app->response()->body($html);
if($user=require_login($app)) {
$html = $app->render('editor.php');
$app->response()->body($html);
}
}); });
$app->post('/editor/publish', function() use($app) { $app->post('/editor/publish', function() use($app) {
@ -66,10 +67,3 @@ $app->post('/editor/test-login', function() use($app) {
$app->response()['Content-type'] = 'application/json'; $app->response()['Content-type'] = 'application/json';
$app->response()->body(json_encode(['logged_in'=>$logged_in])); $app->response()->body(json_encode(['logged_in'=>$logged_in]));
}); });
$app->get('/appcache.manifest', function() use($app) {
$content = partial('partials/appcache');
$app->response()['Content-type'] = 'text/cache-manifest';
$app->response()->body($content);
});

0
public/editor/editor.js → public/editor-files/editor.js

0
public/editor/font-awesome/css/font-awesome.css → public/editor-files/font-awesome/css/font-awesome.css

0
public/editor/font-awesome/css/font-awesome.min.css → public/editor-files/font-awesome/css/font-awesome.min.css

0
public/editor/font-awesome/fonts/FontAwesome.otf → public/editor-files/font-awesome/fonts/FontAwesome.otf

0
public/editor/font-awesome/fonts/fontawesome-webfont.eot → public/editor-files/font-awesome/fonts/fontawesome-webfont.eot

0
public/editor/font-awesome/fonts/fontawesome-webfont.svg → public/editor-files/font-awesome/fonts/fontawesome-webfont.svg

0
public/editor/font-awesome/fonts/fontawesome-webfont.ttf → public/editor-files/font-awesome/fonts/fontawesome-webfont.ttf

0
public/editor/font-awesome/fonts/fontawesome-webfont.woff → public/editor-files/font-awesome/fonts/fontawesome-webfont.woff

0
public/editor/font-awesome/fonts/fontawesome-webfont.woff2 → public/editor-files/font-awesome/fonts/fontawesome-webfont.woff2

0
public/editor/handlebars.min.js → public/editor-files/handlebars.min.js

0
public/editor/jquery-1.11.3.min.js → public/editor-files/jquery-1.11.3.min.js

0
public/editor/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png

Before

Width: 40  |  Height: 40  |  Size: 418 B

After

Width: 40  |  Height: 40  |  Size: 418 B

0
public/editor/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png

Before

Width: 40  |  Height: 40  |  Size: 312 B

After

Width: 40  |  Height: 40  |  Size: 312 B

0
public/editor/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png

Before

Width: 40  |  Height: 100  |  Size: 205 B

After

Width: 40  |  Height: 100  |  Size: 205 B

0
public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png

Before

Width: 1  |  Height: 400  |  Size: 262 B

After

Width: 1  |  Height: 400  |  Size: 262 B

0
public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png

Before

Width: 1  |  Height: 400  |  Size: 348 B

After

Width: 1  |  Height: 400  |  Size: 348 B

0
public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png

Before

Width: 1  |  Height: 400  |  Size: 207 B

After

Width: 1  |  Height: 400  |  Size: 207 B

0
public/editor/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png

Before

Width: 500  |  Height: 100  |  Size: 5.7 KiB

After

Width: 500  |  Height: 100  |  Size: 5.7 KiB

0
public/editor/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png

Before

Width: 1  |  Height: 100  |  Size: 278 B

After

Width: 1  |  Height: 100  |  Size: 278 B

0
public/editor/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png

Before

Width: 1  |  Height: 100  |  Size: 328 B

After

Width: 1  |  Height: 100  |  Size: 328 B

0
public/editor/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png

Before

Width: 256  |  Height: 240  |  Size: 6.8 KiB

After

Width: 256  |  Height: 240  |  Size: 6.8 KiB

0
public/editor/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png

Before

Width: 256  |  Height: 240  |  Size: 4.4 KiB

After

Width: 256  |  Height: 240  |  Size: 4.4 KiB

0
public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png

Before

Width: 256  |  Height: 240  |  Size: 4.4 KiB

After

Width: 256  |  Height: 240  |  Size: 4.4 KiB

0
public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png

Before

Width: 256  |  Height: 240  |  Size: 4.4 KiB

After

Width: 256  |  Height: 240  |  Size: 4.4 KiB

0
public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png → public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png

Before

Width: 256  |  Height: 240  |  Size: 6.2 KiB

After

Width: 256  |  Height: 240  |  Size: 6.2 KiB

0
public/editor/jquery-ui-1.11.4.custom/index.html → public/editor-files/jquery-ui-1.11.4.custom/index.html

0
public/editor/jquery-ui-1.11.4.custom/jquery-ui.css → public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.css

0
public/editor/jquery-ui-1.11.4.custom/jquery-ui.js → public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.js

0
public/editor/jquery-ui-1.11.4.custom/jquery-ui.min.css → public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.css

0
public/editor/jquery-ui-1.11.4.custom/jquery-ui.min.js → public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.js

0
public/editor/jquery-ui-1.11.4.custom/jquery-ui.structure.css → public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.css

0
public/editor/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css → public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css

0
public/editor/jquery-ui-1.11.4.custom/jquery-ui.theme.css → public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.css

0
public/editor/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css → public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css

0
public/editor/jquery.fileupload.js → public/editor-files/jquery.fileupload.js

0
public/editor/jquery.iframetransport.js → public/editor-files/jquery.iframetransport.js

0
public/editor/localforage/localforage.js → public/editor-files/localforage/localforage.js

0
public/editor/medium-editor/css/medium-editor-insert-plugin-frontend.min.css → public/editor-files/medium-editor/css/medium-editor-insert-plugin-frontend.min.css

0
public/editor/medium-editor/css/medium-editor-insert-plugin.min.css → public/editor-files/medium-editor/css/medium-editor-insert-plugin.min.css

0
public/editor/medium-editor/css/medium-editor.min.css → public/editor-files/medium-editor/css/medium-editor.min.css

0
public/editor/medium-editor/css/themes/bootstrap.min.css → public/editor-files/medium-editor/css/themes/bootstrap.min.css

0
public/editor/medium-editor/css/themes/default.min.css → public/editor-files/medium-editor/css/themes/default.min.css

0
public/editor/medium-editor/css/themes/flat.min.css → public/editor-files/medium-editor/css/themes/flat.min.css

0
public/editor/medium-editor/css/themes/mani.min.css → public/editor-files/medium-editor/css/themes/mani.min.css

0
public/editor/medium-editor/css/themes/roman.min.css → public/editor-files/medium-editor/css/themes/roman.min.css

0
public/editor/medium-editor/js/medium-editor-insert-plugin.min.js → public/editor-files/medium-editor/js/medium-editor-insert-plugin.min.js

0
public/editor/medium-editor/js/medium-editor.min.js → public/editor-files/medium-editor/js/medium-editor.min.js

0
public/editor/quill-logo-36.png → public/editor-files/quill-logo-36.png

Before

Width: 36  |  Height: 31  |  Size: 1.7 KiB

After

Width: 36  |  Height: 31  |  Size: 1.7 KiB

0
public/editor/style.css → public/editor-files/style.css

34
views/editor.php

@ -1,5 +1,5 @@
<!doctype html> <!doctype html>
<html lang="en" manifest="appcache.manifest">
<html lang="en">
<head> <head>
<title>Quill Editor</title> <title>Quill Editor</title>
<meta charset="utf-8"> <meta charset="utf-8">
@ -15,22 +15,22 @@
we want to exclude it for iPhone 5 to allow full screen apps --> we want to exclude it for iPhone 5 to allow full screen apps -->
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" /> <meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" />
<link rel="stylesheet" href="/editor/medium-editor/css/medium-editor.min.css">
<link rel="stylesheet" href="/editor/medium-editor/css/themes/default.min.css">
<link rel="stylesheet" href="/editor/medium-editor/css/medium-editor-insert-plugin.min.css">
<link rel="stylesheet" href="/editor/medium-editor/css/medium-editor-insert-plugin-frontend.min.css">
<link href="/editor/font-awesome/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="/editor/style.css">
<link rel="stylesheet" href="/editor-files/medium-editor/css/medium-editor.min.css">
<link rel="stylesheet" href="/editor-files/medium-editor/css/themes/default.min.css">
<link rel="stylesheet" href="/editor-files/medium-editor/css/medium-editor-insert-plugin.min.css">
<link rel="stylesheet" href="/editor-files/medium-editor/css/medium-editor-insert-plugin-frontend.min.css">
<link href="/editor-files/font-awesome/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="/editor-files/style.css">
<script src="/editor/jquery-1.11.3.min.js"></script>
<script src="/editor/jquery-ui-1.11.4.custom/jquery-ui.min.js"></script>
<script src="/editor/jquery.fileupload.js"></script>
<script src="/editor/jquery.iframetransport.js"></script>
<script src="/editor-files/jquery-1.11.3.min.js"></script>
<script src="/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.js"></script>
<script src="/editor-files/jquery.fileupload.js"></script>
<script src="/editor-files/jquery.iframetransport.js"></script>
<script src="/editor/handlebars.min.js"></script>
<script src="/editor/medium-editor/js/medium-editor.min.js"></script>
<script src="/editor/medium-editor/js/medium-editor-insert-plugin.min.js"></script>
<script src="/editor/localforage/localforage.js"></script>
<script src="/editor-files/handlebars.min.js"></script>
<script src="/editor-files/medium-editor/js/medium-editor.min.js"></script>
<script src="/editor-files/medium-editor/js/medium-editor-insert-plugin.min.js"></script>
<script src="/editor-files/localforage/localforage.js"></script>
<link rel="apple-touch-icon" sizes="57x57" href="/images/quill-icon-57.png"> <link rel="apple-touch-icon" sizes="57x57" href="/images/quill-icon-57.png">
<link rel="apple-touch-icon" sizes="72x72" href="/images/quill-icon-72.png"> <link rel="apple-touch-icon" sizes="72x72" href="/images/quill-icon-72.png">
@ -43,7 +43,7 @@
<div class="toolbar"> <div class="toolbar">
<div class="toolbar-left"> <div class="toolbar-left">
<span class="item"><a href="/"><img src="/editor/quill-logo-36.png" width="36" height="31" class="logo"></a></span>
<span class="item"><a href="/"><img src="/editor-files/quill-logo-36.png" width="36" height="31" class="logo"></a></span>
<span class="item text"><span id="draft-status">Draft</span></span> <span class="item text"><span id="draft-status">Draft</span></span>
</div> </div>
<div class="toolbar-right"> <div class="toolbar-right">
@ -106,7 +106,7 @@
</div> </div>
</div> </div>
<script src="/editor/editor.js"></script>
<script src="/editor-files/editor.js"></script>
</body> </body>
</html> </html>

28
views/partials/appcache.php

@ -1,28 +0,0 @@
CACHE MANIFEST
# v25
/editor
/editor/style.css
/editor/medium-editor/css/medium-editor.min.css
/editor/medium-editor/css/themes/default.min.css
/editor/medium-editor/css/medium-editor-insert-plugin.min.css
/editor/medium-editor/css/medium-editor-insert-plugin-frontend.min.css
/editor/font-awesome/css/font-awesome.css
/editor/jquery-1.11.3.min.js
/editor/jquery-ui-1.11.4.custom/jquery-ui.min.js
/editor/jquery.fileupload.js
/editor/jquery.iframetransport.js
/editor/handlebars.min.js
/editor/medium-editor/js/medium-editor.min.js
/editor/medium-editor/js/medium-editor-insert-plugin.min.js
/editor/localforage/localforage.js
/editor/quill-logo-36.png
# /editor/editor.js
/editor/font-awesome/fonts/fontawesome-webfont.woff2?v=4.3.0
/editor/font-awesome/fonts/fontawesome-webfont.woff?v=4.3.0
/editor/font-awesome/fonts/fontawesome-webfont.ttf?v=4.3.0
NETWORK:
*
Loading…
Cancel
Save