diff --git a/public/views/error.ejs b/public/views/error.ejs index 402b5eb0..a40ed39c 100644 --- a/public/views/error.ejs +++ b/public/views/error.ejs @@ -2,18 +2,18 @@ - <%- include head %> + <%- include hackmd/head %> - <%- include header %> + <%- include hackmd/header %>

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

- <%- include footer %> + <%- include hackmd/footer %> \ No newline at end of file diff --git a/public/views/hackmd.ejs b/public/views/hackmd.ejs index c5778fc9..49084a63 100644 --- a/public/views/hackmd.ejs +++ b/public/views/hackmd.ejs @@ -2,14 +2,14 @@ - <%- include head %> + <%- include hackmd/head %> - <%- include header %> - <%- include body %> - <%- include footer %> - <%- include foot %> + <%- include hackmd/header %> + <%- include hackmd/body %> + <%- include hackmd/footer %> + <%- include hackmd/foot %> - \ No newline at end of file + diff --git a/public/views/body.ejs b/public/views/hackmd/body.ejs similarity index 99% rename from public/views/body.ejs rename to public/views/hackmd/body.ejs index 5ad1733e..d8a3f108 100644 --- a/public/views/body.ejs +++ b/public/views/hackmd/body.ejs @@ -244,7 +244,7 @@ -<%- include refresh-modal %> -<%- include signin-modal %> -<%- include help-modal %> -<%- include revision-modal %> +<%- include ../shared/refresh-modal %> +<%- include ../shared/signin-modal %> +<%- include ../shared/help-modal %> +<%- include ../shared/revision-modal %> diff --git a/public/views/foot.ejs b/public/views/hackmd/foot.ejs similarity index 97% rename from public/views/foot.ejs rename to public/views/hackmd/foot.ejs index c1df65c2..178b5504 100644 --- a/public/views/foot.ejs +++ b/public/views/hackmd/foot.ejs @@ -20,9 +20,9 @@ -<%- include build/index-scripts %> +<%- include ../build/index-scripts %> <% } else { %> -<%- include build/index-pack-scripts %> +<%- include ../build/index-pack-scripts %> <% } %> diff --git a/public/views/footer.ejs b/public/views/hackmd/footer.ejs similarity index 100% rename from public/views/footer.ejs rename to public/views/hackmd/footer.ejs diff --git a/public/views/head.ejs b/public/views/hackmd/head.ejs similarity index 93% rename from public/views/head.ejs rename to public/views/hackmd/head.ejs index 218847f7..d0663993 100644 --- a/public/views/head.ejs +++ b/public/views/hackmd/head.ejs @@ -14,9 +14,9 @@ -<%- include build/index-header %> +<%- include ../build/index-header %> <% } else { %> -<%- include build/index-pack-header %> +<%- include ../build/index-pack-header %> <% } %> -<%- include polyfill %> \ No newline at end of file +<%- include ../shared/polyfill %> \ No newline at end of file diff --git a/public/views/header.ejs b/public/views/hackmd/header.ejs similarity index 100% rename from public/views/header.ejs rename to public/views/hackmd/header.ejs diff --git a/public/views/index.ejs b/public/views/index.ejs index 4bcea0eb..5732db4a 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -2,220 +2,14 @@ - - - - - - - - - HackMD - <%= __('Collaborative markdown notes') %> - - - <% if(useCDN) { %> - - - - - - <%- include build/cover-header %> - <% } else { %> - <%- include build/cover-pack-header %> - <% } %> - <%- include polyfill %> + <%- include index/head %> -
-
-
- -
-
-

- -
-
- -
style="display:none;"<% } %>> -
-

HackMD

-

- <%= __('Best way to write and share your knowledge in markdown.') %> -

- <% if (infoMessage && infoMessage.length > 0) { %> -
<%= infoMessage %>
- <% } %> - <% if (errorMessage && errorMessage.length > 0) { %> -
<%= errorMessage %>
- <% } %> - <% if(facebook || twitter || github || gitlab || dropbox || google || ldap || email) { %> - - <%= __('or') %> - <% } %> - - -
-
- -
style="display:none;"<% } %>> - -
-
-
- -
-
- -
- - <%= __('Title') %> - - - <%= __('Time') %> - - - -
- - -
    -
-
    -
    - -
    -
    - -

    - © 2017 HackMD | <%= __('Releases') %> -

    - -
    -
    -
    -
    -
    - - - <%- include signin-modal %> - - <% if(useCDN) { %> - - - - - - - - - <%- include build/cover-scripts %> - <% } else { %> - <%- include build/cover-pack-scripts %> - <% } %> + <%- include index/header %> + <%- include index/body %> + <%- include index/footer %> + <%- include index/foot %> diff --git a/public/views/index/body.ejs b/public/views/index/body.ejs new file mode 100644 index 00000000..b8072450 --- /dev/null +++ b/public/views/index/body.ejs @@ -0,0 +1,175 @@ +
    +
    +
    + +
    +
    +

    + +
    +
    + +
    style="display:none;"<% } %>> +
    +

    HackMD

    +

    + <%= __('Best way to write and share your knowledge in markdown.') %> +

    + <% if (infoMessage && infoMessage.length > 0) { %> +
    <%= infoMessage %>
    + <% } %> + <% if (errorMessage && errorMessage.length > 0) { %> +
    <%= errorMessage %>
    + <% } %> + <% if(facebook || twitter || github || gitlab || dropbox || google || ldap || email) { %> + + <%= __('or') %> + <% } %> + + +
    +
    + +
    style="display:none;"<% } %>> + +
    +
    +
    + +
    +
    + +
    + + <%= __('Title') %> + + + <%= __('Time') %> + + + +
    + + +
      +
    +
      +
      + +
      +
      + +

      + © 2017 HackMD | <%= __('Releases') %> +

      + +
      +
      +
      +
      +
      + + +<%- include ../shared/signin-modal %> \ No newline at end of file diff --git a/public/views/index/foot.ejs b/public/views/index/foot.ejs new file mode 100644 index 00000000..293c6698 --- /dev/null +++ b/public/views/index/foot.ejs @@ -0,0 +1,13 @@ +<% if(useCDN) { %> + + + + + + + + +<%- include ../build/cover-scripts %> +<% } else { %> +<%- include ../build/cover-pack-scripts %> +<% } %> \ No newline at end of file diff --git a/public/views/index/footer.ejs b/public/views/index/footer.ejs new file mode 100644 index 00000000..e69de29b diff --git a/public/views/index/head.ejs b/public/views/index/head.ejs new file mode 100644 index 00000000..bbd14567 --- /dev/null +++ b/public/views/index/head.ejs @@ -0,0 +1,22 @@ + + + + + + + + +HackMD - <%= __('Collaborative markdown notes') %> + + +<% if(useCDN) { %> + + + + + +<%- include ../build/cover-header %> +<% } else { %> +<%- include ../build/cover-pack-header %> +<% } %> +<%- include ../shared/polyfill %> \ No newline at end of file diff --git a/public/views/index/header.ejs b/public/views/index/header.ejs new file mode 100644 index 00000000..e69de29b diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index ced65ed8..de5b8ad3 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -23,12 +23,12 @@ - <%- include build/pretty-header %> + <%- include ../build/pretty-header %> <% } else { %> - <%- include build/pretty-pack-header %> + <%- include ../build/pretty-pack-header %> <% } %> - <%- include polyfill %> + <%- include ../shared/polyfill %> @@ -66,7 +66,7 @@ <% if(typeof disqus !== 'undefined' && disqus) { %>
      - <%- include disqus %> + <%- include ../shared/disqus %>
      <% } %> @@ -90,10 +90,10 @@ -<%- include build/pretty-scripts %> +<%- include ../build/pretty-scripts %> <% } else { %> -<%- include build/pretty-pack-scripts %> +<%- include ../build/pretty-pack-scripts %> <% } %> -<%- include ga %> +<%- include ../shared/ga %> diff --git a/public/views/disqus.ejs b/public/views/shared/disqus.ejs similarity index 100% rename from public/views/disqus.ejs rename to public/views/shared/disqus.ejs diff --git a/public/views/ga.ejs b/public/views/shared/ga.ejs similarity index 100% rename from public/views/ga.ejs rename to public/views/shared/ga.ejs diff --git a/public/views/help-modal.ejs b/public/views/shared/help-modal.ejs similarity index 100% rename from public/views/help-modal.ejs rename to public/views/shared/help-modal.ejs diff --git a/public/views/polyfill.ejs b/public/views/shared/polyfill.ejs similarity index 100% rename from public/views/polyfill.ejs rename to public/views/shared/polyfill.ejs diff --git a/public/views/refresh-modal.ejs b/public/views/shared/refresh-modal.ejs similarity index 100% rename from public/views/refresh-modal.ejs rename to public/views/shared/refresh-modal.ejs diff --git a/public/views/revision-modal.ejs b/public/views/shared/revision-modal.ejs similarity index 100% rename from public/views/revision-modal.ejs rename to public/views/shared/revision-modal.ejs diff --git a/public/views/signin-modal.ejs b/public/views/shared/signin-modal.ejs similarity index 100% rename from public/views/signin-modal.ejs rename to public/views/shared/signin-modal.ejs diff --git a/public/views/slide.ejs b/public/views/slide.ejs index b0323a0e..eb1453f8 100644 --- a/public/views/slide.ejs +++ b/public/views/slide.ejs @@ -23,10 +23,10 @@ - <%- include build/slide-header %> + <%- include ../build/slide-header %> <% } else { %> - <%- include build/slide-pack-header %> + <%- include ../build/slide-pack-header %> <% } %> @@ -45,7 +45,7 @@ document.getElementsByTagName( 'head' )[0].appendChild( link ); - <%- include polyfill %> + <%- include ../shared/polyfill %>
      @@ -79,7 +79,7 @@
      <% if(typeof disqus !== 'undefined' && disqus) { %>
      - <%- include disqus %> + <%- include ../shared/disqus %>
      <% } %> @@ -104,13 +104,13 @@ - <%- include build/slide-scripts %> + <%- include ../build/slide-scripts %> <% } else { %> - <%- include build/slide-pack-scripts %> + <%- include ../build/slide-pack-scripts %> <% } %> -<%- include ga %> +<%- include ../shared/ga %>