예제 #1
0
def list_block(*args):
	new_value = [_span("code-literal", '[')]

	for i, c in enumerate(args):
		append = quote(c) if 'span' not in c else c
		new_value.append(_span("str", append))
		if i < len(args) - 1:
			new_value.append(_span("kept", ', '))

	new_value.append(_span("code-literal", ']'))
	return format_html(_div('code-block', ''.join(new_value)))
예제 #2
0
def br_25():
	# return format_html("""
	# <span class="f-size-10">
	# 		<br><br>
	# 		</span>
	# 		""")

	return format_html(_span('f-size-40', '<br><br>'))
예제 #3
0
def dict_block(*args):
	new_value = [_span("code-literal", ' {')]

	for i, c in enumerate(args):
		# append = _span("str", quote(c)) if isinstance(c, str) else _span("int", c)

		append = quote(c) if 'span' not in c else c
		append = _span("str", append)
		new_value.append(append)

		if i < len(args) - 1:
			append = _span("kept", ', ') if i % 2 != 0 else _span("code-literal", ': ')
			new_value.append(append)

	new_value.append(_span("code-literal", '}'))

	return mark_safe(_div('code-block', ''.join(new_value)))
예제 #4
0
def span(value, *args, **kwargs):
	""""""
	value = _join(value, args)
	if 'cls' in kwargs:
		id = kwargs['id'] if 'id' in kwargs else None
		value = _span(kwargs['cls'], value, id)
	else:
		value = _span_onlyid(value, kwargs['id'])
	return format_html(value)
예제 #5
0
def cl(value):
    return format_html(_span("code-literal", value))
예제 #6
0
def k(value):
    return format_html(_span("kept", value))
예제 #7
0
def it(value):
    return format_html(_span("italic", value))
예제 #8
0
def cb(value, tabs):
    return format_html(_span("code-break", value + '&emsp;' * tabs))
예제 #9
0
def n(value):
    return format_html(_span("int", value))
예제 #10
0
def string(value):
    return mark_safe(_span("str", value))
예제 #11
0
def op7_mleft95(value, id=None):
    return format_html(_span(f"op-07 m-left-95", value, id))
예제 #12
0
def op7_mleft136(value, id=None):
    return format_html(_span("op-07 m-left-136", value, id))
예제 #13
0
def dark_grey(value):
    return format_html(_span("dark grey", value))
예제 #14
0
def m(value):
    return format_html(_span("magic", value))
예제 #15
0
def turq(value):
    return format_html(_span("turquoise", value))
예제 #16
0
def self(value):
    return format_html(_span("self", value))
예제 #17
0
def dl_turq(value):
    return format_html(_span("download-link turquoise", value))
예제 #18
0
def sup(value):
    return format_html(_span("super", value))
예제 #19
0
def ind(value):
    return format_html(_span("indented", value))
예제 #20
0
def span(value, cls):
    return format_html(_span(cls, value))
예제 #21
0
def ind_half(value):
    return format_html(_span("indented-half", value))
예제 #22
0
def mono_bg_it(value):
    return format_html(_span("monospace-bg italic", value))
예제 #23
0
def white(value):
    return format_html(_span("white", value))
예제 #24
0
def doc_bold(value):
    return format_html(_span("doc bold", value))
예제 #25
0
def br_15():
	return format_html(_span('f-size-10', '<br><br>'))