module Ktistec::ViewHelper::ClassMethods

Defined in:

views/view_helper.cr

Constant Summary

PUBLIC = "https://www.w3.org/ns/activitystreams#Public"

Instance Method Summary

Instance Method Detail

def activity(activity) #

[View source]
def addressing(params, actor, to = Set(String).new, cc = Set(String).new) #

Derives visibility and to/cc addressing from the "visibility" param.


[View source]
def depth(object) #

[View source]
def mention_page_mention_banner(env, mention, follow, count) #

[View source]
def object_partial(env, object, actor = object.attributed_to(include_deleted: true), author = actor, *, activity = nil, with_detail = false, for_thread = nil) #

[View source]
def paginate(env, collection) #

[View source]
def pagination_params(env) #

[View source]
def tag_page_tag_controls(env, hashtag, task, follow, count) #

[View source]
def thread_page_thread_controls(env, thread, task, follow) #

[View source]
def visibility(actor, to, cc) #

Derives visibility from to/cc addressing.


[View source]
def wrap_filter_term(str) #

[View source]
def wrap_link(str, include_scheme = false, length = 30, tag = :a) #

Wraps a string in a link if it is a URL.

By default, matches the weird format used by Mastodon: https://github.com/mastodon/mastodon/blob/main/app/lib/text_formatter.rb


[View source]