Skip to content

Commit

Permalink
IE11 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brugarolas committed Jan 18, 2019
1 parent 6d510cb commit e685bb5
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Smoother start up
Animation code simplified
Fixed searcher animations
Error handling
Style fixes in older browsers
Fixes IE11

## v1.3.0
Animations and UX improvements in searcher
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"reselect": "^4.0.0",
"react-flip-move": "^3.0.3",
"@fortawesome/fontawesome-free": "^5.6.3",
"@andres-brugarolas/swing": "^3.1.4"
"@andres-brugarolas/swing": "^3.1.4",
"unfetch": "^4.0.1"
},
"devDependencies": {
"@babel/core": "^7.2.2",
Expand Down
2 changes: 2 additions & 0 deletions src/api/time/timezone-api.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import fetch from '@/api/utils/fetch.js';

const BASE_URL = TIMEZONE_URL || 'http://localhost/timezone';

/* API Calls */
Expand Down
5 changes: 5 additions & 0 deletions src/api/utils/fetch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import unfetch from 'unfetch';

const fetch = window.fetch || unfetch;

export default fetch;
1 change: 1 addition & 0 deletions src/api/weather/cities.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Adapt from './adapt.js';
import fetch from '@/api/utils/fetch.js';

const API_URL = 'https://openweathermap.org/data/2.5/find';

Expand Down
1 change: 1 addition & 0 deletions src/api/weather/openweather.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Adapt from './adapt.js';
import fetch from '@/api/utils/fetch.js';

const API_URL = 'https://api.openweathermap.org/data/2.5/';

Expand Down
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8">
<title>Bruga Weather</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
<div id="home"></div>
Expand Down
3 changes: 2 additions & 1 deletion src/ui/components/city.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
padding: 10px 45px 10px 25px;
}

&::after {
&::after { // Old browsers fix
content: "";
clear: both;
display: table;
Expand Down Expand Up @@ -94,6 +94,7 @@
}
.metrics {
.fontRoboto();
width: 21px; // IE11 fix
font-size: 20px;
font-weight: 300;
position: absolute;
Expand Down
2 changes: 2 additions & 0 deletions src/ui/components/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@import (less, reference) "../../assets/styles/mixins.less";

.main {
display: block; // IE11 fix
width: 100%; // IE11 fix
.fontRoboto();
text-align: center;
color: @color-text;
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/new-city-card.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
top: -46px;
left: calc(50% - 174px/2);
z-index: 3;
pointer-events: none;

@media @tablet-above {
width: 200px;
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/search-city-form.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.search-form {
.fontOpenSans();
width: 100%;
overflow: hidden; // Edge fix

.title {
margin: 5px 0 25px 0;
Expand Down
2 changes: 2 additions & 0 deletions src/ui/components/weather.less
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@

.metrics {
.fontRoboto();
width: 17px; // IE11 fix
font-size: 16px;
font-weight: 300;
position: absolute;
top: 14px;

@media @tablet-above {
width: 25px; // IE11 fix
font-size: 24px;
top: 18px;
}
Expand Down
1 change: 1 addition & 0 deletions src/ui/containers/modal/modal-overlay.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.modal-container {
display: none;
position: fixed;
background-color: rgba(34, 34, 34, 0.55); // IE11 fix
background-color: #2228;
width: 100%;
height: 100%;
Expand Down

0 comments on commit e685bb5

Please sign in to comment.