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
85 changes: 85 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
line-endings:
name: Line endings (LF only)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dos2unix
run: sudo apt-get update && sudo apt-get install -y dos2unix

- name: Check that all tracked text files use LF
run: |
# dos2unix -ic lists files that contain CR characters.
# We feed it every text file tracked by git (-I excludes binary files in grep,
# and git's --eol filter would also work, but -ic is the canonical dos2unix check).
offenders=$(git ls-files -z | xargs -0 dos2unix -ic 2>/dev/null || true)
if [ -n "$offenders" ]; then
echo "::error::The following files contain CRLF or CR line endings; run dos2unix on them:"
printf '%s\n' "$offenders"
exit 1
fi
echo "All tracked files use LF line endings."

formatting:
name: leptosfmt --check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo bin
uses: actions/cache@v4
with:
path: ~/.cargo/bin
key: cargo-bin-leptosfmt-0.1.33

- name: Install leptosfmt
run: |
if ! command -v leptosfmt >/dev/null 2>&1; then
cargo install leptosfmt --version 0.1.33 --locked
fi

- name: Run leptosfmt --check
run: leptosfmt --check src

build:
name: Trunk build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

- name: Install nightly Rust
uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown

- name: Cache cargo registry and target
uses: Swatinem/rust-cache@v2

- name: Install Trunk
run: |
wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz \
| tar -xzf- -C /usr/local/bin

- name: Build with Trunk
run: trunk build --release
50 changes: 0 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,5 @@ leptos_router = "0.8.2"
wasm-bindgen = "0.2.100"
web-sys = { version = "0.3.77", features = ["Document", "Window", "console"] }

[dev-dependencies]
wasm-bindgen = "0.2.100"
wasm-bindgen-test = "0.3.50"
web-sys = { version = "0.3.77", features = ["Document", "Window", "console"] }

[package.metadata.leptos]
assets-dir="public"
126 changes: 63 additions & 63 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
# OpenDevicePartnership.github.io
Website for the Open Device Partnership, built with Rust, Leptos, and Trunk.
## Prerequisites
Before running this project, ensure you have the following installed:
1. **Rust** - Install from [https://rustup.rs/](https://rustup.rs/)
2. **Trunk** - Build tool for Rust web applications
```cmd
cargo binstall trunk or
cargo install trunk
```
3. **WebAssembly target** - Required for compiling to WASM
```cmd
rustup target add wasm32-unknown-unknown
```
## Development
To run the development server:
```cmd
trunk serve
```
This will:
- Build the project in debug mode
- Start a development server at <http://127.0.0.1:3000>
- Watch for file changes and auto-reload the browser
## Production Build
To build for production:
```cmd
trunk build --release
```
The optimized output will be generated in the `dist/` directory.
## Project Structure
- `src/` - Rust source code
- `components/` - Reusable UI components
- `pages/` - Page components
- `style/` - CSS files (Tailwind)
- `public/` - Static assets (images, etc.)
- `index.html` - Main HTML template
- `Trunk.toml` - Trunk configuration
- `Cargo.toml` - Rust dependencies
## Technology Stack
- **Leptos** - Reactive web framework for Rust
- **Trunk** - WASM web application bundler
- **Tailwind CSS** - Utility-first CSS framework
# OpenDevicePartnership.github.io

Website for the Open Device Partnership, built with Rust, Leptos, and Trunk.

## Prerequisites

Before running this project, ensure you have the following installed:

1. **Rust** - Install from [https://rustup.rs/](https://rustup.rs/)

2. **Trunk** - Build tool for Rust web applications

```cmd
cargo binstall trunk or
cargo install trunk
```

3. **WebAssembly target** - Required for compiling to WASM

```cmd
rustup target add wasm32-unknown-unknown
```

## Development

To run the development server:

```cmd
trunk serve
```

This will:

- Build the project in debug mode
- Start a development server at <http://127.0.0.1:3000>
- Watch for file changes and auto-reload the browser

## Production Build

To build for production:

```cmd
trunk build --release
```

The optimized output will be generated in the `dist/` directory.

## Project Structure

- `src/` - Rust source code
- `components/` - Reusable UI components
- `pages/` - Page components
- `style/` - CSS files (Tailwind)
- `public/` - Static assets (images, etc.)
- `index.html` - Main HTML template
- `Trunk.toml` - Trunk configuration
- `Cargo.toml` - Rust dependencies

## Technology Stack

- **Leptos** - Reactive web framework for Rust
- **Trunk** - WASM web application bundler
- **Tailwind CSS** - Utility-first CSS framework
18 changes: 9 additions & 9 deletions gh-public/404.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://opendevicepartnership.org/">
<title>Redirecting...</title>
</head>
<body>
We couldn't find this page. Redirecting you to <a href="https://opendevicepartnership.org/">https://opendevicepartnership.org/</a>
</body>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://opendevicepartnership.org/">
<title>Redirecting...</title>
</head>
<body>
We couldn't find this page. Redirecting you to <a href="https://opendevicepartnership.org/">https://opendevicepartnership.org/</a>
</body>
</html>
18 changes: 9 additions & 9 deletions gh-public/boot-firmware/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://opendevicepartnership.org/boot-firmware">
<title>Redirecting...</title>
</head>
<body>
This page has moved to <a href="https://opendevicepartnership.org/boot-firmware">https://opendevicepartnership.org/boot-firmware</a>. You will be automatically redirected.</p>
</body>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://opendevicepartnership.org/boot-firmware">
<title>Redirecting...</title>
</head>
<body>
This page has moved to <a href="https://opendevicepartnership.org/boot-firmware">https://opendevicepartnership.org/boot-firmware</a>. You will be automatically redirected.</p>
</body>
</html>
18 changes: 9 additions & 9 deletions gh-public/community/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://opendevicepartnership.org/community">
<title>Redirecting...</title>
</head>
<body>
This page has moved to <a href="https://opendevicepartnership.org/community">https://opendevicepartnership.org/community</a>. You will be automatically redirected.</p>
</body>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://opendevicepartnership.org/community">
<title>Redirecting...</title>
</head>
<body>
This page has moved to <a href="https://opendevicepartnership.org/community">https://opendevicepartnership.org/community</a>. You will be automatically redirected.</p>
</body>
</html>
18 changes: 9 additions & 9 deletions gh-public/embedded-controller/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://opendevicepartnership.org/embedded-controller">
<title>Redirecting...</title>
</head>
<body>
This page has moved to <a href="https://opendevicepartnership.org/embedded-controller">https://opendevicepartnership.org/embedded-controller</a>. You will be automatically redirected.</p>
</body>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=https://opendevicepartnership.org/embedded-controller">
<title>Redirecting...</title>
</head>
<body>
This page has moved to <a href="https://opendevicepartnership.org/embedded-controller">https://opendevicepartnership.org/embedded-controller</a>. You will be automatically redirected.</p>
</body>
</html>
Loading
Loading