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)}
- + + + + + + + +