just keep the first three events in the front page, so that events can be shown in full only in the events page
just keep the first three events in the front page, so that events can be shown in full only in the events page

layout 'layouts/main.groovy',
        menu: menu,
        category: category,
        allEvents: allEvents,
        pageTitle: 'The Groovy programming language',
        mainContent: contents {
            div(id: 'band', class: 'band') {

            }
            div(id: 'content') {
                include unescaped: 'html/index.html'

                section(class: "row colset-3-article") {
                    h1 { strong "Groovy events you shouldn't miss!" }
                    allEvents.keySet().take(3).each { String eventName ->
                        Event event = allEvents[eventName]
                        article {
                            div(class: 'content') {
                                div(class: 'event-img', style: "background-image: url(${event.logo})") {}
                                h1 {
                                    a(href: event.url) {
                                        strong eventName
                                        br()
                                        em event.location
                                    }
                                }
                                time event.date
                                yieldUnescaped event.description
                            }
                        }
                    }
                }
            }
            include unescaped: 'html/they-use-groovy.html'
        }

layout 'layouts/main.groovy',
        menu: menu,
        category: category,
        allEvents: allEvents,
        pageTitle: 'The Groovy programming language',
        mainContent: contents {
            div(id: 'band', class: 'band') {

            }
            div(id: 'content') {
                include unescaped: 'html/index.html'
//                include unescaped: 'html/next-events.html'

                boolean titleDisplayed = false
                allEvents.keySet().toList().collate(3).each { List<String> eventNames ->
                    section(class: "row colset-3-article") {
                        if (!titleDisplayed) {
                            h1 { strong "Groovy events you shouldn't miss!" }
                            titleDisplayed = true
                        }
                        eventNames.each { String eventName ->
                            Event event = allEvents[eventName]
                            article {
                                div(class: 'content') {
                                    div(class: 'event-img', style: "background-image: url(${event.logo})") {}
                                    h1 {
                                        a(href: event.url) {
                                            strong eventName
                                            br()
                                            em event.location
                                        }
                                    }
                                    time event.date
                                    yieldUnescaped event.description
                                }
                            }
                        }
                    }
                }
            }
            include unescaped: 'html/they-use-groovy.html'
        }
