Browse Source

Fix bug with EJS on production env

Gaël Métais 4 years ago
parent
commit
72a347aa9f
2 changed files with 3 additions and 1 deletions
  1. 1 0
      Gruntfile.js
  2. 2 1
      front/src/main.html

+ 1 - 0
Gruntfile.js

@@ -56,6 +56,7 @@ module.exports = function(grunt) {
         copy: {
             build: {
                 files: [
+                    {src: ['./front/src/main.html'], dest: './front/build/main.html'},
                     {src: ['./front/src/img/favicon.png'], dest: './front/build/img/favicon.png'},
                     {src: ['./front/src/img/logo-large.png'], dest: './front/build/img/logo-large.png'},
                 ]

+ 2 - 1
front/src/main.html

@@ -28,7 +28,7 @@
     <div id="header"><h1>Yellow Lab <svg width="32" height="32" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" fill="#ffa319"><path d="M478 402L320 139V32h16c9 0 16-7 16-16s-7-16-16-16H176c-9 0-16 7-16 16s7 16 16 16h16v107L34 402c-36 61-8 110 62 110h320c70 0 98-49 62-110zm-357-82l103-172V32h64v116l103 172H121z"/></svg> Tools</h1></div>
     <div id="body" ng-view autoscroll="true"></div>
     <div class="footer">
-        <span class="version"><%= version %></span>
+        <span class="version" id="version">@@version</span>
         <br><a href="<%= baseUrl %>about">More about Yellow Lab Tools</a><br>
         <div class="github"><iframe id="ghbtn" frameborder="0" scrolling="0" width="160px" height="30px"></iframe></div>
     </div>
@@ -59,6 +59,7 @@
     <!-- endbuild -->
 
     <script>
+        document.getElementById('version').innerHTML = "<%= version %>";
         if('<%= googleAnalyticsId %>'.indexOf('UA-')===0){(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');ga('create','<%= googleAnalyticsId %>','auto');}
     </script>
 </body>