فهرست منبع

Merge pull request #3980 from weseek/imprv/create-lp-2

create lp and add settings
itizawa 4 سال پیش
والد
کامیت
f620b13976
4فایلهای تغییر یافته به همراه58 افزوده شده و 19 حذف شده
  1. 1 0
      packages/slackbot-proxy/package.json
  2. 10 0
      packages/slackbot-proxy/src/Server.ts
  3. 42 19
      packages/slackbot-proxy/src/views/top.ejs
  4. 5 0
      yarn.lock

+ 1 - 0
packages/slackbot-proxy/package.json

@@ -34,6 +34,7 @@
     "@tsed/swagger": "^6.43.0",
     "@tsed/swagger": "^6.43.0",
     "@tsed/typeorm": "^6.43.0",
     "@tsed/typeorm": "^6.43.0",
     "axios": "^0.21.1",
     "axios": "^0.21.1",
+    "bootstrap": "^5.0.2",
     "browser-bunyan": "^1.6.3",
     "browser-bunyan": "^1.6.3",
     "bunyan": "^1.8.15",
     "bunyan": "^1.8.15",
     "compression": "^1.7.4",
     "compression": "^1.7.4",

+ 10 - 0
packages/slackbot-proxy/src/Server.ts

@@ -103,6 +103,16 @@ const helmetOptions = isProduction ? {} : {
         root: `${rootDir}/public`,
         root: `${rootDir}/public`,
       },
       },
     ],
     ],
+    '/css': [
+      {
+        root: `${rootDir}/../node_modules/bootstrap/dist/css`,
+      },
+    ],
+    '/js': [
+      {
+        root: `${rootDir}/../node_modules/bootstrap/dist/js`,
+      },
+    ],
   },
   },
 })
 })
 export class Server {
 export class Server {

+ 42 - 19
packages/slackbot-proxy/src/views/top.ejs

@@ -1,25 +1,48 @@
 <head>
 <head>
   <meta name="viewport" content="width=device-width,initial-scale=1">
   <meta name="viewport" content="width=device-width,initial-scale=1">
+  <link href="./css/bootstrap.min.css" rel="stylesheet" >
 </head>
 </head>
 
 
-<body style="padding-top:100px; text-align:center;">
-  <h1 >GROWI Bot</h1>
-  <div>
-    <img height="300" width="300" alt="GROWi Bot" src="/images/growi-bot.png" />
-  </div>
-  <div style="margin-top:24px;">
-    <a  href=<%- url %>>
-      <img alt="Add to Slack" height="40" width="139" src="/images/add-to-slack.png"/>
-    </a>
-  </div>
-  <div style="display:flex; justify-content: space-around; max-width: 500px; margin:30px auto;">
-    <% if (isOfficialMode) { %>
-      <a href="/privacy">
-        Privacy Policy
-      </a>
-      <a href="/term">
-        Term of Service
-      </a>
-    <% } %>
+<body class="pt-3">
+  <div class="container border p-5">
+    <div class="text-center">
+      <h1>GROWI Bot</h1>
+      <h4>GROWI is a wiki that can be written in Markdown and easy to share information with everyone.</h4>
+
+      <div>
+        <img height="300" width="300" alt="GROWi Bot" src="/images/growi-bot.png" />
+      </div>
+      <div class="m-3">
+        <a href=<%- url %>>
+          <img alt="Add to Slack" height="40" width="139" src="/images/add-to-slack.png"/>
+        </a>
+      </div>
+      <div class="d-flex justify-content-evenly my-3">
+        <% if (isOfficialMode) { %>
+          <a href="/privacy">
+            Privacy Policy
+          </a>
+          <a href="/term">
+            Term of Service
+          </a>
+        <% } %>
+      </div>
+    </div>
+    <div class="m-3">
+      <div class="d-flex flex-column align-items-center justify-content-center">
+          <ul>
+            With GROWI for Slack, you can:
+            <ul>
+              <li>Search pages for multiple GROWI apps.</li>
+              <li>Create pages easily.</li>
+            </ul>
+            </li>
+          </ul>
+        <div class="mt-3">
+          GROWI is open-source software developed by WESEEK, Inc and we are looking for contributors who can work with us.<br>
+          Please <a href="https://growi-slackin.weseek.co.jp/">join</a> Slack and feel free to talk to WESEEK members!
+        </div>
+      </div>
+    </div>
   </div>
   </div>
 </body>
 </body>

+ 5 - 0
yarn.lock

@@ -4634,6 +4634,11 @@ bootstrap@^4.5.0:
   resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.5.0.tgz#97d9dbcb5a8972f8722c9962483543b907d9b9ec"
   resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.5.0.tgz#97d9dbcb5a8972f8722c9962483543b907d9b9ec"
   integrity sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA==
   integrity sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA==
 
 
+bootstrap@^5.0.2:
+  version "5.0.2"
+  resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.2.tgz#aff23d5e0e03c31255ad437530ee6556e78e728e"
+  integrity sha512-1Ge963tyEQWJJ+8qtXFU6wgmAVj9gweEjibUdbmcCEYsn38tVwRk8107rk2vzt6cfQcRr3SlZ8aQBqaD8aqf+Q==
+
 bowser@^1.7.3:
 bowser@^1.7.3:
   version "1.9.4"
   version "1.9.4"
   resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.9.4.tgz#890c58a2813a9d3243704334fa81b96a5c150c9a"
   resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.9.4.tgz#890c58a2813a9d3243704334fa81b96a5c150c9a"