diff --git a/Gemfile b/Gemfile
index 534d2f7..550a888 100644
--- a/Gemfile
+++ b/Gemfile
@@ -11,6 +11,7 @@ gem 'pry-byebug'
gem 'actionmailer'
gem 'icalendar'
+gem 'redcarpet'
gem 'tzinfo-data', platforms: %i[mswin mingw jruby]
gem 'wdm', platforms: %i[mswin mingw]
diff --git a/Gemfile.lock b/Gemfile.lock
index d1f66cc..299785a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -157,6 +157,7 @@ GEM
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
+ redcarpet (3.4.0)
sass (3.4.25)
servolux (0.13.0)
sprockets (3.7.1)
@@ -185,6 +186,7 @@ DEPENDENCIES
middleman-livereload
middleman-sprockets
pry-byebug
+ redcarpet
tzinfo-data
wdm
diff --git a/source/index.html.erb b/source/index.html.erb
index 510fccc..229953a 100644
--- a/source/index.html.erb
+++ b/source/index.html.erb
@@ -1,4 +1,8 @@
<%
+ require 'redcarpet'
+ render = Redcarpet::Render::HTML
+ markdown = Redcarpet::Markdown.new render, autolink: true
+
planning = YAML.load File.read File.join Middleman::Application.root, 'config/current.yml'
def parse_time(time)
@@ -62,7 +66,10 @@
<%= event[:author] %>
- <%= event[:description] %>
+ <%=
+ description = event[:description]
+ markdown.render description if description
+ %>
<% end %>
<% end %>
diff --git a/source/javascripts/site.js.coffee b/source/javascripts/site.js.coffee
index 67fedfc..626714e 100644
--- a/source/javascripts/site.js.coffee
+++ b/source/javascripts/site.js.coffee
@@ -130,8 +130,8 @@ class Modal
@header.querySelector('.title').textContent = title
author = @event.querySelector('.author').textContent
@header.querySelector('.author').textContent = author
- description = @event.querySelector('.description').textContent
- @body.textContent = ''
+ description = @event.querySelector('.description').innerHTML
+ @body.innerHTML = ''
@modal.classList.remove 'transition'
@act [
@@ -144,7 +144,7 @@ class Modal
],
[20, =>
@transition @modal, null, =>
- @body.textContent = description
+ @body.innerHTML = description
@modal.style.top = "#{modal.top}px"
@modal.style.left = "#{modal.left}px"
@@ -163,7 +163,7 @@ class Modal
@transition @modal, null, =>
@modal.classList.add 'hidden'
- @body.textContent = ''
+ @body.innerHTML = ''
@start()
]
]