mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
project widget: Fix long title appearing on new line (Fix #324)
* Only affects simple list mode, not card mode
This commit is contained in:
parent
3b58e38c5b
commit
b1c975fa4c
3 changed files with 28 additions and 28 deletions
|
@ -667,7 +667,6 @@ article {
|
|||
}
|
||||
|
||||
#projects.home-section .project-title {
|
||||
display: inline-block;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
{{ if eq $page.Params.view 0 }}
|
||||
|
||||
<div class="row isotope projects-container">
|
||||
<div class="row isotope projects-container js-layout-row">
|
||||
{{ range where $.Site.RegularPages "Type" "project" }}
|
||||
<div class="col-md-12 project-item isotope-item {{ delimit .Params.tags " " }}" itemscope itemtype="http://schema.org/CreativeWork">
|
||||
<i class="fa fa-files-o pub-icon" aria-hidden="true"></i>
|
||||
|
@ -52,7 +52,7 @@
|
|||
|
||||
{{ else }}
|
||||
|
||||
<div class="row isotope projects-container">
|
||||
<div class="row isotope projects-container js-layout-masonry">
|
||||
|
||||
{{ range $project := where $.Site.RegularPages "Type" "project" }}
|
||||
{{ $.Scratch.Set "project_url" $project.Permalink }}
|
||||
|
|
|
@ -97,31 +97,6 @@
|
|||
}
|
||||
});
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Filter projects.
|
||||
* --------------------------------------------------------------------------- */
|
||||
|
||||
$('.projects-container').each(function(index, container) {
|
||||
let $container = $(container);
|
||||
let $section = $container.closest('section');
|
||||
|
||||
$container.imagesLoaded(function() {
|
||||
// Initialize Isotope after all images have loaded.
|
||||
$container.isotope({
|
||||
itemSelector: '.isotope-item',
|
||||
layoutMode: 'masonry',
|
||||
filter: $section.find('.default-project-filter').text()
|
||||
});
|
||||
// Filter items when filter link is clicked.
|
||||
$section.find('.project-filters a').click(function() {
|
||||
let selector = $(this).attr('data-filter');
|
||||
$container.isotope({filter: selector});
|
||||
$(this).removeClass('active').addClass('active').siblings().removeClass('active all');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/* ---------------------------------------------------------------------------
|
||||
* Filter publications.
|
||||
* --------------------------------------------------------------------------- */
|
||||
|
@ -262,6 +237,32 @@
|
|||
resizeTimer = setTimeout(fixScrollspy, 200);
|
||||
});
|
||||
|
||||
// Filter projects.
|
||||
$('.projects-container').each(function(index, container) {
|
||||
let $container = $(container);
|
||||
let $section = $container.closest('section');
|
||||
let layout = 'masonry';
|
||||
if ($section.find('.isotope').hasClass('js-layout-row')) {
|
||||
layout = 'fitRows';
|
||||
}
|
||||
|
||||
$container.imagesLoaded(function() {
|
||||
// Initialize Isotope after all images have loaded.
|
||||
$container.isotope({
|
||||
itemSelector: '.isotope-item',
|
||||
layoutMode: layout,
|
||||
filter: $section.find('.default-project-filter').text()
|
||||
});
|
||||
// Filter items when filter link is clicked.
|
||||
$section.find('.project-filters a').click(function() {
|
||||
let selector = $(this).attr('data-filter');
|
||||
$container.isotope({filter: selector});
|
||||
$(this).removeClass('active').addClass('active').siblings().removeClass('active all');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Enable publication filter for publication index page.
|
||||
if ($('.pub-filters-select')) {
|
||||
filter_publications();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue