Spaces:
Sleeping
Sleeping
link to dict
Browse files
app.py
CHANGED
@@ -92,6 +92,30 @@ if sentence:
|
|
92 |
|
93 |
# Construct the table as a Markdown string
|
94 |
table_md = "<div dir='rtl' style='text-align: right;'>\n\n" # Start with RTL div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
# Add the UD header lines
|
97 |
table_md += "##" + ud_output[0] + "\n"
|
@@ -106,7 +130,7 @@ if sentence:
|
|
106 |
|
107 |
wrd = cells[2]
|
108 |
if wrd != "\_":
|
109 |
-
cells[2] = "<iframe src='https://www.google.com/search?igu=1&q=" + wrd + "+in+English&authuser=0&hl=en-US' width='256' height='128'></iframe><br/>"
|
110 |
cells[2] += "<iframe src='https://freeali.se/freealise/translate/loader.htm?q=" + wrd + "&a=conj' width='256' height='128'></iframe><br/>"
|
111 |
cells[2] += "<iframe src='https://freeali.se/freealise/translate/loader.htm?q=" + wrd + "&a=def' width='256' height='128'></iframe><br/>"
|
112 |
cells[2] += "<a href='javascript:' onclick=''>" + wrd + "</a>"
|
|
|
92 |
|
93 |
# Construct the table as a Markdown string
|
94 |
table_md = "<div dir='rtl' style='text-align: right;'>\n\n" # Start with RTL div
|
95 |
+
table_md += """<style>
|
96 |
+
.google-translate-place {
|
97 |
+
width: 256px;
|
98 |
+
height: 128px;
|
99 |
+
margin-left:-128px;
|
100 |
+
position:relative;
|
101 |
+
left:128px;
|
102 |
+
}
|
103 |
+
.google-translate-crop {
|
104 |
+
width: 256px;
|
105 |
+
height: 128px;
|
106 |
+
overflow-y: scroll;
|
107 |
+
overflow-x: scroll;
|
108 |
+
position: absolute;
|
109 |
+
}
|
110 |
+
.google-translate {
|
111 |
+
transform: scale(0.75);
|
112 |
+
transform-origin: 180px 180px;
|
113 |
+
position: relative;
|
114 |
+
left: -180px; top: -180px;
|
115 |
+
width: 2560px; height: 5120px;
|
116 |
+
position: absolute;
|
117 |
+
}
|
118 |
+
</style>"""
|
119 |
|
120 |
# Add the UD header lines
|
121 |
table_md += "##" + ud_output[0] + "\n"
|
|
|
130 |
|
131 |
wrd = cells[2]
|
132 |
if wrd != "\_":
|
133 |
+
cells[2] = "<div class='google-translate-place'><div class='google-translate-crop'><iframe class='google-translate' src='https://www.google.com/search?igu=1&q=" + wrd + "+in+English&authuser=0&hl=en-US' width='256' height='128'></iframe></div></div><br/>"
|
134 |
cells[2] += "<iframe src='https://freeali.se/freealise/translate/loader.htm?q=" + wrd + "&a=conj' width='256' height='128'></iframe><br/>"
|
135 |
cells[2] += "<iframe src='https://freeali.se/freealise/translate/loader.htm?q=" + wrd + "&a=def' width='256' height='128'></iframe><br/>"
|
136 |
cells[2] += "<a href='javascript:' onclick=''>" + wrd + "</a>"
|