-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(popup): simple content with analytics
- Loading branch information
Showing
17 changed files
with
322 additions
and
70 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 was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,13 +1,68 @@ | ||
import React, { Component, PropTypes } from 'react'; | ||
|
||
export default function PopupScreen({ imagesUrl, openPrefScreenAbout, openPrefScreenSources }) { | ||
export default function PopupScreen({ imagesUrl, openPrefScreenAbout, onClick }) { | ||
function onClickHandler(e) { | ||
onClick({ | ||
name: e.currentTarget.textContent, | ||
href: e.currentTarget.href, | ||
}); | ||
} | ||
|
||
function onOpenPrefsHandler(e) { | ||
onClick({ | ||
name: e.currentTarget.textContent, | ||
}); | ||
openPrefScreenAbout(); | ||
} | ||
|
||
return ( | ||
<section> | ||
<p>Popup ok.</p> | ||
<p>Image Src: {imagesUrl}</p> | ||
<div><a onClick={openPrefScreenAbout} href>Préférences</a></div> | ||
<div><a onClick={openPrefScreenSources} href>Sources de recommandation</a></div> | ||
</section> | ||
<div className="lmem-popup-content"> | ||
<section className="popup-highlight"> | ||
<p> | ||
Si l’assistant ne s’affiche pas en bas de page, c’est qu’aucune de vos sources de recommandation | ||
n’a posté de message sur cette page. | ||
</p> | ||
<footer className="lmem-popup-footer"> | ||
<a className="with-image" href="https://choisir.lmem.net/demander-un-conseil/" target="_blank" rel="noopener noreferrer" onClick={onClickHandler}> | ||
<img role="presentation" className="picto" src={imagesUrl + 'discuss.svg'} /> | ||
<span>Demander de l’aide sur un forum</span> | ||
</a> | ||
</footer> | ||
</section> | ||
<nav className="lmem-popup-controls"> | ||
<ul> | ||
<li> | ||
<a | ||
className="button-hollow with-image" | ||
href="https://form.jotformeu.com/82702852284358" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
onClick={onClickHandler}> | ||
<img | ||
style={{ | ||
transform: 'rotate(45deg) scale(.9)' | ||
}} | ||
role="presentation" | ||
className="picto" | ||
src={imagesUrl + 'close.svg'} /> | ||
<span>Poster un nouveau message</span> | ||
</a> | ||
</li> | ||
<li> | ||
<a className="button-hollow with-image" onClick={onOpenPrefsHandler} href> | ||
<img role="presentation" className="picto" src={imagesUrl + 'settings.svg'} /> | ||
<span>Préférences</span> | ||
</a> | ||
</li> | ||
<li> | ||
<a className="button-hollow with-image" onClick={onClickHandler} href="https://choisir.lmem.net/questions-frequentes-aide/" target="_blank" rel="noopener noreferrer"> | ||
<img role="presentation" className="picto" src={imagesUrl + 'help.svg'} /> | ||
<span>Questions fréquentes, aide</span> | ||
</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
); | ||
} | ||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.