Skip to content
Snippets Groups Projects
Commit 3727c391 authored by Tim Fechner's avatar Tim Fechner
Browse files

Add two new form layout elements

+ <div class="box">
+ <article class="message">
parent ff7bf2f6
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,25 @@ class Card(AbstractElement): ...@@ -57,6 +57,25 @@ class Card(AbstractElement):
return format_html(self.markup, self.title, content) return format_html(self.markup, self.title, content)
class Box(AbstractElement):
markup = '<div class="box">{}</div>'
def render(self, content):
return format_html(self.markup, content)
class Message(AbstractElement):
markup = '<article class="message {}"><div class="message-header"><p>{}</p></div><div class="message-body">{}</div></article>'
def __init__(self, *args, title='', css_class='', **kwargs):
super().__init__(*args, **kwargs)
self.title = title
self.css_class = css_class
def render(self, content):
return format_html(self.markup, self.css_class, self.title, content)
class Submit(AbstractElement): class Submit(AbstractElement):
markup = '<div class="field"><div class="control"><button type="submit" class="button {}">{}</button></div></div>' markup = '<div class="field"><div class="control"><button type="submit" class="button {}">{}</button></div></div>'
......
...@@ -7,7 +7,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) ...@@ -7,7 +7,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup( setup(
name='django-hshassets', name='django-hshassets',
version='1.4.4', version='1.5.0',
packages=find_packages(), packages=find_packages(),
include_package_data=True, include_package_data=True,
license='MIT License', license='MIT License',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment