diff --git a/config.toml b/config.toml index f3a3087..7340319 100644 --- a/config.toml +++ b/config.toml @@ -15,11 +15,11 @@ pluralizeListTitles = false seo_title_suffix = " | The Eclipse Foundation" keywords = ["Cloud developer tools", "Cloud-based developer tools", "Cloud native applications","Open source", "Vendor-neutral", "Multi-language support", "Extensions", "Marketplaces", "Developer workspace", "In-browser IDE", "Building", "Testing", "Debugging", "Industry collaboration"] logo = "images/ecdtools/ecdtools-logo.svg" - styles = "css/styles.css?v1.1" + styles = "css/styles.css?v1.2" favicon = "images/ecdtools/favicon/favicon.ico" share_img = "images/ecdtools/ecdtools-social-share.png" gcse = "" - js = "js/solstice.js" + js = "js/solstice.js?v1.0" header_wrapper_class = " featured-section-darken" logo_width = "250" header_left_classes = "col-sm-7" diff --git a/content/_index.md b/content/_index.md index c361d1b..6ac4eb7 100644 --- a/content/_index.md +++ b/content/_index.md @@ -15,7 +15,14 @@ container: "container-fluid" header_wrapper_class: "featured-jumbotron-home" --- {{< home/powered-by >}} -{{< home/highlights >}} + +{{< home/highlights + id="featured-story-container" + publishTarget="ecd_tools" + templateId="featured-story-custom" + count="5" + templatePath="/js/templates/featured-story-custom.mustache" >}} + {{< home/projects highlight="ecd.openvsx:ecd.theia:ecd.jkube">}} {{< home/whats-new >}} {{< home/stats >}} diff --git a/js/main.js b/js/main.js index 9e4ba05..5077786 100644 --- a/js/main.js +++ b/js/main.js @@ -18,13 +18,27 @@ import './src/eclipseApi' import 'jquery-parallax.js/parallax.min.js' import './src/parallax' +const solsticeSliderHome = () => { + var owl = $('.solstice-slider-home'); + owl.owlCarousel({ + items:1, + autoplay:true, + autoplayTimeout:6000, + autoplayHoverPause:true, + autoplaySpeed: 2000, + loop:true, + }); +} -var owl = $('.solstice-slider-home'); -owl.owlCarousel({ - items:1, - autoplay:true, - autoplayTimeout:6000, - autoplayHoverPause:true, - autoplaySpeed: 2000, - loop:true, +$(window).on("load", function() { + solsticeSliderHome(); +}); + + + +$("body").on("shown.ef.featured_story", function(e) { + var owl = $('.solstice-slider-home'); + owl.trigger('destroy.owl.carousel'); + solsticeSliderHome(); + owl.trigger('refresh.owl.carousel'); }); \ No newline at end of file diff --git a/js/src/eclipseApi.js b/js/src/eclipseApi.js index 000cd64..e3bd2b1 100644 --- a/js/src/eclipseApi.js +++ b/js/src/eclipseApi.js @@ -19,6 +19,9 @@ const EclipseApi = (function($, document) { $("#event-list-container").eclipseFdnApi({ type: "filteredEvents" }); + $("#featured-story-custom").eclipseFdnApi({ + type: "featuredStory" + }); })(jQuery, document); export default EclipseApi; \ No newline at end of file diff --git a/js/templates/featured-story-custom.mustache b/js/templates/featured-story-custom.mustache new file mode 100644 index 0000000..7c0317c --- /dev/null +++ b/js/templates/featured-story-custom.mustache @@ -0,0 +1,26 @@ +{{#featuredStory}} +
+
+
+ {{ #image }} +
+
+ {{ title }} +
+
+ {{ /image }} +
+
+

{{ title }}

+

{{ body }}

+
+
+
+ +
+
+{{/featuredStory}} \ No newline at end of file diff --git a/layouts/shortcodes/home/highlights.html b/layouts/shortcodes/home/highlights.html index 485b211..264b6d3 100644 --- a/layouts/shortcodes/home/highlights.html +++ b/layouts/shortcodes/home/highlights.html @@ -10,33 +10,22 @@ SPDX-License-Identifier: EPL-2.0 --> +{{ $id := .Get "id" | default "featured-story-container" }} +{{ $templateId := .Get "templateId" }} +{{ $templatePath := .Get "templatePath" }} +{{ $publishTarget := .Get "publishTarget" }} +{{ $count := .Get "count" }} +{{ if and $templateId $templatePath }} + {{ .Page.Scratch.SetInMap "mustache-templates" $templateId $templatePath }} +{{ end }} -