forked from jbosstools/jbosstools-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html.haml
95 lines (81 loc) · 2.55 KB
/
index.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
layout: project
tab: home
title: Home
---
.row-fluid
.hero-unit.hidden-phone
%img{:alt => "JBoss Tools", :src => relative("/images/tools/jbt-carousel-jaxrs.png")}
.hero-content
%h1
JBoss Tools
%h2
Eclipse Plugins for
JBoss Technology
%p
%a.btn.btn-primary.btn-large{:href => relative("/downloads")}
%i.icon-download
Download
.row-fluid
%hr
#sections.row-fluid
%section.span4
- feature = site.features.values.find_all{|feature| feature.highlighted == true}.first
- if feature != nil
%header
%h3
%i.icon-magic
%a{:href=>relative(feature.url)} Feature Highlight
.item.center
%span.tagline
%a{:href=>relative(feature.url)}
#{feature.tagline}
%a.block{:href=>relative(feature.url)}
%img{:src=>relative(feature.image_url)}
%section.span4
%header
%h3
%i.icon-pencil
%a{:href => relative("/blog")} Latest posts
- posts = site.posts
- today = Time.now
- posts = posts.find_all{|item| item.date.strftime("%Y%m%d") <= today.strftime("%Y%m%d")}
- posts = posts.sort{|l,r| r.date <=> l.date}.first(2)
- for post in posts
.post
.title-wrapper
%img.img-polaroid{:src => "#{site.team[post.author].photo_32px}"}
.title
%h4
%a{:href=>relative(post.url)}= post.title
.author
/there is only one author per post but the author splitter adds an array here
posted by
%strong< #{site.team[post.author].name}
on
%strong< #{post.date.strftime( '%b %d, %Y' )}.
.footer.right
%a.btn.btn-small{:href=>relative(post.url)}
Read more »
%hr
%section.span4
%header
%h3
%i.icon-globe
%a{:href => relative("/events")} Upcoming Events
- events = site.events
- now = Time.now
- a_few_days_ago = now - 4 * 24 * 60 * 60
- events = events.find_all{|item| item.effective_date.to_s >= a_few_days_ago.strftime("%Y%m%d")}
- events = events.sort{|l,r| l.effective_date <=> r.effective_date}.first(3)
- for event in events
.item.justify
%h4
%a{:href=>relative(event.output_path)} #{event.title}
%strong
#{event.event_date}
in
#{event.location}
.footer.right
%a.btn.btn-small{:href=>relative(event.output_path)}
Read more »