Browse Source

disable manifest during development, set placeholder text

medium
Aaron Parecki 9 years ago
parent
commit
b92daf96f5
  1. 10
      controllers/editor.php
  2. 3
      public/editor/editor.js
  3. 4
      public/editor/style.css
  4. 10
      views/editor.php
  5. 2
      views/partials/appcache.php

10
controllers/editor.php

@ -33,9 +33,9 @@ $app->get('/editor/oembed', function() use($app) {
$app->response()->body($json);
});
$app->get('/appcache.manifest', function() use($app) {
$content = partial('partials/appcache');
// $app->get('/appcache.manifest', function() use($app) {
// $content = partial('partials/appcache');
$app->response()['Content-type'] = 'text/cache-manifest';
$app->response()->body($content);
});
// $app->response()['Content-type'] = 'text/cache-manifest';
// $app->response()->body($content);
// });

3
public/editor/editor.js

@ -26,4 +26,7 @@ $(function () {
}
}
});
$('.editable').focus(function(){
$('.placeholder').removeClass('placeholder');
});
});

4
public/editor/style.css

@ -95,3 +95,7 @@ blockquote {
border-bottom: 1px solid #dbdbdb;
border-top: 1px solid #dbdbdb;
}
.editable .placeholder {
color: #ccc;
}

10
views/editor.php

@ -1,5 +1,5 @@
<!doctype html>
<html lang="en" manifest="appcache.manifest">
<html lang="en" manifest_="appcache.manifest">
<head>
<title>Quill Editor</title>
<meta charset="utf-8">
@ -31,7 +31,6 @@
<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/editor.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,10 +42,11 @@
<body>
<div class="container">
<input id="post-name" type="text" value="Lorem Ipsum">
<div id="content" class="editable">
<?= partial('/partials/sample-html') ?>
<input id="post-name" type="text" value="" placeholder="Title">
<div id="content" class="editable"><p class="placeholder">Tell your story...</p></div>
</div>
<script src="/editor/editor.js"></script>
</body>
</html>

2
views/partials/appcache.php

@ -1,6 +1,6 @@
CACHE MANIFEST
# v1
# v3
/editor
/editor/style.css

Loading…
Cancel
Save