Skip to content

Commit

Permalink
Merge branch 'LaurentGoderre-fix-rect'
Browse files Browse the repository at this point in the history
  • Loading branch information
KatiRG committed Aug 4, 2019
2 parents ed75b65 + 2424aed commit ee60f1e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 45 deletions.
26 changes: 13 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link href="src/style.css" rel="stylesheet">
<link href="lib/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

</head>
<body>

Expand All @@ -25,34 +25,34 @@
<div class="row">
<div class="col-lg-3" id="download"></div>
<div class="col-lg-6 headings" id="pageTitle"></div>

<div class="col-lg-1">
<ul class="navbar-header">
<button id="mapResetButton" class="btn btn-info" type="button">Clear</button>
</ul>
</div>
</div>
<div class="col-lg-1">
<ul class="navbar-header">
<button id="helpButton" class="btn btn-info" type="button">Help</button>
</ul>
</div>
</div>



</div> <!-- ./header row -->


<!-- 2nd row -->
<div class="row">
<div class="col-lg-3" id="mycityCardDiv"> </div>
<div class="col-lg-3"><div id="mycityCardDiv"> </div></div>
<div class="col-lg-9" id="map"> </div>
</div>

<!-- Link to data and paper row -->
<div class="row">
<div class="col-lg-10" style="text-align: left; font-weight:normal; left: 0px;"></div>
<div class="col-lg-10" style="text-align: left; font-weight:normal; left: 0px;"></div>
</div>



<!-- row for barChart title and toggle buttons -->
<div class="row">
Expand All @@ -77,14 +77,14 @@
<option value="high_bua_pc_2014">High BUA (2014)</option>
<option value="none">None</option>
</select>

</div>
<div class="col-lg-2">
<div id="barChartLegend">
<svg></svg>
</div>
</div>
<div class="col-lg-2 units"></div>
<div class="col-lg-2 units"></div>
</div> <!-- .end row -->

<!-- ****************************************** -->
Expand Down Expand Up @@ -131,7 +131,7 @@

<footer class="row">
<div class="col-lg-2 footerClass" id="logo_BNP">
<a target="_blank" href="https://group.bnpparibas/en/group/bnp-paribas-foundation"><img src="img/BNPParisbasFoundation.jpg" title="BNP Parisbas Foundation" width="75" height="75"/></a>
<a target="_blank" href="https://group.bnpparibas/en/group/bnp-paribas-foundation"><img src="img/BNPParisbasFoundation.jpg" title="BNP Parisbas Foundation" width="75" height="75"/></a>
</div>

<div class="col-lg-2 footerClass" id="logo_GCP"> <!-- ratio 1:2.3 -->
Expand Down Expand Up @@ -159,12 +159,12 @@
<script src="lib/topojson.v1.min.js"></script>
<script type="text/javascript" src="lib/jquery.class.js"></script>
<script src="lib/Help.js"></script>

<script type="module" src="src/index.js"></script>

</div> <!-- ./container -->



</body>
</html>
</html>
21 changes: 0 additions & 21 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,26 +158,6 @@ const init = (urlRoot = "") => {
d3.select("#pageTitle").html(i18next.t("title", {ns: "pageText"}));
}

function addRect() {
// city card
const svgCityCard = d3.select("#mycityCardDiv").append("svg")
.attr("width", 273)
.attr("height", mapHeight);

const svg = svgCityCard
.attr("width", settingsCityCard.width) // col 2 width
.attr("height", mapHeight);

const g = svg.append("g")
.attr("id", "cityCardg");

g.append("rect")
.attr("width", settingsCityCard.rect.width)
.attr("height", settingsCityCard.rect.height)
.attr("x", settingsCityCard.rect.pos[0])
.attr("y", settingsCityCard.rect.pos[1]);
}

// ----------------------------------------------------------------
const card = d3.select("#mycityCardDiv");
let removedSelection = d3.select();
Expand Down Expand Up @@ -736,7 +716,6 @@ const init = (urlRoot = "") => {
pageText();
drawMap();

addRect();
const textSet = [
{id: 1, text: i18next.t("initTitle", {ns: "cityCard"})},
{id: 2, text: i18next.t("initRow1", {ns: "cityCard"})},
Expand Down
25 changes: 14 additions & 11 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ ul {
}

#logo_BNP {
text-align: center;
left: -43px;
text-align: center;
left: -43px;
}
#logo_GCP {
text-align: center;
text-align: center;
left: 257px;
}
#logo_CDP {
text-align: center;
left: 590px;
text-align: center;
left: 590px;
}
.footerClass {
position: relative;
Expand Down Expand Up @@ -208,15 +208,15 @@ div.tooltip {
/* map */
#mapResetButton {
position: absolute;
left: 146px;
left: 146px;
top: 4px;
background-color: #ffaa1b;
border-color: #fff;
color: #000;
}
#helpButton {
position: absolute;
left: 122px;
left: 122px;
top: 4px;
background-color: #ffaa1b;
border-color: #fff;
Expand Down Expand Up @@ -244,11 +244,11 @@ div.tooltip {
fill: #d15081;
}
.groupNAmer {
fill: #80c2ff;
fill: #80c2ff;
}
.groupEurope {
fill: #c398db;
}
}
.groupLatinAmer {
fill: #ee8370;
}
Expand Down Expand Up @@ -501,7 +501,6 @@ label {
}

.titlerow {
margin-top: -300px;
font-weight: bold;
font-size: 16px;
color: #00563c;
Expand Down Expand Up @@ -532,6 +531,10 @@ label {
font-size: 14px;
}

#mycityCardDiv {
background: #c7d1d9;
}

.cityCardSubrowTitle {
font-weight: 700;
font-size: 11px;
Expand All @@ -554,4 +557,4 @@ label {
td, th {
padding: 1px 4px;
font-size: 14px;
}
}

0 comments on commit ee60f1e

Please sign in to comment.