ヘッダーの背景に画像を設定
Posted in: テンプレート
とくに珍しくないことですが、ヘッダー画像を設定できるようにしました。
せっかくなので、これも継承して試しました。
// index.html @extends("/layouts/base.html") @section(head-link) @parent <!-- BEGIN_MODULE Blog_Field --> <!-- BEGIN_IF [{bg-jumbotron@path}/nem] --> <style> .jumbotron { background-image: url("%{HTTP_ARCHIVES_DIR}{bg-jumbotron@path}"); background-repeat: no-repeat; background-position: center center; background-size: cover; } </style> <!-- ELSE --> <!-- END_IF --> <!-- END_MODULE Blog_Field --> @endsection @section(aside) @parent @include("/include/category/list.html", {"module_id": "categoryList"}) @include("/include/parts/Api_Twitter_Search.html", {"module_id": "acmscamp"}) @endsection