-
Notifications
You must be signed in to change notification settings - Fork 61
Draft blog post for Node.js WinRT projections #598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
lei9444
wants to merge
10
commits into
main
Choose a base branch
from
leilzh/blogs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0e47628
draft blogs
lei9444 eb3024e
use small gif
lei9444 366fd07
use big one
lei9444 60c480a
fix comments
lei9444 32d34ad
Merge branch 'main' into leilzh/blogs
zateutsch 0c98dce
fix comments
lei9444 85a6396
Merge branch 'leilzh/blogs' of https://github.com/microsoft/winappCliβ¦
lei9444 f0e8d62
fix comments and add image
lei9444 8a435fd
update the content
lei9444 6a7222d
update blogs
lei9444 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,238 @@ | ||
| <!doctype html> | ||
| <html> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <title>Blog banner: dynamic Windows API bindings for Node.js</title> | ||
| <style> | ||
| :root { | ||
| color-scheme: dark; | ||
| } | ||
| html, body { | ||
| margin: 0; | ||
| padding: 0; | ||
| background: #0a0f1c; | ||
| font-family: 'Segoe UI', 'SF Pro Display', system-ui, -apple-system, sans-serif; | ||
| -webkit-font-smoothing: antialiased; | ||
| } | ||
|
|
||
| /* devblogs OG-image style: 1200 x 630 */ | ||
| .banner { | ||
| width: 1200px; | ||
| height: 630px; | ||
| position: relative; | ||
| overflow: hidden; | ||
| background: | ||
| radial-gradient(1200px 700px at 85% 15%, rgba(0, 120, 212, 0.35), transparent 60%), | ||
| radial-gradient(900px 500px at 10% 90%, rgba(126, 87, 194, 0.28), transparent 55%), | ||
| linear-gradient(135deg, #05070f 0%, #0e1a30 55%, #12142b 100%); | ||
| color: #ffffff; | ||
| } | ||
|
|
||
| /* faint grid overlay for texture */ | ||
| .banner::before { | ||
| content: ''; | ||
| position: absolute; | ||
| inset: 0; | ||
| background-image: | ||
| linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), | ||
| linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); | ||
| background-size: 40px 40px; | ||
| mask-image: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(0,0,0,0.1)); | ||
| -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(0,0,0,0.1)); | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| .content { | ||
| position: absolute; | ||
| inset: 0; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| padding: 72px 88px; | ||
| } | ||
|
|
||
| .left { | ||
| max-width: 620px; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 20px; | ||
| } | ||
|
|
||
| .eyebrow { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 10px; | ||
| font-size: 15px; | ||
| font-weight: 600; | ||
| letter-spacing: 0.14em; | ||
| text-transform: uppercase; | ||
| color: #7cc2ff; | ||
| } | ||
| .eyebrow .dot { | ||
| display: inline-block; | ||
| width: 8px; | ||
| height: 8px; | ||
| border-radius: 50%; | ||
| background: #4cc2ff; | ||
| box-shadow: 0 0 12px rgba(76, 194, 255, 0.9); | ||
| } | ||
|
|
||
| h1 { | ||
| margin: 0; | ||
| padding-bottom: 8px; | ||
| font-size: 46px; | ||
| line-height: 1.15; | ||
| font-weight: 700; | ||
| letter-spacing: -0.02em; | ||
| background: linear-gradient(120deg, #ffffff 0%, #b5dbff 60%, #d3c1ff 100%); | ||
| -webkit-background-clip: text; | ||
| background-clip: text; | ||
| color: transparent; | ||
| } | ||
|
|
||
| .subtitle { | ||
| font-size: 22px; | ||
| line-height: 1.4; | ||
| color: #b8c4d9; | ||
| margin: 0; | ||
| max-width: 560px; | ||
| } | ||
|
|
||
| .badges { | ||
| display: flex; | ||
| gap: 10px; | ||
| margin-top: 8px; | ||
| flex-wrap: wrap; | ||
| } | ||
| .badge { | ||
| font-size: 14px; | ||
| font-weight: 600; | ||
| color: #cfe7ff; | ||
| padding: 7px 14px; | ||
| border-radius: 999px; | ||
| background: rgba(0, 120, 212, 0.14); | ||
| border: 1px solid rgba(76, 194, 255, 0.35); | ||
| } | ||
|
|
||
| /* Right side: code card */ | ||
| .right { | ||
| width: 420px; | ||
| transform: rotate(-2deg); | ||
| } | ||
|
|
||
| .card { | ||
| position: relative; | ||
| background: linear-gradient(160deg, #14203a 0%, #0d1428 100%); | ||
| border-radius: 16px; | ||
| border: 1px solid rgba(255, 255, 255, 0.08); | ||
| box-shadow: | ||
| 0 30px 80px rgba(0, 0, 0, 0.55), | ||
| 0 0 0 1px rgba(0, 120, 212, 0.18) inset; | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .card .titlebar { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 8px; | ||
| padding: 14px 18px; | ||
| background: rgba(255,255,255,0.03); | ||
| border-bottom: 1px solid rgba(255,255,255,0.06); | ||
| } | ||
| .card .titlebar .light { | ||
| width: 12px; height: 12px; border-radius: 50%; | ||
| } | ||
| .card .titlebar .light.r { background: #ff5f57; } | ||
| .card .titlebar .light.y { background: #febc2e; } | ||
| .card .titlebar .light.g { background: #28c840; } | ||
| .card .titlebar .file { | ||
| margin-left: 12px; | ||
| font-family: 'Cascadia Code', 'Fira Code', ui-monospace, monospace; | ||
| font-size: 13px; | ||
| color: #8ea3c8; | ||
| } | ||
|
|
||
| .card pre { | ||
| margin: 0; | ||
| padding: 22px 24px 24px; | ||
| font-family: 'Cascadia Code', 'Fira Code', ui-monospace, monospace; | ||
| font-size: 16px; | ||
| line-height: 1.55; | ||
| color: #d6e2f5; | ||
| white-space: pre; | ||
| } | ||
|
|
||
| .k { color: #ff7ab6; } /* keyword */ | ||
| .s { color: #a6e08a; } /* string */ | ||
| .c { color: #6d7f9c; font-style: italic; } /* comment */ | ||
| .m { color: #ffd479; } /* method */ | ||
| .t { color: #7cc2ff; } /* type */ | ||
| .p { color: #c8b6ff; } /* punct / decorator */ | ||
|
|
||
| /* Bottom-right corner label */ | ||
| .corner { | ||
| position: absolute; | ||
| right: 88px; | ||
| bottom: 44px; | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 12px; | ||
| font-size: 15px; | ||
| color: #8ea3c8; | ||
| font-weight: 500; | ||
| } | ||
| .corner .logo { | ||
| width: 22px; | ||
| height: 22px; | ||
| border-radius: 4px; | ||
| background: | ||
| linear-gradient(135deg, #0078d4, #7e57c2); | ||
| box-shadow: 0 2px 8px rgba(0,120,212,0.5); | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div class="banner"> | ||
| <div class="content"> | ||
| <div class="left"> | ||
| <span class="eyebrow"><span class="dot"></span>Public preview</span> | ||
| <h1>Call Windows APIs directly from Electron and Node.js</h1> | ||
| <p class="subtitle">Notifications, Phi Silica, clipboard, and more, straight from JavaScript. No native addon, no <code>node-gyp</code>.</p> | ||
| <div class="badges"> | ||
| <span class="badge">Electron</span> | ||
| <span class="badge">Node.js</span> | ||
| <span class="badge">Windows App SDK</span> | ||
| <span class="badge">On-device AI</span> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="right"> | ||
| <div class="card"> | ||
| <div class="titlebar"> | ||
| <span class="light r"></span> | ||
| <span class="light y"></span> | ||
| <span class="light g"></span> | ||
| <span class="file">main.js</span> | ||
| </div> | ||
| <pre><span class="c">// On-device AI, from JS</span> | ||
| <span class="k">const</span> { <span class="t">LanguageModel</span>, | ||
| <span class="t">TextSummarizer</span> } | ||
| = <span class="m">require</span>(<span class="s">'./.winapp/bindings'</span>); | ||
|
|
||
| <span class="k">const</span> model = <span class="k">await</span> <span class="t">LanguageModel</span> | ||
| .<span class="m">createAsync</span>(); | ||
|
|
||
| <span class="k">const</span> { text } = <span class="k">await</span> <span class="t">TextSummarizer</span> | ||
| .<span class="m">createInstance</span>(model) | ||
| .<span class="m">summarizeParagraphAsync</span>(input);</pre> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="corner"> | ||
| <span class="logo"></span> | ||
| <span>microsoft/winappCli · microsoft/dynwinrt</span> | ||
| </div> | ||
| </div> | ||
| </body> | ||
| </html> |
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.
|
lei9444 marked this conversation as resolved.
|
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.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: for the main.js screenshot could you have copilot remove the tilt on the console window so its straight up and down