mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 04:53:11 -04:00
Remove the styleguide
The idea was that this would be a place to document all the design
patterns used in Notify. However it hasn’t been kept up to date, and,
looking at the `git blame`[1] no new patterns have been added for 5
years.
I think it’s better to get rid of it than have to keep maintaining
something which is inaccurate.
1. 64aa0d359c/app/templates/views/styleguide.html
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
from flask import abort, current_app, render_template
|
||||
from flask_wtf import FlaskForm as Form
|
||||
from notifications_utils.template import SMSPreviewTemplate
|
||||
from wtforms import (
|
||||
FileField,
|
||||
PasswordField,
|
||||
StringField,
|
||||
TextAreaField,
|
||||
validators,
|
||||
)
|
||||
|
||||
from app.main import main
|
||||
|
||||
|
||||
@main.route('/_styleguide')
|
||||
def styleguide():
|
||||
|
||||
if not current_app.config['SHOW_STYLEGUIDE']:
|
||||
abort(404)
|
||||
|
||||
class FormExamples(Form):
|
||||
username = StringField(u'Username')
|
||||
password = PasswordField(u'Password', [validators.required()])
|
||||
code = StringField('Enter code')
|
||||
message = TextAreaField(u'Message')
|
||||
file_upload = FileField('Upload a CSV file to add your recipients’ details')
|
||||
|
||||
sms = "Your vehicle tax for ((registration number)) is due on ((date)). Renew online at www.gov.uk/vehicle-tax"
|
||||
|
||||
form = FormExamples()
|
||||
form.message.data = sms
|
||||
form.validate()
|
||||
|
||||
template = SMSPreviewTemplate({'content': sms, 'template_type': 'sms'})
|
||||
|
||||
return render_template(
|
||||
'views/styleguide.html',
|
||||
form=form,
|
||||
template=template
|
||||
)
|
||||
Reference in New Issue
Block a user