Changeset 1829fbf in OpenWorkouts-current
- Timestamp:
- Feb 20, 2019, 9:31:22 PM (5 years ago)
- Branches:
- current, feature/docs, master
- Children:
- 38171c6
- Parents:
- 42d775c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ow/mail.py
r42d775c r1829fbf 2 2 3 3 from pyramid_mailer import get_mailer 4 from pyramid_mailer.message import Message 4 from pyramid_mailer.message import Message, Attachment 5 5 from pyramid.renderers import render 6 6 from pyramid.i18n import TranslationStringFactory 7 8 import premailer 7 9 8 10 _ = TranslationStringFactory('OpenWorkouts') … … 45 47 mailer = get_mailer(request) 46 48 txt_body = render(txt_template, context, request) 47 html_body = render(html_template, context, request)49 html_body = premailer.transform(render(html_template, context, request)) 48 50 message = Message( 49 51 subject=subject, 50 52 recipients=[user.email], 51 body=txt_body, 52 html=html_body 53 body=Attachment(data=txt_body, 54 content_type="text/plain; charset=utf-8", 55 transfer_encoding="quoted-printable"), 56 html=Attachment(data=html_body, 57 content_type="text/html; charset=utf-8", 58 transfer_encoding="quoted-printable") 53 59 ) 54 60 message = idna_encode_recipients(message) -
ow/static/css/main.css
r42d775c r1829fbf 1492 1492 justify-content: center; 1493 1493 align-items: center; 1494 min-height: calc(100vh - 98px); 1494 /* dynamic min-height based on window height does not work well 1495 with premailer and generating the proper html with styles for mails */ 1496 min-height: 400px; 1495 1497 padding: 1em 0; 1496 color: #e1e1e1; 1498 /* RGB calculated color does not work well with premailer and 1499 generating the proper html with styles for mails */ 1500 color: #151515; 1497 1501 } 1498 1502 .verify-account-content .info { 1499 1503 max-width: 580px; 1500 background-color: rgba(21, 21, 21, 0.6); 1504 /* RGB calculated color does not work well with premailer and 1505 generating the proper html with styles for mails */ 1506 background-color: #e1e1e1; 1501 1507 border-radius: 6px; 1502 1508 padding: 2em 1.5em; … … 1506 1512 } 1507 1513 .verify-account-content a { 1508 color: #e1e1e1; 1514 /* RGB calculated color does not work well with premailer and 1515 generating the proper html with styles for mails */ 1516 color: #151515; 1509 1517 font-size: 13px; 1510 1518 text-decoration: none; … … 1512 1520 } 1513 1521 .verify-account-content a:hover { 1514 color: white;1522 color: #151515; 1515 1523 } 1516 1524 .verify-account-content .button { 1517 transition: all 500ms ease-in-out;1518 1525 background-color: #EE4056; 1526 background: #EE4056; 1519 1527 color: white; 1520 1528 text-transform: uppercase; 1521 1529 } 1522 1530 .verify-account-content .button:hover { 1523 background-color: # e6152f;1524 } 1531 background-color: #F60002; 1532 } -
ow/static/less/pages/verify_account.less
r42d775c r1829fbf 5 5 justify-content: center; 6 6 align-items: center; 7 min-height: calc(100vh - 98px); 7 /* dynamic min-height based on window height does not work well 8 with premailer and generating the proper html with styles for mails */ 9 min-height: 400px; 8 10 padding: 1em 0; 9 color: @color-main-light; 11 /* RGB calculated color does not work well with premailer and 12 generating the proper html with styles for mails */ 13 color: #151515; 10 14 11 15 .info { 12 16 max-width: 580px; 13 background-color: fadeout(@color-main, 40%); 17 /* RGB calculated color does not work well with premailer and 18 generating the proper html with styles for mails */ 19 background-color: #e1e1e1; 14 20 border-radius: 6px; 15 21 padding: 2em 1.5em; … … 20 26 21 27 a { 22 color: @color-main-light; 28 /* RGB calculated color does not work well with premailer and 29 generating the proper html with styles for mails */ 30 color: #151515; 23 31 font-size: 13px; 24 32 text-decoration: none; 25 33 margin-right: .75em; 26 34 &:hover { 27 color: white;35 color: #151515; 28 36 } 29 37 } 30 38 31 39 .button { 32 transition: all 500ms ease-in-out;33 40 background-color: @color-app; 41 background: @color-app; 34 42 color: white; 35 43 text-transform: uppercase; 36 44 &:hover { 37 background-color: darken(@color-app, 10%);45 background-color: @color-app-important; 38 46 } 39 47 } -
setup.py
r42d775c r1829fbf 35 35 'fitparse', 36 36 'splinter', 37 'Pillow' 37 'Pillow', 38 'premailer' 38 39 ] 39 40
Note: See TracChangeset
for help on using the changeset viewer.