Skip to content

Commit

Permalink
feat: 移除網站上的廣告 (#1037)
Browse files Browse the repository at this point in the history
* feat: remove all ads on website

* fix: style of experience detail

* fix: remove unused elements & packages
  • Loading branch information
barry800414 authored Dec 14, 2022
1 parent facab47 commit f47f63f
Show file tree
Hide file tree
Showing 13 changed files with 11,698 additions and 11,687 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"razzle": "^2.4.0",
"react": "^16.12.0",
"react-autocomplete": "^1.8.1",
"react-dfp": "^0.17.2",
"react-dom": "^16.12.0",
"react-facebook-pixel": "^0.1.0",
"react-ga": "^2.2.0",
Expand Down
160 changes: 0 additions & 160 deletions public/ads.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { toPairs, compose, map } from 'ramda';

import Heading from 'common/base/Heading';
import FanPageBlock from 'common/FanPageBlock';
import GoogleAdsense from 'common/GoogleAdsense';
import BreadCrumb from 'common/BreadCrumb';

import {
Expand Down Expand Up @@ -55,11 +54,6 @@ const CompanyAndJobTitleWrapper = ({
/>
{children}
<FanPageBlock className={styles.fanPageBlock} />
<GoogleAdsense
className={styles.adBeforeFanPageBlock}
slot="2116582901"
responsive="true"
/>
</div>
);
};
Expand Down
14 changes: 0 additions & 14 deletions src/components/CompanyAndJobTitle/Overview/Overview.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useWindowSize } from 'react-use';

import { Section } from 'common/base';
import GoogleAdUnit from 'common/GoogleAdUnit';

import SnippetBlock from './SnippetBlock';
import WorkingHourTable from '../TimeAndSalary/WorkingHourTable';
import WorkExperienceEntry from '../WorkExperiences/ExperienceEntry';
import InterviewExperienceEntry from '../InterviewExperiences/ExperienceEntry';
import { tabType as TAB_TYPE } from '../../../constants/companyJobTitle';
import breakpoints from '../../../constants/breakpoints';
import SummaryBlock from './SummaryBlock';

import styles from './Overview.module.css';

const SALARY_WORK_TIMES_LIMIT = 5;
const WORK_EXPERIENCES_LIMIT = 3;
const INTERVIEW_EXPERIENCES_LIMIT = 3;
Expand All @@ -32,7 +27,6 @@ const Overview = ({
overtimeFrequencyCount,
canView,
}) => {
const { width } = useWindowSize();
return (
<Section Tag="main" paddingBottom>
<SnippetBlock
Expand All @@ -50,14 +44,6 @@ const Overview = ({
averageWeekWorkTime={averageWeekWorkTime}
overtimeFrequencyCount={overtimeFrequencyCount}
/>
{width <= breakpoints.xs ? (
<div className={styles.adContainer}>
<GoogleAdUnit
sizes={[[300, 250]]}
adUnit="goodjob_m_list_above_300x250"
/>
</div>
) : null}
<WorkingHourTable
data={salaryWorkTimes.slice(0, SALARY_WORK_TIMES_LIMIT)}
hideContent={!canView}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,3 @@
margin-top: 60px;
}
}

.adContainer {
margin-top: -10px;
margin-bottom: 10px;
display: flex;
justify-content: center;
}
19 changes: 2 additions & 17 deletions src/components/CompanyAndJobTitle/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import React, { useEffect } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { Switch } from 'react-router';
import { useWindowSize } from 'react-use';
import Wrapper from 'common/base/Wrapper';
import GoogleAdUnit, { Manager as GoogleAdManager } from 'common/GoogleAdUnit';
import RouteWithSubRoutes from '../route';
import styles from './styles.module.css';
import breakpoints from '../../constants/breakpoints';

const CompanyAndJobTitlePageContainer = ({ routes, location }) => {
const { width } = useWindowSize();
useEffect(() => {
GoogleAdManager.reload();
}, [location.pathname, location.search]);
const CompanyAndJobTitlePageContainer = ({ routes }) => {
return (
<div>
<Wrapper size="l" className={styles.container}>
Expand All @@ -23,14 +16,6 @@ const CompanyAndJobTitlePageContainer = ({ routes, location }) => {
))}
</Switch>
</div>
{width > breakpoints.md ? (
<div className={styles.sideAds}>
<GoogleAdUnit
sizes={[[160, 600]]}
adUnit="goodjob_pc_list_sidebar"
/>
</div>
) : null}
</Wrapper>
</div>
);
Expand Down
12 changes: 0 additions & 12 deletions src/components/ExperienceDetail/ExperienceDetail.module.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
@value below-small, above-small from "common/variables.module.css";

.container {
display: flex;
justify-content: center;
}

.leftContainer {
flex-shrink: 1;
@media (min-width: above-small) {
padding-right: 16px;
}
}

.breadCrumb {
margin-bottom: 16px;

Expand Down
Loading

0 comments on commit f47f63f

Please sign in to comment.