diff options
-rw-r--r-- | README.md | 40 | ||||
-rw-r--r-- | controllers/editor.php | 14 | ||||
-rw-r--r-- | lib/config.template.php | 1 | ||||
-rw-r--r-- | lib/helpers.php | 41 | ||||
-rw-r--r-- | public/editor-files/editor.js (renamed from public/editor/editor.js) | 0 | ||||
-rw-r--r-- | public/editor-files/font-awesome/css/font-awesome.css (renamed from public/editor/font-awesome/css/font-awesome.css) | 0 | ||||
-rw-r--r-- | public/editor-files/font-awesome/css/font-awesome.min.css (renamed from public/editor/font-awesome/css/font-awesome.min.css) | 0 | ||||
-rw-r--r-- | public/editor-files/font-awesome/fonts/FontAwesome.otf (renamed from public/editor/font-awesome/fonts/FontAwesome.otf) | bin | 93888 -> 93888 bytes | |||
-rw-r--r-- | public/editor-files/font-awesome/fonts/fontawesome-webfont.eot (renamed from public/editor/font-awesome/fonts/fontawesome-webfont.eot) | bin | 60767 -> 60767 bytes | |||
-rw-r--r-- | public/editor-files/font-awesome/fonts/fontawesome-webfont.svg (renamed from public/editor/font-awesome/fonts/fontawesome-webfont.svg) | 0 | ||||
-rw-r--r-- | public/editor-files/font-awesome/fonts/fontawesome-webfont.ttf (renamed from public/editor/font-awesome/fonts/fontawesome-webfont.ttf) | bin | 122092 -> 122092 bytes | |||
-rw-r--r-- | public/editor-files/font-awesome/fonts/fontawesome-webfont.woff (renamed from public/editor/font-awesome/fonts/fontawesome-webfont.woff) | bin | 71508 -> 71508 bytes | |||
-rw-r--r-- | public/editor-files/font-awesome/fonts/fontawesome-webfont.woff2 (renamed from public/editor/font-awesome/fonts/fontawesome-webfont.woff2) | bin | 56780 -> 56780 bytes | |||
-rw-r--r-- | public/editor-files/handlebars.min.js (renamed from public/editor/handlebars.min.js) | 0 | ||||
-rw-r--r-- | public/editor-files/jquery-1.11.3.min.js (renamed from public/editor/jquery-1.11.3.min.js) | 0 | ||||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png) | bin | 418 -> 418 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png) | bin | 312 -> 312 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png) | bin | 205 -> 205 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png) | bin | 262 -> 262 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png) | bin | 348 -> 348 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png) | bin | 207 -> 207 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png) | bin | 5815 -> 5815 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png) | bin | 278 -> 278 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png) | bin | 328 -> 328 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png) | bin | 6922 -> 6922 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png) | bin | 4549 -> 4549 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png) | bin | 4549 -> 4549 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png) | bin | 4549 -> 4549 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png (renamed from public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png) | bin | 6299 -> 6299 bytes | |||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/index.html (renamed from public/editor/jquery-ui-1.11.4.custom/index.html) | 0 | ||||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.css (renamed from public/editor/jquery-ui-1.11.4.custom/jquery-ui.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.js (renamed from public/editor/jquery-ui-1.11.4.custom/jquery-ui.js) | 0 | ||||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.css (renamed from public/editor/jquery-ui-1.11.4.custom/jquery-ui.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.js (renamed from public/editor/jquery-ui-1.11.4.custom/jquery-ui.min.js) | 0 | ||||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.css (renamed from public/editor/jquery-ui-1.11.4.custom/jquery-ui.structure.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css (renamed from public/editor/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.css (renamed from public/editor/jquery-ui-1.11.4.custom/jquery-ui.theme.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css (renamed from public/editor/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css) | 0 | ||||
-rw-r--r-- | public/editor-files/jquery.fileupload.js (renamed from public/editor/jquery.fileupload.js) | 0 | ||||
-rw-r--r-- | public/editor-files/jquery.iframetransport.js (renamed from public/editor/jquery.iframetransport.js) | 0 | ||||
-rw-r--r-- | public/editor-files/localforage/localforage.js (renamed from public/editor/localforage/localforage.js) | 0 | ||||
-rwxr-xr-x | public/editor-files/medium-editor/css/medium-editor-insert-plugin-frontend.min.css (renamed from public/editor/medium-editor/css/medium-editor-insert-plugin-frontend.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/medium-editor/css/medium-editor-insert-plugin.min.css (renamed from public/editor/medium-editor/css/medium-editor-insert-plugin.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/medium-editor/css/medium-editor.min.css (renamed from public/editor/medium-editor/css/medium-editor.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/medium-editor/css/themes/bootstrap.min.css (renamed from public/editor/medium-editor/css/themes/bootstrap.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/medium-editor/css/themes/default.min.css (renamed from public/editor/medium-editor/css/themes/default.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/medium-editor/css/themes/flat.min.css (renamed from public/editor/medium-editor/css/themes/flat.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/medium-editor/css/themes/mani.min.css (renamed from public/editor/medium-editor/css/themes/mani.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/medium-editor/css/themes/roman.min.css (renamed from public/editor/medium-editor/css/themes/roman.min.css) | 0 | ||||
-rwxr-xr-x | public/editor-files/medium-editor/js/medium-editor-insert-plugin.min.js (renamed from public/editor/medium-editor/js/medium-editor-insert-plugin.min.js) | 0 | ||||
-rw-r--r-- | public/editor-files/medium-editor/js/medium-editor.min.js (renamed from public/editor/medium-editor/js/medium-editor.min.js) | 0 | ||||
-rw-r--r-- | public/editor-files/quill-logo-36.png (renamed from public/editor/quill-logo-36.png) | bin | 1730 -> 1730 bytes | |||
-rw-r--r-- | public/editor-files/style.css (renamed from public/editor/style.css) | 2 | ||||
-rw-r--r-- | views/editor.php | 34 | ||||
-rw-r--r-- | views/new-post.php | 10 | ||||
-rw-r--r-- | views/partials/appcache.php | 28 | ||||
-rw-r--r-- | views/partials/syndication-js.php | 3 |
57 files changed, 88 insertions, 85 deletions
@@ -6,6 +6,46 @@ Work in progress. Do not use! 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 By submitting code to this project, you agree to irrevocably release it under the same license as this project. diff --git a/controllers/editor.php b/controllers/editor.php index 4c9740b..a3c0496 100644 --- a/controllers/editor.php +++ b/controllers/editor.php @@ -1,9 +1,10 @@ <?php $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) { @@ -66,10 +67,3 @@ $app->post('/editor/test-login', function() use($app) { $app->response()['Content-type'] = 'application/json'; $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); -}); diff --git a/lib/config.template.php b/lib/config.template.php index ee822bb..87ce75b 100644 --- a/lib/config.template.php +++ b/lib/config.template.php @@ -5,6 +5,7 @@ class Config { public static $gaid = ''; // MySQL (default) + public static $dbType = 'mysql'; public static $dbHost = '127.0.0.1'; public static $dbName = 'quill'; public static $dbUsername = 'quill'; diff --git a/lib/helpers.php b/lib/helpers.php index a860dc0..f0c226b 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -175,13 +175,14 @@ function micropub_get($endpoint, $params, $access_token) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $endpoint); curl_setopt($ch, CURLOPT_HTTPHEADER, array( - 'Authorization: Bearer ' . $access_token + 'Authorization: Bearer ' . $access_token, + 'Accept: application/json' )); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); $data = array(); if($response) { - parse_str($response, $data); + $data = json_decode($response, true); } $error = curl_error($ch); return array( @@ -198,35 +199,23 @@ function get_syndication_targets(&$user) { $r = micropub_get($user->micropub_endpoint, array('q'=>'syndicate-to'), $user->micropub_access_token); if($r['data'] && array_key_exists('syndicate-to', $r['data'])) { if(is_array($r['data']['syndicate-to'])) { - $targetURLs = $r['data']['syndicate-to']; - } elseif(is_string($r['data']['syndicate-to'])) { - // support comma separated as a fallback - $targetURLs = preg_split('/, ?/', $r['data']['syndicate-to']); + $data = $r['data']['syndicate-to']; } else { - $targetURLs = array(); + $data = array(); } - foreach($targetURLs as $t) { - // If the syndication target doesn't have a scheme, add http - if(!preg_match('/^http/', $t)) - $t2 = 'http://' . $t; - else - $t2 = $t; - - // Parse the target expecting it to be a URL - $url = parse_url($t2); - - // If there's a host, and the host contains a . then we can assume there's a favicon - // parse_url will parse strings like http://twitter into an array with a host of twitter, which is not resolvable - if($url && array_key_exists('host', $url) && strpos($url['host'], '.') !== false) { - $targets[] = array( - 'target' => $t, - 'favicon' => 'http://' . $url['host'] . '/favicon.ico' - ); + foreach($data as $t) { + if(array_key_exists('service', $t) && array_key_exists('photo', $t['service'])) { + $icon = $t['service']['photo']; } else { + $icon = false; + } + + if(array_key_exists('uid', $t) && array_key_exists('name', $t)) { $targets[] = array( - 'target' => $t, - 'favicon' => false + 'target' => $t['name'], + 'uid' => $t['uid'], + 'favicon' => $icon ); } } diff --git a/public/editor/editor.js b/public/editor-files/editor.js index a01f33a..a01f33a 100644 --- a/public/editor/editor.js +++ b/public/editor-files/editor.js diff --git a/public/editor/font-awesome/css/font-awesome.css b/public/editor-files/font-awesome/css/font-awesome.css index 2dcdc22..2dcdc22 100644 --- a/public/editor/font-awesome/css/font-awesome.css +++ b/public/editor-files/font-awesome/css/font-awesome.css diff --git a/public/editor/font-awesome/css/font-awesome.min.css b/public/editor-files/font-awesome/css/font-awesome.min.css index 24fcc04..24fcc04 100644 --- a/public/editor/font-awesome/css/font-awesome.min.css +++ b/public/editor-files/font-awesome/css/font-awesome.min.css diff --git a/public/editor/font-awesome/fonts/FontAwesome.otf b/public/editor-files/font-awesome/fonts/FontAwesome.otf Binary files differindex f7936cc..f7936cc 100644 --- a/public/editor/font-awesome/fonts/FontAwesome.otf +++ b/public/editor-files/font-awesome/fonts/FontAwesome.otf diff --git a/public/editor/font-awesome/fonts/fontawesome-webfont.eot b/public/editor-files/font-awesome/fonts/fontawesome-webfont.eot Binary files differindex 33b2bb8..33b2bb8 100644 --- a/public/editor/font-awesome/fonts/fontawesome-webfont.eot +++ b/public/editor-files/font-awesome/fonts/fontawesome-webfont.eot diff --git a/public/editor/font-awesome/fonts/fontawesome-webfont.svg b/public/editor-files/font-awesome/fonts/fontawesome-webfont.svg index 1ee89d4..1ee89d4 100644 --- a/public/editor/font-awesome/fonts/fontawesome-webfont.svg +++ b/public/editor-files/font-awesome/fonts/fontawesome-webfont.svg diff --git a/public/editor/font-awesome/fonts/fontawesome-webfont.ttf b/public/editor-files/font-awesome/fonts/fontawesome-webfont.ttf Binary files differindex ed9372f..ed9372f 100644 --- a/public/editor/font-awesome/fonts/fontawesome-webfont.ttf +++ b/public/editor-files/font-awesome/fonts/fontawesome-webfont.ttf diff --git a/public/editor/font-awesome/fonts/fontawesome-webfont.woff b/public/editor-files/font-awesome/fonts/fontawesome-webfont.woff Binary files differindex 8b280b9..8b280b9 100644 --- a/public/editor/font-awesome/fonts/fontawesome-webfont.woff +++ b/public/editor-files/font-awesome/fonts/fontawesome-webfont.woff diff --git a/public/editor/font-awesome/fonts/fontawesome-webfont.woff2 b/public/editor-files/font-awesome/fonts/fontawesome-webfont.woff2 Binary files differindex 3311d58..3311d58 100644 --- a/public/editor/font-awesome/fonts/fontawesome-webfont.woff2 +++ b/public/editor-files/font-awesome/fonts/fontawesome-webfont.woff2 diff --git a/public/editor/handlebars.min.js b/public/editor-files/handlebars.min.js index 150df8a..150df8a 100644 --- a/public/editor/handlebars.min.js +++ b/public/editor-files/handlebars.min.js diff --git a/public/editor/jquery-1.11.3.min.js b/public/editor-files/jquery-1.11.3.min.js index 0f60b7b..0f60b7b 100644 --- a/public/editor/jquery-1.11.3.min.js +++ b/public/editor-files/jquery-1.11.3.min.js diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png Binary files differindex 09fc62d..09fc62d 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png Binary files differindex 252a7a0..252a7a0 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png Binary files differindex f84f2c8..f84f2c8 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png Binary files differindex b0a731a..b0a731a 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png Binary files differindex 7d5502f..7d5502f 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png Binary files differindex b5aeafe..b5aeafe 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png Binary files differindex 19b3588..19b3588 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png Binary files differindex 3ff0554..3ff0554 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png Binary files differindex 2e954aa..2e954aa 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png Binary files differindex e9c8e16..e9c8e16 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png Binary files differindex 8d68c54..8d68c54 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png Binary files differindex 18bbfe8..18bbfe8 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png Binary files differindex 4435b49..4435b49 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png diff --git a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png Binary files differindex 4d66f59..4d66f59 100755 --- a/public/editor/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png +++ b/public/editor-files/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png diff --git a/public/editor/jquery-ui-1.11.4.custom/index.html b/public/editor-files/jquery-ui-1.11.4.custom/index.html index 9384abf..9384abf 100755 --- a/public/editor/jquery-ui-1.11.4.custom/index.html +++ b/public/editor-files/jquery-ui-1.11.4.custom/index.html diff --git a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.css b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.css index 7728eb5..7728eb5 100755 --- a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.css +++ b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.css diff --git a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.js b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.js index 9bfe637..9bfe637 100755 --- a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.js +++ b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.js diff --git a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.min.css b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.css index 6bb8923..6bb8923 100755 --- a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.min.css +++ b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.css diff --git a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.min.js b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.js index b6cf63b..b6cf63b 100755 --- a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.min.js +++ b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.min.js diff --git a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.structure.css b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.css index dddd12b..dddd12b 100755 --- a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.structure.css +++ b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.css diff --git a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css index f5a4630..f5a4630 100755 --- a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css +++ b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css diff --git a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.theme.css b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.css index 5db92db..5db92db 100755 --- a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.theme.css +++ b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.css diff --git a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css index 67b22a6..67b22a6 100755 --- a/public/editor/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css +++ b/public/editor-files/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css diff --git a/public/editor/jquery.fileupload.js b/public/editor-files/jquery.fileupload.js index a45f18b..a45f18b 100644 --- a/public/editor/jquery.fileupload.js +++ b/public/editor-files/jquery.fileupload.js diff --git a/public/editor/jquery.iframetransport.js b/public/editor-files/jquery.iframetransport.js index e2b4076..e2b4076 100644 --- a/public/editor/jquery.iframetransport.js +++ b/public/editor-files/jquery.iframetransport.js diff --git a/public/editor/localforage/localforage.js b/public/editor-files/localforage/localforage.js index 42e5391..42e5391 100644 --- a/public/editor/localforage/localforage.js +++ b/public/editor-files/localforage/localforage.js diff --git a/public/editor/medium-editor/css/medium-editor-insert-plugin-frontend.min.css b/public/editor-files/medium-editor/css/medium-editor-insert-plugin-frontend.min.css index 88cb919..88cb919 100755 --- a/public/editor/medium-editor/css/medium-editor-insert-plugin-frontend.min.css +++ b/public/editor-files/medium-editor/css/medium-editor-insert-plugin-frontend.min.css diff --git a/public/editor/medium-editor/css/medium-editor-insert-plugin.min.css b/public/editor-files/medium-editor/css/medium-editor-insert-plugin.min.css index 06048f3..06048f3 100755 --- a/public/editor/medium-editor/css/medium-editor-insert-plugin.min.css +++ b/public/editor-files/medium-editor/css/medium-editor-insert-plugin.min.css diff --git a/public/editor/medium-editor/css/medium-editor.min.css b/public/editor-files/medium-editor/css/medium-editor.min.css index dcae6be..dcae6be 100755 --- a/public/editor/medium-editor/css/medium-editor.min.css +++ b/public/editor-files/medium-editor/css/medium-editor.min.css diff --git a/public/editor/medium-editor/css/themes/bootstrap.min.css b/public/editor-files/medium-editor/css/themes/bootstrap.min.css index d097042..d097042 100755 --- a/public/editor/medium-editor/css/themes/bootstrap.min.css +++ b/public/editor-files/medium-editor/css/themes/bootstrap.min.css diff --git a/public/editor/medium-editor/css/themes/default.min.css b/public/editor-files/medium-editor/css/themes/default.min.css index bd238b1..bd238b1 100755 --- a/public/editor/medium-editor/css/themes/default.min.css +++ b/public/editor-files/medium-editor/css/themes/default.min.css diff --git a/public/editor/medium-editor/css/themes/flat.min.css b/public/editor-files/medium-editor/css/themes/flat.min.css index 241b580..241b580 100755 --- a/public/editor/medium-editor/css/themes/flat.min.css +++ b/public/editor-files/medium-editor/css/themes/flat.min.css diff --git a/public/editor/medium-editor/css/themes/mani.min.css b/public/editor-files/medium-editor/css/themes/mani.min.css index 57d2de5..57d2de5 100755 --- a/public/editor/medium-editor/css/themes/mani.min.css +++ b/public/editor-files/medium-editor/css/themes/mani.min.css diff --git a/public/editor/medium-editor/css/themes/roman.min.css b/public/editor-files/medium-editor/css/themes/roman.min.css index da1e706..da1e706 100755 --- a/public/editor/medium-editor/css/themes/roman.min.css +++ b/public/editor-files/medium-editor/css/themes/roman.min.css diff --git a/public/editor/medium-editor/js/medium-editor-insert-plugin.min.js b/public/editor-files/medium-editor/js/medium-editor-insert-plugin.min.js index 2bf815c..2bf815c 100755 --- a/public/editor/medium-editor/js/medium-editor-insert-plugin.min.js +++ b/public/editor-files/medium-editor/js/medium-editor-insert-plugin.min.js diff --git a/public/editor/medium-editor/js/medium-editor.min.js b/public/editor-files/medium-editor/js/medium-editor.min.js index 8885934..8885934 100644 --- a/public/editor/medium-editor/js/medium-editor.min.js +++ b/public/editor-files/medium-editor/js/medium-editor.min.js diff --git a/public/editor/quill-logo-36.png b/public/editor-files/quill-logo-36.png Binary files differindex 90aebc4..90aebc4 100644 --- a/public/editor/quill-logo-36.png +++ b/public/editor-files/quill-logo-36.png diff --git a/public/editor/style.css b/public/editor-files/style.css index 2cfd542..e5b14b5 100644 --- a/public/editor/style.css +++ b/public/editor-files/style.css @@ -131,7 +131,7 @@ input.form-field-small { } .publish-dropdown { - position: absolute; + position: fixed; top: 62px; right: 110px; z-index: 1001; diff --git a/views/editor.php b/views/editor.php index ac0f429..6d235c4 100644 --- a/views/editor.php +++ b/views/editor.php @@ -1,5 +1,5 @@ <!doctype html> -<html lang="en" manifest="appcache.manifest"> +<html lang="en"> <head> <title>Quill Editor</title> <meta charset="utf-8"> @@ -15,22 +15,22 @@ 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)" /> - <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="72x72" href="/images/quill-icon-72.png"> @@ -43,7 +43,7 @@ <div class="toolbar"> <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> </div> <div class="toolbar-right"> @@ -106,7 +106,7 @@ </div> </div> -<script src="/editor/editor.js"></script> +<script src="/editor-files/editor.js"></script> </body> </html>
\ No newline at end of file diff --git a/views/new-post.php b/views/new-post.php index be5dafb..2c8c9f9 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -38,7 +38,12 @@ if($this->syndication_targets) { echo '<ul>'; foreach($this->syndication_targets as $syn) { - echo '<li><button data-syndication="'.$syn['target'].'" class="btn btn-default btn-block"><img src="'.$syn['favicon'].'" width="16" height="16"> '.$syn['target'].'</button></li>'; + echo '<li>' + . '<button data-syndicate-to="'.(isset($syn['uid']) ? $syn['uid'] : $syn['target']).'" class="btn btn-default btn-block">' + . ($syn['favicon'] ? '<img src="'.$syn['favicon'].'" width="16" height="16"> ' : '') + . $syn['target'] + . '</button>' + . '</li>'; } echo '</ul>'; } else { @@ -181,9 +186,10 @@ $(function(){ $("#btn_post").click(function(){ + // Collect all the syndication buttons that are pressed var syndications = []; $("#syndication-container button.btn-info").each(function(i,btn){ - syndications.push($(btn).data('syndication')); + syndications.push($(btn).data('syndicate-to')); }); var category = csv_to_array($("#note_category").val()); diff --git a/views/partials/appcache.php b/views/partials/appcache.php deleted file mode 100644 index 2e76754..0000000 --- a/views/partials/appcache.php +++ /dev/null @@ -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: -* - diff --git a/views/partials/syndication-js.php b/views/partials/syndication-js.php index bd657f3..088cb43 100644 --- a/views/partials/syndication-js.php +++ b/views/partials/syndication-js.php @@ -5,8 +5,9 @@ function reload_syndications() { $("#syndication-container").html('<ul></ul>'); for(var i in data.targets) { var target = data.targets[i].target; + var uid = data.targets[i].uid; var favicon = data.targets[i].favicon; - $("#syndication-container ul").append('<li><button data-syndication="'+target+'" class="btn btn-default btn-block"><img src="'+favicon+'" width="16" height="16"> '+target+'</button></li>'); + $("#syndication-container ul").append('<li><button data-syndicate-to="'+(uid ? uid : target)+'" class="btn btn-default btn-block">'+(favicon ? '<img src="'+favicon+'" width="16" height="16"> ':'')+target+'</button></li>'); } bind_syndication_buttons(); } else { |