-
-
Notifications
You must be signed in to change notification settings - Fork 917
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding sponsor tile to the landing page. (#3697)
* Adding sponsor tile to the landing page. * Consistent naming. * Removing duplication for Sonar * Formatting update
- Loading branch information
Showing
6 changed files
with
88 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import BuildApi from './BuildApi'; | ||
import DarkTheme from './DarkTheme'; | ||
|
||
export default class Sponsor { | ||
|
||
constructor () { | ||
this._api = new BuildApi(); | ||
} | ||
|
||
loadSponsorTile(name, div) { | ||
if (!navigator.onLine) { | ||
return; | ||
} | ||
|
||
this._api.loadSponsorTile(DarkTheme.enabled ? 'dark' : 'light', name, | ||
(content) => { | ||
if (content) { | ||
div.html(content); | ||
div.show(); | ||
} else { | ||
div.hide(); | ||
} | ||
}, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters