Skip to content

Commit

Permalink
worked masthead
Browse files Browse the repository at this point in the history
  • Loading branch information
oyilmaztekin committed Apr 4, 2019
1 parent c0d6507 commit a18d904
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
7 changes: 7 additions & 0 deletions nested/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ class Header extends Component {
}
@autobind
handleStateChange(status) {
// FIXME: global state e bağla. burada değiştirmek doğru değil.
if (status.status === Sticky.STATUS_FIXED) {
console.log("the component is sticky");
const adLeft = document.getElementById("anasayfa_sol");
adLeft.style.top = 80 + "px";
}
else {
const adLeft = document.getElementById("anasayfa_sol");
adLeft.style.top = 150 + "px";
}
}
render() {
Expand Down
11 changes: 11 additions & 0 deletions nested/indexlayout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@ import Container from "@comp/container/";
import Row from "@comp/row/";
import Lists from "@comp/lists/";
import propTypes from "prop-types";
import { AdSlot } from "react-dfp";

const IndexLayout = props => {
return (
<Fragment>
<AdSlot
sizes={[[970, 250]]}
adUnit={"AnasayfaMastHead"}
slotId="anasayfaMastHead"
/>
<AdSlot
sizes={[[160, 600], [120, 600]]}
adUnit={"anasayfa_sol1"}
slotId="anasayfa_sol"
/>
<Container width={970}>
<Cards
dataset={props.dataset.surmanset}
Expand Down
13 changes: 0 additions & 13 deletions nested/pagelayout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import Icon from "@comp/icon/";
import { faArrowAltCircleUp } from "@fortawesome/free-solid-svg-icons";
import { URLProvider } from "@utils";
import { Block } from "@comp/layouts";
import { AdSlot } from "react-dfp";
import "./assets/style.scss";

const PageLayout = props => {
return (
Expand All @@ -20,17 +18,6 @@ const PageLayout = props => {
zIndex={9}
activeClass="sticky-now"
/>
<AdSlot
adUnit={"haberiyakala_anasayfa_masthead"}
slotId="anasayfaMastHead"
sizes={[[970, 250]]}
/>

<AdSlot
adUnit={"haberiyakala_anasayfa_sol1"}
slotId="anasayfa_sol"
sizes={[[160, 600],[120,600]]}
/>
<URLProvider>
<Block
type="section"
Expand Down
3 changes: 2 additions & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { getDataset, getContent } from "@utils";
import PageLayout from "@nest/pagelayout";
import propTypes from "prop-types";
import IndexLayout from "@nest/indexlayout";
import { DFPSlotsProvider } from "react-dfp";
import { DFPSlotsProvider, AdSlot } from "react-dfp";
import "static/styles/pages.scss";
import "static/styles/indexAds.scss";

const IndexPage = props => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
left:0px;
background-color:orange;
top:150px;
z-index: 1;
z-index:1;
}

#anasayfaMastHead{
margin-top:14px;
div{
z-index: 5;
div, iframe{
margin:auto;
background-color:#fff;
background-color:transparent;
display:block;
}
}

0 comments on commit a18d904

Please sign in to comment.