|
@@ -1,8 +1,10 @@
|
|
#!/usr/bin/env python3
|
|
#!/usr/bin/env python3
|
|
-from nicegui import ui
|
|
|
|
|
|
+from nicegui import app, ui
|
|
|
|
|
|
-img_src = 'https://i.stack.imgur.com/PpIqU.png'
|
|
|
|
-mask_src = 'https://i.stack.imgur.com/OfwWp.png'
|
|
|
|
|
|
+app.add_static_files('/images', '.')
|
|
|
|
+
|
|
|
|
+img_src = '/images/PpIqU.png'
|
|
|
|
+mask_src = '/images/OfwWp.png'
|
|
|
|
|
|
with ui.row().classes('w-full flex items-center'):
|
|
with ui.row().classes('w-full flex items-center'):
|
|
ui.image(img_src).style('width: 25%')
|
|
ui.image(img_src).style('width: 25%')
|
|
@@ -14,10 +16,10 @@ with ui.row().classes('w-full flex items-center'):
|
|
<image xlink:href="{mask_src}" width="100%" height="100%" x="0" y="0" filter="url(#mask)" />
|
|
<image xlink:href="{mask_src}" width="100%" height="100%" x="0" y="0" filter="url(#mask)" />
|
|
<filter id="mask">
|
|
<filter id="mask">
|
|
<feComponentTransfer>
|
|
<feComponentTransfer>
|
|
- <feFuncR type="linear" slope="40" intercept="-(0.5 * 40) + 0.5"/>
|
|
|
|
- <feFuncG type="linear" slope="40" intercept="-(0.5 * 40) + 0.5"/>
|
|
|
|
- <feFuncB type="linear" slope="40" intercept="-(0.5 * 40) + 0.5"/>
|
|
|
|
- <feFuncR type="linear" slope="1000"/>
|
|
|
|
|
|
+ <feFuncR type="linear" slope="40" />
|
|
|
|
+ <feFuncG type="linear" slope="40" />
|
|
|
|
+ <feFuncB type="linear" slope="40" />
|
|
|
|
+ <feFuncR type="linear" slope="1000" />
|
|
</feComponentTransfer>
|
|
</feComponentTransfer>
|
|
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 3 -1 -1 0 0" />
|
|
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 3 -1 -1 0 0" />
|
|
</filter>
|
|
</filter>
|