-
Notifications
You must be signed in to change notification settings - Fork 2
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
仮サイトをelm-pagesに移行する #21
Conversation
確認ありがとうございます。 f282d1e にて修正しました。
全てが揃っている必要はないのですが、アンバランスに見えるところは調整したくなりますね。 既存デザインの刷新は後続のPRで取り組みましょう! |
app/Route/Index.elm
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
サイトのトップページの内容はこのファイルに記述します。
今は静的なページが出力できれば良いので view
のみ。
動的に動かす際には Model
や Msg
を定義してページ単位のアプリケーションとして機能します(The Elm Architecture)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
行動規範ページの内容はこのファイルに記述します。
elm-pagesでのFile-Based Routingについては、 https://elm-pages.com/docs/file-based-routing を参照してください。
] | ||
] | ||
, block "本文" | ||
[ p [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コンテンツ部分はHugoでの記述を引き継ぐ形でHTMLを記述しています。
後続のPRでMarkdownでの記述をサポート予定です。
-> (Msg -> msg) | ||
-> View msg | ||
-> { body : List (Html msg), title : String } | ||
view sharedData page model toMsg pageView = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
各ページに共通するものは、この Shared
モジュールに記述します。
現時点では、この部分でviewの共通レイアウトを定義するのみ。
ダークモードや他言語対応などをサポートする場合には、この Shared
モジュールで実装することになります。
elm.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elmのパッケージ(=ライブラリ)は Elm Packages に公開されています。
このファイルで使用するパッケージを管理します。
npx elm install elm/html
のようにしてインストール可能。
インストールが完了すると、ここに記述が増えます。
style.css
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
現時点ではCSSファイルにスタイルを記述しています。
PRチームのMTGにて CSS in JS に準じた手法の採用が決まったので、後続PRで作業予定。
https://package.elm-lang.org/packages/rtfeldman/elm-css/latest/ を使います。
メモ:
|
マージしてみます。 |
PRチームにて、Webサイトでの elm-pages の採用が決まったので、実際に elm-pages を使った実装に置き換えます。