summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2015-05-10 14:14:35 +0200
committerAaron Parecki <aaron@parecki.com>2015-05-10 14:14:35 +0200
commitb92daf96f5ae40abaadc3f41e448fcc75824334b (patch)
tree356b80d4d63f2dbe01afbefee65da986b2c1005a
parent2792d5150d81c7e9e7a8e645e1b07f0ad0dc5e8a (diff)
disable manifest during development, set placeholder text
-rw-r--r--controllers/editor.php10
-rw-r--r--public/editor/editor.js3
-rw-r--r--public/editor/style.css4
-rw-r--r--views/editor.php10
-rw-r--r--views/partials/appcache.php2
5 files changed, 18 insertions, 11 deletions
diff --git a/controllers/editor.php b/controllers/editor.php
index 995438b..a66c188 100644
--- a/controllers/editor.php
+++ b/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);
+// });
diff --git a/public/editor/editor.js b/public/editor/editor.js
index bdf0580..2c4972f 100644
--- a/public/editor/editor.js
+++ b/public/editor/editor.js
@@ -26,4 +26,7 @@ $(function () {
}
}
});
+ $('.editable').focus(function(){
+ $('.placeholder').removeClass('placeholder');
+ });
});
diff --git a/public/editor/style.css b/public/editor/style.css
index b72bf92..bec46db 100644
--- a/public/editor/style.css
+++ b/public/editor/style.css
@@ -95,3 +95,7 @@ blockquote {
border-bottom: 1px solid #dbdbdb;
border-top: 1px solid #dbdbdb;
}
+
+.editable .placeholder {
+ color: #ccc;
+}
diff --git a/views/editor.php b/views/editor.php
index 5036723..fc4fcc6 100644
--- a/views/editor.php
+++ b/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> \ No newline at end of file
diff --git a/views/partials/appcache.php b/views/partials/appcache.php
index 4fa1f13..546685f 100644
--- a/views/partials/appcache.php
+++ b/views/partials/appcache.php
@@ -1,6 +1,6 @@
CACHE MANIFEST
-# v1
+# v3
/editor
/editor/style.css