01Fomantic UI デザインシステムのインターフェースプレビュー
読書用プロンプト3件を絞り込み、星または矢印キーで評価し、話題の候補リストに追加できます。
Fomantic UI 2.9.4 CSS/modulesとjQuery 3.7.1を使用。カバーのアートワークと評価用キーボード拡張はオリジナルです。 ·
実装リファレンス 02Fomantic UI デザインシステムのデザインリファレンス
Fomantic UI 2.9.4のコンパイル済み既定値CSSを直接調査しました。ここに示すのはLessベースのテーマにおけるセレクター単位の既定値であり、架空の実行時CSSトークンではありません。オリジナルのカバー色とアプリケーションの寸法は別途明記しています。
| 名前 / ルール | 値 / 設定 | 用途 |
|---|
html font-size | 14px | 既定のrem基準値。 |
body font-family | Lato, system-ui, platform and emoji fallbacks | プレビューにはローカルのLatoフォントデータが含まれています。 |
body line-height | 1.4285em | 既定のテキストサイズ14pxでは約20pxです。 |
body text color | rgba(0, 0, 0, 0.87) | 既定の強調度が高いテキスト。 |
h1 / h2 / h3 | 2rem / 1.71428571rem / 1.28571429rem | オリジナルのページ側で上書きする前の既定の見出しサイズ。 |
heading line-height | 1.28571429em | 既定の見出し間隔。 |
| 名前 / ルール | 値 / 設定 | 用途 |
|---|
.ui.button background | #e0e1e2 | ニュートラルな既定のボタン。 |
.ui.button border-radius | 0.28571429rem | 既定のルートサイズでは約4pxです。 |
.ui.teal.button background | #00b5ad | 候補リストに使われるネイティブのティール色のアクションカラー。 |
.ui.teal.button:hover | #009c95 | ネイティブのティール色のホバー状態。 |
.ui.teal.button:focus | #008c86 | ネイティブのティール色のフォーカス背景。 |
.ui.teal.button:active | #00827c | ネイティブのティール色の押下時背景。 |
.ui.primary.button background | #2185d0 | プライマリブルーは、名称付きのティールバリエーションとは別の色です。 |
| 名前 / ルール | 値 / 設定 | 用途 |
|---|
.ui.card width | 290px | 既定の固定幅。可変幅の設定では、このアプリケーションのグリッドに合わせて広がります。 |
.ui.card border-radius | 0.28571429rem | 既定のルートサイズでは約4pxです。 |
.ui.card box-shadow | 0 1px 3px 0 #d4d4d5, 0 0 0 1px #d4d4d5 | 既定の立体効果とアウトライン。 |
.ui.card margin | 1em 0 | カードの位置をそろえるため、オリジナルのグリッドでは0に上書きしています。 |
.ui.card transition | box-shadow 0.1s ease, transform 0.1s ease | 既定のカードの動き。 |
| 名前 / ルール | 値 / 設定 | 用途 |
|---|
maxRating | 4 by default; 5 in this example | 明示された5段階のスケールは、アクセシブルなスライダーの最大値と一致します。 |
initialRating | 0 | ユーザーが操作するまでは未評価です。 |
clearable | auto by default; true in this example | 既存の評価をクリアできます。 |
interactive | true | マウス操作が有効です。 |
onRate(value) | Callback after a rating is selected | テキスト出力とアクセシブルな値を同期します。 |
| 名前 / ルール | 値 / 設定 | 用途 |
|---|
Page padding | 36px 28px / 24px 18px mobile | オリジナルのレイアウト間隔。 |
Grid gap | 22px | オリジナルの3列の読書棚。 |
Page heading | 34px / 1.15; 29px mobile | オリジナルの見出しの上書き。 |
Cover height | 175px / 155px mobile | オリジナルのCSS書籍カバーアートワーク。 |
Layout breakpoint | 760px | カードを1列にするオリジナルの切り替え。 |
03Fomantic UIデザインシステム完全ガイド
実際のインターフェースで、このデザインシステムを選び、適用し、レビューするための実践ガイドです。
DESIGN-fomantic-ui.md詳しいガイダンス、実装の出発点、ソースへのリンクをまとめています。
ガイドをダウンロードFomantic UIデザインシステム:jQueryモジュールで構成するCSSの語彙
jQueryモジュールで構成するCSSの語彙
Fomantic UIは、セマンティックなクラス文字列と、任意で使用できる状態管理モジュールを組み合わせます。読書棚の見た目にはui fluid card、ui teal button、ui basic labelを使用します。ドロップダウンと評価機能はjQueryで明示的に初期化します。スタイルシートだけを読み込んでもカードは表示されますが、同じ操作性は得られません。
このサンプルではFomantic UI 2.9.4とjQuery 3.7.1を固定しています。dropdownの前にtransitionモジュールを読み込み、その後にratingを読み込みます。静的な星の列を表示して対話型ライブラリの例と称するより、依存関係を明示する方が有用です。オリジナルのアプリケーションモジュールはカードのマークアップが生成された後に実行されます。
関連する仕様を確認する
Fomantic UIデザインシステム:コンパイル済みの既定値は実行時のトークン名ではない
コンパイル済みの既定値は実行時のトークン名ではない
Fomanticの既定テーマはLessで構築されています。そのため、このリファレンスにはティール色のボタンの背景色やカードの角丸半径など、実際のセレクター値を記載しています。コンパイル済みパッケージで公開されていない--fomantic-primaryトークンAPIを架空のものとして作り出すことはありません。テーマを大幅に変更する場合は、ドキュメントに記載されたテーマ構築方法と変数ファイルを使用してください。
名称付きのティールバリエーションは、プライマリブルーのバリエーションとは別です。この読書棚では候補リストのアクションにティールを使い、オリジナルのカバーアートには紙、セージ、温かみのあるクレイの色を使っています。これらのカバーはアプリケーション用のイラストであり、公式のパレット見本ではありません。ホバー、フォーカス、押下時のボタン値にはFomanticのネイティブの既定値を使用しています。
関連する仕様を確認する
Fomantic UIデザインシステム:remの基準を14ピクセルにすると形状が変わる
remの基準を14ピクセルにすると形状が変わる
既定のサイトスタイルシートでは、ルートサイズと本文テキストのサイズを14ピクセルに設定しています。そのため、ボタンとカードの角丸半径0.28571429remは約4ピクセルです。このrem値をルートサイズが16ピクセルの別の環境にコピーすると形状が変わります。そのため、このリファレンスでは説明のない角丸半径だけでなく、ルートサイズも記載しています。
推奨フォントファミリーはLatoで、コンパイル済みパッケージにはローカルのフォントアセットが含まれています。この単体プレビューでは、ウェブフォントサービスにリクエストを送る代わりにフォントリソースを埋め込んでいます。ページ見出しにはオリジナルの34ピクセルの上書き設定を適用し、カードの説明文にはコンパクトな本文テキストと、アプリケーション側でゆとりを持たせた行高を使用しています。
関連する仕様を確認する
Fomantic UIデザインシステム:カードの構成要素を整理し、コンテンツとアクションを分ける
カードの構成要素を整理し、コンテンツとアクションを分ける
各ネイティブカードには、装飾的なカバー、テーマと説明を表示するコンテンツブロック、評価用のコンテンツブロック、ショートリストへの追加操作用のコンテンツブロックがあります。可変幅のカードは、パッケージの既定幅である290pxを使わず、元の3列グリッドに合わせて広がります。カードごとのマージンをなくし、グリッドで均一な間隔を確保しています。
各プロンプトには異なる読解課題があります。文字間隔の比較、要素を取り除いてネガティブスペースを観察する課題、周囲の色による色の変化を観察する課題です。カバーには、文字、長方形、重なり合う色を用いて、それぞれの課題を視覚的に反映しています。これらは明確にオリジナルのプロンプトであり、出版社の推奨を示唆するものではありません。
関連する仕様を確認する
Fomantic UI デザインシステム:あらゆる入力方法でネイティブの評価動作を呼び出す
あらゆる入力方法でネイティブの評価動作を呼び出す
評価モジュールでは、最大値を5、clearableをtrueに設定しています。onRateは現在の数値を受け取り、画面に表示するスコアとアクセシブルなスライダー値の両方を同期します。「評価をクリア」操作では、手動でアクティブクラスを削除するのではなく、モジュールの評価クリア動作を呼び出します。
ネイティブの星評価モジュールはマウス操作に対応していますが、この例ではキーボード操作も明示的に追加しています。評価コンテナは、0から5までの範囲を持つラベル付きスライダーです。矢印キーで1段階ずつ変更し、Homeでクリア、Endで5を選択できます。どの操作でもset ratingを呼び出すため、表示される星とアプリケーションの出力は、同じモジュールの状態を共有します。
- 評価にTabで移動し、右矢印キーを2回押して5段階中2を選択してください。
- Endを押して5を選択し、次にHomeを押して「未評価」に戻してください。
- 星をクリックし、テキスト出力とアクセシブルな値が同時に更新されることを確認してください。
関連する仕様を確認する
Fomantic UI デザインシステム:ドロップダウンの絞り込みでは非表示項目の状態を維持する
ドロップダウンの絞り込みで非表示の状態を維持する
テーマ選択欄は、dropdown初期化によってネイティブのFomanticドロップダウンになります。onChangeコールバックは、選択した値に一致しないカードを非表示にし、表示中のプロンプト数を更新します。「すべてのテーマ」を選ぶと、棚全体が再表示されます。メニューの動きにはtransitionモジュールを使用します。
絞り込みによってカードが削除・再作成されることはありません。非表示になっても、評価やショートリストへの登録状態は元のレコードに保持されます。これは意図的な動作です。棚の絞り込みは表示方法を変える操作であり、ユーザーが以前に選んだ内容を消去するものではありません。そのため、現在のフィルター対象外にある項目にも、概要から言及できます。
関連する仕様を確認する
Fomantic UI デザインシステム:ショートリストと評価はそれぞれ独立している
候補リストは評価とは独立している
評価は0から5までの関心度を示し、ショートリストへの登録は別個の「はい/いいえ」の選択です。ユーザーは、評価を付ける前に、話し合いたいプロンプトをショートリストに登録できます。ショートリストボタンはaria-pressedで選択状態を示し、「追加」と「削除」のラベルを切り替えます。概要に表示する名前は、安定したトピックIDを格納したSetから取得します。
ステータス領域では、選択したプロンプトを説明しますが、コレクションがリモートに保存されたとは示しません。このサンプルはブラウザーを再読み込みするとクリアされます。実際に共有できる閲覧リストには、永続化、ユーザーID、競合処理が必要です。カードにクラスを追加するだけでは、そうした機能は実現できません。
関連する仕様を確認する
Fomantic UI デザインシステム:装飾的な星だけでなく数値としての意味も伝える
装飾的な星だけでなく数値としての意味も伝える
星のアイコンは支援技術から隠しています。親スライダーが数値とラベルを提示するためです。画面に表示される「未評価」または分数形式の出力によって、色付きのアイコンを数えることなく同じ意味を伝えられます。フォーカス時に見えるアウトラインでアクティブなスライダーを示し、「クリア」ボタンを押すと、そのコントロールにフォーカスが戻ります。
本の表紙を模した図形も装飾要素です。実際のプロンプトのタイトル、所要時間、説明はカード内のテキストとして表示されます。画面幅が狭い場合は、元の760pxのブレークポイントでカードを縦に並べます。この例では、コンパイル済みのbodyに適用されるビューポート高さをリセットし、横方向のオーバーフローを非表示にする設定を解除しています。これにより、埋め込み時にコンテンツの実際の高さが使われ、レイアウト上の問題が隠れません。
- 現在の数値は、テキストとアクセシブルな値の両方で示してください。
- クリア操作とショートリストの変更には、ネイティブのボタンを使用してください。
- グリッドが1列になっても、ラベルと説明全文を維持してください。
関連する仕様を確認する
Fomantic UI デザインシステム:フォントをスタイルと一緒に配置するか、バンドルする
フォントをスタイルとともに配布するか、バンドルする
通常のプロジェクトでは、semantic.cssだけを取り出してthemesアセットを忘れることのないよう、fomantic-ui-cssディレクトリ全体をコピーしてください。コンパイル済みスタイルは、相対パスでLatoとアイコンフォントのファイルを参照します。以下の設定ではそれらのパスを維持し、パッケージのモジュールより先にjQueryを読み込みます。
ローカルプレビューでは、必要なコンポーネントのスタイルとスクリプトだけを使い、参照されるアセットを1つのドキュメントに埋め込みます。外部フォントへのリクエストはありません。本番環境のバンドラーではアセットの処理方法が異なる場合がありますが、npm installが成功したからといって前提にせず、納品するページでフォントのパスとモジュールの読み込み順をテストする必要があります。
関連する仕様を確認する
Fomantic UI デザインシステムのコンポーネント例
3枚のカードで構成した読書用の棚
ネイティブのカード、ラベル、ボタン、ドロップダウンのマークアップ、評価コンテナ。
html
<main class="reading-room"><header><div><p class="kicker">FOMANTIC UI · READING ROOM</p><h1>Make a shelf worth returning to.</h1><p class="intro">Rate three original reading prompts and build a local discussion shortlist.</p></div><span class="ui teal basic label">Local collection</span></header><div class="toolbar"><label for="topic">Show topic</label><select id="topic" class="ui selection dropdown"><option value="all">All topics</option><option value="type">Typography</option><option value="space">Space & rhythm</option><option value="color">Color</option></select><span id="visible-count">3 prompts</span></div><div class="book-grid"><article class="ui fluid card" data-topic="type" data-name="Letters in the margins"><div class="book-cover type-cover" aria-hidden="true"><span>Aa</span><small>FORM / COUNTERFORM</small></div><div class="content"><div class="meta">TYPOGRAPHY · 18 MIN</div><h2 class="header">Letters in the margins</h2><div class="description">Compare a narrow editorial column with a generous display line. Find where the rhythm changes.</div></div><div class="content"><label class="rating-label" id="label-type">Your interest</label><div class="ui huge star rating" data-rating="0" data-max-rating="5" role="slider" tabindex="0" aria-labelledby="label-type" aria-valuemin="0" aria-valuemax="5" aria-valuenow="0"></div><output class="score">Not rated</output><button class="ui tiny basic button clear-rating" type="button">Clear rating</button></div><div class="extra content"><button class="ui fluid teal button shortlist" aria-pressed="false">Add to shortlist</button></div></article><article class="ui fluid card" data-topic="space" data-name="The space between"><div class="book-cover space-cover" aria-hidden="true"><span></span><span></span><span></span><small>PAUSE / SEQUENCE</small></div><div class="content"><div class="meta">SPACE & RHYTHM · 12 MIN</div><h2 class="header">The space between</h2><div class="description">Remove one element from a crowded page. Rebalance the remaining space without adding decoration.</div></div><div class="content"><label class="rating-label" id="label-space">Your interest</label><div class="ui huge star rating" data-rating="0" data-max-rating="5" role="slider" tabindex="0" aria-labelledby="label-space" aria-valuemin="0" aria-valuemax="5" aria-valuenow="0"></div><output class="score">Not rated</output><button class="ui tiny basic button clear-rating" type="button">Clear rating</button></div><div class="extra content"><button class="ui fluid teal button shortlist" aria-pressed="false">Add to shortlist</button></div></article><article class="ui fluid card" data-topic="color" data-name="A color and its neighbor"><div class="book-cover color-cover" aria-hidden="true"><span></span><span></span><small>CONTEXT / CONTRAST</small></div><div class="content"><div class="meta">COLOR · 15 MIN</div><h2 class="header">A color and its neighbor</h2><div class="description">Place the same accent on two backgrounds. Describe the shift before changing its value.</div></div><div class="content"><label class="rating-label" id="label-color">Your interest</label><div class="ui huge star rating" data-rating="0" data-max-rating="5" role="slider" tabindex="0" aria-labelledby="label-color" aria-valuemin="0" aria-valuemax="5" aria-valuenow="0"></div><output class="score">Not rated</output><button class="ui tiny basic button clear-rating" type="button">Clear rating</button></div><div class="extra content"><button class="ui fluid teal button shortlist" aria-pressed="false">Add to shortlist</button></div></article></div><section class="ui message summary"><h2 class="header">Discussion shortlist</h2><p id="summary" role="status">No prompts selected. Add one to begin.</p><p class="scope">Ratings and selections stay in this browser page. These are original prompts, not published books.</p></section></main>
コードリファレンス
- これらは演習用のオリジナルプロンプトであり、実在する本の表紙ではありません。
- 各評価には、固有のアクセシブルなラベルと数値範囲があります。
- ショートリスト操作ではaria-pressedを使用して状態を示します。
モジュールの初期化とローカルでの操作
ドロップダウンによる絞り込み、評価動作の呼び出し、キーボード操作の拡張、ショートリストの状態管理。
JavaScript
const cards=[...document.querySelectorAll('.book-grid article')],selected=new Set();
$('#topic').dropdown({onShow(){this.setAttribute('aria-expanded','true');},onHide(){this.setAttribute('aria-expanded','false');},onChange(value){let count=0;cards.forEach(card=>{card.hidden=value!=='all'&&card.dataset.topic!==value;if(!card.hidden)count++;});document.querySelectorAll('.toolbar .menu .item').forEach(item=>item.setAttribute('aria-selected',String(item.dataset.value===value)));document.querySelector('#visible-count').textContent=`${count} ${count===1?'prompt':'prompts'}`;}});
const dropdown=document.querySelector('.toolbar div.dropdown');dropdown.setAttribute('role','combobox');dropdown.setAttribute('aria-label','Show topic');dropdown.setAttribute('aria-expanded','false');dropdown.setAttribute('aria-haspopup','listbox');dropdown.querySelector('.menu').setAttribute('role','listbox');dropdown.querySelectorAll('.menu .item').forEach(item=>{item.setAttribute('role','option');item.setAttribute('aria-selected',String(item.dataset.value==='all'));});
$('.ui.rating').each(function(){const node=this,$rating=$(node);$rating.rating({maxRating:5,clearable:true,onRate(value){node.setAttribute('aria-valuenow',value);node.setAttribute('aria-valuetext',value?`${value} out of 5`:'Not rated');node.closest('article').querySelector('.score').textContent=value?`${value} / 5`:'Not rated';}});node.setAttribute('aria-valuetext','Not rated');node.querySelectorAll('.icon').forEach(i=>i.setAttribute('aria-hidden','true'));node.addEventListener('keydown',e=>{let value=Number($rating.rating('get rating'));if(['ArrowRight','ArrowUp'].includes(e.key))value=Math.min(5,value+1);else if(['ArrowLeft','ArrowDown'].includes(e.key))value=Math.max(0,value-1);else if(e.key==='Home')value=0;else if(e.key==='End')value=5;else return;e.preventDefault();$rating.rating('set rating',value);});node.closest('article').querySelector('.clear-rating').onclick=()=>{$rating.rating('clear rating');node.focus();};});
cards.forEach(card=>{card.querySelector('.shortlist').onclick=e=>{const id=card.dataset.topic,button=e.currentTarget;if(selected.has(id)){selected.delete(id);button.textContent='Add to shortlist';button.setAttribute('aria-pressed','false');}else{selected.add(id);button.textContent='Remove from shortlist';button.setAttribute('aria-pressed','true');}const names=cards.filter(c=>selected.has(c.dataset.topic)).map(c=>c.dataset.name);document.querySelector('#summary').textContent=names.length?`${names.length} selected: ${names.join('; ')}.`:'No prompts selected. Add one to begin.';};});
コードリファレンス
- このファイルより先に、jQueryとFomanticのモジュールを読み込んでください。
- 矢印キーによる変更にも、同じset ratingメソッドを使用します。
- 絞り込みでは、評価や選択状態を破棄せずにカードを非表示にします。
オリジナルの棚レイアウト
レスポンシブグリッド、カバーアート、明示的なフォーカス表示。
CSS
body{background:#f6f5f2}.reading-room{max-width:1120px;margin:auto;padding:36px 28px}.reading-room header{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:32px}.kicker{font-size:11px;letter-spacing:.14em;font-weight:700;color:#008c86}h1{font-size:34px;line-height:1.15;margin:12px 0}.intro{color:#666;font-size:15px;line-height:1.6}.toolbar{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin-bottom:24px;font-size:14px}.toolbar>label{font-weight:700}.toolbar>span{color:#767676;margin-left:auto}.book-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px;align-items:start}.book-grid>.ui.card{margin:0;height:100%}.book-grid>.ui.card[hidden]{display:none}.book-cover{height:175px;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center}.book-cover small{position:absolute;bottom:16px;left:18px;letter-spacing:.15em;font-size:9px;font-weight:700}.type-cover{background:#e2ccb0;color:#4a332a}.type-cover>span{font-family:Georgia,serif;font-size:90px;line-height:1}.space-cover{background:#ccd7d5;gap:10px}.space-cover>span{height:65px;width:25px;background:#3c6763}.space-cover>span:nth-child(2){height:90px;width:45px}.color-cover{background:#dcb9b0}.color-cover>span{width:85px;height:85px;background:#a85243}.color-cover>span:nth-child(2){width:50px;height:50px;border-radius:50%;background:#e6c57c;position:absolute}.book-grid .description{font-size:14px;line-height:1.6;min-height:88px}.rating-label{display:block;font-size:12px;font-weight:bold;margin-bottom:10px}.score{display:block;font-size:12px;color:#666;margin:8px 0 12px}.clear-rating{margin-bottom:0!important}.book-grid .ui.rating:focus-visible{outline:3px solid #00b5ad;outline-offset:4px}.summary{margin-top:28px!important}.scope{font-size:12px;color:#666}button:focus-visible{outline:3px solid #00b5ad!important;outline-offset:3px}@media(max-width:760px){.reading-room{padding:24px 18px}.reading-room header{flex-direction:column;gap:8px}h1{font-size:29px}.book-grid{grid-template-columns:1fr}.book-grid .description{min-height:0}.book-cover{height:155px}.toolbar>span{width:100%;margin-left:0}.toolbar .dropdown{min-width:180px}}
html,body{height:auto;min-height:0}body{min-width:0;overflow-x:visible}
コードリファレンス
- 埋め込み時は、コンパイル済みサイトの既定値height:100%をautoにリセットします。
- レイアウトの問題を隠すために、bodyのオーバーフロー設定を利用することはありません。
04Fomantic UI デザインシステムのエージェント設定
実装の出発点
Fomantic UI 2.9.4とjQuery 3.7.1で動作確認済みです。単体の例では必要なフォントアセットを埋め込み、通常の設定ではパッケージ相対のパスを維持します。HTMLラッパーにはbody全体のマークアップを含めます。付属の操作例とCSSの例は、ここで参照しているファイル名で保存してください。
html
<!-- npm install [email protected] [email protected] -->
<!-- Copy node_modules/fomantic-ui-css into public/vendor/fomantic-ui-css. -->
<!-- Copy node_modules/jquery/dist/jquery.min.js into public/vendor/jquery.min.js. -->
<link rel="stylesheet" href="/vendor/fomantic-ui-css/semantic.min.css">
<link rel="stylesheet" href="style.css">
<main class="reading-room"><header><div><p class="kicker">FOMANTIC UI · READING ROOM</p><h1>Make a shelf worth returning to.</h1><p class="intro">Rate three original reading prompts and build a local discussion shortlist.</p></div><span class="ui teal basic label">Local collection</span></header><div class="toolbar"><label for="topic">Show topic</label><select id="topic" class="ui selection dropdown"><option value="all">All topics</option><option value="type">Typography</option><option value="space">Space & rhythm</option><option value="color">Color</option></select><span id="visible-count">3 prompts</span></div><div class="book-grid"><article class="ui fluid card" data-topic="type" data-name="Letters in the margins"><div class="book-cover type-cover" aria-hidden="true"><span>Aa</span><small>FORM / COUNTERFORM</small></div><div class="content"><div class="meta">TYPOGRAPHY · 18 MIN</div><h2 class="header">Letters in the margins</h2><div class="description">Compare a narrow editorial column with a generous display line. Find where the rhythm changes.</div></div><div class="content"><label class="rating-label" id="label-type">Your interest</label><div class="ui huge star rating" data-rating="0" data-max-rating="5" role="slider" tabindex="0" aria-labelledby="label-type" aria-valuemin="0" aria-valuemax="5" aria-valuenow="0"></div><output class="score">Not rated</output><button class="ui tiny basic button clear-rating" type="button">Clear rating</button></div><div class="extra content"><button class="ui fluid teal button shortlist" aria-pressed="false">Add to shortlist</button></div></article><article class="ui fluid card" data-topic="space" data-name="The space between"><div class="book-cover space-cover" aria-hidden="true"><span></span><span></span><span></span><small>PAUSE / SEQUENCE</small></div><div class="content"><div class="meta">SPACE & RHYTHM · 12 MIN</div><h2 class="header">The space between</h2><div class="description">Remove one element from a crowded page. Rebalance the remaining space without adding decoration.</div></div><div class="content"><label class="rating-label" id="label-space">Your interest</label><div class="ui huge star rating" data-rating="0" data-max-rating="5" role="slider" tabindex="0" aria-labelledby="label-space" aria-valuemin="0" aria-valuemax="5" aria-valuenow="0"></div><output class="score">Not rated</output><button class="ui tiny basic button clear-rating" type="button">Clear rating</button></div><div class="extra content"><button class="ui fluid teal button shortlist" aria-pressed="false">Add to shortlist</button></div></article><article class="ui fluid card" data-topic="color" data-name="A color and its neighbor"><div class="book-cover color-cover" aria-hidden="true"><span></span><span></span><small>CONTEXT / CONTRAST</small></div><div class="content"><div class="meta">COLOR · 15 MIN</div><h2 class="header">A color and its neighbor</h2><div class="description">Place the same accent on two backgrounds. Describe the shift before changing its value.</div></div><div class="content"><label class="rating-label" id="label-color">Your interest</label><div class="ui huge star rating" data-rating="0" data-max-rating="5" role="slider" tabindex="0" aria-labelledby="label-color" aria-valuemin="0" aria-valuemax="5" aria-valuenow="0"></div><output class="score">Not rated</output><button class="ui tiny basic button clear-rating" type="button">Clear rating</button></div><div class="extra content"><button class="ui fluid teal button shortlist" aria-pressed="false">Add to shortlist</button></div></article></div><section class="ui message summary"><h2 class="header">Discussion shortlist</h2><p id="summary" role="status">No prompts selected. Add one to begin.</p><p class="scope">Ratings and selections stay in this browser page. These are original prompts, not published books.</p></section></main>
<script src="/vendor/jquery.min.js"></script>
<script src="/vendor/fomantic-ui-css/components/transition.min.js"></script>
<script src="/vendor/fomantic-ui-css/components/dropdown.min.js"></script>
<script src="/vendor/fomantic-ui-css/components/rating.min.js"></script>
<script src="app.js"></script>
<!-- Keep the themes/ assets beside the copied CSS. -->
あなたのプロジェクト向けプロンプト
AI エージェント用プロンプト
Fomantic UI 2.9.4 の読書室ショートリストを拡張し、指定された jQuery モジュールの初期化、Dropdown と Rating コンポーネントを使用してください。3つの読書プロンプトと評価状態を維持し、ローカルのショートリスト機能を表示中のカードに連動させてください。評価コントロールに追加された明示的なキーボード操作とスライダーのセマンティクス、および対応するテーマ/アイコンアセットも保持してください。ショートリストでは重複追加を防ぎ、現在の内容をわかりやすく表示してください。サポートチケットのワークフローやリモートのおすすめサービスではありません。
05Fomantic UI デザインシステムのソースと対象範囲
Fomantic UI 2.9.4 と jQuery 3.7.1。テーマの値はコンパイル済みのデフォルトです。オリジナルの表紙アートワークとキーボード操作の拡張を明記しています。選択内容はすべてローカルに保存されます。