Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0233/title-comment] コメント文をタイトルに表示する機能を実装 #734

Merged
merged 3 commits into from
Jun 13, 2020

Conversation

cwtickle
Copy link
Owner

@cwtickle cwtickle commented Jun 13, 2020

変更内容

  1. コメント文をタイトルに表示する機能を実装しました。
    譜面内に下記のように記載することでコメントエリアがタイトル画面に表示され、
    その中にコメントが表示されます。
    改行すると<br>タグが自動で付加される仕様です。タグも使用可能にしています。
|commentVal=
このような形で
コメントを入れます。
<img src="image.png" alt="画像タグや"><a href="index.html">リンクも可能です。</a>
|
  1. 自動で<br>を入れたくない場合は下記のように指定できるようにしました。
    ※デフォルトはtrue(自動改行タグ挿入が有効)です。
|commentAutoBr=false|
  1. コメントをタイトル画面からのボタンではなく、
    ダンおに本体の外部に置きたい場合は下記の譜面ヘッダーを指定します。
    ※デフォルトはfalse(コメントをタイトル画面内に配置する)です。
|commentExternal=true|

外部化する場合、html側で次の指定を行います。
指定した箇所が、コメント部に置き換えられます。

<span id="commentArea"></span> ※divタグでも問題ありません。

変更理由

  1. コメント表示を手軽に載せる需要より。
  2. 移植等で、すでに<br>を入れている可能性があるため。
  3. html本体を簡素化し、譜面本体で制御できるようにするため。

その他コメント

  • 特殊文字はWikiを参考にエスケープが必要です。
    (特にシングルクォート、バッククォートには要注意)
    ダブルクォートは譜面データの区切り文字には使用されていないため、必須ではありません。

@cwtickle
Copy link
Owner Author

取り急ぎ、下記の作品レベルの実装まで完了しました。
https://cw7.sakura.ne.jp/danoni/2020/0001_Positive3rdShort_ev.html

@cwtickle
Copy link
Owner Author

コメントエリアの背景・テキスト文は固定色になっています。
今後どうするかは引き続き検討します。

@cwtickle cwtickle marked this pull request as ready for review June 13, 2020 02:26
@codeclimate
Copy link

codeclimate bot commented Jun 13, 2020

Code Climate has analyzed commit 289e959 and detected 0 issues on this pull request.

View more on Code Climate.

@cwtickle cwtickle merged commit 894360a into develop Jun 13, 2020
@cwtickle cwtickle deleted the feature/0233-title-comment branch June 18, 2020 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant