Skip to content

Commit

Permalink
deploy: 2ea5c5d
Browse files Browse the repository at this point in the history
  • Loading branch information
yasulab committed Feb 5, 2025
1 parent efdcae9 commit 3bacad4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
11 changes: 11 additions & 0 deletions assets/js/simple-jekyll-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,11 +374,22 @@ var _$src_8 = {};
}

function initWithURL (url) {
//_$JSONLoader_2.load(url, function (err, json) {
// if (err) {
// throwError('failed to get JSON (' + url + ')')
// }
// initWithJSON(json)
//})
_$JSONLoader_2.load(url, function (err, json) {
if (err) {
throwError('failed to get JSON (' + url + ')')
}
initWithJSON(json)

// JSONの読み込み完了後に success コールバックを呼び出す
if (typeof options.success === 'function') {
options.success.call({ search: search });
}
})
}

Expand Down
2 changes: 1 addition & 1 deletion feed.xml

Large diffs are not rendered by default.

21 changes: 13 additions & 8 deletions projects/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,21 @@
resultsContainer: document.getElementById('search-results'),
json: '/projects/search.json',
limit: 20,
success: true,

// JSONの読み込み完了後に success コールバック内で検索処理を実行する
success: function() {
const queryParamValue = getQueryParam('q');
if (queryParamValue) {
//setInputValue('search-input', queryParamValue);
document.getElementById('search-input').value = queryParamValue;
this.search(queryParamValue);
}
},

exclude: ['assets', 'img', 'webp', 'projects'],
searchResultTemplate: '<li><img class="lazyload" data-src="{thumbnail}" loading="lazy"><a href="{permalink}">{title}</a> <small>by {creators} / {mentor}PM</small><br><code>{description}</code></li>',
noResultsText: '検索結果が見つかりませんでした。',
debounceTime: 20
// debounceTime: 400,
noResultsText: '検索結果が見つかりませんでした。'
});

function getQueryParam(name) {
Expand Down Expand Up @@ -83,11 +93,6 @@
handleClick();
});
}

const queryParamValue = getQueryParam('q');
if (queryParamValue) {
setInputValue('search-input', queryParamValue);
}
});

</script> </div> </div> </div> <footer> <a hreflang="ja" href="/">ホーム</a> <a hreflang="ja" href="/about">未踏ジュニアとは</a> <a hreflang="ja" href="/news">お知らせ一覧</a> <a hreflang="ja" href="/guideline">応募の手引き</a> <a hreflang="ja" href="/applications">提案書ダウンロード</a> <a hreflang="ja" href="/projects">採択プロジェクト一覧</a> <a hreflang="ja" href="/projects/showcase">採択プロジェクト図鑑</a> <a hreflang="ja" href="/projects/search">採択プロジェクト検索</a> <a hreflang="ja" href="/interviews">修了生インタビュー</a> <a hreflang="ja" href="/mentors">メンター紹介</a> <a hreflang="ja" href="/#faq">よくある質問</a> <a hreflang="ja" href="/q-box">匿名質問箱</a> <a hreflang="ja" href="/#contact">問い合わせ</a> <a hreflang="ja" href="/stats">統計情報</a> <a hreflang="ja" href="/opportunities">他の支援プログラム</a> <a hreflang="ja" href="/admissions">大学と未踏ジュニア</a> <a hreflang="ja" href="/#sponsors">スポンサー</a> <a hreflang="ja" href="/flyers">チラシ</a> <a hreflang="ja" href="/privacy">プライバシーポリシー</a> <a hreflang="en" href="/english">English</a> <div class="sns"> <a href="https://twitter.com/mitoujr"><i class="fab fa-twitter"></i></a> <a href="https://facebook.com/mitoujr"><i class="fab fa-facebook"></i></a> <a href="https://github.com/mitou/jr.mitou.org"><i class="fab fa-github"></i></a> <a href="https://anchor.fm/mitoujr"><i class="fab fa-spotify"></i></a> <a href="https://youtube.com/mitoujr"><i class="fab fa-youtube"></i></a> </div> <span class="copyright">Copyright &copy; <a href='/#organizer' style='padding: 0 0 0 0; color: #666; font-weight: lighter;'>未踏社団</a> 未踏ジュニア実行委員会 </span> </footer> <script src="/assets/js/lazysizes.min.js" async=""></script> </body> </html>
2 changes: 1 addition & 1 deletion sitemap.xml

Large diffs are not rendered by default.

0 comments on commit 3bacad4

Please sign in to comment.