Exemple #1
0
 def html_ok(self):
     self._html_ok = DIV(
         DIV(
             XML("".join(['<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="50px" '
                 'height="50px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision;',
                 ' image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 50 50"',
                 ' xmlns:xlink="http://www.w3.org/1999/xlink"><circle class="fil0" cx="25.1541" cy="25.1175" ',
                 'r="24.5529"/><polygon class="fil1" points="14.6544,18.9408 20.4585,26.0181 39.3804,13.6859'
                 ' 43.962,20.7361 21.8877,35.1224 18.7388,37.1752 16.3517,34.266 8.16404,24.2795 "/></svg>'])),
             _class="captcha-ok-svg-container", _id="captcha-ok-svg-container-{0}".format(self._id)),
         _class='captcha-container')
     return self._html_ok
Exemple #2
0
}

css = ""
with open(os.path.join(os.path.dirname(__file__), "email.sass"), "r") as f:
    c = f.read()
    css = sass.compile(string=c, indented=True, output_style="compressed")

html = HTML(
    HEAD(TITLE("{{app_name}}"), META(**http_equiv),
         META(_name="viewport", _content="width=device-width"), STYLE(css)),
    BODY(
        SPAN("Your two factor verification code at {{app_name}}",
             " is {{code}}.",
             _class="preheader"),
        TABLE(TR(
            TD(XML("&nbsp;")),
            TD(DIV(TABLE(TR(
                TD(TABLE(TR(
                    TD(
                        P("Greetings {{user_name}},"),
                        P("An account in the application {{app_name}} linked to this email tried to login, to complete the authentication it is necessary to add this code."
                          ),
                        TABLE(TR(
                            TD(TABLE(
                                TBODY(TR(TD(DIV("{{code}}",
                                                _class="code")), ), ),
                                _role="presentation",
                                _border="0",
                                _cellpadding="0",
                                _cellspacing="0",
                            ),
from phanterpwa.helpers import XML

html = XML("""<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100px" height="100px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd" viewBox="0 0 100 100" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="phanterpwa-fil0" d="M0.122836 43.2972l12.5009 -21.6533 12.5009 21.6533 6.25044 10.8261 6.25044 10.8261 -25.0018 0 -12.5009 -21.6521zm50.0035 -43.3055l25.0018 0 12.5021 21.6521 -25.003 0 -12.5009 0 -12.5009 0 12.5009 -21.6521zm37.5038 64.9576l-12.5021 21.6521 -25.0006 0 -25.003 0 0 0 -12.5009 -21.6521 12.5009 21.6521 6.25162 10.8261 1.48466 2.57246 9.53157 0 7.7351 -13.3985 12.4997 -21.6521 6.25162 -10.8261 6.25044 -10.8261 -0.366145 -0.635438 12.867 22.2876z"/><path class="phanterpwa-fil1" d="M12.6237 64.9493l50.0035 0 -12.4997 21.6521 -25.003 0 -12.5009 -21.6521zm25.0018 -43.3055l-12.5009 21.6533 -12.5009 -21.6533 12.5009 -21.6521 25.0018 0 -12.5009 21.6521zm25.0018 0l25.003 43.3055 12.5009 -21.6521 -12.5009 -21.6533 -25.003 0z"/></svg>""")
Exemple #4
0
html = XML(
    """<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="4724px" height="1181px" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"
viewBox="0 0 4724 1181"
 xmlns:xlink="http://www.w3.org/1999/xlink">
 <defs>
 <radialGradient id="logo_sindfa_id0" gradientUnits="userSpaceOnUse" cx="558.211" cy="591.724" r="836.664" fx="558.211" fy="591.724">
  <stop offset="0" style="stop-color:#B6DDC7"/>
  <stop offset="1" style="stop-color:#28166F"/>
 </radialGradient>
 <radialGradient id="logo_sindfa_id1" gradientUnits="userSpaceOnUse" cx="558.211" cy="591.728" r="949.505" fx="558.211" fy="591.728">
  <stop offset="0" style="stop-color:#FFFCC8"/>
  <stop offset="1" style="stop-color:#F8C300"/>
 </radialGradient>
 <radialGradient id="logo_sindfa_id2" gradientUnits="userSpaceOnUse" cx="558.211" cy="591.727" r="836.664" fx="558.211" fy="591.727">
  <stop offset="0" style="stop-color:#DA251D"/>
  <stop offset="1" style="stop-color:#850505"/>
 </radialGradient>
 <linearGradient id="logo_sindfa_id3" gradientUnits="userSpaceOnUse" x1="759.469" y1="751.04" x2="351.877" y2="422.336">
  <stop offset="0" style="stop-color:#0A0B0C"/>
  <stop offset="0.54902" style="stop-color:#72706F"/>
  <stop offset="1" style="stop-color:#0A0B0C"/>
 </linearGradient>
 <linearGradient id="logo_sindfa_id5" gradientUnits="userSpaceOnUse" x1="3203.81" y1="1415.71" x2="1519.66" y2="-221.832">
  <stop offset="0" style="stop-color:#0A0B0C"/>
  <stop offset="0.54902" style="stop-color:#72706F"/>
  <stop offset="1" style="stop-color:#0A0B0C"/>
 </linearGradient>
 </defs>
 <g id="Camada_x0020_1">
  <metadata id="CorelCorpID_0Corel-Layer"/>
  <path class="logo_sindfa_fil0" d="M1115.88 727.138l137.018 -31.6815c11.5478,49.7626 41.1401,74.6439 88.7781,74.6439 37.1708,0 55.6971,-12.6721 55.6971,-38.0164 0,-13.291 -4.21026,-23.646 -12.8717,-31.0638 -8.54099,-7.41786 -23.8184,-13.9075 -45.9527,-19.6259 -84.3281,-20.8635 -138.462,-48.062 -162.4,-81.4429 -24.0605,-33.5357 -35.9685,-72.9433 -35.9685,-118.224 0,-58.2611 17.2024,-106.787 51.6073,-145.421 34.4037,-38.6352 83.9667,-57.9529 148.565,-57.9529 97.9214,0 162.641,50.6885 194.159,151.759l-122.341 47.5978c-12.632,-41.4165 -38.3754,-62.1253 -77.1099,-62.1253 -32.2401,0 -48.3596,12.8268 -48.3596,38.4805 0,11.4368 3.7296,20.3994 10.9467,26.7355 7.33873,6.33607 21.4127,12.3639 42.3448,18.0823 57.5017,15.7628 98.4021,29.6703 122.582,41.7247 24.2991,12.0545 44.5107,32.6086 60.6302,61.8171 16.2399,29.0538 24.2991,63.3606 24.2991,102.923 0,62.4347 -19.7286,113.124 -59.1846,151.913 -39.4584,38.7899 -91.3067,58.2623 -155.424,58.2623 -117.168,0 -189.587,-62.8977 -217.015,-188.385zm635.768 -439.203l0 618.007 -147.605 0 0 -618.007 147.605 0zm495.261 618.007l-120.177 0 -131.844 -273.073c-16.9615,-34.9257 -33.9242,-77.5799 -51.1267,-127.651 7.8194,39.8717 11.6695,73.7168 11.6695,101.379l0 299.345 -119.815 0 0 -618.007 139.543 0 111.995 226.401c22.3764,44.9713 39.3379,84.5336 50.7653,118.532 -7.45802,-52.6986 -11.1876,-106.787 -11.1876,-161.958l0 -182.976 120.177 0 0 618.007zm83.8463 0l0 -618.007 186.098 0c80.719,0 141.228,30.7532 181.406,92.4156 40.18,61.5065 60.2688,132.749 60.2688,213.573 0,92.4156 -21.532,167.522 -64.5983,225.321 -43.1868,57.797 -99.1249,86.6972 -167.933,86.6972l-195.242 0zm147.604 -142.177l38.4947 0c24.4195,0 44.9902,-15.2999 61.8324,-45.7449 16.7206,-30.4438 25.1423,-72.015 25.1423,-124.404 0,-45.126 -7.4592,-83.7612 -22.3764,-116.369 -14.916,-32.6086 -36.4492,-48.9891 -64.5983,-48.9891l-38.4947 0 0 335.507zm643.225 -89.1702l-156.866 0 0 231.347 -143.755 0 0 -618.007 347.777 0 0 147.122 -204.022 0 0 100.606 156.866 0 0 138.932zm335.506 231.347l-27.1866 -121.779 -128.957 0 -28.8719 121.779 -119.815 0 148.687 -618.007 156.144 0 150.492 618.007 -150.492 0zm-131.122 -256.692l78.1928 0 -39.097 -179.266 -39.0958 179.266z"/>
  <g id="_96218176">
   <path id="_96218512" class="logo_sindfa_fil1" d="M427.172 1048.82c-36.983,-10.681 -72.6209,-25.8568 -106.199,-45.2441 -33.4211,-19.2952 -64.2464,-42.4404 -91.8865,-68.968 -59.7456,22.0375 -128.675,-1.48806 -161.566,-58.4571 -32.8094,-56.8285 -18.87,-128.071 29.7931,-168.845 -19.1546,-76.1651 -19.229,-155.903 -0.073222,-232.059 -48.6041,-40.7835 -62.5127,-111.984 -29.7199,-168.783 32.892,-56.9738 101.828,-80.4981 161.575,-58.4548 55.8223,-53.6646 123.959,-92.8349 198.382,-114.212 10.492,-63.1493 65.412,-111.341 131.524,-111.341 66.084,0 120.983,48.1458 131.513,111.253 37.0893,10.6821 72.8311,25.8852 106.507,45.328 33.4211,19.2964 64.2499,42.4392 91.8889,68.968 59.7456,-22.0351 128.672,1.49042 161.563,58.4583 32.8141,56.8368 18.8665,128.092 -29.8132,168.863 19.1487,76.1556 19.2267,155.88 0.076765,232.026 48.6182,40.7811 62.5328,111.993 29.7352,168.799 -32.892,56.9726 -101.827,80.4958 -161.576,58.4524 -56.042,53.8701 -124.496,93.1325 -199.27,114.453 -11.2467,62.2411 -65.7392,109.496 -131.207,109.496 -65.5514,0 -120.097,-47.3746 -131.248,-109.733z"/>
   <g>
    <path id="_96218440" class="logo_sindfa_fil2" d="M935.095 318.716c30.6009,0 55.4161,24.8164 55.4161,55.4172 0,30.6009 -24.8152,55.4161 -55.4161,55.4161 -30.6009,0 -55.4161,-24.8152 -55.4161,-55.4161 0,-30.6009 24.8152,-55.4172 55.4161,-55.4172zm-173.766 -69.0212c43.8163,26.0859 82.1941,60.3503 113.034,100.687 -2.88046,7.35999 -4.463,15.3719 -4.463,23.7511 0,32.7066 24.0983,59.794 55.5046,64.4767l0.250372 0.599948c0.40154,0.964877 0.799537,1.93212 1.19399,2.90054 0.682618,1.68292 1.35461,3.37057 2.01597,5.06413 0.399178,1.02157 0.793632,2.04313 1.18454,3.06824 0.618844,1.62506 1.22706,3.25602 1.82464,4.8917l0.54326 1.48806 -0.004724 0.002362c14.7129,40.7315 22.9834,84.5431 23.5361,130.211l-94.5615 0c-0.451142,-28.4326 -4.83147,-55.9121 -12.5977,-81.9319l-46.4558 26.8217 -35.0497 -60.7069 -35.0485 -60.7069 46.3861 -26.7804c-18.9999,-20.1077 -40.7244,-37.6137 -64.5783,-51.9357l47.2861 -81.9012zm-580.001 504.21c30.6009,0 55.4161,24.8164 55.4161,55.4161 0,30.6021 -24.8152,55.4172 -55.4161,55.4172 -30.6009,0 -55.4172,-24.8152 -55.4172,-55.4172 0,-30.5997 24.8164,-55.4161 55.4172,-55.4161zm173.762 179.854c-43.8151,-26.0847 -82.1905,-60.355 -113.028,-100.693 2.88046,-7.35881 4.46182,-15.3672 4.46182,-23.7452 0,-32.7078 -24.0971,-59.7976 -55.5046,-64.4791l-0.113376 -0.266906c-0.487753,-1.16919 -0.969601,-2.34074 -1.44554,-3.51466 -0.577509,-1.42311 -1.14675,-2.85093 -1.70891,-4.28231 -0.504287,-1.28729 -1.00385,-2.5793 -1.49515,-3.8725 -0.494839,-1.30501 -0.984954,-2.61001 -1.4668,-3.92092 -0.263363,-0.715686 -0.526726,-1.43255 -0.786546,-2.1506l0.008267 -0.004724c-14.7141,-40.7327 -22.9846,-84.5431 -23.5373,-130.212l94.5615 0c0.452323,28.4338 4.83147,55.9121 12.5989,81.9319l46.4546 -26.8205 35.0497 60.7069 35.0497 60.7069 -46.3838 26.7792c19.0011,20.1053 40.7244,37.6089 64.5759,51.9286l-47.2908 81.9094z"/>
    <path id="_96218368" class="logo_sindfa_fil3" d="M935.095 753.906c30.6009,0 55.4161,24.8164 55.4161,55.4161 0,30.6021 -24.8152,55.4172 -55.4161,55.4172 -30.6009,0 -55.4161,-24.8152 -55.4161,-55.4172 0,-30.5997 24.8152,-55.4161 55.4161,-55.4161zm20.8529 -157.288c-0.552708,45.6693 -8.82325,89.4796 -23.5373,130.211l0.005905 0.003543c-0.186598,0.516097 -0.375558,1.03101 -0.564518,1.54593 -0.598767,1.63568 -1.20816,3.26783 -1.82819,4.89406 -0.396816,1.044 -0.800718,2.08683 -1.20698,3.12729 -0.636559,1.62978 -1.28375,3.25484 -1.94156,4.87281 -0.42516,1.04637 -0.855044,2.08919 -1.28729,3.13083l-0.187779 0.440513c-31.404,4.68267 -55.5011,31.7713 -55.5011,64.4779 0,8.37801 1.58136,16.3852 4.46064,23.7428 -30.8395,40.3371 -69.216,74.6061 -113.032,100.691l-47.2861 -81.9024c23.8527,-14.3196 45.5772,-31.8244 64.5759,-51.9309l-46.3826 -26.7792 35.0485 -60.7069 35.0497 -60.7069 46.4546 26.8205c7.76744,-26.0198 12.1478,-53.4981 12.5989,-81.9319l94.5615 0zm-774.62 -277.901c30.6009,0 55.4161,24.8164 55.4161,55.4172 0,30.6009 -24.8152,55.4161 -55.4161,55.4161 -30.6009,0 -55.4172,-24.8152 -55.4172,-55.4161 0,-30.6009 24.8164,-55.4172 55.4172,-55.4172zm-20.8541 268.12c0.552708,-45.6681 8.82325,-89.4796 23.5361,-130.211l-0.007086 -0.004724c0.257458,-0.713324 0.518459,-1.42665 0.780641,-2.13761 0.483029,-1.31445 0.974325,-2.62418 1.47153,-3.93155 0.483029,-1.27076 0.971963,-2.53797 1.46798,-3.80164 0.575147,-1.46916 1.15856,-2.9336 1.75024,-4.39332 0.46059,-1.13494 0.925904,-2.26516 1.39712,-3.39419l0.147625 -0.351938c31.4075,-4.68148 55.5058,-31.7689 55.5058,-64.4767 0,-8.38038 -1.58254,-16.3923 -4.46418,-23.7523 30.8383,-40.3394 69.2137,-74.6061 113.029,-100.691l47.2908 81.9083c-23.8527,14.3208 -45.576,31.8268 -64.5771,51.9333l46.385 26.7804 -35.0485 60.7069 -35.0497 60.7069 -46.4558 -26.8217c-7.76626,26.0186 -12.1454,53.4993 -12.5977,81.9319l-94.5615 0z"/>
    <path id="_96218296" class="logo_sindfa_fil4" d="M558.21 971.499c30.6009,0 55.4172,24.8164 55.4172,55.4172 0,30.6009 -24.8164,55.4161 -55.4172,55.4161 -30.6009,0 -55.4161,-24.8152 -55.4161,-55.4161 0,-30.6009 24.8152,-55.4172 55.4161,-55.4172zm194.654 -32.8401c-38.0837,21.4233 -80.0482,36.7574 -124.578,44.6749 -3.00919,0.534993 -6.03019,1.03574 -9.06299,1.50223l-0.905827 0.139358c-3.03045,0.459409 -6.0727,0.884569 -9.12559,1.27666l-0.022439 0.002362c-11.9482,-14.9515 -30.3363,-24.5341 -50.959,-24.5341 -20.6226,0 -39.0084,9.58145 -50.9554,24.5341l-0.024801 -0.002362c-3.04698,-0.390911 -6.08215,-0.816071 -9.10669,-1.2743l-0.935352 -0.142901c-3.03753,-0.467676 -6.06325,-0.96842 -9.07598,-1.50459 -44.5213,-7.91979 -86.4775,-23.2551 -124.555,-44.6737l47.2872 -81.9047c23.9471,13.3477 49.8902,23.5432 77.2681,30.0257l0 -53.6339 70.0983 0.001181 70.0983 0 0 53.6339c27.3779,-6.48251 53.3198,-16.6781 77.2681,-30.0246l47.2872 81.9047zm-194.654 -837.536c30.6009,0 55.4172,24.8164 55.4172,55.4161 0,30.6009 -24.8164,55.4172 -55.4172,55.4172 -30.5997,0 -55.4161,-24.8164 -55.4161,-55.4172 0,-30.5997 24.8164,-55.4161 55.4161,-55.4161zm70.0983 98.9997l0 0c44.5225,7.91979 86.4799,23.248 124.558,44.6666l-47.2884 81.9071c-23.9483,-13.3465 -49.8913,-23.5397 -77.2693,-30.0234l0 53.6387 -70.0983 -0.001181 -70.0983 0 0 -53.6363c-27.3779,6.48251 -53.321,16.6781 -77.2693,30.0234l-47.2872 -81.9035c38.079,-21.4186 80.0352,-36.7515 124.557,-44.6713l0 0c3.05997,-0.544441 6.13411,-1.05227 9.21771,-1.52703l0.635378 -0.096842c3.08477,-0.468857 6.18135,-0.902284 9.28857,-1.2991 11.947,14.9526 30.3328,24.5353 50.9566,24.5353 20.6238,0 39.0132,-9.58263 50.9601,-24.5353 3.1143,0.396816 6.2156,0.832605 9.30746,1.30264l0.599948 0.090937c3.08832,0.474762 6.166,0.983773 9.2307,1.5294z"/>
    <path id="_96218224" class="logo_sindfa_fil5" d="M404.293 764.713c-0.343671,-7.16867 -0.727496,-12.9071 -1.16447,-17.2154 2.89817,1.68883 5.47866,2.86038 7.74146,3.51466 2.2498,0.655455 4.23625,0.982592 5.94279,0.982592 2.25099,0 4.05083,-0.429884 5.37355,-1.29201 1.33689,-0.844415 1.99825,-2.11989 1.99825,-3.80872 0,-0.568061 -0.066136,-1.11959 -0.198408,-1.63687 -0.119281,-0.517278 -0.369653,-1.10305 -0.727496,-1.77504 -0.370834,-0.655455 -0.886931,-1.36169 -1.54947,-2.13761l-7.29149 -8.27054c-1.70773,-1.89669 -2.89817,-3.25838 -3.57371,-4.10279 -1.36287,-1.70536 -2.43522,-3.30798 -3.18988,-4.79014 -0.76765,-1.48216 -1.32272,-2.98084 -1.66757,-4.51496 -0.356662,-1.53412 -0.529088,-3.15445 -0.529088,-4.87753 0,-2.05022 0.277535,-4.06618 0.833786,-6.03137 0.556251,-1.964 1.39004,-3.80872 2.50136,-5.5318 1.11132,-1.70655 2.58048,-3.18752 4.42048,-4.44646 1.82583,-1.24005 3.7981,-2.08447 5.88965,-2.53206 2.09155,-0.466495 4.24806,-0.689704 6.47188,-0.689704 4.36734,0 9.11968,0.654274 14.2677,1.964 0.079127,2.32657 0.172426,4.44646 0.264544,6.39393 0.10629,1.92975 0.357843,5.32513 0.741668,10.1672 -2.38326,-1.24005 -4.53976,-2.10218 -6.51203,-2.60174 -1.95928,-0.483029 -3.65283,-0.725134 -5.06885,-0.725134 -2.01242,0 -3.69299,0.483029 -5.01689,1.46562 -1.33689,0.964877 -1.99825,2.18839 -1.99825,3.6363 0,0.671989 0.10629,1.32626 0.304698,1.964 0.211399,0.63774 0.595224,1.37941 1.16447,2.24154 0.569242,0.860949 1.3239,1.80929 2.25099,2.82495 0.925904,1.03456 2.39507,2.55096 4.38033,4.56693l2.79188 2.8781c0.820795,0.879845 1.70773,1.94747 2.67378,3.1887 0.953067,1.24005 1.77386,2.46357 2.47538,3.68708 0.700333,1.20698 1.2306,2.32657 1.61443,3.32688 0.369653,1.01684 0.648369,2.0325 0.833786,3.05052 0.171245,1.03338 0.264544,2.13643 0.264544,3.30798 0,3.03281 -0.55507,5.91091 -1.66757,8.66854 -1.11132,2.73992 -2.68677,4.99799 -4.72518,6.75532 -2.0514,1.77504 -4.28821,2.99856 -6.73642,3.7048 -2.43522,0.706238 -5.01689,1.0688 -7.72964,1.0688 -4.18192,0 -9.47634,-0.792451 -15.8549,-2.37853zm44.5095 1.0688c1.49515,-27.0213 2.2498,-47.8222 2.2498,-62.4017l-0.040154 -6.5144c4.52677,0.069679 7.54423,0.103928 9.06654,0.103928 0.701514,0 3.48041,-0.034249 8.33786,-0.103928 -0.462952,7.56549 -0.833786,14.7353 -1.12431,21.5072 -0.357843,9.42674 -0.609396,18.2335 -0.76765,26.4367 -0.159435,8.18551 -0.225571,15.1818 -0.225571,20.9722l-7.95403 -0.102747c-1.54947,0 -4.73817,0.034249 -9.54248,0.102747zm27.026 0l0.780641 -10.5983 1.50814 -35.9485 0.423979 -14.4932 0 -7.87609c4.01068,0.069679 7.54423,0.103928 10.6148,0.103928 2.19666,0 5.28025,-0.034249 9.26376,-0.103928l16.6108 39.1891 2.28878 5.75619c0.278716,-5.65345 0.569242,-13.5803 0.860949,-23.783 0.290526,-10.2015 0.435789,-17.2497 0.435789,-21.1623 3.19106,0.069679 5.73139,0.103928 7.65052,0.103928 0.87394,0 3.40128,-0.034249 7.59619,-0.103928l-0.925904 15.0459 -1.73371 41.8062 -0.238562 12.0639c-3.36113,-0.068498 -6.49786,-0.102747 -9.4232,-0.102747 -2.42105,0 -5.78336,0.034249 -10.0716,0.102747 -1.34988,-3.29145 -2.34192,-5.6877 -2.99147,-7.16867l-6.52502 -14.3893c-2.14351,-4.72282 -4.11578,-9.22007 -5.92862,-13.5284 -1.19163,-2.73992 -2.42223,-5.72195 -3.67881,-8.99568l-0.807804 23.9365 -0.396816 20.1455c-3.20287,-0.068498 -5.63809,-0.102747 -7.31984,-0.102747 -1.42901,0 -4.0898,0.034249 -7.99301,0.102747zm65.2219 0c0.569242,-7.66823 0.953067,-13.8212 1.16447,-18.4224 0.304698,-6.87578 0.622387,-15.751 0.927085,-26.6587 0.237381,-8.35912 0.343671,-14.322 0.343671,-17.9229l0 -5.91209c3.03163,0.103928 5.63809,0.155892 7.83475,0.155892 2.11871,0 4.89761,-0.086213 8.33904,-0.22439 3.44025,-0.154711 6.67029,-0.240924 9.70073,-0.240924 3.45442,0 6.49786,0.276354 9.10551,0.810166 2.60765,0.551527 5.04287,1.6534 7.30567,3.34341 2.26398,1.67111 4.15594,3.87722 5.69124,6.59943 1.52231,2.7411 2.68678,5.92862 3.48041,9.58145 0.807804,3.65401 1.20462,7.41077 1.20462,11.2715 0,3.80754 -0.303517,7.47809 -0.925904,10.9951 -0.622387,3.51466 -1.49633,6.68564 -2.60765,9.51177 -1.11132,2.82613 -2.40806,5.25663 -3.8914,7.29031 -1.48215,2.0325 -3.1887,3.77329 -5.09483,5.2212 -1.43019,1.08534 -2.8592,1.92975 -4.3012,2.53325 -1.45617,0.603491 -3.42844,1.08534 -5.94279,1.46562 -2.79307,0.395635 -5.95578,0.60231 -9.48933,0.60231l-15.6707 -0.154711c-1.46916,0 -3.86423,0.051964 -7.17339,0.154711zm16.756 -15.1995c1.41602,0.172426 2.91116,0.258639 4.45946,0.258639 2.63363,0 4.97673,-0.310603 7.05529,-0.914094 2.06439,-0.60231 3.87722,-1.8955 5.43851,-3.87722 1.56246,-1.99943 2.71394,-4.54921 3.46742,-7.6517 0.754659,-3.11902 1.12549,-6.30654 1.12549,-9.56374 0,-4.0154 -0.556251,-7.39306 -1.66757,-10.133 -1.11132,-2.7411 -2.59466,-4.65314 -4.43347,-5.72195 -1.85299,-1.08534 -4.36734,-1.61915 -7.54423,-1.61915 -1.86598,0 -4.06264,0.102747 -6.59116,0.292888l-1.30973 38.9293zm44.7469 15.1995c0.542079,-6.82382 0.912913,-12.3214 1.12549,-16.4572 0.303517,-6.1353 0.608215,-14.5452 0.88575,-25.264 0.291707,-10.7188 0.43697,-17.9394 0.43697,-21.6454l0 -5.54952c7.7698,0.069679 15.0081,0.103928 21.7056,0.103928 6.74941,0 13.2355,-0.034249 19.4688,-0.103928 -0.409807,7.73791 -0.621206,12.8044 -0.621206,15.2007l-3.3753 -0.154711 -2.71276 -0.051964 -2.71394 -0.051964 -7.63635 0c-0.87394,0 -3.45442,0.034249 -7.71547,0.103928l-0.357843 11.7521 5.6251 0.154711 6.28646 0c1.81283,0 4.57874,-0.051964 8.29771,-0.154711 -0.277535,6.35968 -0.422798,11.3565 -0.422798,14.9585 -4.16893,-0.172426 -7.2537,-0.258639 -9.27794,-0.258639 -3.41545,0 -7.13324,0.086213 -11.1699,0.258639l-0.383825 18.1638 -0.040154 6.77303 0 2.22264 -8.32487 -0.102747c-0.648369,0 -3.67881,0.034249 -9.07953,0.102747zm41.6503 0l3.21704 -7.2726 20.051 -49.1662 2.13052 -5.51409c0.622387,-1.60262 1.48216,-3.92919 2.59466,-6.96318 4.55275,0.069679 7.87373,0.103928 9.96528,0.103928 3.65283,0 7.01514,-0.034249 10.1247,-0.103928l5.66526 21.0596 11.5148 40.4811 2.2498 7.37535c-4.47363,-0.068498 -7.18757,-0.102747 -8.14063,-0.102747 -2.1695,0 -5.35938,0.034249 -9.58145,0.102747 -1.13848,-5.54952 -2.77889,-12.0804 -4.92359,-19.5774l-19.5479 0c-2.2498,5.92862 -4.57992,12.443 -6.98798,19.5774 -4.80431,-0.068498 -7.74264,-0.102747 -8.82797,-0.102747 -1.97227,0 -5.13499,0.034249 -9.50351,0.102747zm30.0175 -34.2762l12.058 0c-3.00446,-11.8738 -4.64605,-18.4224 -4.92359,-19.6294 -1.70773,4.94603 -3.1639,8.99568 -4.34136,12.1667l-2.79307 7.46274zm-241.405 -322.55l21.082 10.6467c5.28616,2.66906 7.42849,9.17637 4.75825,14.4637l-57.7249 114.322c-2.67024,5.28497 -9.17755,7.42613 -14.4649,4.75707l-21.082 -10.6479c-5.28852,-2.67024 -7.42849,-9.17873 -4.76061,-14.4625l57.7261 -114.322c2.66906,-5.28852 9.17755,-7.42731 14.4661,-4.75707zm248.18 4.84328l-21.2899 10.2286c-5.33812,2.56395 -7.60682,9.02993 -5.04287,14.368l55.4633 115.436c2.56277,5.33694 9.02756,7.60564 14.3657,5.04051l21.2911 -10.2275c5.33694,-2.56513 7.60564,-9.02874 5.04169,-14.3669l-55.4609 -115.437c-2.56513,-5.33812 -9.02993,-7.60564 -14.368,-5.04169zm-255.352 171.109l9.75388 -12.397 -20.6805 -25.4742 52.5309 -102.062 55.6924 1.21171c13.6878,-6.88051 29.225,-10.7188 42.1688,-11.5974 15.4416,-3.18988 55.8271,14.1874 78.5589,12.3426 16.4572,34.8513 32.9145,69.7026 49.3729,104.554 -0.509011,5.40071 -2.42223,10.6444 -5.73966,15.7309 -1.99825,3.0647 -2.59702,2.45766 -0.542079,5.46803 11.0766,16.2258 12.0001,42.0176 -19.222,45.6893 -1.97581,0.232657 -1.99235,0.380282 -2.48482,2.29823 -4.32482,16.8257 -5.09838,20.8848 -23.3153,24.2282 -3.69299,0.677894 -4.59055,0.667265 -6.38449,3.89258 -3.23476,5.81761 -6.79784,10.3999 -10.9821,13.4835 -6.76831,4.98736 -15.1664,6.05853 -26.445,2.11281 -3.74731,-2.18721 -3.60205,-3.30562 -6.42464,-0.038973 -16.3722,18.9243 -30.3198,14.0362 -41.9846,2.95132l-4.95666 5.80107c-4.98854,5.83768 -14.5924,6.04908 -20.6285,1.30146l-1.02865 -0.808985c-5.43732,-4.27758 -6.83209,-11.8596 -3.5867,-17.7339l-1.25777 1.63096c-5.82705,7.55486 -18.0941,8.03789 -25.5946,2.13643l-1.49869 -1.17864c-6.87106,-5.40544 -8.54808,-15.0613 -4.2457,-22.4107 -6.62895,6.52857 -17.3135,7.28087 -24.8081,1.38531l-1.38295 -1.09006c-6.60061,-5.19049 -8.77837,-14.0031 -5.93453,-21.4812 -7.07773,5.03224 -16.9473,5.06885 -24.0983,-0.559794l-1.48215 -1.16092c-8.68744,-6.83445 -10.205,-19.5349 -3.36939,-28.2247zm19.6329 -22.028c8.59177,-7.26315 16.8375,-5.24364 24.827,1.06408 7.41432,5.83296 9.60271,15.9376 5.83532,24.1763 6.53565,-4.08862 15.2384,-3.88903 21.6229,1.13376l1.38531 1.09006c7.70012,6.05735 9.3736,17.043 4.08154,25.0903 6.14829,-5.57904 15.6671,-6.08805 22.3977,-0.793632l1.49869 1.17982c7.49345,5.89673 9.71136,17.5627 3.89966,25.1175 4.75116,-6.02192 13.565,-7.06947 19.5963,-2.32539l1.02865 0.808985c5.21293,4.09925 7.745,12.8198 5.12554,18.883 2.74819,2.01951 6.17072,3.87368 7.25134,4.44528 11.0837,5.85894 21.0809,-4.88698 15.7959,-11.2537 -10.8806,-7.56076 -21.7611,-15.1215 -32.6428,-22.6811 -3.00919,-2.09155 -3.76267,-6.26639 -1.66993,-9.27676 0,0 0,0 0,0 1.73489,-2.49663 4.90233,-3.44025 7.64934,-2.49781 16.0829,11.2065 32.1657,22.413 48.2486,33.6207 5.46094,3.32097 13.291,5.8306 17.7847,-0.361386 3.57489,-5.66526 2.68087,-11.8797 -2.67969,-15.8703 -18.0197,-13.4185 -36.0406,-26.8382 -54.0615,-40.2567 -1.77622,-2.30059 -1.90259,-5.60148 -0.092118,-8.04379 0,0 0,0 0,0 1.72072,-2.32539 4.69684,-3.20878 7.32456,-2.40452 20.5388,14.7755 41.0764,29.551 61.6151,44.3265 5.46094,3.32215 13.2898,5.8306 17.7847,-0.360205 3.57489,-5.66644 2.74937,-11.9742 -2.67969,-15.8715 -21.2946,-15.2892 -42.5904,-30.5785 -63.8862,-45.8665 -3.98115,-2.95368 -9.88615,-8.08867 -5.93689,-13.4232 0,0 0,0 0,0 3.52174,-4.75825 7.94931,-1.31682 9.77986,-0.049602 23.6212,16.345 46.9991,33.0408 70.4986,49.5607 6.43054,4.52087 15.2621,3.56662 20.0345,-2.67969 0,0 0,0 0,0 4.77242,-6.24631 3.30798,-14.942 -2.67969,-20.0345 -22.6587,-19.2739 -45.3162,-38.5478 -67.9748,-57.8206 -0.331861,-0.28344 -0.668446,-0.522002 -1.00976,-0.722772 -8.60713,-7.50053 -17.2154,-15.0022 -25.8237,-22.5028 -5.65345,-6.48369 -11.8254,-11.0199 -19.444,-11.895 -11.9092,-1.3676 -20.1408,6.1223 -22.4319,14.2948 -4.35317,15.5278 -8.96143,27.6897 -26.3198,33.5062 -13.4717,3.80164 -25.0714,4.86336 -29.982,-8.8386 1.18572,-11.5608 7.2041,-11.562 7.47573,-33.2192 0.151168,-12.0415 6.48841,-23.8822 17.2887,-33.6455l-31.2835 -0.041335 -43.8127 85.2387 14.5806 19.1995z"/>
   </g>
  </g>
 </g>
</svg>
""")
Exemple #5
0
from phanterpwa.helpers import (XML)
import os
with open(os.path.join(os.path.dirname(__file__), "logo.svg"), 'r') as f:
    html = XML(f.read())
Exemple #6
0
 def html(self):
     question = self.question
     choice = self.choice
     new_dict_t = dict()
     opt = self.options[choice]
     if isinstance(self.translator, Translator):
         for d in self.translator.languages:
             t = self.translator.translator(question, d)
             new_dict_t["_{0}".format(d.lower())] = t.format(option=self.translator.translator(opt, d))
         new_dict_t["_phanterpwa-i18n"] = question.format(option=opt)
         question = SPAN(
             question.format(option=opt),
             **new_dict_t
         )
     else:
         question = question.format(option=opt)
     content = []
     if self.debug:
         token_question = choice
     else:
         token_question = self.signature
     for x in self._opt:
         attrs = {
             "_xmlns": "http://www.w3.org/2000/svg",
             "_xml:space": "preserve",
             "_width": "50px",
             "_height": "50px",
             "_style": "shape-rendering:geometricPrecision; text-rendering:geometricPrecision; " +
                 "image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd",
             "_viewBox": "0 0 50 50",
             "_xmlns:xlink": "http://www.w3.org/1999/xlink",
         }
         svg_e = self.grafical_forms[x]
         recipe = svg_e[2]
         sub_folder = svg_e[3]
         vector = svg_e[4]
         attrs["_class"] = svg_e[5]
         svg_recipe = ""
         svg_vector = ""
         if self.debug:
             token_option = str(x)
         else:
             sign_option = self.serializer.dumps({
                 'option': str(x)
             })
             token_option = sign_option.decode("utf-8")
         p = os.path.join(__dirname__, "recipes", "{0}.recs".format(recipe))
         with open(p, 'r', encoding='utf-8') as f:
             svg_recipe = f.read()
         p = os.path.join(__dirname__, "vectors", sub_folder, "{0}.recs".format(vector))
         with open(p, 'r', encoding='utf-8') as f:
             svg_vector = f.read()
         content.append(
             DIV(
                 DIV(
                     DIV(
                         SVG(XML(svg_recipe), XML(svg_vector), **attrs),
                         _class='captcha-option-svg'),
                     _class='captcha-option link',
                     _token_option=token_option,
                     _token_question=token_question,
                     _id_captcha=self._id
                 ),
                 _class='captcha-option-container')
         )
     html = DIV(
         DIV(
             XML(question),
             _class='captcha-question-container'),
         DIV(
             *content,
             _class='captcha-options-container'),
         _class='captcha-container')
     html.sass_file(os.path.join(__dirname__, "sass", "captcha.sass"))
     self._html = html
     return self._html
Exemple #7
0
     META(
         _name="viewport",
         _content=
         "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
     ),
     META(_name="aplication-name", _content="Flask, Nginx, Cordova"),
     META(_name="aplication-version", _content=app_version),
     META(_name="msapplication-tap-highlight", _content="no"),
     # LINK(_rel="manifest", _href="/static/{0}/json/manifest.json".format(app_version)),
     CSS_HEAD,
     JAVASCRIPT_HEAD,
     FAVICONS),
 BODY(
     DIV(_id="layout-top_slide-container"),
     NAV(DIV(DIV(_id="layout-main_button-container", _class="e-float_left"),
             DIV(DIV(XML(SVG_LOGO), _class="logo-svg"),
                 _class="p-logo link"),
             _class="nav-wrapper"),
         _class="main-nav"),
     DIV(DIV(_id="layout-left_bar-container"),
         MAIN(DIV(
             PRELOADER,
             _style="width:100%; text-align: center; padding-top: 100px;"),
              _id="main-container"),
         _class="main-and-left_bar"),
     DIV(_id="modal-container"),
     FOOTER(DIV(_id="main-progress-bar-container",
                _class="main-progress-bar-container"),
            DIV(DIV(_class="row"), _class='container'),
            DIV(DIV(A("Conexão Didata © 2011-",
                      SPAN("2020", _id="conexao_year"),
Exemple #8
0
app_version = CONFIG['PROJECT']['version']
app_folder_name = app_name_from_relative_child(CONFIG['PROJECT']['path'], __file__)
transcrypt_main_file = CONFIG["FRONTEND"][app_folder_name]['transcrypt_main_file']
html = CONCATENATE(
    SCRIPT(
        _src="/static/{0}/js/jquery.min.js".format(app_version)
    ),
    SCRIPT(
        _src="/static/{0}/lib/codemirror.js".format(app_version)
    ),
    SCRIPT(
        _src="/static/{0}/mode/python/python.js".format(app_version)
    ),
    SCRIPT(
        _src="/static/{0}/js/hammer.min.js".format(app_version)
    ),
    SCRIPT(
        _src="/static/{0}/js/touch-emulator.js".format(app_version)
    ),
    SCRIPT(
        _src="/static/{0}/js/jquery.hammer.js".format(app_version)
    ),
    XML(
        interpolate(
            "<script type=\"module\">import * as {{MODULE}} from '/static/{{VERSION}}/js/transcrypt/{{FILE}}'</script>",
            context={'MODULE': transcrypt_main_file, 'VERSION': app_version, 'FILE': "{0}.js".format(transcrypt_main_file)}
        )
    ),

)