Skip to content
Snippets Groups Projects
Commit 83ad8846 authored by Jennifer Mankoff's avatar Jennifer Mankoff
Browse files

added ability to collapse headers

parent 62877353
No related branches found
No related tags found
6 merge requests!12Accessibility website jen summer work,!9Q access 24 sp,!8Q access 24 sp,!5Latest update from Spring 2023,!4Latest update after pmp class,!3Updated content for week 3 and week 4 (week 4 still needs work)
# _plugins/details_tag.rb -- copied from http://movb.de/jekyll-details-support.html
module Jekyll
module Tags
class DetailsTag < Liquid::Block
def initialize(tag_name, markup, tokens)
super
@caption = markup
end
def render(context)
site = context.registers[:site]
converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
# below Jekyll 3.x use this:
# converter = site.getConverterImpl(::Jekyll::Converters::Markdown)
caption = converter.convert(@caption).gsub(/<\/?p[^>]*>/, '').chomp
body = converter.convert(super(context))
"<details><summary>#{caption}</summary>#{body}</details>"
end
end
end
end
Liquid::Template.register_tag('details', Jekyll::Tags::DetailsTag)
......@@ -13,9 +13,22 @@ $lab-background:#d8e6c9;
$background: #d8e6c9;
$highlight-dark: red;
$highlight-light: lightcoral;
$break-color: #ddeeee;
$activity-color: #f0f4f2;
$highlight-darkest: #660000;
$white: white;
details {
summary {
font-weight:bold;
font-size: large;
background-color: $background;
color: $dark-color;
padding:5px;
}
padding:1em;
}
a {
color: $link-color;
}
......@@ -115,6 +128,41 @@ dl dt.lecture {
margin-top: 1em !important;
}
dl dt.homework {
&::before {
font-family: FontAwesome;
font-size: 1.2em;
content: "\e066";
float: left;
margin-right: 0.4em;
}
style:bold;
font-size: large;
background-color: $activity-color;
color: $dark-color;
padding:5px;
margin-top: 1em !important;
margin-left: 1em !important;
}
dl dt.activity {
style:bold;
font-size: large;
background-color: $activity-color;
color: $dark-color;
padding:5px;
margin-top: 1em !important;
}
dl dt.break {
style:bold;
font-size: large;
background-color: $break-color;
color: $dark-color;
padding:5px;
margin-top: 1em !important;
}
dl dt.demonstration {
style:bold;
font-size: large;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment