-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
671bb9f
commit 1a3b8b7
Showing
21 changed files
with
358 additions
and
281 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
engine-strict=true |
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,4 +1,6 @@ | ||
{ | ||
"docs": {}, | ||
"docs": { | ||
"locales/en/content.json": "1D-dlkNwrDYD_puaYICD02NOO8qtQij5MG-FNz9aKsN0" | ||
}, | ||
"sheets": {} | ||
} |
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,8 +1 @@ | ||
{ | ||
"SeoTitle": "Testing", | ||
"SeoDescription": "Testing", | ||
"title": "My page", | ||
"chartTitle": "Congess", | ||
"chartChatter": "Bacon ipsum dolor amet salami bresaola venison, boudin leberkas frankfurter pastrami.", | ||
"story": "English Bacon ipsum dolor amet salami bresaola venison, boudin leberkas frankfurter pastrami. Beef buffalo strip steak boudin. Kevin tenderloin leberkas jowl, strip steak ball tip swine alcatra bacon turkey corned beef chuck brisket chicken tail.\n\nTenderloin cow kevin doner biltong burgdoggen short ribs. Capicola bresaola pork loin, flank spare ribs turducken chuck ham hock prosciutto fatback short ribs rump. Sirloin bresaola pastrami, swine porchetta ham hock short loin frankfurter ham kielbasa tail cow spare ribs cupim." | ||
} | ||
{"SEOTitle":"My page title for Google","SEODescription":"My page description for Google","ShareTitle":"My page title for Twitter","ShareDescription":"My page description for Twitter","Hed":"Reuters Graphics Interactive","Dek":"The beginning of a beautiful page","Kicker":"Global News","blocks":[{"Type":"text","Text":"Pig short ribs jerky, meatloaf turducken ribeye strip steak bacon pastrami tail pancetta chicken. Meatloaf ham hock tail picanha, meatball boudin pancetta capicola chislic kielbasa.\n\n#### This is a subhead\n\n“Rump salami spare ribs jowl corned beef picanha meatloaf bresaola, porchetta jerky ham hock venison ground round alcatra.” Picanha pig chuck pork meatloaf pork loin kevin t-bone leberkas turducken cupim meatball andouille."},{"Type":"photo","AltText":"describe what is happening in the image (for people using screenreaders)","Caption":"add a caption and source information (for all readers)"},{"Type":"text","Text":"Jerky venison flank, landjaeger pork chop capicola turkey. Spare ribs chicken venison, cupim tenderloin porchetta pig andouille ground round.\n\nGround round porchetta boudin drumstick venison beef ribs sausage pig kielbasa short loin. Kevin tenderloin tongue t-bone jerky, chicken ham. Pork chislic short loin burgdoggen pork chop capicola flank pancetta. Pig ground round turducken, rump tail spare ribs kielbasa frankfurter ribeye hamburger."},{"Type":"graphic","Title":"Pig ground round turducken","Chatter":"Pork chislic short loin burgdoggen pork chop capicola flank pancetta."},{"Type":"text","Text":"Jerky venison flank, landjaeger pork chop capicola turkey. Spare ribs chicken venison, cupim tenderloin porchetta pig andouille ground round.\n\nGround round porchetta boudin drumstick venison beef ribs sausage pig kielbasa short loin. Kevin tenderloin tongue t-bone jerky, chicken ham. Pork chislic short loin burgdoggen pork chop capicola flank pancetta. Pig ground round turducken, rump tail spare ribs kielbasa frankfurter ribeye hamburger."}],"EndNotes":"##### Note\nData is current as of today.\n\n##### Sources\nData, Inc.\n\n##### Edited by\n<Editor>, <Copyeditor>"} |
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,8 +1,15 @@ | ||
<script> | ||
import pages from '@svelte-kit-pages'; | ||
import { Framer } from '@reuters-graphics/svelte-page-components'; | ||
import { Framer } from 'reuters-components'; | ||
const embeds = pages.filter(p => /^\/embeds\//.test(p)); | ||
</script> | ||
|
||
<Framer {embeds} /> | ||
<Framer {embeds} /> | ||
|
||
<style lang='scss'> | ||
:global(body) { | ||
padding-bottom: 60px; | ||
background-color: #fafafa; | ||
} | ||
</style> |
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,12 +1,21 @@ | ||
<script> | ||
import Chart from '$lib/Chart.svelte'; | ||
import { PymChild } from '@reuters-graphics/svelte-page-components'; | ||
import '$lib/translations'; | ||
import { init } from 'svelte-i18n'; | ||
init({ initialLocale: 'en' }); | ||
import { PymChild } from 'reuters-components'; | ||
import content from '$locales/en/content.json'; | ||
</script> | ||
|
||
|
||
<article> | ||
{#each content.blocks as block} | ||
{#if block.Type === 'graphic'} | ||
<Chart title={block.Title} chatter={block.Chatter} /> | ||
{/if} | ||
{/each} | ||
</article> | ||
<PymChild /> | ||
<article class='container-fluid'> | ||
<Chart /> | ||
</article> | ||
|
||
<style lang="scss"> | ||
:global { | ||
@import "@reuters-graphics/style-theme-eisbaer/scss/main"; | ||
} | ||
</style> |
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 @@ | ||
<script> | ||
import { SEO } from 'reuters-components'; | ||
import Page from '$lib/Page.svelte'; | ||
import content from '$locales/en/content.json'; | ||
import { PymChild } from 'reuters-components'; | ||
</script> | ||
|
||
<SEO | ||
seoTitle={content.SEOTitle} | ||
seoDescription={content.SEODescription} | ||
shareTitle={content.ShareTitle} | ||
shareDescription={content.ShareDescription} | ||
shareImgPath='images/shark.jpg' | ||
lang='en' | ||
/> | ||
|
||
<Page /> | ||
|
||
<PymChild/> | ||
|
||
<style lang="scss"> | ||
:global { | ||
@import "@reuters-graphics/style-theme-eisbaer/scss/main"; | ||
} | ||
</style> | ||
|
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,10 @@ | ||
<script> | ||
import marked from 'marked'; | ||
export let text; | ||
if (!text) throw new Error('"text" prop must be defined as a string for BodyText components'); | ||
</script> | ||
|
||
<section class='end-notes'> | ||
{@html marked(text)} | ||
</section> |
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,27 +1,53 @@ | ||
<script> | ||
import Chart from '@reuters-graphics/parliament-chart'; | ||
import { onMount } from 'svelte'; | ||
import { _ } from 'svelte-i18n'; | ||
import debounce from 'lodash/debounce'; | ||
export let title; | ||
export let chatter; | ||
const colours = (p) => { | ||
switch (p.id) { | ||
case 'a': | ||
return '#2c6075'; | ||
case 'b': | ||
return '#7ebfc1'; | ||
case 'c': | ||
return '#d1eeea'; | ||
case 'd': | ||
return '#ffd430'; | ||
case 'e': | ||
return '#cda200'; | ||
default: | ||
return 'lightgrey'; | ||
} | ||
}; | ||
onMount(() => { | ||
const chart = new Chart(); | ||
chart | ||
.selection('#parliament-chart') | ||
.data([ | ||
{ id: "gop",seats: 211 }, | ||
{ id: "dem",seats: 221 } | ||
{ id: 'a', seats: 150 }, | ||
{ id: 'b', seats: 125 }, | ||
{ id: 'c', seats: 75 }, | ||
{ id: 'd', seats: 50 }, | ||
{ id: 'e', seats: 25 }, | ||
{ id: 'f', seats: 10 }, | ||
]) | ||
.props({ | ||
circle: { | ||
fill: (p) => p.id === 'gop' ? 'red' : 'blue', | ||
} | ||
fill: colours, | ||
}, | ||
}) | ||
.draw(); | ||
}) | ||
const resize = debounce(() => { chart.draw(); }, 250); | ||
window.addEventListener('resize', resize); | ||
}); | ||
</script> | ||
|
||
<section class='graphic'> | ||
<h3>{$_('chartTitle')}</h3> | ||
<p>{$_('chartChatter')}</p> | ||
<h3>{title}</h3> | ||
<p>{chatter}</p> | ||
<div id='parliament-chart'></div> | ||
</section> |
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,22 +1,29 @@ | ||
<script> | ||
import { Image, BodyText } from '@reuters-graphics/svelte-page-components'; | ||
import { _ } from 'svelte-i18n'; | ||
import Chart from './Chart.svelte'; | ||
import content from '$locales/en/content.json'; | ||
import { BodyText, Image, EndNotes } from 'reuters-components'; | ||
import Chart from './Chart.svelte'; | ||
</script> | ||
|
||
|
||
<article class='container-fluid'> | ||
<section class="headline"> | ||
<p class="section-title color-red">Reuters Internet Fashion</p> | ||
<h2 class="">{$_('title')}</h2> | ||
<p>Cold simple theme for features and graphics.</p> | ||
<p class="section-title color-red">{content.Kicker}</p> | ||
<h2>{content.Hed}</h2> | ||
<p>{content.Dek}</p> | ||
</section> | ||
<BodyText text={$_('story')} /> | ||
<Chart /> | ||
<BodyText text={$_('story')} /> | ||
<Image src='/images/shark.jpg' alt='a shark' caption='Photo by Jon' wider /> | ||
<BodyText text={$_('story')} /> | ||
{#each content.blocks as block} | ||
{#if block.Type === 'text'} | ||
<BodyText text={block.Text} /> | ||
{:else if block.Type === 'photo'} | ||
<Image | ||
src='images/shark.jpg' | ||
caption={block.Caption} | ||
alt={block.AltText} | ||
wide | ||
/> | ||
{:else if block.Type === 'graphic'} | ||
<Chart title={block.Title} chatter={block.Chatter} /> | ||
{/if} | ||
{/each} | ||
|
||
<EndNotes text={content.EndNotes} /> | ||
</article> | ||
|
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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 +1 @@ | ||
{"deeper/images/shark.jpg":{"width":2600,"height":1956,"size":205},"shark.jpg":{"width":1400,"height":788,"size":103}} | ||
{"shark.jpg":{"width":1400,"height":788,"size":103}} |
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 |
---|---|---|
|
@@ -8,6 +8,8 @@ | |
%svelte.head% | ||
</head> | ||
<body> | ||
%svelte.body% | ||
<div id='svelte-app'> | ||
%svelte.body% | ||
</div> | ||
</body> | ||
</html> |
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.