Faloodeh UI
Python To HTML
hello everyone I am Amir Mohammad Dehghan this project is html, css and js compiler and this file is basic class and function for create elements in this project ...
Base_Elements_Tag
this class is basic class for create html tags well as h1, a p and the other tags similar them ...
Source code in Faloodeh\Faloodeh_UI\base_html_element.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
|
html_code = ''
instance-attribute
html_code is end answer of your progress and is html code if print it
general_tag(tag_name, args=None, attribute=None, single=False, add_to_body=True, inner=None, pyclass=None, pyid=None, pytype=None)
this function is basic customize html tags creator like p h1 a and other similar them
in tag_name you should enter name of your tag ilke p br and ...
some tags just are single. they don't have end tag like this <...> your inner and the have inner
but when single is True it will create tags like
I called the important html attribute in function entry like id as pyid , class as pyclass, and type as pytype
but for other attribute I used **kwargs for enter other and your customize attribute you can use like
example="attr_value"
Source code in Faloodeh\Faloodeh_UI\base_html_element.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
inner_tag(tag_name, add_to_body=True, inner=None, src=None, pyclass=None, pyid=None, args=None, attribute=None)
this function is basic customize html tags creator like script div class a and other similar them in inner_tag you should enter name of your tag ilke script class and ... they have to include end tag like this <...> your inner and the have inner it did not support single tags I called the important html attribute in function entry like id as pyid , class as pyclass, and type as pytype but for other attribute I used **kwargs for enter other and your customize attribute you can use like example="attr_value"
Source code in Faloodeh\Faloodeh_UI\base_html_element.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
|