Mortenson Components
Components used for the mortenson.coffee site. Note that listing and listing page components aren't shown as they can be quite long.
mc_header
The header of the site.
Available context
node
The current node, if available.
is_front
If the current path is the front page.
Example usage
Basic usage
Note that the "Back" link changes based on the current node.
{% include "sfc--mc-header" %}
Displaying on the front page
{% include "sfc--mc-header" with {"is_front": 1} %}
Samuel
Mortenson
mc_about
The static about section of the homepage.
Example usage
Basic usage
{% include "sfc--mc-about" %}
You can call me Sam. I live in Portland, Oregon and spend a lot of time on the internet. I like web development, security research, and games. I did Drupal for a long time, but am trying my hand at security engineering now.

mc_footer
The footer of the site.
Example usage
Basic usage
{% include "sfc--mc-footer" %}
mc_blog_teaser
A teaser used when listing blogs.
Available context
title_element
The element to wrap the title in. Defaults to "h2".
title
The teaser title.
text
The teaser text.
link
Where the teaser should link to.
Example usage
Basic usage
{% include "sfc--mc-blog-teaser" with {
"title": "My great blog post",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"link": "https://google.com",
} %}
mc_gallery_teaser
A teaser used when listing gallery items.
Available context
title_element
The element to wrap the title in. Defaults to "h2".
title
The teaser title.
link
Where the teaser should link to.
image
HTML for an image.
Example usage
Basic usage
{% include "sfc--mc-gallery-teaser" with {
"title": "My great gallery item",
"image": drupal_image('public://2020-02/blueberry.jpg', 'gallery_teaser_wide', responsive=true),
"link": "https://google.com",
} %}
mc_work_teaser
A teaser used when listing work. Expects to be on a dark background.
Available context
title_element
The element to wrap the title in. Defaults to "h2".
title
The teaser title.
subtitle
The teaser subtitle.
text
The teaser text.
link
Where the teaser should link to.
image
HTML for an image.
Example usage
Basic usage
{% include "sfc--mc-work-teaser" with {
"title": "My great work post",
"subtitle": "This is great",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"link": "https://google.com",
"image": drupal_image('public://work/2-0010.jpg', 'work_teaser', responsive=true),
} %}
mc_blog_title
A flexible blog title used across listings and full pages.
Available context
element
The title element. Defaults to "h1".
title
The title text.
Example usage
Basic usage
{% include "sfc--mc-blog-title" with {"title": "My great blog"} %}
My great blog
mc_work_title
A flexible work title used across listings and full pages.
Available context
element
The title element. Defaults to "h1".
title
The title text.
subtitle
The subtitle.
align
The alignment for the title, either "right" or "left". Default to "left".
Example usage
Basic usage
{% include "sfc--mc-work-title" with {"title": "My great work", "subtitle": "And more..."} %}
My great work
And more...
Right alignment
{% include "sfc--mc-work-title" with {"title": "My great work", "subtitle": "And more...", "align": "right"} %}
My great work
And more...
mc_gallery_title
A flexible gallery title used across listings and full pages.
Available context
element
The title element. Defaults to "h1".
title
The title text.
Example usage
Basic usage
{% include "sfc--mc-gallery-title" with {"title": "My great gallery item"} %}
My great gallery item
mc_more_link
A link to take users to listing pages.
Available context
link
Where the text links to.
text
The link text.
Example usage
Basic usage
{% include "sfc--mc-more-link" with {"text": "More stuff", "link": "https://google.com"} %}
mc_error_page
A re-usable error page for 4xx and 5xx pages.
Available context
title
The page title.
_title
If a title is not provided, the route title is used by default.
text
The page text.
Example usage
Basic usage
{% include "sfc--mc-error-page" with {"text": "We can't find your stuff.", "title": "Error! Not found."} %}
Error! Not found.
We can't find your stuff.
mc_blog
The full blog view.
Available context
title
The blog title.
time
The timestamp when the blog was created.
text
The blog text.
Example usage
Basic usage
{% include "sfc--mc-blog" with {
"title": "My great blog",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"time": "-15897600",
} %}
My great blog
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
mc_gallery_item
The full gallery item view.
Available context
title
The gallery item title.
time
The timestamp when the gallery item was created.
text
The gallery item text.
image
HTML for the gallery item image.
Example usage
Basic usage
{% include "sfc--mc-gallery-item" with {
"title": "My great gallery item",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"time": "-15897600",
"image": drupal_image('public://2020-02/blueberry.jpg', 'gallery_full', responsive=true),
} %}
My great gallery item

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
mc_work
The full work view.
Available context
title
The work title.
text
The work text.
image
HTML for the work image.
Example usage
Basic usage
{% include "sfc--mc-work" with {
"title": "My great work",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"image": drupal_image('public://work/2-0010.jpg', 'work_full', responsive=true),
} %}
My great work

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.