diff --git a/static-site/config.toml b/static-site/config.toml index b8a1037..c355cce 100644 --- a/static-site/config.toml +++ b/static-site/config.toml @@ -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]] @@ -51,6 +51,8 @@ url = "https://www.linkedin.com/company/99059952" [extra.translations.en] home = "Home" +projects = "Projects" +sponsors = "Sponsors" events = "Events" donate = "Donate" commercial_disclosure = "Commercial Disclosure" @@ -58,6 +60,8 @@ code_of_conduct = "Code of Conduct" [extra.translations.jp] home = "ホーム" +projects = "プロジェクト" +sponsors = "スポンサー" events = "イベント" donate = "寄付" commercial_disclosure = "特定商取引法に基づく表記" diff --git a/static-site/content/commercial-disclosure.md b/static-site/content/commercial-disclosure.md index 30e086d..0480ef1 100644 --- a/static-site/content/commercial-disclosure.md +++ b/static-site/content/commercial-disclosure.md @@ -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. | diff --git a/static-site/content/projects.jp.md b/static-site/content/projects.jp.md new file mode 100644 index 0000000..7365262 --- /dev/null +++ b/static-site/content/projects.jp.md @@ -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コミュニティメンバーによるすべてのプロジェクトを歓迎します! diff --git a/static-site/content/projects.md b/static-site/content/projects.md new file mode 100644 index 0000000..f9da981 --- /dev/null +++ b/static-site/content/projects.md @@ -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! diff --git a/static-site/content/sponsors.jp.md b/static-site/content/sponsors.jp.md new file mode 100644 index 0000000..1adc2d4 --- /dev/null +++ b/static-site/content/sponsors.jp.md @@ -0,0 +1,12 @@ ++++ +title = "スポンサー" +template = "sponsors.html" + +[[extra.sponsor]] +name = "RustJobs.dev" +url = "https://rustjobs.dev" +logo_html = '''RustJobs''' +description = "RustJobs.devは、Rustエンジニアリング人材のための採用プラットフォームです。東京の求人も含め、多数の求人情報を掲載しています(私たちの協力により、今後さらに増えることを期待しています!)" ++++ + +東京Rustを支えてくださる寛大なスポンサーの皆様に感謝いたします!皆様のサポートにより、イベントの開催、軽食の提供、そしてコミュニティの構築を続けることができます。 diff --git a/static-site/content/sponsors.md b/static-site/content/sponsors.md new file mode 100644 index 0000000..4a28ab2 --- /dev/null +++ b/static-site/content/sponsors.md @@ -0,0 +1,12 @@ ++++ +title = "Our Sponsors" +template = "sponsors.html" + +[[extra.sponsor]] +name = "RustJobs.dev" +url = "https://rustjobs.dev" +logo_html = '''RustJobs''' +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. diff --git a/static-site/mise.toml b/static-site/mise.toml new file mode 100644 index 0000000..ba736d6 --- /dev/null +++ b/static-site/mise.toml @@ -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" diff --git a/static-site/public/.gitkeep b/static-site/public/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/static-site/scripts/add-project.sh b/static-site/scripts/add-project.sh new file mode 100755 index 0000000..3746dcd --- /dev/null +++ b/static-site/scripts/add-project.sh @@ -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! 🦀" diff --git a/static-site/templates/footer.html b/static-site/templates/footer.html index cd51d87..f1c8188 100644 --- a/static-site/templates/footer.html +++ b/static-site/templates/footer.html @@ -1,3 +1,4 @@ +{% import "macros.tera.html" as macros %}