diff options
author | Wu Cheng-Han | 2016-11-26 23:13:02 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-11-26 23:13:02 +0800 |
commit | 3fbfdb7db8b81f12183cf9be735d9c4c0483d9d0 (patch) | |
tree | 7c1e9b2d6da9f76c8fea3d35effdb8f4c18f0542 /public/views | |
parent | 71a356552fff1985b33156ecebda98782d283fc5 (diff) |
Optimize index page resources packing and loads
Diffstat (limited to '')
-rw-r--r-- | public/views/index.ejs | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/public/views/index.ejs b/public/views/index.ejs index f1b4e021..729987ca 100644 --- a/public/views/index.ejs +++ b/public/views/index.ejs @@ -13,25 +13,16 @@ <title>HackMD - <%= __('Collaborative markdown notes') %></title> <link rel="icon" type="image/png" href="<%- url %>/favicon.png"> <link rel="apple-touch-icon" href="<%- url %>/apple-touch-icon.png"> - - <!-- Bootstrap core CSS --> <% if(useCDN) { %> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" /> - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.2/css/font-awesome.min.css" integrity="sha256-tWdbDR7ojbN0seYOMB/anwwdNYX0cXNGiCcRX8TlKcI=" crossorigin="anonymous" /> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/4.9.0/bootstrap-social.min.css" integrity="sha256-02JtFTurpwBjQJ6q13iJe82/NF0RbZlJroDegK5g87Y=" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.css" integrity="sha256-ijlUKKj3hJCiiT2HWo1kqkI79NTEYpzOsw5Rs3k42dI=" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2-bootstrap.min.css" integrity="sha256-NAWFcNIZdH+TS1xpWujF/EB/Y8gwBbEOCoaK/eqaer8=" crossorigin="anonymous" /> - <link rel="stylesheet" href="<%- url %>/css/google-font.css"> + <%- include build/cover-header %> <% } else { %> - <link rel="stylesheet" href="<%- url %>/vendor/bootstrap/dist/css/bootstrap.min.css"> - <link rel="stylesheet" href="<%- url %>/vendor/font-awesome/css/font-awesome.min.css"> - <link rel="stylesheet" href="<%- url %>/css/bootstrap-social.css"> - <link rel="stylesheet" href="<%- url %>/vendor/select2/select2.css"> - <link rel="stylesheet" href="<%- url %>/vendor/select2/select2-bootstrap.css"> - <link rel="stylesheet" href="<%- url %>/css/font.css"> + <%- include build/cover-pack-header %> <% } %> - <!-- Custom styles for this template --> - <%- include build/cover-header %> <%- include polyfill %> </head> @@ -196,27 +187,18 @@ </div> <%- include signin-modal %> - <!-- Bootstrap core JavaScript - ================================================== --> - <!-- Placed at the end of the document so the pages load faster --> <% if(useCDN) { %> + <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.3.1/velocity.min.js" integrity="sha256-zt0EvRuKYSkXKgIFLrJIYeZsBjIZLel9UThCm5GI6io=" crossorigin="anonymous" defer></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous" defer></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/list.pagination.js/0.1.1/list.pagination.min.js" integrity="sha256-WwTza96H3BgcQTfEfxX7MFaFc/dZA0QrPRKDRLdFHJo=" crossorigin="anonymous" defer></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.js" integrity="sha256-HzzZFiY4t0PIv02Tm8/R3CVvLpcjHhO1z/YAUCp4oQ4=" crossorigin="anonymous" defer></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.15.1/moment-with-locales.min.js" integrity="sha256-J5wam9fTysK5BqYlUUBjbomFslRxkLgwB9AhnVWsj1Q=" crossorigin="anonymous" defer></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/js-url/2.3.0/url.min.js" integrity="sha256-HOZJz4x+1mn1Si84WT5XKXPtOlTytmZLnMb6n1v4+5Q=" crossorigin="anonymous" defer></script> + <%- include build/cover-scripts %> <% } else { %> - <script src="<%- url %>/vendor/velocity/velocity.min.js" defer></script> - <script src="<%- url %>/vendor/select2/select2.min.js" defer></script> - <script src="<%- url %>/vendor/moment/min/moment-with-locales.min.js" defer></script> + <%- include build/cover-pack-scripts %> <% } %> - <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" integrity="sha256-KM512VNnjElC30ehFwehXjx1YCHPiQkOPmqnrWtpccM=" crossorigin="anonymous"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous" defer></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js" integrity="sha256-rMOSOM5HDzVEMoVZTv2189+RKSTSgY5ZKfTfap7q2zE=" crossorigin="anonymous" defer></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/list.pagination.js/0.1.1/list.pagination.min.js" integrity="sha256-WwTza96H3BgcQTfEfxX7MFaFc/dZA0QrPRKDRLdFHJo=" crossorigin="anonymous" defer></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js" integrity="sha256-s63qpgPYoQk+wv3U6WZqioVJrwFNBTgD4dkeegLuwvo=" crossorigin="anonymous" defer></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.4/lodash.min.js" integrity="sha256-KteOoEtQ75FeAFFOTJZlvNt0iJ8NMusVDESd5jlwKEQ=" crossorigin="anonymous" defer></script> - <%- include build/cover-scripts %> </body> </html> |