Skip to content

Commit

Permalink
Change tool page to resource page
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis committed Aug 30, 2023
1 parent 75576fa commit 1eebc29
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/component/InsideApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import PageService from "./PageService.jsx";
import PageArticle from "./PageArticle.jsx";
/* import PageEvent from "./PageEvent.jsx"; */
import PageJob from "./PageJob.jsx";
import PageTool from "./PageTool.jsx";
import PageResource from "./PageResource.jsx";
import PageCompany from "./PageCompany.jsx";
import PageAbout from "./PageAbout.jsx";
import PageSearch from "./PageSearch.jsx";
Expand Down Expand Up @@ -83,7 +83,7 @@ export default class InsideApp extends React.Component {
<Route path="/job/:handle" render={(props) => <PageJob
{...props}
/>}/>
<Route path="/tool/:handle" render={(props) => <PageTool
<Route path="/resource/:handle" render={(props) => <PageResource
{...props}
/>}/>
<Route path="/company/:handle" render={(props) => <PageCompany
Expand Down
28 changes: 14 additions & 14 deletions src/component/PageTool.css → src/component/PageResource.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

.PageTool article {
.PageResource article {
margin-bottom: 20px;
}

.PageTool article .PageTool-content-cover {
.PageResource article .PageResource-content-cover {
position: relative;
margin: auto;
background: repeating-linear-gradient(
Expand All @@ -17,38 +17,38 @@
min-height: 50px;
}

.PageTool article .PageTool-content-cover img {
.PageResource article .PageResource-content-cover img {
max-width: 100%;
min-height: 50px;
max-height: 300px;
}

.PageTool article .content-media {
.PageResource article .content-media {
margin: 15px auto;
text-align: center;
display: flex;
justify-content: center;
}

.PageTool article .content-media img {
.PageResource article .content-media img {
max-width: 100%;
max-height: 300px;
}

.PageTool article .content-media iframe {
.PageResource article .content-media iframe {
max-width: 100%;
}

.PageTool article .content-media p {
.PageResource article .content-media p {
margin: 0 !important;
}

.PageTool-related-article {
.PageResource-related-article {
background-color: #f8f9fa;
padding-top: 0px !important;
}

.PageTool-publication-date {
.PageResource-publication-date {
position: absolute;
right: 30px;
bottom: 0px;
Expand All @@ -61,32 +61,32 @@
line-height: 1.2;
}

.PageTool-tags {
.PageResource-tags {
padding: 30px 10px 5px 10px;
}

/* Collapsible */

.PageTool .Collapsible {
.PageResource .Collapsible {
margin: 30px 0px 0px 0px !important;
border-top: solid 0px !important;
border-bottom: solid 0px !important;
}

.PageTool .Collapsible__trigger p {
.PageResource .Collapsible__trigger p {
position: relative;
padding: 8px 70px 8px 20px;
font-style: italic;
cursor: pointer;
margin-bottom: 0px;
}

.PageTool .Collapsible .is-closed:after {
.PageResource .Collapsible .is-closed:after {
top: 45px !important;
right: 10px;
}

.PageTool .Collapsible .is-open:after {
.PageResource .Collapsible .is-open:after {
top: 45px !important;
right: 10px;
}
14 changes: 7 additions & 7 deletions src/component/PageTool.jsx → src/component/PageResource.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import "./PageTool.css";
import "./PageResource.css";
import dompurify from "dompurify";
import { NotificationManager as nm } from "react-notifications";
import Breadcrumb from "react-bootstrap/Breadcrumb";
Expand All @@ -10,7 +10,7 @@ import Loading from "./box/Loading.jsx";
import { getContentFromBlock } from "../utils/article.jsx";
import { getSettingValue } from "../utils/setting.jsx";

export default class PageTool extends React.Component {
export default class PageResource extends React.Component {
constructor(props) {
super(props);

Expand Down Expand Up @@ -47,7 +47,7 @@ export default class PageTool extends React.Component {
let positionToTreat = 0;

return (
<div className={"PageTool page max-sized-page"}>
<div className={"PageResource page max-sized-page"}>
<div className="row">
<div className="col-md-12">
<Breadcrumb>
Expand All @@ -56,9 +56,9 @@ export default class PageTool extends React.Component {
<Link to="/">{getSettingValue(this.props.settings, "PROJECT_NAME")}</Link>
</Breadcrumb.Item>
}
<Breadcrumb.Item><Link to="/services">Services</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to="/resources">Resources</Link></Breadcrumb.Item>
{this.state.article !== null
? <Breadcrumb.Item><Link to={"/service/" + this.props.match.params.handle}>{this.state.article.title}</Link></Breadcrumb.Item>
? <Breadcrumb.Item><Link to={"/resource/" + this.props.match.params.handle}>{this.state.article.title}</Link></Breadcrumb.Item>
: ""}
</Breadcrumb>
</div>
Expand All @@ -68,7 +68,7 @@ export default class PageTool extends React.Component {
? <div className="row row-spaced">
<div className="col-md-12">
<article>
<div className='PageTool-content-cover'>
<div className='PageResource-content-cover'>
{this.state.article.image !== null
? <img src={getApiURL() + "public/get_public_image/" + this.state.article.image}/>
: ""}
Expand All @@ -80,7 +80,7 @@ export default class PageTool extends React.Component {

{this.state.article.abstract !== null
&& <div
className="PageTool-abstract"
className="PageResource-abstract"
dangerouslySetInnerHTML={{
__html:
dompurify.sanitize(this.state.article.abstract),
Expand Down
2 changes: 1 addition & 1 deletion src/component/item/ResourceHorizontal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default class ResourceHorizontal extends Component {
className="ResourceHorizontal-link">
{this.getBoxContent()}
</a>
: <Link to={"/tool/" + this.props.info.handle} className="ResourceHorizontal-link">
: <Link to={"/resource/" + this.props.info.handle} className="ResourceHorizontal-link">
{this.getBoxContent()}
</Link>;
}
Expand Down

0 comments on commit 1eebc29

Please sign in to comment.