Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,13 @@ docs/assets/component-kits/** -text
docs/assets/component-kits/*.pdf binary
docs/assets/component-kits/*.png binary
docs/assets/component-kits/*.zip binary

examples/yew-sheet/** text eol=lf
examples/yew-sheet/fonts/*.ttf binary
examples/yew-sheet/fonts/*-OFL.txt -text -whitespace
tools/fixtures/yew-client/** text eol=lf
docs/assets/yew-starter/** -text
docs/assets/yew-starter/*.pdf binary
docs/assets/yew-starter/*.png binary
docs/assets/yew-starter/*.zip binary
docs/assets/yew-starter/preview/fonts/*-OFL.txt -whitespace
39 changes: 38 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,43 @@ concurrency:
cancel-in-progress: true

jobs:
yew-starter:
name: Yew PDF and HTML starter (${{ matrix.os }}, Rust ${{ matrix.rust }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
rust: '1.85.0'
- os: windows-latest
rust: '1.97.0'
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
targets: wasm32-unknown-unknown
- run: |
python -m pip install --only-binary=:all: -r tools/browser-requirements.txt
- run: python -m playwright install --with-deps chromium
- name: Reproduce the download and check native and browser component builds
run: |
python tools/build_yew_starter.py
git diff --exit-code -- docs/assets/yew-starter/project.zip docs/assets/yew-starter/source.json
python tools/verify_yew_starter.py
- name: Check the exported HTML and PDF downloads in Chromium
run: python tools/check_yew_starter_browser.py --root target/yew-starter/documents --output target/yew-starter/browser
- uses: actions/upload-artifact@v4
if: always()
with:
name: yew-starter-${{ matrix.os }}-${{ matrix.rust }}
path: target/yew-starter/
retention-days: 14
component-kits:
name: Component kit composition (${{ matrix.os }})
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -1127,7 +1164,7 @@ jobs:
path: site
deploy:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: [build, component-kits, accessible-showcase, showcase-authoring, component-notebook, page-band-notebook, complete-html, component-preview, bootstrap-preview, components, node-components, dotnet-components, aspnet, chinese, arabic, markdown, tagged-notice, rust-download, matplotlib, pandas-components, numbered-report, axum, lambda-starter, n8n-workflow, laravel-queue, laravel-platform, streamlit]
needs: [build, yew-starter, component-kits, accessible-showcase, showcase-authoring, component-notebook, page-band-notebook, complete-html, component-preview, bootstrap-preview, components, node-components, dotnet-components, aspnet, chinese, arabic, markdown, tagged-notice, rust-download, matplotlib, pandas-components, numbered-report, axum, lambda-starter, n8n-workflow, laravel-queue, laravel-platform, streamlit]
runs-on: ubuntu-latest
permissions:
pages: write
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ docs/assets/playground/project-verification.json
docs/assets/playground/node-project-verification.json
examples/rust/target/
examples/rust/verification/
examples/yew-sheet/target/
examples/yew-sheet/output/
/output/
/target/
__pycache__/
Expand Down
Binary file added docs/assets/yew-starter/document.pdf
Binary file not shown.
Binary file added docs/assets/yew-starter/document.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/assets/yew-starter/preview/document.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Saturday mixed-game rotation</title><link rel="stylesheet" href="style.css"></head><body><main class="sheet"><header class="masthead"><p class="eyebrow">Riverstone / Community Series</p><h1>Saturday mixed-game rotation</h1><p class="subtitle">A sample structure for an afternoon around the table.</p></header><dl class="facts"><div><dt>Starting stack</dt><dd>20,000 chips</dd></div><div><dt>Table size</dt><dd>6 players</dd></div><div><dt>Registration</dt><dd>Through level 4</dd></div></dl><section aria-labelledby="schedule-title"><h2 id="schedule-title">The rotation</h2><div tabindex="0" role="region" aria-label="Schedule table" class="table-scroll"><table><caption>Levels, stakes and scheduled breaks</caption><thead><tr><th scope="col">Level</th><th scope="col">Minutes</th><th scope="col">Game</th><th scope="col">Blinds / bets</th><th scope="col">Ante</th></tr></thead><tbody><tr class="level"><th scope="row">1</th><td>20</td><td>No-limit hold’em</td><td class="numeric">100 / 200</td><td class="numeric">200</td></tr><tr class="level"><th scope="row">2</th><td>20</td><td>Pot-limit Omaha</td><td class="numeric">100 / 200</td><td class="numeric">—</td></tr><tr class="level"><th scope="row">3</th><td>20</td><td>Limit hold’em</td><td class="numeric">300 / 600</td><td class="numeric">—</td></tr><tr class="level"><th scope="row">4</th><td>20</td><td>Seven-card stud</td><td class="numeric">300 / 600</td><td class="numeric">75</td></tr><tr class="break"><th colspan="5" scope="row"><span class="break-label">First interval · registration closes</span> · 15 minute break</th></tr><tr class="level"><th scope="row">5</th><td>20</td><td>No-limit hold’em</td><td class="numeric">200 / 400</td><td class="numeric">400</td></tr><tr class="level"><th scope="row">6</th><td>20</td><td>Pot-limit Omaha</td><td class="numeric">200 / 400</td><td class="numeric">—</td></tr><tr class="level"><th scope="row">7</th><td>20</td><td>Limit hold’em</td><td class="numeric">600 / 1,200</td><td class="numeric">—</td></tr><tr class="level"><th scope="row">8</th><td>20</td><td>Seven-card stud</td><td class="numeric">600 / 1,200</td><td class="numeric">150</td></tr><tr class="break"><th colspan="5" scope="row"><span class="break-label">Second interval</span> · 10 minute break</th></tr><tr class="level"><th scope="row">9</th><td>20</td><td>No-limit hold’em</td><td class="numeric">400 / 800</td><td class="numeric">800</td></tr><tr class="level"><th scope="row">10</th><td>20</td><td>Pot-limit Omaha</td><td class="numeric">400 / 800</td><td class="numeric">—</td></tr><tr class="level"><th scope="row">11</th><td>20</td><td>Limit hold’em</td><td class="numeric">1,200 / 2,400</td><td class="numeric">—</td></tr><tr class="level"><th scope="row">12</th><td>20</td><td>Seven-card stud</td><td class="numeric">1,200 / 2,400</td><td class="numeric">300</td></tr></tbody></table></div></section><section aria-labelledby="notes-title" class="notes"><h2 id="notes-title">Before you begin</h2><ul><li>This is fictional layout data, not an event announcement or a complete set of tournament rules.</li><li>Blinds are shown for no-limit and pot-limit games; small and big bets are shown for limit games.</li><li>Provide your own event settings, break policy and complete rules before using a structure sheet.</li></ul></section><footer><p>Illustrative structure · synthetic event data</p></footer></main></body></html>
93 changes: 93 additions & 0 deletions docs/assets/yew-starter/preview/fonts/DMSerifDisplay-OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. Copyright 2019 Google LLC.

This Font Software is licensed under the SIL Open Font License, Version 1.1.

This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
93 changes: 93 additions & 0 deletions docs/assets/yew-starter/preview/fonts/Inter-OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
57 changes: 57 additions & 0 deletions docs/assets/yew-starter/preview/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
@font-face { font-family: Inter; src: url('fonts/Inter-Variable.ttf') format('truetype'); font-weight: 100 900; }
@font-face { font-family: 'DM Serif Display'; src: url('fonts/DMSerifDisplay-Regular.ttf') format('truetype'); }
@page { size: A4; margin: 16mm 17mm; }
* { box-sizing: border-box; }
body { margin: 0; color: #213436; font-family: Inter, sans-serif; font-size: 9pt; line-height: 1.4; }
.masthead { background: #183b3f; color: #fffaf1; padding: 7mm 8mm; border-top: 2mm solid #c47d4e; }
.eyebrow { margin: 0 0 3mm; font-size: 8pt; text-transform: uppercase; letter-spacing: 2pt; color: #edd4b0; }
h1 { margin: 0 0 2mm; font-family: 'DM Serif Display', serif; font-size: 27pt; font-weight: 400; line-height: 1.1; }
.subtitle { margin: 0; color: #e0e8df; font-size: 9pt; }
.facts { display: flex; gap: 7mm; padding: 5mm 0; margin: 0 0 3mm; border-bottom: 0.3mm solid #c9d5d0; }
.facts div { flex: 1; }
dt { font-size: 7.5pt; color: #5f7270; text-transform: uppercase; letter-spacing: 0.6pt; }
dd { margin: 1mm 0 0; font-weight: 700; font-size: 11pt; }
h2 { margin: 0 0 2mm; font-size: 13pt; font-weight: 700; }
table { width: 100%; border-collapse: collapse; font-size: 8.6pt; }
caption { text-align: left; color: #5f7270; margin-bottom: 3mm; font-size: 8pt; }
th, td { text-align: left; padding: 2.2mm 2.4mm; border-bottom: 0.2mm solid #d4dcd7; vertical-align: top; }
thead { display: table-header-group; }
thead th { background: #e7eee8; font-size: 7.5pt; color: #254b49; font-weight: 700; }
tbody th { color: #254b49; font-weight: 700; }
tbody tr { break-inside: avoid; }
.numeric { text-align: right; white-space: nowrap; }
.break th { background: #f8eee0; color: #7a4d31; font-size: 8pt; font-weight: 400; padding-top: 2mm; padding-bottom: 2mm; }
.break-label { font-weight: 700; }
.notes { margin-top: 5mm; padding-left: 4mm; border-left: 0.8mm solid #c47d4e; }
.notes h2 { font-size: 10pt; }
.notes ul { margin: 0; padding-left: 4mm; font-size: 8pt; }
.notes li { margin-bottom: 1.2mm; }
footer { margin-top: 5mm; border-top: 0.2mm solid #c9d5d0; padding-top: 2mm; color: #5f7270; font-size: 7pt; }
footer p { margin: 0; }
@media screen {
body { background: #e7e9e3; padding: 24px; font-size: 14px; }
.sheet { background: #fffdf8; max-width: 850px; margin: 0 auto; padding: 32px; }
.table-scroll { overflow-x: auto; }
table { min-width: 560px; font-size: 13px; }
th, td { padding: 10px; }
caption, .notes ul { font-size: 12px; }
footer { font-size: 11px; }
}
@media screen and (max-width: 600px) {
body { padding: 0; }
.sheet { padding: 16px; }
.masthead { padding: 24px; }
.facts { flex-wrap: wrap; gap: 16px; }
.facts div { flex-basis: 42%; }
}
@media print {
body { background: #fff; padding: 0; font-size: 9pt; }
.sheet { margin: 0; padding: 0; max-width: none; }
.table-scroll { overflow: visible; }
table { min-width: 0; font-size: 8.6pt; }
th, td { padding: 2.2mm 2.4mm; }
caption, .notes ul { font-size: 8pt; }
footer { font-size: 7pt; }
.facts { flex-wrap: nowrap; gap: 7mm; }
.facts div { flex-basis: auto; }
}
Loading
Loading