-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #346 from cofacts/banner
Add favicon and article detail banner
- Loading branch information
Showing
6 changed files
with
45 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import gql from 'graphql-tag'; | |
import Link from 'next/link'; | ||
import { useEffect, useRef, useCallback, useState } from 'react'; | ||
import { makeStyles } from '@material-ui/core/styles'; | ||
import { Box, Snackbar } from '@material-ui/core'; | ||
import { Box, Hidden, Snackbar } from '@material-ui/core'; | ||
import { ngettext, msgid, t } from 'ttag'; | ||
|
||
import { useRouter } from 'next/router'; | ||
|
@@ -174,6 +174,10 @@ const useStyles = makeStyles(theme => ({ | |
lineHeight: '20px', | ||
margin: '0 12px', | ||
}, | ||
bannerImage: { | ||
width: '100%', | ||
borderRadius: theme.shape.borderRadius, | ||
}, | ||
})); | ||
|
||
const LOAD_ARTICLE = gql` | ||
|
@@ -460,6 +464,16 @@ function ArticlePage() { | |
</CardHeader> | ||
<CurrentReplies articleReplies={article.articleReplies} /> | ||
</Card> | ||
|
||
<Hidden smDown implementation="css"> | ||
<a href={LINE_URL}> | ||
<img | ||
className={classes.bannerImage} | ||
src="/[email protected]" | ||
alt={t`Add Cofacts as friend in LINE`} | ||
/> | ||
</a> | ||
</Hidden> | ||
</div> | ||
|
||
<aside className={classes.aside}> | ||
|
@@ -484,6 +498,16 @@ function ArticlePage() { | |
)} | ||
</aside> | ||
</div> | ||
<Hidden mdUp implementation="css"> | ||
<a href={LINE_URL}> | ||
<img | ||
className={classes.bannerImage} | ||
src="/[email protected]" | ||
alt={t`Add Cofacts as friend in LINE`} | ||
style={{ marginBottom: 24 }} | ||
/> | ||
</a> | ||
</Hidden> | ||
<Snackbar | ||
open={!!flashMessage} | ||
onClose={() => setFlashMessage('')} | ||
|
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.
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.