From 23c33c0c046a9a27b2a31d334f6f818d8b1b3459 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Sun, 24 Jun 2018 13:37:46 +0200 Subject: Rename HackMD view to CodiMD Even when it looks a bit weird in first place to rename all internals step by step, it makes sense to do so, because we run into confusion afterwards. Signed-off-by: Sheogorath --- lib/config/default.js | 2 +- lib/config/index.js | 2 +- lib/response.js | 2 +- public/views/codimd.ejs | 15 +++ public/views/codimd/body.ejs | 250 +++++++++++++++++++++++++++++++++++++++++ public/views/codimd/foot.ejs | 27 +++++ public/views/codimd/footer.ejs | 0 public/views/codimd/head.ejs | 22 ++++ public/views/codimd/header.ejs | 180 +++++++++++++++++++++++++++++ public/views/error.ejs | 8 +- public/views/hackmd.ejs | 15 --- public/views/hackmd/body.ejs | 250 ----------------------------------------- public/views/hackmd/foot.ejs | 27 ----- public/views/hackmd/footer.ejs | 0 public/views/hackmd/head.ejs | 22 ---- public/views/hackmd/header.ejs | 180 ----------------------------- 16 files changed, 501 insertions(+), 501 deletions(-) create mode 100644 public/views/codimd.ejs create mode 100644 public/views/codimd/body.ejs create mode 100644 public/views/codimd/foot.ejs create mode 100644 public/views/codimd/footer.ejs create mode 100644 public/views/codimd/head.ejs create mode 100644 public/views/codimd/header.ejs delete mode 100644 public/views/hackmd.ejs delete mode 100644 public/views/hackmd/body.ejs delete mode 100644 public/views/hackmd/foot.ejs delete mode 100644 public/views/hackmd/footer.ejs delete mode 100644 public/views/hackmd/head.ejs delete mode 100644 public/views/hackmd/header.ejs diff --git a/lib/config/default.js b/lib/config/default.js index 8e71029e..5c39a4da 100644 --- a/lib/config/default.js +++ b/lib/config/default.js @@ -41,7 +41,7 @@ module.exports = { defaultNotePath: './public/default.md', docsPath: './public/docs', indexPath: './public/views/index.ejs', - hackmdPath: './public/views/hackmd.ejs', + codimdPath: './public/views/codimd.ejs', errorPath: './public/views/error.ejs', prettyPath: './public/views/pretty.ejs', slidePath: './public/views/slide.ejs', diff --git a/lib/config/index.js b/lib/config/index.js index 760d94a1..8705b10b 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -175,7 +175,7 @@ config.tmpPath = path.join(appRootPath, config.tmpPath) config.defaultNotePath = path.join(appRootPath, config.defaultNotePath) config.docsPath = path.join(appRootPath, config.docsPath) config.indexPath = path.join(appRootPath, config.indexPath) -config.hackmdPath = path.join(appRootPath, config.hackmdPath) +config.codimdPath = path.join(appRootPath, config.codimdPath) config.errorPath = path.join(appRootPath, config.errorPath) config.prettyPath = path.join(appRootPath, config.prettyPath) config.slidePath = path.join(appRootPath, config.slidePath) diff --git a/lib/response.js b/lib/response.js index d1e5e15c..e256d472 100644 --- a/lib/response.js +++ b/lib/response.js @@ -119,7 +119,7 @@ function responseHackMD (res, note) { 'Cache-Control': 'private', // only cache by client 'X-Robots-Tag': 'noindex, nofollow' // prevent crawling }) - res.render(config.hackmdPath, { + res.render(config.codimdPath, { url: config.serverURL, title: title, useCDN: config.useCDN, diff --git a/public/views/codimd.ejs b/public/views/codimd.ejs new file mode 100644 index 00000000..7818346c --- /dev/null +++ b/public/views/codimd.ejs @@ -0,0 +1,15 @@ + + + + + <%- include codimd/head %> + + + + <%- include codimd/header %> + <%- include codimd/body %> + <%- include codimd/footer %> + <%- include codimd/foot %> + + + diff --git a/public/views/codimd/body.ejs b/public/views/codimd/body.ejs new file mode 100644 index 00000000..49604379 --- /dev/null +++ b/public/views/codimd/body.ejs @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + +<%- include ../shared/refresh-modal %> +<%- include ../shared/signin-modal %> +<%- include ../shared/help-modal %> +<%- include ../shared/revision-modal %> diff --git a/public/views/codimd/foot.ejs b/public/views/codimd/foot.ejs new file mode 100644 index 00000000..4d73d05f --- /dev/null +++ b/public/views/codimd/foot.ejs @@ -0,0 +1,27 @@ + +<% if(useCDN) { %> + + + + + + + + + + + + + + + + + + + +<%- include ../build/index-scripts %> +<% } else { %> + + +<%- include ../build/index-pack-scripts %> +<% } %> diff --git a/public/views/codimd/footer.ejs b/public/views/codimd/footer.ejs new file mode 100644 index 00000000..e69de29b diff --git a/public/views/codimd/head.ejs b/public/views/codimd/head.ejs new file mode 100644 index 00000000..8dfef432 --- /dev/null +++ b/public/views/codimd/head.ejs @@ -0,0 +1,22 @@ + + + + + + +<%= title %> + + +<% if(useCDN) { %> + + + + + + +<%- include ../build/index-header %> +<%- include ../shared/polyfill %> +<% } else { %> + +<%- include ../build/index-pack-header %> +<% } %> diff --git a/public/views/codimd/header.ejs b/public/views/codimd/header.ejs new file mode 100644 index 00000000..8fc050b7 --- /dev/null +++ b/public/views/codimd/header.ejs @@ -0,0 +1,180 @@ + +
diff --git a/public/views/error.ejs b/public/views/error.ejs index a40ed39c..98c3c74e 100644 --- a/public/views/error.ejs +++ b/public/views/error.ejs @@ -2,18 +2,18 @@ - <%- include hackmd/head %> + <%- include codimd/head %> - <%- include hackmd/header %> + <%- include codimd/header %>

<%- code %> <%- detail %> <%- msg %>

- <%- include hackmd/footer %> + <%- include codimd/footer %> - \ No newline at end of file + diff --git a/public/views/hackmd.ejs b/public/views/hackmd.ejs deleted file mode 100644 index 49084a63..00000000 --- a/public/views/hackmd.ejs +++ /dev/null @@ -1,15 +0,0 @@ - - - - - <%- include hackmd/head %> - - - - <%- include hackmd/header %> - <%- include hackmd/body %> - <%- include hackmd/footer %> - <%- include hackmd/foot %> - - - diff --git a/public/views/hackmd/body.ejs b/public/views/hackmd/body.ejs deleted file mode 100644 index 49604379..00000000 --- a/public/views/hackmd/body.ejs +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - - - - - -<%- include ../shared/refresh-modal %> -<%- include ../shared/signin-modal %> -<%- include ../shared/help-modal %> -<%- include ../shared/revision-modal %> diff --git a/public/views/hackmd/foot.ejs b/public/views/hackmd/foot.ejs deleted file mode 100644 index 4d73d05f..00000000 --- a/public/views/hackmd/foot.ejs +++ /dev/null @@ -1,27 +0,0 @@ - -<% if(useCDN) { %> - - - - - - - - - - - - - - - - - - - -<%- include ../build/index-scripts %> -<% } else { %> - - -<%- include ../build/index-pack-scripts %> -<% } %> diff --git a/public/views/hackmd/footer.ejs b/public/views/hackmd/footer.ejs deleted file mode 100644 index e69de29b..00000000 diff --git a/public/views/hackmd/head.ejs b/public/views/hackmd/head.ejs deleted file mode 100644 index 8dfef432..00000000 --- a/public/views/hackmd/head.ejs +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - -<%= title %> - - -<% if(useCDN) { %> - - - - - - -<%- include ../build/index-header %> -<%- include ../shared/polyfill %> -<% } else { %> - -<%- include ../build/index-pack-header %> -<% } %> diff --git a/public/views/hackmd/header.ejs b/public/views/hackmd/header.ejs deleted file mode 100644 index 8fc050b7..00000000 --- a/public/views/hackmd/header.ejs +++ /dev/null @@ -1,180 +0,0 @@ - -
-- cgit v1.2.3