Personal wiki notebook (not under development)

Error_page.py 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. from Page import Page
  2. from Tags import Div, H2, P, A, Ul, Li, Strong, Noscript, Img
  3. class Error_page( Page ):
  4. def __init__( self, support_email, message = None ):
  5. header_image = Div(
  6. A( Img( src = u"/static/images/luminotes_title_full.png", width = u"206", height = u"69" ), href = u"/", alt = u"Luminotes personal wiki notebook" ),
  7. class_ = u"error_header",
  8. )
  9. if message:
  10. title = u"whoops"
  11. Page.__init__(
  12. self,
  13. title,
  14. header_image,
  15. Div(
  16. H2( title ),
  17. P( message ),
  18. class_ = u"error_box",
  19. ),
  20. )
  21. return
  22. title = u"uh oh"
  23. Page.__init__(
  24. self,
  25. title,
  26. header_image,
  27. Div(
  28. H2( title ),
  29. Noscript(
  30. P(
  31. Strong(
  32. u"""
  33. Please enable JavaScript in your web browser. JavaScript is necessary for many Luminotes
  34. features to work properly.
  35. """,
  36. ),
  37. ),
  38. ),
  39. P(
  40. u"Something went wrong! If you care, please",
  41. A( "let me know about it.", href = "mailto:%s" % support_email ),
  42. u"Be sure to include the following information:",
  43. ),
  44. Ul(
  45. Li( u"the series of steps you took to produce this error" ),
  46. Li( u"the time of the error" ),
  47. Li( u"the name of your web browser and its version" ),
  48. Li( u"any other information that you think is relevant" ),
  49. ),
  50. P(
  51. u"Thanks!",
  52. ),
  53. class_ = u"error_box",
  54. ),
  55. )