-
Notifications
You must be signed in to change notification settings - Fork 17
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 #289 from cofacts/logo-and-links
Add AppBar and links to website
- Loading branch information
Showing
13 changed files
with
273 additions
and
53 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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.
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,55 @@ | ||
<script> | ||
import { t } from 'ttag'; | ||
import { VIEW_ARTICLE_PREFIX, getArticleURL } from 'src/lib/sharedUtils'; | ||
import logo from '../assets/logo.svg'; | ||
import NewWindowIcon from './icons/NewWindowIcon.svelte'; | ||
export let articleId; | ||
const articleUrl = getArticleURL(articleId); | ||
const openLink = liff.isInClient() ? | ||
`https://line.me/R/oaMessage/@cofacts?${encodeURIComponent(`${VIEW_ARTICLE_PREFIX}${articleUrl}`)}` : | ||
getArticleURL(articleId); | ||
</script> | ||
|
||
<style> | ||
header { | ||
display: flex; | ||
align-items: center; | ||
height: 56px; | ||
padding: 0 16px; | ||
background: #fff; | ||
border-bottom: 2px solid var(--secondary50); | ||
position: sticky; | ||
top: 0; | ||
z-index: 1; | ||
} | ||
.logo { | ||
margin-right: auto; | ||
} | ||
a { | ||
color: var(--secondary300); | ||
font-weight: 700; | ||
font-size: 14px; | ||
letter-spacing: 0.25px; | ||
text-decoration: none; | ||
display: flex; | ||
align-items: center; | ||
} | ||
a > :global(svg) { | ||
margin-left: 8px; | ||
} | ||
</style> | ||
|
||
<header> | ||
<img class="logo" src={logo} alt="Cofacts 真的假的" /> | ||
{#if articleId } | ||
<a href={openLink}> | ||
{t`Open in Cofacts`} | ||
<NewWindowIcon /> | ||
</a> | ||
{/if} | ||
</header> |
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
Oops, something went wrong.