فهرست منبع

Merge pull request #927 from weseek/add-staff-credit-react-component

:new: StaffCredit componentの雛形を作成
Yuki Takei 7 سال پیش
والد
کامیت
0437c2544e
3فایلهای تغییر یافته به همراه35 افزوده شده و 0 حذف شده
  1. 11 0
      src/client/js/app.js
  2. 21 0
      src/client/js/components/StaffCredit/StaffCredit.jsx
  3. 3 0
      src/server/views/layout/layout.html

+ 11 - 0
src/client/js/app.js

@@ -38,6 +38,7 @@ import LikeButton from './components/LikeButton';
 import PagePathAutoComplete from './components/PagePathAutoComplete';
 import RecentCreated from './components/RecentCreated/RecentCreated';
 import UserPictureList from './components/Common/UserPictureList';
+import StaffCredit from './components/StaffCredit/StaffCredit';
 
 import CustomCssEditor from './components/Admin/CustomCssEditor';
 import CustomScriptEditor from './components/Admin/CustomScriptEditor';
@@ -646,6 +647,16 @@ socket.on('page:editingWithHackmd', (data) => {
   }
 });
 
+// render for stuff credit
+const pageStuffCreditElem = document.getElementById('staff-credit');
+if (pageStuffCreditElem) {
+  ReactDOM.render(
+    <StaffCredit></StaffCredit>,
+    pageStuffCreditElem,
+  );
+
+}
+
 // うわーもうー (commented by Crowi team -- 2018.03.23 Yuki Takei)
 $('a[data-toggle="tab"][href="#revision-history"]').on('show.bs.tab', () => {
   ReactDOM.render(

+ 21 - 0
src/client/js/components/StaffCredit/StaffCredit.jsx

@@ -0,0 +1,21 @@
+import React from 'react';
+
+/**
+ * Page staff credit component
+ *
+ * @export
+ * @class StaffCredit
+ * @extends {React.Component}
+ */
+export default class StaffCredit extends React.Component {
+
+  render() {
+    return (
+      <div>スタッフロール</div>
+    );
+  }
+
+}
+
+StaffCredit.propTypes = {
+};

+ 3 - 0
src/server/views/layout/layout.html

@@ -228,6 +228,9 @@
 
 </div><!-- /#wrapper -->
 
+<!-- /#staff-credit -->
+<div id="staff-credit"></div>
+
 {% include '../modal/shortcuts.html' %}
 
 {% block body_end %}