From 7b48922345d3226ac28270a4acf3fa31dd971e67 Mon Sep 17 00:00:00 2001 From: Yoshihiro OKUMURA Date: Thu, 27 Jun 2019 14:56:56 +0900 Subject: [PATCH] apply some changes from souces code of visiome platform. --- .gitignore | 6 +- package.json | 10 +- src/App.css | 287 +---------- src/common/AppRoot.tsx | 19 +- src/common/CenterColumn.module.css | 94 ---- src/common/CenterColumn.tsx | 76 ++- src/common/Container.module.css | 25 - src/common/Container.tsx | 26 - src/common/Footer.tsx | 14 +- src/common/Header.module.css | 4 +- src/common/Header.tsx | 18 +- src/common/LeftColumn.module.css | 28 -- src/common/LeftColumn.tsx | 37 +- src/common/MainContent.module.css | 9 - src/common/MainContent.tsx | 5 +- .../theme => theme/images}/banner_cbsn.gif | Bin .../theme => theme/images}/banner_ibr.gif | Bin .../images}/banner_incf-japan-node.gif | Bin .../images}/banner_riken-cbs.gif | Bin .../theme => theme/images}/banner_riken.gif | Bin .../theme => theme/images}/banner_xoonips.gif | Bin .../theme => theme/images}/header_back.gif | Bin .../theme => theme/images}/header_left.gif | Bin .../theme => theme/images}/header_right.jpg | Bin .../theme => theme/images}/icon_home.gif | Bin .../theme => theme/images}/icon_home_h.gif | Bin .../theme => theme/images}/icon_inquiry.gif | Bin .../theme => theme/images}/icon_inquiry_h.gif | Bin .../{images/theme => theme/images}/logo.png | Bin .../theme => theme/images}/menu_indent.gif | Bin .../theme => theme/images}/menu_indent_h.gif | Bin .../theme => theme/images}/title_indent.gif | Bin .../theme => theme/images}/title_indent2.gif | Bin .../theme => theme/images}/title_indent3.gif | Bin .../theme => theme/images}/xoops_quote.jpg | Bin src/common/assets/theme/style.css | 450 ++++++++++++++++++ src/common/blocks/Announce.tsx | 28 +- src/common/blocks/MainMenu.module.css | 27 -- src/common/blocks/MainMenu.tsx | 8 +- src/common/lib/LangFlag.tsx | 49 +- src/common/lib/LinkImage.tsx | 34 +- src/common/lib/Loading.module.css | 6 - src/common/lib/Loading.tsx | 3 +- src/common/lib/NoticeSiteHasBeenArchived.tsx | 15 + src/common/lib/PageNotFound.module.css | 0 src/common/lib/PageNotFound.tsx | 8 +- src/common/lib/XoopsCode.tsx | 61 ++- src/config.ts | 4 +- src/database/Database.module.css | 26 +- src/database/Database.tsx | 6 +- src/database/DatabaseAdvancedSearch.tsx | 7 +- src/database/DatabaseDetailItem.tsx | 4 +- src/database/DatabaseSearchByIndexId.tsx | 4 +- src/database/DatabaseTop.tsx | 10 +- src/database/DatabaseXoopsPathRedirect.tsx | 150 ++++++ src/database/assets/images/simpf_button.png | Bin 0 -> 6596 bytes src/database/blocks/IndexTree.module.css | 11 +- src/database/blocks/IndexTree.tsx | 2 +- src/database/blocks/Search.tsx | 14 +- .../item-type/binder/BinderAdvancedSearch.tsx | 26 + .../item-type/binder/BinderDetail.tsx | 95 ++++ src/database/item-type/binder/BinderList.tsx | 28 ++ src/database/item-type/binder/BinderTop.tsx | 15 + src/database/item-type/binder/index.tsx | 13 + .../item-type/book/BookAdvancedSearch.tsx | 2 +- src/database/item-type/book/BookDetail.tsx | 2 +- src/database/item-type/book/BookTop.tsx | 2 +- src/database/item-type/data/DataDetail.tsx | 11 +- src/database/item-type/index.tsx | 11 +- .../item-type/lib/AdvancedSearchBase.tsx | 18 +- src/database/item-type/lib/ListBase.tsx | 5 + .../item-type/lib/field/CreativeCommons.tsx | 2 +- src/database/item-type/lib/field/Preview.tsx | 4 +- .../item-type/lib/field/RelatedTo.tsx | 15 +- .../item-type/lib/field/SimPFLinkIcon.tsx | 25 + src/database/item-type/model/ModelDetail.tsx | 11 +- .../item-type/simulator/SimulatorDetail.tsx | 11 +- .../item-type/stimulus/StimulusDetail.tsx | 11 +- src/database/item-type/tool/ToolDetail.tsx | 11 +- src/database/lib/DatabaseListItem.tsx | 19 +- src/database/lib/ItemUtil.ts | 27 +- src/forum/Forum.tsx | 5 +- src/forum/ForumCategory.tsx | 4 +- src/forum/ForumForum.tsx | 14 +- src/forum/ForumPost.tsx | 4 +- src/forum/ForumTopic.tsx | 18 +- src/forum/lib/ForumUtils.ts | 6 + src/forum/lib/Post.tsx | 14 +- src/forum/lib/PostsTree.tsx | 4 +- src/functions.ts | 59 ++- src/index.tsx | 6 - yarn.lock | 283 ++++++----- 92 files changed, 1440 insertions(+), 926 deletions(-) delete mode 100644 src/common/CenterColumn.module.css delete mode 100644 src/common/Container.module.css delete mode 100644 src/common/Container.tsx delete mode 100644 src/common/LeftColumn.module.css delete mode 100644 src/common/MainContent.module.css rename src/common/assets/{images/theme => theme/images}/banner_cbsn.gif (100%) rename src/common/assets/{images/theme => theme/images}/banner_ibr.gif (100%) rename src/common/assets/{images/theme => theme/images}/banner_incf-japan-node.gif (100%) rename src/common/assets/{images/theme => theme/images}/banner_riken-cbs.gif (100%) rename src/common/assets/{images/theme => theme/images}/banner_riken.gif (100%) rename src/common/assets/{images/theme => theme/images}/banner_xoonips.gif (100%) rename src/common/assets/{images/theme => theme/images}/header_back.gif (100%) rename src/common/assets/{images/theme => theme/images}/header_left.gif (100%) rename src/common/assets/{images/theme => theme/images}/header_right.jpg (100%) rename src/common/assets/{images/theme => theme/images}/icon_home.gif (100%) rename src/common/assets/{images/theme => theme/images}/icon_home_h.gif (100%) rename src/common/assets/{images/theme => theme/images}/icon_inquiry.gif (100%) rename src/common/assets/{images/theme => theme/images}/icon_inquiry_h.gif (100%) rename src/common/assets/{images/theme => theme/images}/logo.png (100%) rename src/common/assets/{images/theme => theme/images}/menu_indent.gif (100%) rename src/common/assets/{images/theme => theme/images}/menu_indent_h.gif (100%) rename src/common/assets/{images/theme => theme/images}/title_indent.gif (100%) rename src/common/assets/{images/theme => theme/images}/title_indent2.gif (100%) rename src/common/assets/{images/theme => theme/images}/title_indent3.gif (100%) rename src/common/assets/{images/theme => theme/images}/xoops_quote.jpg (100%) create mode 100644 src/common/assets/theme/style.css delete mode 100644 src/common/blocks/MainMenu.module.css delete mode 100644 src/common/lib/Loading.module.css create mode 100644 src/common/lib/NoticeSiteHasBeenArchived.tsx delete mode 100644 src/common/lib/PageNotFound.module.css create mode 100644 src/database/DatabaseXoopsPathRedirect.tsx create mode 100644 src/database/assets/images/simpf_button.png create mode 100644 src/database/item-type/binder/BinderAdvancedSearch.tsx create mode 100644 src/database/item-type/binder/BinderDetail.tsx create mode 100644 src/database/item-type/binder/BinderList.tsx create mode 100644 src/database/item-type/binder/BinderTop.tsx create mode 100644 src/database/item-type/binder/index.tsx create mode 100644 src/database/item-type/lib/field/SimPFLinkIcon.tsx diff --git a/.gitignore b/.gitignore index 89deecf..15eae78 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,5 @@ yarn-error.log* # database contents /public/database/items.json /public/database/file -/src/database/assets/tree.json -/src/database/assets/rankings.json -/src/database/assets/recent-contents.json -/src/forum/assets/forum.json +/src/database/assets/*.json +/src/forum/assets/*.json diff --git a/package.json b/package.json index 39784c9..a6f4241 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,13 @@ "@types/async-lock": "^1.1.1", "@types/jest": "24.0.15", "@types/lokijs": "^1.5.2", - "@types/node": "12.0.8", + "@types/node": "12.0.10", "@types/rc-tree": "^1.11.3", - "@types/react": "16.8.20", + "@types/react": "16.8.22", "@types/react-dom": "16.8.4", "@types/react-helmet": "^5.0.8", - "@types/react-overlays": "^1.1.2", + "@types/react-html-parser": "^2.0.0", + "@types/react-overlays": "^1.1.3", "@types/react-router-dom": "^4.3.4", "@types/react-router-hash-link": "^1.2.1", "async-lock": "^1.2.0", @@ -23,8 +24,9 @@ "react-app-polyfill": "^1.0.1", "react-cookie": "^4.0.0", "react-dom": "^16.8.6", - "react-ga": "^2.5.7", + "react-ga": "^2.6.0", "react-helmet": "^5.2.1", + "react-html-parser": "^2.0.2", "react-image-lightbox": "^5.1.0", "react-overlays": "^1.2.0", "react-router-dom": "^5.0.0", diff --git a/src/App.css b/src/App.css index a879fe7..46f0a08 100644 --- a/src/App.css +++ b/src/App.css @@ -1,286 +1 @@ -/* HTML TAG Re-definition */ -body { - background: #fff; - font-family: Verdana, Arial, Helvetica, sans-serif, "MS Pゴシック", Osaka, "ヒラギノ角ゴ Pro W3"; - color: #666666; - margin: 0px; - padding: 0px 15px 15px; - font-size: 80%; - min-width: 880px; - max-width: 1280px; -} -a { - color: #6075aa; -} -a:hover { - color: #ff9900; -} -h1, -h2, -h3 { - color: #286367; -} -h4, -h5 { - color: #6075aa; -} -ul { - margin: 2px; - padding: 2px; - list-style: decimal inside; - text-align: left; -} -li { - margin-left: 2px; - list-style: square inside; -} -table { - width: 100%; - margin: 0; - padding: 0; -} -th { - color: #6075aa; - background-color: #e3e7f0; - padding: 4px; - vertical-align: middle; - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: #c7c7c7; -} -td { - padding: 0; - vertical-align: top; - font-family: Verdana, Arial, Helvetica, sans-serif; -} -legend { - padding: 3px; - color: #990000; - font-size: 120%; - font-weight: bold; -} -form { - margin: 0; - padding: 0; -} -textarea { - width: 400px; -} - -.clearfix::after { - content: ""; - display: block; - clear: both; -} - -/* XOOPS Newbb & tabular work */ -.outer { - border: 0px solid #cc0000; -} -.head, -tr.head td { - padding: 5px; - font-weight: bold; - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: #c7c7c7; - background-color: #f0f2f7; -} -.even { - padding: 2px; - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: #c7c7c7; - background-color: #f8fafe; -} -.odd { - padding: 2px; - border-bottom-width: 1px; - border-bottom-style: solid; - border-bottom-color: #c7c7c7; - background-color: #ffffff; -} - -tr.even td { - padding: 2px; - background-color: #f8fafe; -} -tr.odd td { - padding: 2px; - background-color: #ffffff; -} -.foot { - padding: 5px; - font-weight: bold; -} - -.comTitle { - font-weight: bold; - margin-bottom: 2px; -} -.comText { - padding: 2px; -} -.comUserStat { - font-size: 90%; - color: #2f5376; - font-weight: bold; - border: 1px solid silver; - background-color: #ffffff; - margin: 2px; - padding: 2px; -} -.comUserStatCaption { - font-weight: normal; -} -.comUserStatus { - margin-left: 2px; - margin-top: 10px; - color: #2f5376; - font-weight: bold; - font-size: 10px; -} -.comUserRank { - margin: 2px; -} -.comUserRankText { - font-size: 90%; - font-weight: bold; -} -.comUserRankImg { - border: 0; -} -.comUserImg { - margin: 2px; -} -.comDate { - font-style: normal; - font-size: 85%; -} -.comDateCaption { - font-weight: bold; - font-style: normal; -} - -/* XOOPS News */ -.itemHead { - padding: 3px; -} -.itemInfo { - text-align: right; - padding: 3px; - margin-bottom: 5px; - border-bottom: 1px solid silver; - font-style: italic; -} -.itemTitle { - padding: 3px; - font-size: 120%; - font-weight: bold; - color: #6075aa; -} -.itemTitle a { - color: #286367; - text-decoration: none; -} -.itemTitle a:hover { - color: #ff9900; -} -.itemPoster { - font-size: 90%; - font-style: italic; -} -.itemPostDate { - font-size: 90%; - font-style: italic; -} -.itemStats { - font-size: 80%; -} -.itemBody { - padding: 3px; -} -.itemBody img { - padding: 5px; -} -.itemTopicImage { - float: left; -} -.itemText { - margin-top: 5px; - margin-bottom: 5px; - line-height: 1.5em; -} -.itemText:first-letter { - font-size: 133%; - font-weight: bold; -} -.itemFoot { - text-align: right; - padding: 3px; - margin-top: 5px; - background-color: #efefef; - border: 1px solid silver; -} -.itemAdminLink { - font-size: 90%; -} -.itemPermaLink { - font-size: 90%; -} - -/* XOOPS Error Msg */ -div.errorMsg { - background-color: #ffcccc; - text-align: center; - border-top: 1px solid #ddddff; - border-left: 1px solid #ddddff; - border-right: 1px solid #aaaaaa; - border-bottom: 1px solid #aaaaaa; - font-weight: bold; - padding: 10px; -} -div.confirmMsg { - background-color: #ddffdf; - color: #136c99; - text-align: center; - border-top: 1px solid #ddddff; - border-left: 1px solid #ddddff; - border-right: 1px solid #aaaaaa; - border-bottom: 1px solid #aaaaaa; - font-weight: bold; - padding: 10px; -} -div.resultMsg { - background-color: #cccccc; - color: #333333; - text-align: center; - border-top: 1px solid silver; - border-left: 1px solid silver; - font-weight: bold; - border-right: 1px solid #666666; - border-bottom: 1px solid #666666; - padding: 10px; -} - -/* XOOPS Code &Quote */ -div.xoopsCode { - background: #ffffff url(./common/assets/images/theme/xoops_quote.jpg) no-repeat right top; - border: 1px inset #000080; - overflow: auto; - max-height: 300px; - max-width: 600px; -} -div.xoopsQuote { - background: #ffffff url(./common/assets/images/theme/xoops_quote.jpg) no-repeat right top; - border: 1px inset #000080; - overflow: auto; - max-height: 300px; - max-width: 600px; -} - -/* other */ -table.report { - background-color: #ff8; -} - +@import url('./common/assets/theme/style.css'); \ No newline at end of file diff --git a/src/common/AppRoot.tsx b/src/common/AppRoot.tsx index 50b4f85..bde7fa2 100644 --- a/src/common/AppRoot.tsx +++ b/src/common/AppRoot.tsx @@ -5,9 +5,10 @@ import Helmet from 'react-helmet'; import { RouteComponentProps, withRouter } from 'react-router-dom'; import Config, { MultiLang } from '../config'; import Functions from '../functions'; -import Container from './Container'; +import CenterColumn from './CenterColumn'; import Footer from './Footer'; import Header from './Header'; +import LeftColumn from './LeftColumn'; interface Props extends RouteComponentProps, ReactCookieProps { } interface State { @@ -19,6 +20,9 @@ class AppRoot extends Component { constructor(props: Props) { super(props); this.state = { lang: 'en' }; + if (Config.GOOGLE_ANALYTICS_TRACKING_ID !== '') { + ReactGA.initialize(Config.GOOGLE_ANALYTICS_TRACKING_ID); + } } static getDerivedStateFromProps(nextProps: Props, prevState: State) { @@ -61,15 +65,20 @@ class AppRoot extends Component { render() { const { lang } = this.state; - const title = Functions.mlang(Config.SITE_TITLE, lang); - const slogan = Functions.mlang(Config.SITE_SLOGAN, lang); return ( <> - {title} - {slogan} + {Functions.mlang(Config.SITE_TITLE, lang)} - {Functions.mlang(Config.SITE_SLOGAN, lang)}
- + + + + + + + +