index.ejs 3.08 KB
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Capstone Design</title>
  <meta http-equiv="Content-Security-Policy" content="default-src 'self' https: localhost:*; script-src 'unsafe-inline' https: localhost:*; connect-src https: localhost:* ws://localhost:*; style-src 'unsafe-inline' https:; object-src 'none';">
  <meta name="importmap-type" content="systemjs-importmap" />
  <script type="systemjs-importmap">
    {
      "imports": {
        "single-spa": "https://cdn.jsdelivr.net/npm/single-spa@5.5.5/lib/system/single-spa.min.js"
      }
    }
  </script>
  <% if (isLocal) { %>
    <script type="systemjs-importmap">
      {
        "imports": {
          "react": "https://cdn.jsdelivr.net/npm/react@16.13.1/umd/react.development.js",
          "react-dom": "https://cdn.jsdelivr.net/npm/react-dom@16.13.1/umd/react-dom.development.js",
          "@capstone-design/root": "http://localhost:9000/capstone-design-root.js",
          "@capstone-design/navbar": "http://localhost:9001/capstone-design-navbar.js",
          "@capstone-design/news": "http://localhost:9002/capstone-design-news.js",
          "@capstone-design/comment": "http://localhost:9003/capstone-design-comment.js",
          "@capstone-design/recommend": "http://localhost:9004/capstone-design-recommend.js"
        }
      }
    </script>
  <% } %>  
  <link rel="preload" href="https://cdn.jsdelivr.net/npm/single-spa@5.5.5/lib/system/single-spa.min.js" as="script">

  <% if (isLocal) { %>
  <script type="systemjs-importmap">
    {
      "imports": {
        "@capstone-design/root": "//localhost:9000/capstone-design-root.js"
      }
    }
  </script>
  <% } %>

  <% if (isLocal) { %>
  <script src="https://cdn.jsdelivr.net/npm/import-map-overrides@1.16.0/dist/import-map-overrides.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/systemjs@6.4.0/dist/system.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/systemjs@6.4.0/dist/extras/amd.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/systemjs@6.4.0/dist/extras/named-exports.js"></script>
  <% } else { %>
  <script src="https://cdn.jsdelivr.net/npm/import-map-overrides@1.16.0/dist/import-map-overrides.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/systemjs@6.4.0/dist/system.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/systemjs@6.4.0/dist/extras/amd.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/systemjs@6.4.0/dist/extras/named-exports.min.js"></script>
  <% } %>
</head>
<body>
    <div id="single-spa-application:@capstone-design/navbar"></div>
    <div class="home" id="single-spa-application:@capstone-design/news"></div>
    <div class="comment" id="single-spa-application:@capstone-design/comment"></div>
    <div class="contact" id="single-spa-application:@capstone-design/recommend"></div>

  <script>
    System.import('@capstone-design/root');
  </script>
  <import-map-overrides-full show-when-local-storage="devtools" dev-libs></import-map-overrides-full>
</body>
</html>