Invite Home visitors into Writing Solver and unify marketing screenshots
42
Docs/HomeSolverInvitation/Report.md
Normal file
@ -0,0 +1,42 @@
|
||||
# Home Writing Solver invitation and canonical marketing screenshots
|
||||
|
||||
## Home invitation
|
||||
|
||||
The new section follows “Sound familiar?” and precedes “Meet PlotDirector”. The hero, manuscript composition, primary Start writing route, new public photography and the remainder of the Home sequence remain intact.
|
||||
|
||||
**Not sure what’s getting in the way?**
|
||||
|
||||
“Characters, storylines, scene order, continuity. You can feel something getting tangled without knowing what to call it.”
|
||||
|
||||
“Tell us what’s becoming difficult. We’ll help you narrow down what’s happening, what to look at next and where PlotDirector may help.”
|
||||
|
||||
Four illustrative frustrations are plain list items, not controls:
|
||||
|
||||
- I’m losing track of things
|
||||
- Something doesn’t feel right
|
||||
- Changing things causes problems elsewhere
|
||||
- There’s simply too much to manage
|
||||
|
||||
The plum **Help me find the problem →** link performs ordinary server navigation to `/writing-problems`. “No sign-up needed.” makes its anonymous availability explicit. The cream/sage example cards, plum heading, editorial serif and compact responsive grid use the public palette. The section stacks below 900px and the examples below 600px. The link has an evident keyboard focus outline. No solver logic or recommendations were changed.
|
||||
|
||||
## Tour contrast amendment
|
||||
|
||||
The public visual unification changed the Plot Lines section’s background to cream through an alternating-section rule, while the former dark section retained pale foreground variables and explicit pale olive details. The shared public visual stylesheet now pairs that section’s cream surface with dark ink/muted text and darker olive emphasis, annotation and checkmarks. Its screenshot frame also uses the warm surface.
|
||||
|
||||
The rest of the Tour was checked too. All eight other small section labels failed normal-text contrast (approximately 3.58–3.73:1). Tour labels now use `#62664f`, including on sage. Browser checks walk rendered Tour text nodes against their solid ancestor surfaces and require WCAG AA normal/large-text ratios at all four widths. Decorative/photo regions also receive visual review; this automated check is not an assertion about text baked into screenshots.
|
||||
|
||||
## Screenshot amendment
|
||||
|
||||
See [the inventory and capture report](../PublicMarketingScreenshots/Report.md). Principal Home and all Tour application screenshots now use PlotDirector. One later Home composition deliberately demonstrates Modern Dark, labelled “A different mood, still your workspace. Shown in Modern Dark.”
|
||||
|
||||
Existing angled layouts and cropped fragments remain. The common `_MarketingScreenshot` partial uses lazy AVIF/WebP 640/960/1280 variants and intrinsic dimensions. The 14 approved Solver captures and derivatives remain unchanged. No application theme or author preference code changed.
|
||||
|
||||
## Verification before deployment
|
||||
|
||||
- `dotnet build PlotLine.slnx`: passed; two existing nullable warnings on the first build, no new errors.
|
||||
- Existing executable regression harness: **395 passed**, exit 0.
|
||||
- `home-solver-marketing.cjs`: Home placement, four noninteractive examples, anonymous JavaScript-disabled CTA, keyboard focus, canonical-theme clusters, AVIF decode, full Home/Tour captures, Tour text contrast and no horizontal overflow at **390/768/1440/1920px**.
|
||||
- `public-visual-identity.cjs`: existing coordinated photos, one responsive background per page, intact hero/manuscript/Tour/Pricing structure and ten other public page types passed at all four widths.
|
||||
- `writing-solver-clean-urls.cjs`: all 52 permanent pages, personalised/private evidence, fresh sharing, Back/Forward, revised diagnosis, JS/no-JS, 390/1440, metadata/canonical/OG/schema and Development noindex passed.
|
||||
|
||||
Development deployment and measured performance are recorded in Deployment.md. Production remains unchanged.
|
||||
127
Docs/PublicMarketingScreenshots/Captures.json
Normal file
@ -0,0 +1,127 @@
|
||||
[
|
||||
{
|
||||
"asset": "scene",
|
||||
"route": "/Scenes/Edit/{id}",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
"cropY": 44,
|
||||
"theme": "plotdirector",
|
||||
"presentation": "actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "writing",
|
||||
"route": "/Scenes/Edit/{id}",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
"cropY": 44,
|
||||
"theme": "plotdirector",
|
||||
"presentation": "actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "import",
|
||||
"route": "/onboarding",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
"cropY": 44,
|
||||
"theme": "plotdirector",
|
||||
"presentation": "actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "dark-overview",
|
||||
"route": "/Timeline?projectId={id}&bookId={id}",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
"cropY": 44,
|
||||
"theme": "modern-dark",
|
||||
"presentation": "actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "dark-knowledge",
|
||||
"route": "/Dynamics/Knowledge/{id}?projectId={id}",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
"cropY": 44,
|
||||
"theme": "modern-dark",
|
||||
"presentation": "actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "dark-plot-lines",
|
||||
"route": "/PlotLineWorkspace?projectId={id}&bookId={id}&plotLineId={id}&plotLineId={id}",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
"cropY": 44,
|
||||
"theme": "modern-dark",
|
||||
"presentation": "actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "person-fragment",
|
||||
"source": "scene.png",
|
||||
"crop": {
|
||||
"left": 860,
|
||||
"top": 306,
|
||||
"width": 380,
|
||||
"height": 110
|
||||
},
|
||||
"theme": "plotdirector",
|
||||
"width": 380,
|
||||
"height": 110,
|
||||
"presentation": "crop-of-actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "knowledge-fragment",
|
||||
"source": "character-knowledge.png",
|
||||
"crop": {
|
||||
"left": 26,
|
||||
"top": 362,
|
||||
"width": 1000,
|
||||
"height": 175
|
||||
},
|
||||
"theme": "plotdirector",
|
||||
"width": 1000,
|
||||
"height": 175,
|
||||
"presentation": "crop-of-actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "dark-knowledge-fragment",
|
||||
"source": "dark-knowledge.png",
|
||||
"crop": {
|
||||
"left": 26,
|
||||
"top": 362,
|
||||
"width": 1000,
|
||||
"height": 82
|
||||
},
|
||||
"theme": "modern-dark",
|
||||
"width": 1000,
|
||||
"height": 82,
|
||||
"presentation": "crop-of-actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "calendar",
|
||||
"route": "/StoryCalendar?projectId={id}&bookId={id}&month={id}-{id}&date={id}-{id}-{id}",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
"cropY": 44,
|
||||
"theme": "plotdirector",
|
||||
"presentation": "actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
},
|
||||
{
|
||||
"asset": "characters",
|
||||
"route": "/Characters/Details/{id}?projectId={id}",
|
||||
"width": 1280,
|
||||
"height": 800,
|
||||
"cropY": 44,
|
||||
"theme": "plotdirector",
|
||||
"presentation": "actual-installed-pwa",
|
||||
"privacyChecked": true
|
||||
}
|
||||
]
|
||||
BIN
Docs/PublicMarketingScreenshots/Masters/calendar.png
Normal file
|
After Width: | Height: | Size: 91 KiB |
BIN
Docs/PublicMarketingScreenshots/Masters/characters.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
|
After Width: | Height: | Size: 11 KiB |
BIN
Docs/PublicMarketingScreenshots/Masters/dark-knowledge.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
Docs/PublicMarketingScreenshots/Masters/dark-overview.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
Docs/PublicMarketingScreenshots/Masters/dark-plot-lines.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
Docs/PublicMarketingScreenshots/Masters/import.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
Docs/PublicMarketingScreenshots/Masters/knowledge-fragment.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
Docs/PublicMarketingScreenshots/Masters/person-fragment.png
Normal file
|
After Width: | Height: | Size: 8.6 KiB |
BIN
Docs/PublicMarketingScreenshots/Masters/scene.png
Normal file
|
After Width: | Height: | Size: 156 KiB |
BIN
Docs/PublicMarketingScreenshots/Masters/writing.png
Normal file
|
After Width: | Height: | Size: 141 KiB |
50
Docs/PublicMarketingScreenshots/Report.md
Normal file
@ -0,0 +1,50 @@
|
||||
# Canonical public application screenshots
|
||||
|
||||
## Policy and inventory
|
||||
|
||||
**PlotDirector is the canonical marketing screenshot theme.** Another application theme must be an intentional, labelled demonstration of appearance choice, and an entire composition must remain coherent. This is asset policy; application theme behaviour is unchanged.
|
||||
|
||||
Audited Home, Tour (`/features`), feature detail rendering, discovery/How-To metadata and Writing Problem results. The ten legacy JPEG application assets were referenced by Home/Tour. The current feature-detail graph has no separate screenshot assignments, so its pages need no replacement. Social branding images and decorative photography are not application screenshots.
|
||||
|
||||
| Legacy asset | Finding | Current principal replacement |
|
||||
|---|---|---|
|
||||
| scene.jpg | Older light fixture/chrome | New actual PWA Scene Inspector, PlotDirector |
|
||||
| writing.jpg | Older light fixture/chrome | New actual PWA Writer/notes, PlotDirector |
|
||||
| workspace.jpg | Older light fixture/chrome | Reuse approved `series-project` project/books overview |
|
||||
| calendar.jpg | Older light fixture/chrome | New actual PWA Story Calendar, PlotDirector; selected day and dated scene visible |
|
||||
| plot-lines.jpg | Legacy dark map, inconsistent principal story | Reuse approved `plot-lines-weave`, PlotDirector |
|
||||
| characters.jpg | Older light fixture/chrome | New actual PWA Mara Vale profile, PlotDirector |
|
||||
| continuity.jpg | Older light fixture/chrome | Reuse approved `continuity-story-state`, PlotDirector; alt identifies recorded state rather than a warning panel |
|
||||
| knowledge.jpg | Older light fixture/chrome | Reuse approved `character-knowledge`, PlotDirector |
|
||||
| import.jpg | Older fixture layout | New actual PWA manuscript setup wizard, PlotDirector; caption accurately identifies book selection, not a completed scan/review |
|
||||
| insights.jpg | Legacy dark health view | Reuse approved `timeline-story-values`, PlotDirector; alt identifies scene metrics |
|
||||
|
||||
All **14 approved Writing Problem assets** already satisfy the policy: `plot-lines-weave`, `timeline-chronology`, `timeline-scene-overview`, `character-records`, `relationship-map`, `character-knowledge`, `character-arc`, `location-reference`, `object-journey`, `timeline-story-values`, `scenario-alternatives`, `continuity-story-state`, `series-project`, `story-bible`. None was regenerated or modified. Five full captures are reused on Home/Tour; a knowledge detail crop derives from the approved master.
|
||||
|
||||
## New captures and deliberate alternative
|
||||
|
||||
Eight full captures came from the actual currently deployed Development application installed as a standalone Chromium PWA: five canonical views (Scene Inspector, Writer, Calendar, Character profile, manuscript setup) and three Modern Dark views (Timeline, Knowledge, Plot Lines). The latter appear only together in the later dark-green Home composition, explicitly labelled as Modern Dark. No principal Tour image uses an alternative theme. Legacy JPEGs are no longer referenced in either view; retained files are not initial-page requests.
|
||||
|
||||
Three direct crops support existing compositions: people from the new Scene Inspector, knowledge from the approved PlotDirector capture, and knowledge from the new Modern Dark capture. These are extracts of real UI, not reconstructed UI. The existing rotations, annotation papers, fragments and full-image links remain. Full links open optimized 1280px WebP originals of the respective real views.
|
||||
|
||||
Totals: **8 new full captures + 3 crops = 11 new asset groups**, each with three widths in AVIF and WebP (**66 derivatives**). Five approved full views are reused without duplicate files.
|
||||
|
||||
## Provenance and safe fixture
|
||||
|
||||
[Captures.json](Captures.json) records route templates, theme, crop geometry and PWA/privacy provenance. [Masters](Masters) retain lossless approved source captures and real crops in the repository. `Tools/PublicMarketingCapture/encode.cjs` regenerates public derivatives using the existing browser workspace’s Sharp dependency (AVIF quality 55, WebP 82).
|
||||
|
||||
`PlotLine.Tests/Browser/capture-public-marketing.cjs` uses an actual installed PWA, verifies standalone display mode and selected theme, excludes the account/title strip, blurs focus and moves the mouse clear, waits for fonts and stable UI, and rejects fixture/account/debug labels. It never intercepts application data or fakes application views. The only theme preference changed belonged to the disposable fixture account.
|
||||
|
||||
A dedicated `pwa-browser-…@example.invalid` identity and fictional The Glass Harbour project were created after the existing identity tool verified Development and made a unique COPY_ONLY/CHECKSUM backup. The operational fixture helper uses existing repositories/stored procedures and validates identity, database and ownership before writes. No real manuscript, author preference or application feature was modified.
|
||||
|
||||
Cleanup removed the owned project via the normal account workflow. That exposed a pre-existing account-delete foreign-key omission for UserOnboardingState. A scoped operational cleanup removed only this disposable user’s onboarding row after verifying exact identity and absence of remaining project access; the normal account workflow then removed the user and private credential file. No application/schema change was made for this unrelated defect.
|
||||
|
||||
The import screenshot intentionally shows current real setup at book selection. Capturing a completed Word scan would require an actual connected Word document; no completed import or generated analysis was simulated for a marketing image.
|
||||
|
||||
## Rendering and verification
|
||||
|
||||
`_MarketingScreenshot.cshtml` centralizes the current asset mappings, dimensions, responsive formats and explicit theme metadata. Existing Home/Tour composition wrappers remain; only the fragment crop positioning adapts to current PWA panels. Loading is lazy, decode is asynchronous, and intrinsic dimensions reserve image space. New screenshots do not replace the public-site photographic assets.
|
||||
|
||||
Full Home and Tour reviewed at desktop and mobile, with automated 390/768/1440/1920px image decoding/theme/overflow checks. Main Writing Problem and representative diagnosis pages remain covered by unchanged Solver checks. All Tour rendered text colours are checked against their surfaces, including every section label, Plot Lines emphasis, annotation and capability text.
|
||||
|
||||
See [Home report](../HomeSolverInvitation/Report.md) and its Development deployment/performance record for measured results and runtime commit.
|
||||
25
PlotLine.Tests/Browser/capture-public-marketing.cjs
Normal file
@ -0,0 +1,25 @@
|
||||
// Official captures: actual installed Development application with isolated, fictional persisted data.
|
||||
const{chromium}=require('playwright'),fs=require('node:fs'),os=require('node:os'),path=require('node:path'),assert=require('node:assert/strict');
|
||||
const base='https://dev.plotdirector.com',masters='/home/nick/.codex/artifacts/public-marketing-20261102';let stage='setup';
|
||||
(async()=>{const file=process.argv[2];assert(file?.startsWith('/tmp/pd-dev-browser-'));const id=JSON.parse(fs.readFileSync(file));assert.equal(id.Database,'PlotDirector_Development');assert(id.Email.startsWith('pwa-browser-'));fs.mkdirSync(masters,{recursive:true});
|
||||
const profile=fs.mkdtempSync(path.join(os.tmpdir(),'pd-capture-'));const ctx=await chromium.launchPersistentContext(profile,{headless:false,viewport:{width:1280,height:944}});const cdp=await ctx.browser().newBrowserCDPSession();let installed=false;const manifestId=base+'/Projects';
|
||||
try{const web=ctx.pages()[0];await web.goto(base+'/Account/Login');await web.locator('[name=Email]').fill(id.Email);await web.locator('[name=Password]').fill(id.Password);await web.locator('form button[type=submit]').click();await web.waitForURL('**/Projects');await web.waitForFunction(()=>!document.querySelector('[data-app-theme-choice]').disabled);if(await web.locator('html').getAttribute('data-app-theme')!=='plotdirector'){await web.locator('#accountMenuButton').click();await web.locator('[data-app-theme-choice=plotdirector]').click();await web.waitForFunction(()=>document.documentElement.dataset.appTheme==='plotdirector');await web.locator('#accountMenuButton').click();}
|
||||
stage='PWA install';await web.goto(base+'/Projects');await cdp.send('PWA.install',{manifestId,installUrlOrBundleUrl:base+'/Projects'});installed=true;await cdp.send('PWA.changeAppUserSettings',{manifestId,displayMode:'standalone'});const opened=ctx.waitForEvent('page');await cdp.send('PWA.launch',{manifestId,url:base+'/Projects'});const app=await opened;await app.waitForLoadState();assert(await app.evaluate(()=>matchMedia('(display-mode: standalone)').matches));await app.setViewportSize({width:1280,height:944});
|
||||
const q=`projectId=${id.ProjectID}&bookId=${id.BookID}`;const selection=process.env.CAPTURE_ASSETS?.split(',');const captures=selection?JSON.parse(fs.readFileSync(path.join(masters,'captures.json'))).filter(c=>!selection.includes(c.asset)):[];let theme='plotdirector';
|
||||
async function capture(asset,url,prepare){if(selection&&!selection.includes(asset))return;stage=asset;await app.setViewportSize(asset==='series-project'?{width:1440,height:1000}:{width:1280,height:944});assert.equal((await app.goto(base+url)).status(),200);assert.equal(await app.locator('html').getAttribute('data-app-theme'),theme);if(prepare)await prepare();await app.evaluate(()=>document.fonts.ready);await app.waitForTimeout(400);
|
||||
const height=800;const width=1280;const y=Math.ceil(await app.locator('.pd-titlebar').evaluate(e=>e.getBoundingClientRect().bottom));const clip={x:0,y,width,height};const visible=await app.evaluate(clip=>{const out=[];const w=document.createTreeWalker(document.body,NodeFilter.SHOW_TEXT);while(w.nextNode()){const n=w.currentNode;if(!n.textContent.trim()||['SCRIPT','STYLE'].includes(n.parentElement.tagName))continue;const range=document.createRange();range.selectNode(n);const r=range.getBoundingClientRect();if(r.width&&r.height&&r.bottom>clip.y&&r.top<clip.y+clip.height&&getComputedStyle(n.parentElement).visibility!=='hidden')out.push(n.textContent.trim());}return out.join(' ');},clip);
|
||||
assert(!visible.includes(id.Email)&&!visible.includes('Desktop Verification')&&!visible.includes('House Theme Verification')&&!/Development preview|debug|@example.invalid/i.test(visible),'Private/development label in capture');
|
||||
await app.evaluate(()=>document.activeElement?.blur());await app.mouse.move(1278,940);await app.screenshot({path:path.join(masters,asset+'.png'),clip,animations:'disabled'});captures.push({asset,route:url.replace(/\d+/g,'{id}'),width,height,cropY:y,theme,presentation:'actual-installed-pwa',privacyChecked:true});console.log('CAPTURE',asset);}
|
||||
async function sceneArea(area){const command=app.locator(`[data-scene-area-command="${area}"]:visible`);if(await command.count())await command.click();else{const group=app.locator('.pd-context-group[aria-label="Edit Scene"]');const details=group.locator('details[data-compact="true"]');if(await details.count()&&await details.getAttribute('open')===null)await details.locator('summary').click();await group.locator('button.pd-context-command').filter({hasText:new RegExp('^'+area+'$','i')}).click();}}
|
||||
await capture('scene','/Scenes/Edit/'+id.SceneID);
|
||||
await capture('writing','/Scenes/Edit/'+id.SceneID,async()=>{await sceneArea('writer');await app.locator('[data-scene-editor="notes"]:visible').first().click();await app.locator('[data-scene-editor-body] textarea').first().waitFor();});
|
||||
await capture('calendar','/StoryCalendar?'+q+'&month=1926-05&date=1926-05-14',async()=>{await app.locator('.story-calendar-grid-wrap').evaluate(e=>e.scrollTop=260);});
|
||||
await capture('characters','/Characters/Details/'+id.CharacterID+'?projectId='+id.ProjectID);
|
||||
await capture('import','/onboarding',async()=>{if((await app.locator('h1').innerText()).includes('Scan'))await app.getByRole('button',{name:'Back',exact:true}).click();});
|
||||
// One explicitly labelled alternative-theme cluster, selected only in this disposable account.
|
||||
await app.locator('#accountMenuButton').click();await app.locator('[data-app-theme-choice="modern-dark"]').click();await app.locator('#accountMenuButton').click();await app.waitForFunction(()=>document.documentElement.dataset.appTheme==='modern-dark');theme='modern-dark';
|
||||
await capture('dark-overview','/Timeline?'+q,async()=>{const hint=app.locator('[data-timeline-navigation-dismiss]');if(await hint.isVisible())await hint.click();});
|
||||
await capture('dark-knowledge','/Dynamics/Knowledge/'+id.CharacterID+'?projectId='+id.ProjectID);
|
||||
await capture('dark-plot-lines','/PlotLineWorkspace?'+q+'&plotLineId='+id.LineAID+'&plotLineId='+id.LineBID);
|
||||
fs.writeFileSync(path.join(masters,'captures.json'),JSON.stringify(captures,null,2));console.log('PASS public marketing real Development PWA captures; account strip excluded; fictional data privacy checks passed.');
|
||||
}catch(e){console.error('FAILED',stage,e.message);process.exitCode=1;}finally{if(installed)await cdp.send('PWA.uninstall',{manifestId}).catch(()=>{});await ctx.close();fs.rmSync(profile,{recursive:true,force:true});}})();
|
||||
5
PlotLine.Tests/Browser/home-solver-marketing.cjs
Normal file
@ -0,0 +1,5 @@
|
||||
const{chromium}=require('playwright'),assert=require('node:assert/strict'),fs=require('fs');
|
||||
const base=process.env.PUBLIC_BASE_URL||'http://127.0.0.1:5238',live=base.includes('dev.plotdirector.com'),output=process.env.PUBLIC_CAPTURE_DIR||'/tmp/home-marketing-browser';fs.mkdirSync(output,{recursive:true});
|
||||
(async()=>{const b=await chromium.launch(),results=[];try{for(const width of [390,768,1440,1920]){const c=await b.newContext({viewport:{width,height:1000},reducedMotion:'reduce'}),p=await c.newPage();await c.addCookies([{name:'solver-anonymous',value:'true',url:base}]);for(const name of ['home','tour']){await p.goto(base+(live?(name==='home'?'/':'/features'):`/public-fixture/${name}?anonymous=true`));await p.waitForLoadState('networkidle');for(const picture of await p.locator('[data-marketing-screenshot]').all()){await picture.scrollIntoViewIfNeeded();const img=picture.locator('img');await img.evaluate(e=>e.decode());assert((await img.evaluate(e=>e.currentSrc)).endsWith('.avif'));assert.equal(await img.evaluate(e=>e.naturalWidth>0),true);if(name==='tour'||!(await picture.evaluate(e=>e.closest('.power-composition'))))assert.equal(await picture.getAttribute('data-screenshot-theme'),'plotdirector');}assert.equal(await p.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false,`${name}/${width}`);if(name==='home'){const section=p.locator('.writer-solver-invitation');assert.equal(await section.count(),1);assert.equal(await section.locator('li').count(),4);assert.equal(await section.locator('button,input,select,form').count(),0);assert.match(await section.innerText(),/No sign-up needed/);const link=section.getByRole('link',{name:'Help me find the problem'});assert.equal(await link.getAttribute('href'),'/writing-problems');await link.focus();assert.equal(await link.evaluate(e=>e===document.activeElement),true);await section.screenshot({path:`${output}/invitation-${width}.png`});assert(await p.locator('.writer-problems').evaluate(e=>!!e.nextElementSibling?.matches('.writer-solver-invitation')));assert(await section.evaluate(e=>!!e.nextElementSibling?.matches('.remembers-section')));}await p.evaluate(()=>scrollTo(0,0));await p.screenshot({path:`${output}/${name}-${width}-full.png`,fullPage:true});if(name==='tour'){const failures=await p.evaluate(()=>{const rgb=s=>(s.match(/[\d.]+/g)||[]).map(Number),lin=v=>(v/=255)<=.04045?v/12.92:((v+.055)/1.055)**2.4,lum=c=>.2126*lin(c[0])+.7152*lin(c[1])+.0722*lin(c[2]);const out=[];const walk=document.createTreeWalker(document.querySelector('.writer-tour'),NodeFilter.SHOW_TEXT);while(walk.nextNode()){const n=walk.currentNode,e=n.parentElement;if(!n.textContent.trim()||e.closest('[aria-hidden=true],script,style')||!e.getBoundingClientRect().width)continue;const st=getComputedStyle(e);if(st.visibility==='hidden'||st.display==='none')continue;let bg=null;for(let a=e;a;a=a.parentElement){const col=rgb(getComputedStyle(a).backgroundColor);if(col.length===3||col[3]===1){bg=col;break;}}bg??=[252,243,229];const fg=rgb(st.color),ratio=(Math.max(lum(fg),lum(bg))+.05)/(Math.min(lum(fg),lum(bg))+.05),large=parseFloat(st.fontSize)>=24||(parseFloat(st.fontSize)>=18.66&&parseInt(st.fontWeight)>=700);if(ratio<(large?3:4.5))out.push({text:n.textContent.trim().slice(0,90),ratio,fg:st.color,bg,tag:e.tagName,cls:e.className});}return out;});results.push({width,contrastFailures:failures});assert.deepEqual(failures,[],`Tour contrast ${width}: ${JSON.stringify(failures)}`);}}
|
||||
// Ordinary server navigation remains usable without JavaScript and without an account.
|
||||
await c.close();const nj=await b.newContext({javaScriptEnabled:false,viewport:{width,height:1000}});await nj.addCookies([{name:'solver-anonymous',value:'true',url:base}]);const np=await nj.newPage();await np.goto(base+(live?'/':'/public-fixture/home?anonymous=true'));await np.locator('.writer-solver-invitation a').click();assert.equal(new URL(np.url()).pathname,'/writing-problems');assert.equal(await np.locator('form').count()>0,true);assert(!np.url().includes('Login'));await nj.close();}fs.writeFileSync(output+'/checks.json',JSON.stringify(results,null,2));console.log('PASS Home invitation/anonymous no-JS CTA, canonical screenshot clusters, AVIF loading, all Tour text contrast, full-page captures and overflow at four widths.');}finally{await b.close();}})().catch(e=>{console.error(e);process.exit(1)});
|
||||
1
PlotLine.Tests/Browser/public-marketing-performance.cjs
Normal file
@ -0,0 +1 @@
|
||||
const{chromium}=require('playwright'),fs=require('fs'),assert=require('node:assert/strict');const base=process.env.PUBLIC_BASE_URL||'https://dev.plotdirector.com';(async()=>{const b=await chromium.launch(),out=[];try{for(const width of [390,1440])for(const path of ['/','/features']){const c=await b.newContext({viewport:{width,height:1000},reducedMotion:'reduce'}),p=await c.newPage();await c.addCookies([{name:'solver-anonymous',value:'true',url:base}]);await p.addInitScript(()=>{window.marketingCLS=0;new PerformanceObserver(list=>{for(const e of list.getEntries())if(!e.hadRecentInput)window.marketingCLS+=e.value;}).observe({type:'layout-shift',buffered:true});});await p.goto(base+path);await p.waitForLoadState('networkidle');const first=await p.evaluate(()=>({cls:window.marketingCLS,bytes:performance.getEntriesByType('resource').reduce((s,r)=>s+r.transferSize,0)}));for(const img of await p.locator('main img').all()){await img.scrollIntoViewIfNeeded();await img.evaluate(e=>e.decode());}await p.waitForLoadState('networkidle');await p.waitForTimeout(300);const full=await p.evaluate(()=>({cls:window.marketingCLS,bytes:performance.getEntriesByType('resource').reduce((s,r)=>s+r.transferSize,0),images:performance.getEntriesByType('resource').filter(r=>/\.(avif|webp|png|jpe?g)(\?|$)/.test(r.name)).map(r=>({url:r.name,encoded:r.encodedBodySize}))}));out.push({path,width,first,full});assert(full.cls<.02,`Layout shift ${path}/${width}: ${full.cls}`);await c.close();}fs.writeFileSync(process.argv[2],JSON.stringify(out,null,2));console.log('PASS full-page image decoding and CLS <0.02; recorded fresh-context initial/full-scroll transfers.');}finally{await b.close();}})().catch(e=>{console.error(e);process.exit(1)});
|
||||
@ -68,6 +68,27 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="writer-solver-invitation" aria-labelledby="home-solver-heading">
|
||||
<div class="marketing-container writer-solver-grid">
|
||||
<div>
|
||||
<p class="marketing-eyebrow">The Writing Problem Solver</p>
|
||||
<h2 id="home-solver-heading">Not sure what’s<br />getting in the way?</h2>
|
||||
<p>Characters, storylines, scene order, continuity. You can feel something getting tangled without knowing what to call it.</p>
|
||||
<p>Tell us what’s becoming difficult. We’ll help you narrow down what’s happening, what to look at next and where PlotDirector may help.</p>
|
||||
<a class="marketing-btn marketing-btn--primary" href="/writing-problems">Help me find the problem <span aria-hidden="true">→</span></a>
|
||||
<p class="writer-solver-note">No sign-up needed.</p>
|
||||
</div>
|
||||
<div class="writer-solver-examples">
|
||||
<span class="writer-solver-mark" aria-hidden="true">?</span>
|
||||
<ul aria-label="Examples of writing difficulties">
|
||||
<li>I’m losing track of things</li>
|
||||
<li>Something doesn’t feel right</li>
|
||||
<li>Changing things causes problems elsewhere</li>
|
||||
<li>There’s simply too much to manage</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="editorial-section remembers-section">
|
||||
<div class="marketing-container editorial-split">
|
||||
<div>
|
||||
@ -80,11 +101,11 @@
|
||||
<div class="product-composition remembers-composition">
|
||||
<div class="composition-paper" aria-hidden="true"><small>THE CROSSING</small><p>A letter.<br />A missing sender.<br /><u>One very long night.</u></p></div>
|
||||
<figure class="product-print product-print--tilt">
|
||||
<a class="product-preview" href="~/images/public/scene.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/scene.jpg" width="1440" height="960" loading="lazy" alt="PlotDirector Scene Inspector showing the story, people and details of an example scene." /></a>
|
||||
<a class="product-preview" href="/images/public/application/scene-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("scene", "PlotDirector Scene Inspector showing the story, people and details of an example scene."))</a>
|
||||
<figcaption><span class="hand-note">All those details. One place.</span><span>Scene Inspector · fictional demonstration</span>
|
||||
</figcaption>
|
||||
</figure>
|
||||
<a class="ui-fragment fragment-person" href="~/images/public/scene.jpg" target="_blank" rel="noopener" aria-label="Open the real example scene and character details"><span class="fragment-label">A familiar face, in the right scene</span><span class="ui-crop ui-crop--person"><img src="~/images/public/scene.jpg" width="1440" height="960" loading="lazy" alt="The actual character card for Mara Vale in the demonstration scene." /></span></a>
|
||||
<a class="ui-fragment fragment-person" href="/images/public/application/scene-1280.webp" target="_blank" rel="noopener" aria-label="Open the real example scene and character details"><span class="fragment-label">A familiar face, in the right scene</span><span class="ui-crop ui-crop--person">@await Html.PartialAsync("_MarketingScreenshot", ("person-fragment", "The actual character card for Mara Vale in the demonstration scene."))</span></a>
|
||||
<span class="composition-annotation hand-note" aria-hidden="true">Nothing on a stray scrap of paper. ↗</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -113,7 +134,7 @@
|
||||
<p>You don't need to plan every detail before you begin. Work on your next scene. Keep the structure close when you need it, and get back to your story when you don't.</p>
|
||||
</div>
|
||||
<figure class="product-print writing-product">
|
||||
<a class="product-preview" href="~/images/public/writing.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/writing.jpg" width="1440" height="960" loading="lazy" alt="The actual PlotDirector scene workspace, showing notes and drafting support for a fictional scene." /></a>
|
||||
<a class="product-preview" href="/images/public/application/writing-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("writing", "The actual PlotDirector scene workspace, showing notes and drafting support for a fictional scene."))</a>
|
||||
<figcaption><span class="hand-note">One scene. Your words. Off you go.</span><span>Scene notes and drafting support</span>
|
||||
</figcaption>
|
||||
</figure>
|
||||
@ -130,7 +151,7 @@
|
||||
<div class="product-composition chronology-composition">
|
||||
<span class="demo-date-slip" aria-hidden="true"><small>THURSDAY</small><strong>18:40</strong><span>…wait. Where is she?</span></span>
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/calendar.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/calendar.jpg" width="1440" height="960" loading="lazy" alt="PlotDirector story calendar places example scenes in story time." /></a>
|
||||
<a class="product-preview" href="/images/public/application/calendar-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("calendar", "PlotDirector story calendar places example scenes in story time."))</a>
|
||||
</figure>
|
||||
<span class="composition-annotation hand-note" aria-hidden="true">The day matters. So does the order. ↗</span>
|
||||
</div>
|
||||
@ -144,7 +165,7 @@
|
||||
<svg class="escaping-threads" viewBox="0 0 800 180" preserveAspectRatio="none" aria-hidden="true"><path d="M0 25 C180 120 420 -60 800 80" /><path d="M0 80 C200 -30 500 200 800 120" /><path d="M0 135 C250 220 450 0 800 160" /></svg>
|
||||
<span class="thread-note" aria-hidden="true"><small>NOTE TO SELF</small>Did I ever resolve this?<span class="hand-note">follow it through →</span></span>
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/plot-lines.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/plot-lines.jpg" width="1920" height="900" loading="lazy" alt="PlotDirector's genuine narrative map arranges example plot lines across scenes." /></a>
|
||||
<a class="product-preview" href="/images/writing-solver/plot-lines-weave-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("plot-lines", "PlotDirector's genuine narrative map arranges example plot lines across scenes."))</a>
|
||||
</figure>
|
||||
</div>
|
||||
<div><span class="section-number">02 / THE LOOSE ENDS</span>
|
||||
@ -152,9 +173,9 @@
|
||||
<p>See how plot lines weave through your scenes. Follow the promises, developments and payoffs, and find the threads that need another look.</p><a class="editorial-link" asp-route="@PublicRouteNames.Features" asp-fragment="plot-lines">Follow the thread →</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="small-problems"><a asp-route="@PublicRouteNames.Features" asp-fragment="knowledge"><span class="small-problem-visual"><span class="fragment-label">PlotDirector · recorded story knowledge</span><span class="ui-crop ui-crop--knowledge"><img src="~/images/public/knowledge.jpg" width="1440" height="960" loading="lazy" alt="Real knowledge record for the letter in the fictional demonstration project." /></span></span><span class="section-number">03 / FINDING THINGS</span>
|
||||
<div class="small-problems"><a asp-route="@PublicRouteNames.Features" asp-fragment="knowledge"><span class="small-problem-visual"><span class="fragment-label">PlotDirector · recorded story knowledge</span><span class="ui-crop ui-crop--knowledge">@await Html.PartialAsync("_MarketingScreenshot", ("knowledge-fragment", "Real knowledge record for the letter in the fictional demonstration project."))</span></span><span class="section-number">03 / FINDING THINGS</span>
|
||||
<h3>“I'm sure I mentioned this earlier.”</h3>
|
||||
<p>Keep story knowledge and search close to the manuscript.</p><span class="editorial-link">Find your bearings →</span></a><a asp-route="@PublicRouteNames.Features" asp-fragment="characters"><span class="small-problem-visual"><span class="fragment-label">PlotDirector · people in this scene</span><span class="ui-crop ui-crop--person"><img src="~/images/public/scene.jpg" width="1440" height="960" loading="lazy" alt="Actual people panel from the example scene, showing Mara Vale." /></span></span><span class="section-number">04 / YOUR CAST</span>
|
||||
<p>Keep story knowledge and search close to the manuscript.</p><span class="editorial-link">Find your bearings →</span></a><a asp-route="@PublicRouteNames.Features" asp-fragment="characters"><span class="small-problem-visual"><span class="fragment-label">PlotDirector · people in this scene</span><span class="ui-crop ui-crop--person">@await Html.PartialAsync("_MarketingScreenshot", ("person-fragment", "Actual people panel from the example scene, showing Mara Vale."))</span></span><span class="section-number">04 / YOUR CAST</span>
|
||||
<h3>“Who the hell is Malcolm?”</h3>
|
||||
<p>A minor character. A major secret. A place to remember both.</p><span class="editorial-link">Meet your characters →</span></a>
|
||||
</div>
|
||||
@ -178,11 +199,12 @@
|
||||
<p class="serif-statement">PlotDirector doesn't run out of road.</p>
|
||||
<p>One book or a whole series. A small cast or a world full of people. Connected scenes, chronology, relationships, continuity and insights help you understand the story you've made.</p><a class="editorial-link" asp-route="@PublicRouteNames.Features">See what else is inside →</a>
|
||||
</div>
|
||||
<p class="theme-demo-note">A different mood, still your workspace. Shown in Modern Dark.</p>
|
||||
<div class="power-composition">
|
||||
<span class="power-annotation hand-note" aria-hidden="true">The whole story. Still your story.</span>
|
||||
<figure class="product-print power-overview"><a class="product-preview" href="~/images/public/workspace.jpg" target="_blank" rel="noopener" aria-label="Open the full application overview"><img src="~/images/public/workspace.jpg" width="1440" height="960" loading="lazy" alt="Actual PlotDirector application overview of the fictional demonstration novel." /></a><figcaption>A place for the big picture</figcaption></figure>
|
||||
<a class="ui-fragment power-knowledge" href="~/images/public/knowledge.jpg" target="_blank" rel="noopener" aria-label="Open the full demonstration knowledge workspace"><span class="fragment-label">And the smallest detail</span><span class="ui-crop ui-crop--knowledge"><img src="~/images/public/knowledge.jpg" width="1440" height="960" loading="lazy" alt="A genuine character knowledge record for the example letter." /></span></a>
|
||||
<figure class="product-print power-map"><a class="product-preview" href="~/images/public/plot-lines.jpg" target="_blank" rel="noopener" aria-label="Open the full Plot Lines Workspace screenshot"><img src="~/images/public/plot-lines.jpg" width="1920" height="900" loading="lazy" alt="Three populated plot lines woven across eight scenes in the actual PlotDirector narrative map." /></a><figcaption>Actual PlotDirector application · fictional demonstration project</figcaption></figure>
|
||||
<figure class="product-print power-overview"><a class="product-preview" href="/images/public/application/dark-overview-1280.webp" target="_blank" rel="noopener" aria-label="Open the full application overview">@await Html.PartialAsync("_MarketingScreenshot", ("dark-overview", "Timeline overview of six fictional scenes, shown in Modern Dark."))</a><figcaption>A place for the big picture</figcaption></figure>
|
||||
<a class="ui-fragment power-knowledge" href="/images/public/application/dark-knowledge-1280.webp" target="_blank" rel="noopener" aria-label="Open the full demonstration knowledge workspace"><span class="fragment-label">And the smallest detail</span><span class="ui-crop ui-crop--knowledge">@await Html.PartialAsync("_MarketingScreenshot", ("dark-knowledge-fragment", "A genuine character knowledge record for the example letter."))</span></a>
|
||||
<figure class="product-print power-map"><a class="product-preview" href="/images/public/application/dark-plot-lines-1280.webp" target="_blank" rel="noopener" aria-label="Open the full Plot Lines Workspace screenshot">@await Html.PartialAsync("_MarketingScreenshot", ("dark-plot-lines", "Two plot lines woven across six fictional scenes, shown in Modern Dark."))</a><figcaption>Actual PlotDirector application · fictional demonstration project · Shown in Modern Dark</figcaption></figure>
|
||||
<span class="power-footnote hand-note" aria-hidden="true">Every thread has somewhere to go. ↗</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<p>Keep the next scene in reach. PlotDirector gives the work around your writing a home, so getting organised doesn't become a second novel.</p>
|
||||
</div>
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/writing.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/writing.jpg" width="1440" height="960" alt="Actual scene workspace with drafting support and notes for a fictional scene." /></a>
|
||||
<a class="product-preview" href="/images/public/application/writing-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("writing", "Actual scene workspace with drafting support and notes for a fictional scene."))</a>
|
||||
<figcaption>Scene workspace · fictional demonstration</figcaption>
|
||||
</figure>
|
||||
<ul class="tour-capabilities">
|
||||
@ -51,7 +51,7 @@
|
||||
</div>
|
||||
<div class="product-composition tour-story-composition">
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/workspace.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/workspace.jpg" width="1440" height="960" loading="lazy" alt="Actual project dashboard showing a demonstration book and progress." /></a>
|
||||
<a class="product-preview" href="/images/writing-solver/series-project-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("workspace", "PlotDirector project overview showing fictional demonstration books."))</a>
|
||||
<figcaption>Project overview</figcaption>
|
||||
</figure>
|
||||
<span class="tour-paper-note" aria-hidden="true"><small>THE BIG PICTURE</small>One book.<br />A whole world.<span class="hand-note">Room to grow. ↗</span></span>
|
||||
@ -72,10 +72,10 @@
|
||||
</div>
|
||||
<div class="product-composition tour-cast-composition">
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/characters.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/characters.jpg" width="1440" height="960" loading="lazy" alt="The actual character profile workspace, using fictional character Mara Vale." /></a>
|
||||
<a class="product-preview" href="/images/public/application/characters-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("characters", "The actual character profile workspace, using fictional character Mara Vale."))</a>
|
||||
<figcaption>A home for your cast</figcaption>
|
||||
</figure>
|
||||
<a class="ui-fragment fragment-person" href="~/images/public/scene.jpg" target="_blank" rel="noopener" aria-label="Open the example scene character panel"><span class="fragment-label">And here she is, in the scene</span><span class="ui-crop ui-crop--person"><img src="~/images/public/scene.jpg" width="1440" height="960" loading="lazy" alt="Actual character appearance in the demonstration scene." /></span></a>
|
||||
<a class="ui-fragment fragment-person" href="/images/public/application/scene-1280.webp" target="_blank" rel="noopener" aria-label="Open the example scene character panel"><span class="fragment-label">And here she is, in the scene</span><span class="ui-crop ui-crop--person">@await Html.PartialAsync("_MarketingScreenshot", ("person-fragment", "Actual character appearance in the demonstration scene."))</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -88,7 +88,7 @@
|
||||
</div>
|
||||
<div class="product-composition tour-time-composition">
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/calendar.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/calendar.jpg" width="1440" height="960" loading="lazy" alt="Real story calendar showing fictional scenes arranged in story time." /></a>
|
||||
<a class="product-preview" href="/images/public/application/calendar-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("calendar", "Real story calendar showing fictional scenes arranged in story time."))</a>
|
||||
<figcaption>Story Calendar · make time make sense</figcaption>
|
||||
</figure>
|
||||
<span class="demo-date-slip" aria-hidden="true"><small>THURSDAY</small><strong>18:40</strong><span>Check the crossing.</span></span>
|
||||
@ -115,7 +115,7 @@
|
||||
<div class="product-composition tour-weave-composition">
|
||||
<svg class="escaping-threads" viewBox="0 0 800 180" preserveAspectRatio="none" aria-hidden="true"><path d="M0 25 C180 120 420 -60 800 80" /><path d="M0 80 C200 -30 500 200 800 120" /><path d="M0 135 C250 220 450 0 800 160" /></svg>
|
||||
<figure class="product-print large-product">
|
||||
<a class="product-preview" href="~/images/public/plot-lines.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/plot-lines.jpg" width="1920" height="900" loading="lazy" alt="Genuine Plot Lines Workspace narrative map rendered with fictional regression data." /></a>
|
||||
<a class="product-preview" href="/images/writing-solver/plot-lines-weave-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("plot-lines", "Genuine Plot Lines Workspace narrative map rendered with fictional regression data."))</a>
|
||||
<figcaption>Plot Lines Workspace · follow the weave</figcaption>
|
||||
</figure>
|
||||
<span class="composition-annotation hand-note" aria-hidden="true">Follow the promises you made to the reader. ↗</span>
|
||||
@ -140,7 +140,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/continuity.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/continuity.jpg" width="1440" height="960" loading="lazy" alt="Actual continuity review panel showing an example warning for a fictional scene." /></a>
|
||||
<a class="product-preview" href="/images/writing-solver/continuity-story-state-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("continuity", "Continuity Explorer showing recorded story state in a fictional project."))</a>
|
||||
<figcaption>A second look at the details</figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
@ -159,7 +159,7 @@
|
||||
</div>
|
||||
<div class="product-composition tour-knowledge-composition">
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/knowledge.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/knowledge.jpg" width="1440" height="960" loading="lazy" alt="Actual scene knowledge panel with fictional character knowledge records." /></a>
|
||||
<a class="product-preview" href="/images/writing-solver/character-knowledge-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("knowledge", "Actual scene knowledge panel with fictional character knowledge records."))</a>
|
||||
<figcaption>Who knows what, and when</figcaption>
|
||||
</figure>
|
||||
<span class="tour-paper-note" aria-hidden="true"><small>NOTE TO SELF</small>Who knows<br />about the letter?<span class="hand-note">It is in here somewhere…</span></span>
|
||||
@ -174,8 +174,8 @@
|
||||
<p>Bring your manuscript from Microsoft Word into the guided import. Scan, review the detected structure and approve what comes into your workspace. Then build from the work you've already done.</p>
|
||||
</div>
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/import.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/import.jpg" width="1440" height="960" loading="lazy" alt="Actual PlotDirector guided manuscript import interface, using a fictional demonstration project." /></a>
|
||||
<figcaption>Guided manuscript import · review before you continue</figcaption>
|
||||
<a class="product-preview" href="/images/public/application/import-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("import", "Current manuscript setup wizard with a fictional book selected."))</a>
|
||||
<figcaption>Manuscript setup · choose the book you’ll bring into your workspace</figcaption>
|
||||
</figure>
|
||||
<ul class="tour-capabilities">
|
||||
<li>Bring your existing manuscript</li>
|
||||
@ -198,7 +198,7 @@
|
||||
<p class="tour-aside">PlotDirector helps you understand your work. The creative decisions stay with you.</p>
|
||||
</div>
|
||||
<figure class="product-print">
|
||||
<a class="product-preview" href="~/images/public/insights.jpg" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab"><img src="~/images/public/insights.jpg" width="1440" height="960" loading="lazy" alt="Actual PlotDirector plot health panel showing example story development and revision signals." /></a>
|
||||
<a class="product-preview" href="/images/writing-solver/timeline-story-values-1280.webp" target="_blank" rel="noopener" aria-label="Open full-size application screenshot in a new tab">@await Html.PartialAsync("_MarketingScreenshot", ("insights", "Timeline showing story values and scene metrics across a fictional manuscript."))</a>
|
||||
<figcaption>Room for a wider view</figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
|
||||
11
PlotLine/Views/Shared/_MarketingScreenshot.cshtml
Normal file
@ -0,0 +1,11 @@
|
||||
@model (string Asset, string Alt)
|
||||
@{
|
||||
// Canonical PlotDirector captures, or an explicitly labelled alternative-theme composition.
|
||||
var shared = Model.Asset switch { "plot-lines" => "plot-lines-weave", "workspace" => "series-project", "knowledge" => "character-knowledge", "continuity" => "continuity-story-state", "insights" => "timeline-story-values", _ => null };
|
||||
var stem = shared is null ? "/images/public/application/" + Model.Asset : "/images/writing-solver/" + shared;
|
||||
var dimensions = Model.Asset switch { "workspace" => (1440,760), "knowledge" => (1280,660), "person-fragment" => (380,110), "knowledge-fragment" => (1000,175), "dark-knowledge-fragment" => (1000,82), _ => (1280,800) };
|
||||
}
|
||||
<picture data-marketing-screenshot="@Model.Asset" data-screenshot-theme="@(Model.Asset.StartsWith("dark-", StringComparison.Ordinal) ? "modern-dark" : "plotdirector")">
|
||||
<source type="image/avif" srcset="@(stem)-640.avif 640w, @(stem)-960.avif 960w, @(stem)-1280.avif 1280w" sizes="(max-width:600px) 90vw, (max-width:1000px) 80vw, 900px" />
|
||||
<img src="@(stem)-1280.webp" srcset="@(stem)-640.webp 640w, @(stem)-960.webp 960w, @(stem)-1280.webp 1280w" sizes="(max-width:600px) 90vw, (max-width:1000px) 80vw, 900px" width="@dimensions.Item1" height="@dimensions.Item2" loading="lazy" decoding="async" alt="@Model.Alt" />
|
||||
</picture>
|
||||
@ -38,3 +38,43 @@ html[data-site-theme="public"] {
|
||||
html[data-site-theme="public"] .public-scene img { object-position:left top; }
|
||||
html[data-site-theme="public"] .public-scene::after,html[data-site-theme="public"] .public-scene-host--pricing .public-scene::after { background:linear-gradient(0deg,var(--paper) 25%,#fcf3e5dc 70%,#fcf3e5c9),linear-gradient(90deg,#fcf3e540,#fcf3e5cc); }
|
||||
}
|
||||
|
||||
/* Home offers a problem-first path after the familiar frustrations, before the product tour. */
|
||||
html[data-site-theme="public"] {
|
||||
.writer-solver-invitation { padding:48px 0; border-block:1px solid var(--line); background:linear-gradient(110deg,#e8eadcbb,var(--paper) 75%); }
|
||||
.writer-solver-grid { display:grid; grid-template-columns:1fr 1.05fr; align-items:center; gap:56px; }
|
||||
.writer-solver-invitation h2 { color:var(--plum); font-size:clamp(2.3rem,3.4vw,3.5rem); margin-bottom:20px; }
|
||||
.writer-solver-invitation p:not(.marketing-eyebrow) { line-height:1.65; }
|
||||
.writer-solver-note { font-size:.9rem; color:var(--muted); margin:10px 0 0; }
|
||||
.writer-solver-examples { position:relative; }
|
||||
.writer-solver-mark { position:absolute; right:25px; top:-105px; font:italic 12rem/1 Georgia,serif; color:var(--plum); opacity:.07; pointer-events:none; }
|
||||
.writer-solver-examples ul { position:relative; display:grid; grid-template-columns:1fr 1fr; gap:16px; list-style:none; padding:0; margin:0; }
|
||||
.writer-solver-examples li { display:flex; align-items:center; min-height:112px; padding:22px; border:1px solid var(--line); border-left:3px solid #94718a; border-radius:7px; background:#fffaf2; color:var(--ink); font:1.12rem/1.5 Georgia,serif; box-shadow:0 3px 10px #573b2709; }
|
||||
.writer-solver-examples li:nth-child(2),.writer-solver-examples li:nth-child(3) { background:#edf0e3; border-left-color:#75816a; }
|
||||
}
|
||||
@media(max-width:900px) { html[data-site-theme="public"] .writer-solver-grid { grid-template-columns:1fr; gap:28px; } html[data-site-theme="public"] .writer-solver-mark { display:none; } }
|
||||
@media(max-width:600px) { html[data-site-theme="public"] .writer-solver-invitation { padding:34px 0; } html[data-site-theme="public"] .writer-solver-examples ul { grid-template-columns:1fr; gap:10px; } html[data-site-theme="public"] .writer-solver-examples li { min-height:0; padding:16px 18px; } }
|
||||
|
||||
/* The warm Tour backgrounds must use their matching foreground palette, including
|
||||
Plot Lines (formerly dark). Keep this together with the surface overrides. */
|
||||
html[data-site-theme="public"] .writer-tour .tour-stop--weave {
|
||||
--ink:#30242b; --muted:#71625c; --line:#dfcdb9; color:var(--ink);
|
||||
background:#f6ecdd;
|
||||
h2 em,.composition-annotation { color:#6b6134; }
|
||||
.section-number { color:var(--muted); }
|
||||
.tour-capabilities li::before { color:#4e6846; }
|
||||
.large-product { background:#fffaf2; border-color:var(--line); }
|
||||
}
|
||||
|
||||
/* Source crops now follow the current PWA panels; the surrounding angled compositions stay intact. */
|
||||
html[data-site-theme="public"] {
|
||||
.product-preview picture { display:block; }
|
||||
.ui-crop picture { display:block; width:100%; height:100%; }
|
||||
.ui-crop picture img { position:static; width:100%; height:100%; max-width:100%; object-fit:cover; object-position:left top; }
|
||||
}
|
||||
/* Small section labels need normal-text contrast on cream and sage, not large-heading contrast. */
|
||||
html[data-site-theme="public"] .writer-tour .section-number { color:#62664f; }
|
||||
html[data-site-theme="public"] .application-reveal {
|
||||
.theme-demo-note { color:#c8cebd; font-size:12px; margin-top:26px; }
|
||||
.product-print figcaption { color:#62664f; }
|
||||
}
|
||||
|
||||
BIN
PlotLine/wwwroot/images/public/application/calendar-1280.avif
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
PlotLine/wwwroot/images/public/application/calendar-1280.webp
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
PlotLine/wwwroot/images/public/application/calendar-640.avif
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
PlotLine/wwwroot/images/public/application/calendar-640.webp
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
PlotLine/wwwroot/images/public/application/calendar-960.avif
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
PlotLine/wwwroot/images/public/application/calendar-960.webp
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
PlotLine/wwwroot/images/public/application/characters-1280.avif
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
PlotLine/wwwroot/images/public/application/characters-1280.webp
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
PlotLine/wwwroot/images/public/application/characters-640.avif
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
PlotLine/wwwroot/images/public/application/characters-640.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
PlotLine/wwwroot/images/public/application/characters-960.avif
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
PlotLine/wwwroot/images/public/application/characters-960.webp
Normal file
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 27 KiB |
BIN
PlotLine/wwwroot/images/public/application/import-1280.avif
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
PlotLine/wwwroot/images/public/application/import-1280.webp
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
PlotLine/wwwroot/images/public/application/import-640.avif
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
PlotLine/wwwroot/images/public/application/import-640.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
PlotLine/wwwroot/images/public/application/import-960.avif
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
PlotLine/wwwroot/images/public/application/import-960.webp
Normal file
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
BIN
PlotLine/wwwroot/images/public/application/scene-1280.avif
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
PlotLine/wwwroot/images/public/application/scene-1280.webp
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
PlotLine/wwwroot/images/public/application/scene-640.avif
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
PlotLine/wwwroot/images/public/application/scene-640.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
PlotLine/wwwroot/images/public/application/scene-960.avif
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
PlotLine/wwwroot/images/public/application/scene-960.webp
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
PlotLine/wwwroot/images/public/application/writing-1280.avif
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
PlotLine/wwwroot/images/public/application/writing-1280.webp
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
PlotLine/wwwroot/images/public/application/writing-640.avif
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
PlotLine/wwwroot/images/public/application/writing-640.webp
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
PlotLine/wwwroot/images/public/application/writing-960.avif
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
PlotLine/wwwroot/images/public/application/writing-960.webp
Normal file
|
After Width: | Height: | Size: 33 KiB |
57
Tools/PublicMarketingCapture/Program.cs
Normal file
@ -0,0 +1,57 @@
|
||||
// Operational fixture only. Never registered in the website; all writes use existing repositories/SPs.
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Diagnostics;
|
||||
using Dapper;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using PlotLine.Data;
|
||||
using PlotLine.Models;
|
||||
if(args.Length!=1||!args[0].StartsWith("/tmp/pd-dev-browser-"))throw new InvalidOperationException("Dedicated Development identity file required.");
|
||||
var file=args[0];var id=JsonNode.Parse(await File.ReadAllTextAsync(file))!;
|
||||
if(id["Database"]!.GetValue<string>()!="PlotDirector_Development"||!id["Email"]!.GetValue<string>().StartsWith("pwa-browser-")||!id["Email"]!.GetValue<string>().EndsWith("@example.invalid"))throw new InvalidOperationException("Fixture scope mismatch.");
|
||||
var start=new ProcessStartInfo("sudo"){RedirectStandardOutput=true,RedirectStandardError=true};
|
||||
foreach(var part in new[]{"-n","cat","/etc/plotdirector/plotdirector.env"})start.ArgumentList.Add(part);
|
||||
using var process=Process.Start(start)!;var environment=await process.StandardOutput.ReadToEndAsync();await process.WaitForExitAsync();if(process.ExitCode!=0)throw new InvalidOperationException("Development configuration unavailable.");
|
||||
var line=environment.Split('\n').Single(l=>l.StartsWith("ConnectionStrings__DefaultConnection="));
|
||||
var raw=line[(line.IndexOf('=')+1)..].Trim().Trim('\'','"');var cs=new SqlConnectionStringBuilder(raw);
|
||||
if(cs.InitialCatalog!="PlotDirector_Development")throw new InvalidOperationException("Wrong database.");
|
||||
await using var connection=new SqlConnection(cs.ConnectionString);await connection.OpenAsync();if(await connection.ExecuteScalarAsync<string>("SELECT DB_NAME()")!="PlotDirector_Development")throw new InvalidOperationException("Wrong database.");
|
||||
var factory=new SqlConnectionFactory(new ConfigurationBuilder().AddInMemoryCollection(new Dictionary<string,string?>{["ConnectionStrings:DefaultConnection"]=cs.ConnectionString}).Build());
|
||||
var user=await new UserRepository(factory).GetByEmailAsync(id["Email"]!.GetValue<string>());if(user?.UserID!=id["UserID"]!.GetValue<int>())throw new InvalidOperationException("Identity mismatch.");
|
||||
var project=await new ProjectRepository(factory).GetForUserAsync(id["ProjectID"]!.GetValue<int>(),user.UserID);if(project is null||!project.IsOwner||project.ProjectName!="The Glass Harbour")throw new InvalidOperationException("Not the owned fictional project.");
|
||||
var chapter=await new ChapterRepository(factory).GetAsync(id["ChapterID"]!.GetValue<int>());var book=await new BookRepository(factory).GetAsync(id["BookID"]!.GetValue<int>());if(chapter?.BookID!=book?.BookID||book?.ProjectID!=project.ProjectID)throw new InvalidOperationException("Fixture ownership mismatch.");
|
||||
var existing=await new SceneRepository(factory).ListByChapterAsync(chapter!.ChapterID);
|
||||
if(id["SceneID"] is null&&existing.Count>0){var cast=await new CharacterRepository(factory).ListCharactersAsync(project.ProjectID);id["SceneID"]=existing[0].SceneID;id["SceneIDs"]=new JsonArray(existing.Select(x=>(JsonNode?)JsonValue.Create(x.SceneID)).ToArray());id["CharacterID"]=cast.Single(x=>x.CharacterName=="Mara Vale").CharacterID;await File.WriteAllTextAsync(file,id.ToJsonString());}
|
||||
if(id["SceneID"] is null){
|
||||
var lookup=await new LookupRepository(factory).GetAllAsync();var characters=new CharacterRepository(factory);
|
||||
var mara=await characters.SaveCharacterAsync(new Character{ProjectID=project.ProjectID,CharacterName="Mara Vale",ShortName="Mara",DefaultDescription="An archivist carrying a letter with no named sender.",CharacterImportance=1,ShowInQuickAddBar=true});
|
||||
var elias=await characters.SaveCharacterAsync(new Character{ProjectID=project.ProjectID,CharacterName="Elias Hart",ShortName="Elias",DefaultDescription="A harbour pilot who recognises the seal on the letter.",CharacterImportance=2});
|
||||
var scenes=new SceneRepository(factory);var writer=new WriterWorkspaceRepository(factory);var noteType=(await writer.ListNoteTypesAsync()).First(x=>x.IsActive).SceneNoteTypeID;
|
||||
var names=new[]{"Arrival at the quay","A concealed message","The witness returns","A promise made","The missing page","Across the water"};var sceneIds=new JsonArray();
|
||||
var time=lookup.TimeModes.First(x=>x.TimeModeName.Contains("Exact"));var revision=lookup.RevisionStatuses.First(x=>x.StatusName=="Planned");
|
||||
for(var i=0;i<names.Length;i++){
|
||||
var scene=await scenes.SaveAsync(new Scene{ChapterID=chapter!.ChapterID,SceneNumber=i+1,SceneTitle=names[i],Summary=i==0?"Mara reaches the harbour with a sealed letter. Elias recognises its crest but will not explain why.":"The letter draws Mara and Elias closer to the harbour's unfinished story.",TimeModeID=time.TimeModeID,StartDateTime=new DateTime(1926,5,14).AddDays(i).AddHours(7+i),TimeConfidenceID=lookup.TimeConfidences.First().TimeConfidenceID,RevisionStatusID=revision.RevisionStatusID,POVCharacterID=i%2==0?mara:elias,ScenePurposeNotes="Connect the discovery to the next decision.",SceneOutcomeNotes="The search for the sender gains a new direction."});
|
||||
sceneIds.Add(scene);await characters.SaveSceneCharacterAsync(new SceneCharacter{SceneID=scene,CharacterID=mara,ProjectID=project.ProjectID,AppearanceNotes="Carries the unopened letter."});await characters.SaveSceneCharacterAsync(new SceneCharacter{SceneID=scene,CharacterID=elias,ProjectID=project.ProjectID,AppearanceNotes="Recognises the crest on the seal."});
|
||||
if(i==0)await writer.SaveNoteAsync(new SceneNote{SceneID=scene,SceneNoteTypeID=noteType,NoteTitle="At the harbour",NoteText="By the time Mara reached the quay, the last light in the customs house had gone out.\n\nShe stopped at the end of the pier. In her coat pocket, the letter felt heavier than it had any right to.\n\nAcross the water a door closed. Elias turned at the sound, and for a moment she thought he might tell her everything.\n\nThen he looked away. Someone had been here before her.",IsPinned=true});
|
||||
}
|
||||
id["SceneID"]=sceneIds[0]!.GetValue<int>();id["SceneIDs"]=sceneIds;id["CharacterID"]=mara;
|
||||
await File.WriteAllTextAsync(file,id.ToJsonString());Console.WriteLine("Verified Development fixture ownership; seeded six fictional scenes, two characters and one writing note through existing repositories.");
|
||||
|
||||
}
|
||||
if(id["LineAID"] is null){
|
||||
var plots=new PlotRepository(factory);var plotLookup=await plots.GetLookupsAsync();var savedScenes=id["SceneIDs"]!.AsArray().Select(x=>x!.GetValue<int>()).ToArray();
|
||||
for(var lineIndex=0;lineIndex<2;lineIndex++){
|
||||
var title=lineIndex==0?"The missing letter":"An uneasy alliance";
|
||||
var lineId=await plots.SavePlotLineAsync(new PlotLineItem{ProjectID=project.ProjectID,BookID=book!.BookID,PlotLineName=title,PlotLineTypeID=plotLookup.PlotLineTypes.First().PlotLineTypeID,PlotImportanceID=plotLookup.PlotImportance.First().PlotImportanceID,Colour=lineIndex==0?"#6c3154":"#557d69",SortOrder=lineIndex+1});
|
||||
id[lineIndex==0?"LineAID":"LineBID"]=lineId;
|
||||
var thread=await plots.SavePlotThreadAsync(new PlotThread{PlotLineID=lineId,ProjectID=project.ProjectID,ThreadTitle=title,ThreadTypeID=plotLookup.ThreadTypes.First().ThreadTypeID,ThreadStatusID=plotLookup.ThreadStatuses.First(x=>x.IsOpenStatus).ThreadStatusID,IntroducedSceneID=savedScenes[0],PlannedResolutionSceneID=savedScenes[^1]});
|
||||
if(lineIndex==0)id["ThreadID"]=thread;
|
||||
for(var i=0;i<savedScenes.Length;i++)if((i+lineIndex)%3!=2)await plots.SaveThreadEventAsync(new ThreadEvent{PlotThreadID=thread,SceneID=savedScenes[i],EventTypeID=plotLookup.ThreadEventTypes.First().ThreadEventTypeID,PlotEventTypeID=plotLookup.PlotEventTypes.First().PlotEventTypeID,EventTitle=i==0?"A letter at the quay":i==savedScenes.Length-1?"The threads reconnect":"A new connection",EventDescription="The discovery changes what Mara can do next."});
|
||||
}
|
||||
var chars=new CharacterRepository(factory);var known=(await chars.GetLookupsAsync(project.ProjectID)).KnowledgeStates.First(x=>x.StateName=="Knows");
|
||||
await chars.SaveKnowledgeAsync(new CharacterKnowledgeItem{CharacterID=id["CharacterID"]!.GetValue<int>(),PlotThreadID=id["ThreadID"]!.GetValue<int>(),SceneID=savedScenes[2],KnowledgeStateID=known.KnowledgeStateID,Description="Mara learns that the letter was posted from the old archive."});
|
||||
var metrics=new SceneMetricTypeRepository(factory);await metrics.AddMissingDefaultsAsync(project.ProjectID);foreach(var metric in (await metrics.ListForManagementAsync(project.ProjectID)).Where(m=>m.IsActive).Take(4))for(var i=0;i<savedScenes.Length;i++)await new SceneRepository(factory).SaveMetricValueAsync(savedScenes[i],metric.MetricTypeID,Math.Clamp(i%3==0?3:i%3==1?7:5,metric.MinValue,metric.MaxValue));
|
||||
await File.WriteAllTextAsync(file,id.ToJsonString());Console.WriteLine("Added two fictional plot lines and recorded knowledge; only the owned fixture project changed.");
|
||||
}
|
||||
|
||||
var profileRepository=new CharacterRepository(factory);var profile=await profileRepository.GetCharacterAsync(id["CharacterID"]!.GetValue<int>());if(profile is null||profile.ProjectID!=project.ProjectID)throw new InvalidOperationException("Character ownership mismatch.");profile.BirthDate=new DateTime(1898,3,12);profile.AgeAtSeriesStart=28;profile.Height="Five feet six inches";profile.EyeColour="Grey-green";profile.CharacterImportance=3;await profileRepository.SaveCharacterAsync(profile);
|
||||
@ -0,0 +1 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><OutputType>Exe</OutputType><TargetFramework>net10.0</TargetFramework><ImplicitUsings>enable</ImplicitUsings><Nullable>enable</Nullable></PropertyGroup><ItemGroup><ProjectReference Include="../../PlotLine/PlotLine.csproj" /></ItemGroup></Project>
|
||||
2
Tools/PublicMarketingCapture/encode.cjs
Normal file
@ -0,0 +1,2 @@
|
||||
const sharp=require('../../PlotLine.Tests/Browser/node_modules/sharp'),fs=require('fs'),path=require('path');const masters=path.resolve(__dirname,'../../Docs/PublicMarketingScreenshots/Masters'),root=path.resolve(__dirname,'../../PlotLine/wwwroot/images/public/application');fs.mkdirSync(root,{recursive:true});(async()=>{const specs=JSON.parse(fs.readFileSync(path.resolve(masters,'../Captures.json')));for(const spec of specs){for(const width of [640,960,1280]){await sharp(masters+'/'+spec.asset+'.png').resize({width}).avif({quality:55,effort:6}).toFile(root+'/'+spec.asset+'-'+width+'.avif');await sharp(masters+'/'+spec.asset+'.png').resize({width}).webp({quality:82,effort:6}).toFile(root+'/'+spec.asset+'-'+width+'.webp');}}
|
||||
console.log('Encoded',specs.length,'approved public captures/crops');})();
|
||||