diff --git a/CLAUDE.md b/CLAUDE.md index 7501ed9d6dc..ee534d472fd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1896,8 +1896,14 @@ bootstrap-subset → theme-styles.styl の順で `/css/site.css` に連結する 同じ URL のリンクが人数ぶん並ぶだけになる。フッターの Pull Request は出さない (ページ全体の原稿ではなく、節のデータだけが直せる対象) - **著者ページのプロフィールの鉛筆は `_profile.yml` へ。自己紹介が無い人のページにも出す** - ——329人のうち書いているのは5人で、いちばん要るのは「これから書く人」の側。 + ——330人のうち書いているのは8人で、いちばん要るのは「これから書く人」の側。 ここにフッターの Pull Request は出さない(鉛筆と同じ行き先を2つ置くことになる) + - **置くのは h1 の末尾で、プロフィールの箱は中身があるときだけ描く**(#3229)。 + 鉛筆はどのページでも見出しの末尾にあり、自己紹介の段落の末尾に置いていた著者ページだけが + 例外だった。自己紹介が無い322人では鉛筆1つの箱(54px)が h1 の下に立ち、 + h1 → h2 が 117px 空いて「欠けている」ように見えた。h1 に移せばタグページと同じ 48px になる。 + 「自己紹介を書く」の文字を添える案は、箱と空きが残るうえ読者向けのページで書き手に + 呼びかけることになり、鉛筆の部品に2つ目の形が生まれるので採らない - パスは**リポジトリ相対で、区切りの `/` は残して要素だけ encode する**。 `source/` の外(`_profile.yml`・`themes/`)を指せる必要があり、 日本語のファイル名があるため diff --git a/themes/future/layout/_partial/edit-pencil.ejs b/themes/future/layout/_partial/edit-pencil.ejs index 7379aedc1e3..ed58c15820f 100644 --- a/themes/future/layout/_partial/edit-pencil.ejs +++ b/themes/future/layout/_partial/edit-pencil.ejs @@ -1,5 +1,6 @@ <%# 原稿の編集画面(GitHub)への鉛筆 (#3186)。記事タイトル・特設ページの見出し・ - 著者プロフィールが同じ形を使う。行き先の組み立ては scripts/edit_url.js。 + 著者ページの h1 が同じ形を使う。置き場所はいつも見出しの末尾 (#3229)。 + 行き先の組み立ては scripts/edit_url.js。 引数: url 行き先(必須) diff --git a/themes/future/layout/author.ejs b/themes/future/layout/author.ejs index ed2d03c998c..6361b78e41e 100644 --- a/themes/future/layout/author.ejs +++ b/themes/future/layout/author.ejs @@ -25,7 +25,10 @@
-

<%- partial('_partial/svg-icon', {icon: 'user'}) %><%- page.author %>さんのページ

+ <%# 鉛筆は他のページと同じく h1 の末尾 (#3186 / #3229)。行き先は _profile.yml で、 + 自己紹介が無い人のページにも出す——330人のうち書いているのは8人で、 + いちばん要るのは「これから書く人」の側 %> +

<%- partial('_partial/svg-icon', {icon: 'user'}) %><%- page.author %>さんのページ<%- partial('_partial/edit-pencil', {url: edit_url('_profile.yml'), label: page.author + 'さんの自己紹介をGitHubで編集する'}) %>

<% if (isFirstPage) { %> <%# 累計・直近1年の数字と推移はサイドバーへ移した (#2911)。表彰とプロフィールは 本文に残す。表彰は書き手にとっての意味が大きく、プロフィールは読者が @@ -68,14 +71,15 @@ <%# プロフィールと外部への導線 (#2774)。アイコンはフッターと同じ svg-icon の 辞書から取り、形も同じ .icon-link(28px の円)にそろえる。 ブランドの絵が名乗るリンクなので「(外部サイト)」の印は付けない (#2729) %> - <%# 鉛筆は profile が無い人のページにも出す (#3186)。329人のうち _profile.yml に - 自己紹介があるのは5人で、いちばん要るのは「これから書く人」の側 %> + <%# 箱は中身があるときだけ描く (#3229)。空の箱が h1 の下に立つと「欠けている」ように見える %> <% const profile = get_profile_data(page.author); %> - <% const profileEdit = partial('_partial/edit-pencil', {url: edit_url('_profile.yml'), label: page.author + 'さんの自己紹介をGitHubで編集する'}); %> + <% if (profile && (profile.about || profile.twitter_id || profile.github_id)) { %>
+ <% if (profile.about) { %> <%# about は
を含むのでエスケープしない %> -

<% if (profile && profile.about) { %><%- profile.about %><% } %><%- profileEdit %>

- <% if (profile && (profile.twitter_id || profile.github_id)) { %> +

<%- profile.about %>

+ <% } %> + <% if (profile.twitter_id || profile.github_id) { %>
<% if (profile.twitter_id) { %> <%- partial('_partial/svg-icon', {icon: 'brand-x'}) %> @@ -86,6 +90,7 @@
<% } %>
+ <% } %> <%# その著者の中でよく読まれている記事。タグ・カテゴリページと同じく 新着一覧の直前に置き、ページ間でコンテンツ構成を揃える (#2189)。 順位・件数の規則は共有ヘルパー(popular_posts_in)側 %>