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
6 changes: 5 additions & 1 deletion static-site/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ description = """

[extra]
events_page_link = "https://guild.host/tokyo-rust/events/upcoming/"
donate_link = "mailto:donations@tokyorust.org"
donate_link = "mailto:contact@tokyorust.org"
tokyo_rust_icon = "/tokyo-rust-outline-opt.svg"

[[extra.socials]]
Expand Down Expand Up @@ -51,13 +51,17 @@ url = "https://www.linkedin.com/company/99059952"

[extra.translations.en]
home = "Home"
projects = "Projects"
sponsors = "Sponsors"
events = "Events"
donate = "Donate"
commercial_disclosure = "Commercial Disclosure"
code_of_conduct = "Code of Conduct"

[extra.translations.jp]
home = "ホーム"
projects = "プロジェクト"
sponsors = "スポンサー"
events = "イベント"
donate = "寄付"
commercial_disclosure = "特定商取引法に基づく表記"
Expand Down
2 changes: 1 addition & 1 deletion static-site/content/commercial-disclosure.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ In detail, our efforts include, but are not limited to, the following:
| Legal Name: | TokyoRust.org |
| Address: | We will disclose without delay if requested. |
| Phone Number: | We will disclose without delay if requested. |
| Email Address: | [donations@tokyorust.org](mailto:donations@tokyorust.org) |
| Email Address: | [contact@tokyorust.org](mailto:contact@tokyorust.org) |
| Head of Operations: | [Kovacs Mate Janos](https://www.linkedin.com/in/mate-j-kovacs/), representative / 代表 |
| Price: | We hope to receive a monthly donation in the 1000 to 5000 JPY range from each supporting member, but both smaller and larger amounts are welcome. |
| Accepted Payment Methods: | Bank transfer. |
Expand Down
43 changes: 43 additions & 0 deletions static-site/content/projects.jp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
+++
title = "コミュニティプロジェクト"
template = "projects.html"
description = "東京Rustコミュニティメンバーが作成したプロジェクトをご覧ください!ツールやライブラリからアプリケーションや実験まで、私たちのメンバーはRustで素晴らしいものを作っています。"

[[extra.project]]
name = "Shizen"
url = "https://github.com/brandonpollack23/shizen-again"
logo_url = "https://github.com/brandonpollack23.png?size=200"
description = "自然はタスク表管理のラブレリーとアプリです。P2P同期や依存関係の連鎖を通して現在実行できるアクションだけを見えるようにすることが機能です。"

[[extra.project]]
name = "Sarekt"
url = "https://github.com/brandonpollack23/sarekt"
logo_url = "https://raw.githubusercontent.com/brandonpollack23/sarekt/master/sarekt_screenshot.png"
description = "ラストで実行したよくないVulkan/Ash三次元レンダラー"
+++


## プロジェクトを追加する

あなたのRustプロジェクトを紹介しませんか?掲載をお待ちしています!プロジェクトは2つの方法で追加できます:

### 方法1:対話型スクリプトを使用(最も簡単)

1. [サイト](https://github.com/tokyo-rust/website)をフォークしてクローン
1. [mise](https://mise.jdx.dev)を有効にして必要な依存関係を取得(または単に[gum](https://github.com/charmbracelet/gum)をインストール)
1. スクリプトを実行:`./scripts/add-project.sh`
1. プロンプトに従ってプロジェクトの詳細を入力
1. 変更内容をプルリクエストで提出(`gh pr create`)

### 方法2:手動編集

1. [tokyo-rust websiteリポジトリ](https://github.com/tokyo-rust/website)をフォークしてクローン
2. `content/projects.md`と`content/projects.jp.md`を編集
3. プロジェクトの詳細を含む新しい`[[extra.project]]`エントリを追加:
- `name`:プロジェクト名
- `url`:プロジェクトリポジトリへのリンク
- `logo_url`:(オプション)プロジェクトロゴまたはGitHubアバターのURL
- `description`:プロジェクトの簡単な説明
4. プルリクエストを提出

東京Rustコミュニティメンバーによるすべてのプロジェクトを歓迎します!
43 changes: 43 additions & 0 deletions static-site/content/projects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
+++
title = "Community Projects"
template = "projects.html"
description = "Check out projects built by Tokyo Rust community members! From tools and libraries to applications and experiments, our members are creating amazing things with Rust."


[[extra.project]]
name = "Shizen"
url = "https://github.com/brandonpollack23/shizen-again"
logo_url = "https://github.com/brandonpollack23.png?size=200"
description = "Shizen is a tasklist/task management applicaiton and library with peer to peer synchronization and dependency chains for comprehension and visibility of currently actionable todo items"

[[extra.project]]
name = "Sarekt"
url = "https://github.com/brandonpollack23/sarekt"
logo_url = "https://raw.githubusercontent.com/brandonpollack23/sarekt/master/sarekt_screenshot.png"
description = "A bad renderer implemented with ash/vulkan in rust some years ago"
+++

## Add Your Project

Want to showcase your Rust project? We'd love to feature it! You can add your project in two ways:

### Option 1: Use the Interactive Script (Easiest)

1. Fork and clone [the site](https://github.com/tokyo-rust/website)
1. Activate [mise](https://mise.jdx.dev) to get any necessary dependencies (or simply install [gum](https://github.com/charmbracelet/gum))
1. Run the script: `./scripts/add-project.sh`
1. Follow the prompts to add your project details
1. Submit a pull request with your changes (`gh pr create`)

### Option 2: Manual Edit

1. Fork and Clone the [tokyo-rust website repository](https://github.com/tokyo-rust/website)
2. Edit `content/projects.md` and `content/projects.jp.md`
3. Add a new `[[extra.project]]` entry with your project details:
- `name`: Your project name
- `url`: Link to your project repository
- `logo_url`: (Optional) URL to your project logo or GitHub avatar
- `description`: Brief description of what your project does
4. Submit a pull request

All projects by Tokyo Rust community members are welcome!
12 changes: 12 additions & 0 deletions static-site/content/sponsors.jp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+++
title = "スポンサー"
template = "sponsors.html"

[[extra.sponsor]]
name = "RustJobs.dev"
url = "https://rustjobs.dev"
logo_html = '''<span style="font-size: 1.5rem; letter-spacing: -0.025em; line-height: 2.5rem; font-weight: 800; background: linear-gradient(to right, #fb923c, #dc2626); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;">RustJobs</span>'''
description = "RustJobs.devは、Rustエンジニアリング人材のための採用プラットフォームです。東京の求人も含め、多数の求人情報を掲載しています(私たちの協力により、今後さらに増えることを期待しています!)"
+++

東京Rustを支えてくださる寛大なスポンサーの皆様に感謝いたします!皆様のサポートにより、イベントの開催、軽食の提供、そしてコミュニティの構築を続けることができます。
12 changes: 12 additions & 0 deletions static-site/content/sponsors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+++
title = "Our Sponsors"
template = "sponsors.html"

[[extra.sponsor]]
name = "RustJobs.dev"
url = "https://rustjobs.dev"
logo_html = '''<span style="font-size: 1.5rem; letter-spacing: -0.025em; line-height: 2.5rem; font-weight: 800; background: linear-gradient(to right, #fb923c, #dc2626); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;">RustJobs</span>'''
description = "RustJobs.dev is the go-to hiring platform for Rust Engineering Talent. They have tons of job listings, including a few in Tokyo (hopefully with our help more soon!)"
+++

Thank you to our generous sponsors who help make Tokyo Rust possible! Their support enables us to host events, provide refreshments, and continue building our community.
12 changes: 12 additions & 0 deletions static-site/mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[tools]
gum = "latest"
zola = "latest"

[tasks.init]
description = "Initialize Zola and dependencies"
run = "npm i"

[tasks.dev]
description = "Run Zola in serve/dev mode"
depends = ["init"]
run = "zola serve"
Empty file removed static-site/public/.gitkeep
Empty file.
159 changes: 159 additions & 0 deletions static-site/scripts/add-project.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
#!/usr/bin/env bash

set -euo pipefail

# Colors for output
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

echo -e "${BLUE}=== Tokyo Rust Projects - Add Your Project ===${NC}\n"

# Check if gum is installed
if ! command -v gum &> /dev/null; then
echo "Error: 'gum' is not installed. Please run 'mise install' or install it first."
exit 1
fi

# Get project title
PROJECT_NAME=$(gum input --placeholder "Project name (e.g., 'My Awesome Rust Tool')")
if [ -z "$PROJECT_NAME" ]; then
echo "Error: Project name is required"
exit 1
fi

# Get repository URL
REPO_URL=$(gum input --placeholder "Repository URL (e.g., 'https://github.com/username/project')")
if [ -z "$REPO_URL" ]; then
echo "Error: Repository URL is required"
exit 1
fi

# Get GitHub username (optional)
echo -e "\n${BLUE}GitHub username (optional - leave empty for none)${NC}"
GITHUB_USERNAME=$(gum input --placeholder "GitHub username (or press Enter to skip)")

# Get logo URL with options
echo -e "\n${BLUE}Select logo option:${NC}"
LOGO_OPTIONS=("Custom URL" "None")
if [ -n "$GITHUB_USERNAME" ]; then
LOGO_OPTIONS=("Use GitHub avatar" "${LOGO_OPTIONS[@]}")
fi

LOGO_CHOICE=$(gum choose "${LOGO_OPTIONS[@]}")

LOGO_URL=""
case "$LOGO_CHOICE" in
"Use GitHub avatar")
LOGO_URL="https://github.com/${GITHUB_USERNAME}.png?size=200"
echo -e "${GREEN}✓ Using GitHub avatar: ${LOGO_URL}${NC}"
;;
"Custom URL")
LOGO_URL=$(gum input --placeholder "Enter logo URL")
if [ -n "$LOGO_URL" ]; then
echo -e "${GREEN}✓ Using custom logo: ${LOGO_URL}${NC}"
fi
;;
"None")
LOGO_URL=""
echo -e "${GREEN}✓ No logo will be used${NC}"
;;
esac

# Get English description
echo -e "\n${BLUE}Enter project description (English):${NC}"
DESCRIPTION_EN=$(gum write --placeholder "Describe your project...")
if [ -z "$DESCRIPTION_EN" ]; then
echo "Error: English description is required"
exit 1
fi

# Get Japanese description (optional)
echo -e "\n${BLUE}Enter project description (Japanese) - Press Ctrl+D on empty line to skip${NC}"
DESCRIPTION_JP=$(gum write --placeholder "プロジェクトの説明を入力してください... (or leave empty to use English)" || echo "")

if [ -z "$DESCRIPTION_JP" ]; then
DESCRIPTION_JP="$DESCRIPTION_EN"
echo -e "${GREEN}✓ Using English description for Japanese page${NC}"
fi

# Prepare the TOML entry
TOML_ENTRY_EN="
[[extra.project]]
name = \"${PROJECT_NAME}\"
url = \"${REPO_URL}\""

TOML_ENTRY_JP="$TOML_ENTRY_EN"

if [ -n "$LOGO_URL" ]; then
TOML_ENTRY_EN="${TOML_ENTRY_EN}
logo_url = \"${LOGO_URL}\""
TOML_ENTRY_JP="${TOML_ENTRY_JP}
logo_url = \"${LOGO_URL}\""
fi

TOML_ENTRY_EN="${TOML_ENTRY_EN}
description = \"${DESCRIPTION_EN}\""

TOML_ENTRY_JP="${TOML_ENTRY_JP}
description = \"${DESCRIPTION_JP}\""

# Function to add project to a file
add_project_to_file() {
local file=$1
local toml_entry=$2

# Find the line number where the front matter ends (first +++ after the start)
local end_line=$(grep -n "^+++" "$file" | tail -1 | cut -d: -f1)

if [ -z "$end_line" ]; then
echo "Error: Could not find end of front matter in $file"
return 1
fi

# Insert the new project entry before the closing +++
# Create a temporary file
local temp_file=$(mktemp)

# Copy everything up to (but not including) the closing +++
head -n $((end_line - 1)) "$file" > "$temp_file"

# Add the new project entry
echo "$toml_entry" >> "$temp_file"

# Add the closing +++ and everything after
tail -n +${end_line} "$file" >> "$temp_file"

# Replace the original file
mv "$temp_file" "$file"
}

# Add to English file
PROJECTS_EN="content/projects.md"
if [ ! -f "$PROJECTS_EN" ]; then
echo "Error: $PROJECTS_EN not found"
exit 1
fi

echo -e "\n${BLUE}Adding project to ${PROJECTS_EN}...${NC}"
add_project_to_file "$PROJECTS_EN" "$TOML_ENTRY_EN"
echo -e "${GREEN}✓ Added to English projects page${NC}"

# Add to Japanese file
PROJECTS_JP="content/projects.jp.md"
if [ ! -f "$PROJECTS_JP" ]; then
echo "Error: $PROJECTS_JP not found"
exit 1
fi

echo -e "${BLUE}Adding project to ${PROJECTS_JP}...${NC}"
add_project_to_file "$PROJECTS_JP" "$TOML_ENTRY_JP"
echo -e "${GREEN}✓ Added to Japanese projects page${NC}"

echo -e "\n${GREEN}=== Success! ===${NC}"
echo -e "Your project has been added to both projects pages."
echo -e "\nNext steps:"
echo -e "1. Review the changes: ${BLUE}git diff${NC}"
echo -e "2. Commit the changes: ${BLUE}git add content/projects*.md && git commit -m 'Add ${PROJECT_NAME} to projects'${NC}"
echo -e "3. Push and create a pull request: ${BLUE}git push${NC}"
echo -e "\nThank you for contributing to Tokyo Rust! 🦀"
1 change: 1 addition & 0 deletions static-site/templates/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% import "macros.tera.html" as macros %}
<footer class="d-flex flex-wrap justify-content-between align-items-center px-3 py-1 my-4 border-top">
<div class="col-12 col-md-4 d-flex justify-content-center justify-content-md-start align-items-center">
{{ macros::rust_logo(size=3) }}
Expand Down
4 changes: 3 additions & 1 deletion static-site/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% extends "base.html" %} {% block content %}
{% extends "base.html" %}
{% import "macros.tera.html" as macros %}
{% block content %}
<div class="bg-black">
<div class=" py-5 container column-gap-3">
<h1 class="text-primary fw-bold p-5 m-0 text-center text-md-start"> {{ section.title }} </h1>
Expand Down
49 changes: 48 additions & 1 deletion static-site/templates/macros.tera.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,51 @@ <h5 class="text-dark">{{ title }}</h5>
<img height="24px" alt="{{ name }} icon" src="{{ icon }}" />
</a>
</li>
{% endmacro social_link %}
{% endmacro social_link %}

{% macro sponsor_card(name, url, logo_html, description) %}
<div class="row mb-5 pb-4 align-items-center">
<!-- Logo Column -->
<div class="col-md-4 text-center mb-3 mb-md-0">
<a href="{{ url }}" target="_blank" rel="noopener noreferrer" class="d-inline-block" style="max-width: 100%;">
<div style="max-width: 250px; max-height: 100px; overflow: hidden; display: flex; align-items: center; justify-content: center; margin: 0 auto;">
{{ logo_html | safe }}
</div>
</a>
</div>
<!-- Content Column -->
<div class="col-md-8">
<h3 class="mb-3">
<a href="{{ url }}" target="_blank" rel="noopener noreferrer" class="text-decoration-none text-dark">{{ name }}</a>
</h3>
<p class="mb-0">{{ description }}</p>
</div>
</div>
{% endmacro sponsor_card %}

{% macro project_card(name, url, logo_url, description) %}
<div class="card mb-4">
<div class="card-body">
<div class="row align-items-center">
{% if logo_url %}
<!-- Logo Column -->
<div class="col-md-3 text-center mb-3 mb-md-0">
<a href="{{ url }}" target="_blank" rel="noopener noreferrer" class="d-inline-block">
<img src="{{ logo_url }}" alt="{{ name }} logo" style="max-width: 120px; max-height: 120px; width: auto; height: auto;" class="img-fluid rounded">
</a>
</div>
<!-- Content Column -->
<div class="col-md-9">
{% else %}
<!-- Content Column (full width when no logo) -->
<div class="col-12">
{% endif %}
<h4 class="mb-2">
<a href="{{ url }}" target="_blank" rel="noopener noreferrer" class="text-decoration-none">{{ name }}</a>
</h4>
<p class="mb-0 text-muted">{{ description }}</p>
</div>
</div>
</div>
</div>
{% endmacro project_card %}
Loading