first commi
3
nimanyatta_v001/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
/dist/
|
||||
/target/
|
||||
/Cargo.lock
|
7
nimanyatta_v001/Cargo.toml
Normal file
|
@ -0,0 +1,7 @@
|
|||
[package]
|
||||
name = "nimanyatta_v001"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
makepad-widgets = { git = "https://github.com/makepad/makepad", branch = "rik" }
|
0
nimanyatta_v001/README.md
Normal file
4
nimanyatta_v001/resources/icons/add_contact.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 26.12 478.318 C 27.455 371.36 111.726 246.106 262.142 245.254 C 405.325 244.252 468.365 358.156 472.358 476.201 Z M 361.132 148.48 C 361.672 200.615 318.234 237.596 265.693 237.952 C 205.763 238.358 141.023 201.499 141.023 141.567 C 141.023 81.635 203.446 37.329 256.008 37.901 C 315.875 38.552 361.22 99.215 361.132 148.48 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 477 B |
8
nimanyatta_v001/resources/icons/arrow_back.svg
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- License: CC Attribution. Made by salesforce: https://lightningdesignsystem.com/ -->
|
||||
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg"
|
||||
width="800px" height="800px" viewBox="0 0 52 52" enable-background="new 0 0 52 52" xml:space="preserve">
|
||||
<path d="M48.6,23H15.4c-0.9,0-1.3-1.1-0.7-1.7l9.6-9.6c0.6-0.6,0.6-1.5,0-2.1l-2.2-2.2c-0.6-0.6-1.5-0.6-2.1,0
|
||||
L2.5,25c-0.6,0.6-0.6,1.5,0,2.1L20,44.6c0.6,0.6,1.5,0.6,2.1,0l2.1-2.1c0.6-0.6,0.6-1.5,0-2.1l-9.6-9.6C14,30.1,14.4,29,15.3,29
|
||||
h33.2c0.8,0,1.5-0.6,1.5-1.4v-3C50,23.8,49.4,23,48.6,23z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 590 B |
|
@ -0,0 +1,11 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"/></svg>
|
||||
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- License: CC Attribution. Made by salesforce: https://lightningdesignsystem.com/ -->
|
||||
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg"
|
||||
width="800px" height="800px" viewBox="0 0 52 52" enable-background="new 0 0 52 52" xml:space="preserve">
|
||||
<path d="M48.6,23H15.4c-0.9,0-1.3-1.1-0.7-1.7l9.6-9.6c0.6-0.6,0.6-1.5,0-2.1l-2.2-2.2c-0.6-0.6-1.5-0.6-2.1,0
|
||||
L2.5,25c-0.6,0.6-0.6,1.5,0,2.1L20,44.6c0.6,0.6,1.5,0.6,2.1,0l2.1-2.1c0.6-0.6,0.6-1.5,0-2.1l-9.6-9.6C14,30.1,14.4,29,15.3,29
|
||||
h33.2c0.8,0,1.5-0.6,1.5-1.4v-3C50,23.8,49.4,23,48.6,23z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 763 B |
4
nimanyatta_v001/resources/icons/back.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 353.56 52.54 L 112.646 233.14 L 82.765 255.541 L 112.842 277.727 L 355.107 456.442 L 395.549 411.711 L 183.36 255.183 L 394.393 96.983 L 353.56 52.54 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 303 B |
4
nimanyatta_v001/resources/icons/chat.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 485.952 219.206 C 485.952 309.503 387.472 382.704 265.99 382.704 C 231.496 382.704 198.857 376.802 169.799 366.283 C 129.409 399.528 43.827 448.824 28.821 443.232 C 36.136 445.451 92.393 358.523 100.398 326.828 C 66.544 298.072 46.028 260.42 46.028 219.206 C 46.028 128.909 144.508 55.708 265.99 55.708 C 387.472 55.708 485.952 128.909 485.952 219.206 Z M 28.701 443.186 C 28.74 443.202 28.78 443.217 28.821 443.232 C 28.779 443.22 28.739 443.204 28.701 443.186 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 616 B |
4
nimanyatta_v001/resources/icons/contacts.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 8.519 478.559 C 9.706 374.681 84.66 253.033 218.445 252.205 C 345.797 251.232 401.867 361.857 405.418 476.503 L 8.519 478.559 Z M 306.49 158.218 C 306.971 208.852 268.335 244.768 221.603 245.114 C 168.3 245.508 110.718 209.71 110.718 151.504 C 110.718 93.297 166.239 50.267 212.989 50.822 C 266.237 51.455 306.568 110.371 306.49 158.218 Z M 364.323 153.275 L 479.38 153.214 L 479.386 164.214 L 364.329 164.275 L 364.323 153.275 Z M 481.582 229.879 L 367.499 229.543 L 367.531 218.543 L 481.614 218.879 L 481.582 229.879 Z M 366.138 296.715 L 482.243 296.612 L 482.253 307.612 L 366.148 307.715 L 366.138 296.715 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 763 B |
4
nimanyatta_v001/resources/icons/discover.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 462.932 247.921 C 462.28 317.262 383.634 461.241 260.208 451.248 C 118.81 439.799 71.095 346.598 72.526 241.826 C 74.423 102.936 192.292 42.705 260.208 44.594 C 411.229 48.794 463.584 178.58 462.932 247.921 Z M 336.948 226.044 L 382.363 110.526 L 274.785 176.882 Z M 269.576 196.661 C 245.557 196.661 226.085 217.9 226.085 244.099 C 226.085 270.298 245.557 291.537 269.576 291.537 C 293.595 291.537 313.067 270.298 313.067 244.099 C 313.067 217.9 293.595 196.661 269.576 196.661 Z M 203.842 263.902 L 161.467 390.659 L 271.348 306.072 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 689 B |
5
nimanyatta_v001/resources/icons/icon_home.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 23 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<path d="M 26.12 478.318 C 27.455 371.36 111.726 246.106 262.142 245.254 C 405.325 244.252 468.365 358.156 472.358 476.201 L 26.12 478.318 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 598 B |
4
nimanyatta_v001/resources/icons/me.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 26.12 478.318 C 27.455 371.36 111.726 246.106 262.142 245.254 C 405.325 244.252 468.365 358.156 472.358 476.201 Z M 361.132 148.48 C 361.672 200.615 318.234 237.596 265.693 237.952 C 205.763 238.358 141.023 201.499 141.023 141.567 C 141.023 81.635 203.446 37.329 256.008 37.901 C 315.875 38.552 361.22 99.215 361.132 148.48 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 477 B |
1
nimanyatta_v001/resources/icons/menu.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> <title>ic_fluent_add_circle_28_regular</title> <desc>Created with Sketch.</desc> <g id="🔍-System-Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g id="ic_fluent_add_circle_28_regular" fill="#212121" fill-rule="nonzero"> <path d="M14,2 C20.627417,2 26,7.372583 26,14 C26,20.627417 20.627417,26 14,26 C7.372583,26 2,20.627417 2,14 C2,7.372583 7.372583,2 14,2 Z M14,3.5 C8.20101013,3.5 3.5,8.20101013 3.5,14 C3.5,19.7989899 8.20101013,24.5 14,24.5 C19.7989899,24.5 24.5,19.7989899 24.5,14 C24.5,8.20101013 19.7989899,3.5 14,3.5 Z M14,8 C14.4142136,8 14.75,8.33578644 14.75,8.75 L14.75,13.25 L19.25,13.25 C19.6642136,13.25 20,13.5857864 20,14 C20,14.4142136 19.6642136,14.75 19.25,14.75 L14.75,14.75 L14.75,19.25 C14.75,19.6642136 14.4142136,20 14,20 C13.5857864,20 13.25,19.6642136 13.25,19.25 L13.25,14.75 L8.75,14.75 C8.33578644,14.75 8,14.4142136 8,14 C8,13.5857864 8.33578644,13.25 8.75,13.25 L13.25,13.25 L13.25,8.75 C13.25,8.33578644 13.5857864,8 14,8 Z" id="🎨-Color"> </path> </g> </g> </g></svg>
|
After Width: | Height: | Size: 1.4 KiB |
5
nimanyatta_v001/resources/icons/money.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 23 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<path d="M11.391,4.904C11.465,4.83 11.576,4.793 11.688,4.793C11.762,4.793 11.873,4.83 11.947,4.904L18.813,10.508L18.813,16.594C18.813,16.928 18.516,17.188 18.219,17.188L14.025,17.188C13.729,17.188 13.432,16.928 13.432,16.594L13.432,13.031C13.432,12.734 13.172,12.438 12.838,12.438L10.463,12.438C10.166,12.438 9.869,12.734 9.869,13.031L9.869,16.594C9.869,16.928 9.609,17.188 9.313,17.188L5.156,17.188C4.822,17.188 4.563,16.928 4.563,16.594L4.563,10.545L11.391,4.904ZM22.19,8.727C22.301,8.801 22.375,8.949 22.375,9.061C22.375,9.172 22.338,9.283 22.264,9.357L21.299,10.508C21.225,10.619 21.113,10.656 20.965,10.656C20.854,10.656 20.742,10.619 20.668,10.545L11.947,3.383C11.873,3.309 11.762,3.271 11.688,3.271C11.576,3.271 11.465,3.309 11.391,3.383L2.67,10.545C2.596,10.619 2.484,10.656 2.373,10.656C2.225,10.656 2.113,10.619 2.039,10.508L1.074,9.357C1.037,9.283 0.963,9.172 0.963,9.061C0.963,8.949 1.037,8.801 1.148,8.727L10.537,0.971C10.834,0.748 11.242,0.6 11.688,0.6C12.096,0.6 12.504,0.748 12.801,0.971L16.141,3.717L16.141,1.045C16.141,0.785 16.326,0.6 16.586,0.6L18.664,0.6C18.887,0.6 19.109,0.785 19.109,1.045L19.109,6.166L22.19,8.727Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
6
nimanyatta_v001/resources/icons/navbar_icons/phone.svg
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- License: CC Attribution. Made by salesforce: https://lightningdesignsystem.com/ -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
height="24" viewBox="0 -960 960 960" width="24">
|
||||
<path d="M798-120q-125 0-247-54.5T329-329Q229-429 174.5-551T120-798q0-18 12-30t30-12h162q14 0 25 9.5t13 22.5l26 140q2 16-1 27t-11 19l-97 98q20 37 47.5 71.5T387-386q31 31 65 57.5t72 48.5l94-94q9-9 23.5-13.5T670-390l138 28q14 4 23 14.5t9 23.5v162q0 18-12 30t-30 12ZM241-600l66-66-17-94h-89q5 41 14 81t26 79Zm358 358q39 17 79.5 27t81.5 13v-88l-94-19-67 67ZM241-600Zm358 358Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 607 B |
7
nimanyatta_v001/resources/icons/scan.svg
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 19 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(-1,0,0,1,18.9721,0)">
|
||||
<path d="M18.666,6.426C19.074,6.797 19.074,7.428 18.666,7.799L12.135,13.44C11.578,13.922 10.688,13.514 10.688,12.734L10.688,9.506C4.898,9.58 2.449,10.99 4.119,16.371C4.305,16.965 3.563,17.447 3.08,17.076C1.447,15.889 0,13.625 0,11.361C0,5.721 4.713,4.496 10.688,4.459L10.688,1.49C10.688,0.711 11.578,0.303 12.135,0.785L18.666,6.426Z" style="fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 877 B |
5
nimanyatta_v001/resources/icons/search.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 19 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1;">
|
||||
<path d="M18.74,16.815C19.074,17.186 19.074,17.742 18.703,18.076L17.664,19.115C17.33,19.486 16.773,19.486 16.402,19.115L12.729,15.441C12.543,15.256 12.469,15.033 12.469,14.81L12.469,14.18C11.133,15.219 9.5,15.813 7.719,15.813C3.451,15.813 0,12.361 0,8.094C0,3.863 3.451,0.375 7.719,0.375C11.949,0.375 15.438,3.863 15.438,8.094C15.438,9.912 14.807,11.545 13.805,12.844L14.398,12.844C14.621,12.844 14.844,12.955 15.029,13.104L18.74,16.815ZM7.719,12.844C10.316,12.844 12.469,10.729 12.469,8.094C12.469,5.496 10.316,3.344 7.719,3.344C5.084,3.344 2.969,5.496 2.969,8.094C2.969,10.729 5.084,12.844 7.719,12.844Z" style="fill-rule:nonzero; stroke-width: 0.5;"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
BIN
nimanyatta_v001/resources/makepad.png
Normal file
After Width: | Height: | Size: 22 KiB |
42
nimanyatta_v001/resources/makepad.svg
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 7067 1035" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<g transform="matrix(1,0,0,1,-54.1122,-304.466)">
|
||||
<!-- <rect id="ArtBoard5" x="54.112" y="304.466" width="7066.93" height="1034.07" style="fill:none;"/> -->
|
||||
<g>
|
||||
<clipPath id="_clip1">
|
||||
<rect x="54.112" y="304.466" width="7066.93" height="1034.07"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#_clip1)">
|
||||
<g transform="matrix(2.46433,0,0,0.355348,0.112216,246.617)">
|
||||
<g transform="matrix(0.412987,0,0,2.51071,-14964.8,-23383.5)">
|
||||
<path d="M37739.3,9977.06L38019.7,10537.9L37458.9,10537.9L37739.3,9977.06Z" style="fill:rgb(255,92,57);"/>
|
||||
</g>
|
||||
<g transform="matrix(-0.412987,0,0,2.51071,15723.6,-23383.5)">
|
||||
<path d="M37739.3,9977.06L38019.7,10537.9L37458.9,10537.9L37739.3,9977.06Z" style="fill:rgb(255,92,57);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.412987,0,0,2.51071,-15087.3,-24885.4)">
|
||||
<path d="M37739.3,9977.06L38019.7,10537.9L37458.9,10537.9L37739.3,9977.06Z" style="fill:rgb(255,92,57);"/>
|
||||
</g>
|
||||
<g transform="matrix(-0.412987,0,0,2.51071,15846,-24885.4)">
|
||||
<path d="M37739.3,9977.06L38019.7,10537.9L37458.9,10537.9L37739.3,9977.06Z" style="fill:rgb(255,92,57);"/>
|
||||
</g>
|
||||
<g transform="matrix(-0.412987,-3.50746e-16,4.43366e-17,-2.51071,16084.4,28088.3)">
|
||||
<path d="M37739.3,9977.06L38019.7,10537.9L37458.9,10537.9L37739.3,9977.06Z" style="fill:rgb(255,92,57);"/>
|
||||
</g>
|
||||
<g transform="matrix(0.412987,-3.50746e-16,-4.43366e-17,-2.51071,-15325.6,28088.3)">
|
||||
<path d="M37739.3,9977.06L38019.7,10537.9L37458.9,10537.9L37739.3,9977.06Z" style="fill:rgb(255,92,57);"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(83.3091,0,0,83.3091,-43233.8,-47386.6)">
|
||||
<path d="M544.422,582.292L546.018,582.292L546.63,579.016C546.75,578.38 546.87,577.936 547.026,577.672C547.302,577.204 547.746,576.952 548.31,576.952C548.718,576.952 549.054,577.096 549.222,577.348C549.318,577.492 549.366,577.684 549.366,577.948C549.366,578.14 549.33,578.368 549.282,578.644L548.61,582.292L550.206,582.292L550.818,579.016C550.95,578.296 551.07,577.924 551.274,577.624C551.574,577.192 552.018,576.952 552.534,576.952C552.918,576.952 553.23,577.084 553.398,577.336C553.506,577.48 553.554,577.672 553.554,577.948C553.554,578.14 553.518,578.368 553.47,578.644L552.798,582.292L554.394,582.292L555.102,578.452C555.162,578.116 555.198,577.804 555.198,577.528C555.198,577.168 555.15,576.856 555.054,576.604C554.766,575.896 553.998,575.488 552.954,575.488C552.018,575.488 551.31,575.8 550.638,576.52C550.314,575.788 549.798,575.488 548.874,575.488C548.094,575.488 547.578,575.704 547.002,576.268L547.122,575.644L545.658,575.644L544.422,582.292Z" style="fill:rgb(250,225,188);fill-rule:nonzero;"/>
|
||||
<path d="M563.61,575.644L562.146,575.644L561.978,576.532C561.558,575.8 560.958,575.488 559.998,575.488C558.03,575.488 556.338,576.964 555.966,578.992C555.918,579.244 555.894,579.484 555.894,579.724C555.894,581.344 556.986,582.448 558.678,582.448C559.614,582.448 560.298,582.16 561.066,581.428L560.91,582.292L562.374,582.292L563.61,575.644ZM559.866,576.952C560.874,576.952 561.522,577.588 561.522,578.548C561.522,578.692 561.498,578.836 561.474,578.992C561.258,580.18 560.322,580.984 559.17,580.984C558.15,580.984 557.526,580.372 557.526,579.448C557.526,579.316 557.538,579.172 557.562,579.028C557.79,577.828 558.75,576.952 559.866,576.952Z" style="fill:rgb(250,225,188);fill-rule:nonzero;"/>
|
||||
<path d="M563.67,582.292L565.266,582.292L565.842,579.184L567.534,582.292L569.682,582.292L567.546,578.896L570.534,575.644L568.626,575.644L565.914,578.776L566.91,573.424L565.314,573.424L563.67,582.292Z" style="fill:rgb(250,225,188);fill-rule:nonzero;"/>
|
||||
<path d="M576.918,579.676C577.014,579.448 577.05,579.304 577.098,579.064C577.146,578.8 577.17,578.548 577.17,578.308C577.17,576.64 576.054,575.488 574.326,575.488C572.37,575.488 570.534,577.036 570.174,578.992C570.138,579.208 570.114,579.424 570.114,579.628C570.114,581.26 571.338,582.448 573.138,582.448C574.23,582.448 575.142,582.064 575.994,581.248C576.306,580.936 576.522,580.66 576.69,580.324L574.95,580.324C574.458,580.804 574.026,580.984 573.366,580.984C572.418,580.984 571.818,580.48 571.77,579.676L576.918,579.676ZM571.986,578.272C572.394,577.408 573.126,576.952 574.074,576.952C575.058,576.952 575.622,577.42 575.67,578.272L571.986,578.272Z" style="fill:rgb(250,225,188);fill-rule:nonzero;"/>
|
||||
<path d="M577.074,584.512L578.67,584.512L579.198,581.668C579.714,582.208 580.278,582.448 581.094,582.448C583.014,582.448 584.694,580.96 585.066,578.944C585.114,578.692 585.138,578.44 585.138,578.2C585.138,576.592 584.07,575.488 582.39,575.488C581.49,575.488 580.662,575.812 580.038,576.424L580.182,575.644L578.718,575.644L577.074,584.512ZM581.874,576.952C582.858,576.952 583.494,577.612 583.494,578.548C583.494,578.68 583.47,578.836 583.446,578.98C583.242,580.108 582.246,580.984 581.178,580.984C580.206,580.984 579.558,580.312 579.558,579.388C579.558,579.256 579.57,579.124 579.594,578.992C579.81,577.828 580.794,576.952 581.874,576.952Z" style="fill:rgb(250,225,188);fill-rule:nonzero;"/>
|
||||
<path d="M593.37,575.644L591.906,575.644L591.738,576.532C591.318,575.8 590.718,575.488 589.758,575.488C587.79,575.488 586.098,576.964 585.726,578.992C585.678,579.244 585.654,579.484 585.654,579.724C585.654,581.344 586.746,582.448 588.438,582.448C589.374,582.448 590.058,582.16 590.826,581.428L590.67,582.292L592.134,582.292L593.37,575.644ZM589.626,576.952C590.634,576.952 591.282,577.588 591.282,578.548C591.282,578.692 591.258,578.836 591.234,578.992C591.018,580.18 590.082,580.984 588.93,580.984C587.91,580.984 587.286,580.372 587.286,579.448C587.286,579.316 587.298,579.172 587.322,579.028C587.55,577.828 588.51,576.952 589.626,576.952Z" style="fill:rgb(250,225,188);fill-rule:nonzero;"/>
|
||||
<path d="M601.758,573.424L600.162,573.424L599.646,576.232C599.274,575.716 598.554,575.404 597.714,575.404C595.854,575.404 594.114,576.964 593.742,578.956C593.694,579.196 593.67,579.436 593.67,579.664C593.67,581.284 594.774,582.448 596.43,582.448C597.33,582.448 598.026,582.148 598.806,581.428L598.65,582.292L600.114,582.292L601.758,573.424ZM597.654,576.868C598.662,576.868 599.298,577.528 599.298,578.5C599.298,578.644 599.286,578.788 599.262,578.944C599.046,580.084 598.026,580.984 596.946,580.984C595.974,580.984 595.314,580.276 595.314,579.316C595.314,579.184 595.326,579.052 595.35,578.908C595.566,577.756 596.574,576.868 597.654,576.868Z" style="fill:rgb(250,225,188);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 7.1 KiB |
4
nimanyatta_v001/resources/me.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M 26.12 478.318 C 27.455 371.36 111.726 246.106 262.142 245.254 C 405.325 244.252 468.365 358.156 472.358 476.201 Z M 361.132 148.48 C 361.672 200.615 318.234 237.596 265.693 237.952 C 205.763 238.358 141.023 201.499 141.023 141.567 C 141.023 81.635 203.446 37.329 256.008 37.901 C 315.875 38.552 361.22 99.215 361.132 148.48 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 477 B |
298
nimanyatta_v001/src/app.rs
Normal file
|
@ -0,0 +1,298 @@
|
|||
use makepad_widgets::*;
|
||||
|
||||
live_design! {
|
||||
|
||||
import makepad_draw::shader::std::*;
|
||||
import makepad_widgets::base::*;
|
||||
import makepad_widgets::theme_desktop_dark::*;
|
||||
|
||||
import crate::home::home_screen::HomeScreen;
|
||||
import crate::default_choice::default_choice_screen::DefaultChoiceScreen;
|
||||
import crate::two::two_screen::TwoScreen;
|
||||
import crate::three::three_screen::ThreeScreen;
|
||||
import crate::four::four_screen::FourScreen;
|
||||
import crate::five::five_screen::FiveScreen;
|
||||
import crate::shared::styles::*;
|
||||
|
||||
REGULAR_TEXT = {
|
||||
font_size: (12),
|
||||
font: {path: dep("crate://makepad-widgets/resources/GoNotoKurrent-Regular.ttf")}
|
||||
}
|
||||
ICON_CHAT = dep("crate://self/resources/icons/chat.svg")
|
||||
PHONE_CHAT = dep("crate://self/resources/icons/chat.svg")
|
||||
|
||||
AppTab = <RadioButton> {
|
||||
width: Fit,
|
||||
height: Fill,
|
||||
flow: Right,
|
||||
align: {x: 0.0, y: 0.0}
|
||||
margin: <SPACING_0> {}
|
||||
padding: <SPACING_0> {}
|
||||
// color: #000
|
||||
draw_radio: {
|
||||
radio_type: Tab,
|
||||
color_active: #fff,
|
||||
color_inactive: #fff,
|
||||
}
|
||||
draw_text: {
|
||||
color_selected: #000, //#0b0,
|
||||
color_unselected: #000,
|
||||
color_unselected_hover: #111,
|
||||
text_style: <H3_TEXT_REGULAR> {}
|
||||
}
|
||||
}
|
||||
App = {{App}} {
|
||||
ui: <Window> {
|
||||
caption_bar = { margin: {left: -100}, visible: true, caption_label = {label = {text: "NiManyatta"}} },
|
||||
|
||||
body = {
|
||||
show_bg: true
|
||||
flow: Down,
|
||||
spacing: 20,
|
||||
align: {
|
||||
x: 0.5,
|
||||
y: 1.0
|
||||
},
|
||||
width: Fill,
|
||||
height: Fill
|
||||
|
||||
draw_bg: {
|
||||
fn pixel(self) -> vec4 {
|
||||
return mix(#3, #1, self.pos.y);
|
||||
}
|
||||
}
|
||||
navigation = <StackNavigation> {
|
||||
root_view = {
|
||||
width: Fill,
|
||||
height: Fill,
|
||||
padding: 0, align: {x: 1, y: 0.0}, spacing: 0., flow: Down
|
||||
mobile_menu = <View> {
|
||||
width: Fill,
|
||||
height: 80,
|
||||
// flow: Down,
|
||||
show_bg: true
|
||||
spacing: 0.0, padding: 0
|
||||
draw_bg: {
|
||||
instance radius: 0.0,
|
||||
instance border_width: 0.0,
|
||||
instance border_color: #000,
|
||||
color: #fff
|
||||
}
|
||||
|
||||
mobile_modes = <View> {
|
||||
|
||||
home_tab = <AppTab> {
|
||||
flow: Right,
|
||||
align: {x: 0.0, y: 0.5}
|
||||
animator: {selected = {default: on}}
|
||||
label: ""
|
||||
draw_icon: {
|
||||
svg_file: (ICON_CHAT),
|
||||
fn get_color(self) -> vec4 {
|
||||
return mix(
|
||||
#000,
|
||||
#016def,//#0b0,
|
||||
self.selected
|
||||
)
|
||||
}
|
||||
}
|
||||
width: Fill,
|
||||
icon_walk: {width: 20, height: 20}
|
||||
flow: Right, spacing: 5.0, align: {x: 0.2, y: 0.5}
|
||||
}
|
||||
two_tab = <AppTab> {
|
||||
flow: Right,
|
||||
align: {x: 0.0, y: 0.5}
|
||||
animator: {selected = {default: on}}
|
||||
label: "2"
|
||||
draw_icon: {
|
||||
svg_file: (ICON_CHAT),
|
||||
fn get_color(self) -> vec4 {
|
||||
return mix(
|
||||
#000,
|
||||
#016def,//#0b0,
|
||||
self.selected
|
||||
)
|
||||
}
|
||||
}
|
||||
width: Fill,
|
||||
icon_walk: {width: 20, height: 20}
|
||||
flow: Down, spacing: 5.0, align: {x: 0.5, y: 0.5}
|
||||
}
|
||||
three_tab = <AppTab> {
|
||||
flow: Right,
|
||||
align: {x: 0.0, y: 0.5}
|
||||
animator: {selected = {default: on}}
|
||||
label: "3"
|
||||
draw_icon: {
|
||||
svg_file: (ICON_CHAT),
|
||||
fn get_color(self) -> vec4 {
|
||||
return mix(
|
||||
#000,
|
||||
#016def,//#0b0,
|
||||
self.selected
|
||||
)
|
||||
}
|
||||
}
|
||||
width: Fill,
|
||||
icon_walk: {width: 20, height: 20}
|
||||
flow: Down, spacing: 5.0, align: {x: 0.5, y: 0.5}
|
||||
}
|
||||
four_tab = <AppTab> {
|
||||
flow: Right,
|
||||
align: {x: 0.0, y: 0.5}
|
||||
animator: {selected = {default: on}}
|
||||
label: "4"
|
||||
draw_icon: {
|
||||
svg_file: (ICON_CHAT),
|
||||
fn get_color(self) -> vec4 {
|
||||
return mix(
|
||||
#000,
|
||||
#016def,//#0b0,
|
||||
self.selected
|
||||
)
|
||||
}
|
||||
}
|
||||
width: Fill,
|
||||
icon_walk: {width: 20, height: 20}
|
||||
flow: Down, spacing: 5.0, align: {x: 0.5, y: 0.5}
|
||||
}
|
||||
five_tab = <AppTab> {
|
||||
flow: Right,
|
||||
align: {x: 0.0, y: 0.5}
|
||||
animator: {selected = {default: on}}
|
||||
label: ""
|
||||
draw_icon: {
|
||||
svg_file: (PHONE_CHAT),
|
||||
fn get_color(self) -> vec4 {
|
||||
return mix(
|
||||
#000,
|
||||
#016def,//#0b0,
|
||||
self.selected
|
||||
)
|
||||
}
|
||||
}
|
||||
width: Fill,
|
||||
icon_walk: {width: 20, height: 20}
|
||||
flow: Right, spacing: 5.0, align: {x: 0.8, y: 0.5}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
application_pages = <View> {
|
||||
margin: 0.0,
|
||||
padding: 0.0
|
||||
|
||||
home_frame = <HomeScreen> { visible: true }
|
||||
kimanyatta_frame = <TwoScreen> {visible: false}
|
||||
insurance_frame = <ThreeScreen> {visible: false}
|
||||
matatu_frame = <FourScreen> {visible: false}
|
||||
contactus_frame = <FiveScreen> {visible: false}
|
||||
}
|
||||
}
|
||||
|
||||
default_choices_stack_view = <StackNavigationView> { //default_choices_stack_view
|
||||
header = {
|
||||
content = {
|
||||
title_container = {
|
||||
title = {
|
||||
text: "Help Me Choose"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
body = {
|
||||
<DefaultChoiceScreen> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
app_main!(App);
|
||||
|
||||
#[derive(Live)]
|
||||
pub struct App {
|
||||
#[live]
|
||||
ui: WidgetRef,
|
||||
}
|
||||
|
||||
impl LiveRegister for App {
|
||||
fn live_register(cx: &mut Cx) {
|
||||
crate::makepad_widgets::live_design(cx);
|
||||
crate::home::home_screen::live_design(cx);
|
||||
crate::default_choice::default_choice_screen::live_design(cx);
|
||||
crate::two::two_screen::live_design(cx);
|
||||
crate::three::three_screen::live_design(cx);
|
||||
crate::four::four_screen::live_design(cx);
|
||||
crate::five::five_screen::live_design(cx);
|
||||
|
||||
crate::shared::styles::live_design(cx);
|
||||
crate::shared::custom_button::live_design(cx);
|
||||
}
|
||||
}
|
||||
|
||||
impl LiveHook for App {
|
||||
// fn after_new_from_doc(&mut self, _cx: &mut Cx) {
|
||||
// // self.init_navigation_destinations();
|
||||
// }
|
||||
fn after_new_from_doc(&mut self, _cx: &mut Cx) {
|
||||
println!("after_new_from_doc(): starting some kind of a loop");
|
||||
// crate::sliding_sync::start_matrix_tokio().unwrap();
|
||||
}
|
||||
}
|
||||
impl MatchEvent for App {
|
||||
fn handle_startup(&mut self, _cx: &mut Cx) {
|
||||
log!("App::handle_startup(): starting nigig sdk loop");
|
||||
// crate::sliding_sync::start_matrix_tokio().unwrap();
|
||||
}
|
||||
fn handle_shutdown(&mut self, _cx: &mut Cx) {
|
||||
log!("App::handle_shutdown()");
|
||||
}
|
||||
fn handle_pause(&mut self, _cx: &mut Cx) {
|
||||
log!("App::handle_pause()");
|
||||
}
|
||||
fn handle_resume(&mut self, _cx: &mut Cx) {
|
||||
log!("App::handle_resume()");
|
||||
}
|
||||
fn handle_app_got_focus(&mut self, _cx: &mut Cx) {
|
||||
log!("App::handle_app_got_focus()");
|
||||
}
|
||||
fn handle_app_lost_focus(&mut self, _cx: &mut Cx) {
|
||||
log!("App::handle_app_lost_focus()");
|
||||
}
|
||||
fn handle_actions(&mut self, cx: &mut Cx, actions: &Actions) {
|
||||
self.ui
|
||||
.radio_button_set(ids!(
|
||||
mobile_modes.home_tab,
|
||||
mobile_modes.two_tab,
|
||||
mobile_modes.three_tab,
|
||||
mobile_modes.four_tab,
|
||||
mobile_modes.five_tab,
|
||||
))
|
||||
.selected_to_visible(
|
||||
cx,
|
||||
&self.ui,
|
||||
&actions,
|
||||
ids!(
|
||||
application_pages.home_frame,
|
||||
application_pages.two_frame,
|
||||
application_pages.three_frame,
|
||||
application_pages.four_frame,
|
||||
application_pages.five_frame,
|
||||
),
|
||||
);
|
||||
|
||||
let mut navigation = self.ui.stack_navigation(id!(navigation));
|
||||
navigation.handle_stack_view_actions(cx, &actions);
|
||||
}
|
||||
}
|
||||
|
||||
impl AppMain for App {
|
||||
fn handle_event(&mut self, cx: &mut Cx, event: &Event) {
|
||||
self.match_event(cx, event);
|
||||
self.ui.handle_event(cx, event, &mut Scope::empty());
|
||||
}
|
||||
}
|
72
nimanyatta_v001/src/default_choice/default_choice_screen.rs
Normal file
|
@ -0,0 +1,72 @@
|
|||
use makepad_widgets::widget::WidgetCache;
|
||||
use makepad_widgets::*;
|
||||
use std::collections::HashMap;
|
||||
|
||||
// use crate::shared::steps::StepsNavSetWidgetExt;
|
||||
|
||||
live_design! {
|
||||
import makepad_draw::shader::std::*;
|
||||
import makepad_widgets::base::*;
|
||||
import makepad_widgets::theme_desktop_dark::*;
|
||||
|
||||
import crate::shared::styles::*;
|
||||
import crate::shared::custom_button::CustomButton;
|
||||
|
||||
DefaultChoiceScreen = <View> {
|
||||
width: Fill, height: Fill flow: Down
|
||||
<View> {
|
||||
flow: Down,
|
||||
align: {x: 0.5, y: 0.3}
|
||||
<View> {
|
||||
flow: Down,
|
||||
spacing: (SSPACING_2),
|
||||
align: {x: 0.5, y: 0.5}
|
||||
label = <Label> {
|
||||
margin: {top: 1}
|
||||
draw_text: {
|
||||
text_style: <H2_TEXT_BOLD> {},
|
||||
color: (COLOR_DOWN_6)
|
||||
}
|
||||
text: "Step One"
|
||||
}
|
||||
getstarted = <CustomButton> {
|
||||
width: 250
|
||||
height: Fit
|
||||
text: "Submit"
|
||||
draw_bg: {
|
||||
border_radius: 2.
|
||||
}
|
||||
}
|
||||
getstartedw = <CustomButton> {
|
||||
width: 250
|
||||
height: Fit
|
||||
text: "Submit"
|
||||
draw_bg: {
|
||||
border_radius: 2.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Live, LiveHook, Widget)]
|
||||
pub struct DefaultChoiceScreen {
|
||||
#[deref]
|
||||
view: View,
|
||||
}
|
||||
|
||||
impl Widget for DefaultChoiceScreen {
|
||||
fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
|
||||
let _uid = self.widget_uid();
|
||||
|
||||
let actions = cx.capture_actions(|cx| self.view.handle_event(cx, event, scope));
|
||||
if self.view.button(id!(getstartedw)).clicked(&actions) {
|
||||
log!("Option Selected: {}", 0);
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_walk(&mut self, cx: &mut Cx2d, scope: &mut Scope, walk: Walk) -> DrawStep {
|
||||
self.view.draw_walk(cx, scope, walk)
|
||||
}
|
||||
}
|
1
nimanyatta_v001/src/default_choice/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod default_choice_screen;
|
61
nimanyatta_v001/src/five/five_screen.rs
Normal file
|
@ -0,0 +1,61 @@
|
|||
use makepad_widgets::widget::WidgetCache;
|
||||
use makepad_widgets::*;
|
||||
|
||||
live_design! {
|
||||
import makepad_draw::shader::std::*;
|
||||
import makepad_widgets::base::*;
|
||||
import makepad_widgets::theme_desktop_dark::*;
|
||||
|
||||
import crate::shared::styles::*;
|
||||
import crate::shared::custom_button::CustomButton;
|
||||
|
||||
FiveScreen = <View> {
|
||||
width: Fill, height: Fill
|
||||
flow: Down
|
||||
show_bg: true,
|
||||
draw_bg: {
|
||||
color: #fff
|
||||
}
|
||||
<View> {
|
||||
flow: Down,
|
||||
spacing: (SSPACING_2),
|
||||
|
||||
align: {x: 0.5, y: 1}
|
||||
label = <Label> {
|
||||
margin: {top: 1}
|
||||
draw_text: {
|
||||
text_style: <H2_TEXT_BOLD> {},
|
||||
color: (COLOR_DOWN_6)
|
||||
}
|
||||
text: "Five"
|
||||
}
|
||||
// getstarted = <FishButton> {text: "Get Started"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Live, LiveHook, Widget)]
|
||||
pub struct Five {
|
||||
#[deref]
|
||||
view: View,
|
||||
#[rust]
|
||||
counter: usize,
|
||||
}
|
||||
|
||||
impl Widget for Five {
|
||||
fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
|
||||
let actions = cx.capture_actions(|cx| self.view.handle_event(cx, event, scope));
|
||||
if self.view.button(id!(button1)).clicked(&actions) {
|
||||
log!("BUTTON CLICKED {}", self.counter);
|
||||
self.counter += 1;
|
||||
let label = self.view.label(id!(label1));
|
||||
label.set_text_and_redraw(cx, &format!("Counter: {}", self.counter));
|
||||
let user_prompt1 = self.view.text_input(id!(message_input.input)).text();
|
||||
log!("Click to count: {}", user_prompt1);
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_walk(&mut self, cx: &mut Cx2d, scope: &mut Scope, walk: Walk) -> DrawStep {
|
||||
self.view.draw_walk(cx, scope, walk)
|
||||
}
|
||||
}
|
1
nimanyatta_v001/src/five/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod five_screen;
|
61
nimanyatta_v001/src/four/four_screen.rs
Normal file
|
@ -0,0 +1,61 @@
|
|||
use makepad_widgets::widget::WidgetCache;
|
||||
use makepad_widgets::*;
|
||||
|
||||
live_design! {
|
||||
import makepad_draw::shader::std::*;
|
||||
import makepad_widgets::base::*;
|
||||
import makepad_widgets::theme_desktop_dark::*;
|
||||
|
||||
import crate::shared::styles::*;
|
||||
import crate::shared::custom_button::CustomButton;
|
||||
|
||||
FourScreen = <View> {
|
||||
width: Fill, height: Fill
|
||||
flow: Down
|
||||
show_bg: true,
|
||||
draw_bg: {
|
||||
color: #fff
|
||||
}
|
||||
<View> {
|
||||
flow: Down,
|
||||
spacing: (SSPACING_2),
|
||||
|
||||
align: {x: 0.5, y: 1}
|
||||
label = <Label> {
|
||||
margin: {top: 1}
|
||||
draw_text: {
|
||||
text_style: <H2_TEXT_BOLD> {},
|
||||
color: (COLOR_DOWN_6)
|
||||
}
|
||||
text: "Four"
|
||||
}
|
||||
// getstarted = <FishButton> {text: "Get Started"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Live, LiveHook, Widget)]
|
||||
pub struct Four {
|
||||
#[deref]
|
||||
view: View,
|
||||
#[rust]
|
||||
counter: usize,
|
||||
}
|
||||
|
||||
impl Widget for Four {
|
||||
fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
|
||||
let actions = cx.capture_actions(|cx| self.view.handle_event(cx, event, scope));
|
||||
if self.view.button(id!(button1)).clicked(&actions) {
|
||||
log!("BUTTON CLICKED {}", self.counter);
|
||||
self.counter += 1;
|
||||
let label = self.view.label(id!(label1));
|
||||
label.set_text_and_redraw(cx, &format!("Counter: {}", self.counter));
|
||||
let user_prompt1 = self.view.text_input(id!(message_input.input)).text();
|
||||
log!("Click to count: {}", user_prompt1);
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_walk(&mut self, cx: &mut Cx2d, scope: &mut Scope, walk: Walk) -> DrawStep {
|
||||
self.view.draw_walk(cx, scope, walk)
|
||||
}
|
||||
}
|
1
nimanyatta_v001/src/four/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod four_screen;
|
154
nimanyatta_v001/src/home/home_screen.rs
Normal file
|
@ -0,0 +1,154 @@
|
|||
use crate::utils::get_current_year;
|
||||
|
||||
use makepad_widgets::*;
|
||||
|
||||
live_design! {
|
||||
import makepad_widgets::base::*;
|
||||
import makepad_widgets::theme_desktop_dark::*;
|
||||
import makepad_draw::shader::std::*;
|
||||
import crate::shared::styles::*;
|
||||
|
||||
import crate::shared::custom_button::CustomButton;
|
||||
|
||||
|
||||
|
||||
FishPanel = <GradientYView> {
|
||||
flow: Down,
|
||||
padding: <SPACING_2> {}
|
||||
width: Fill,
|
||||
height: Fit
|
||||
draw_bg: {
|
||||
instance border_width: 0.0
|
||||
instance border_color: (COLOR_UP_FULL)
|
||||
instance inset: vec4(1.0, 1.0, 1.0, 1.0)
|
||||
instance radius: 2.5
|
||||
instance dither: 1.0
|
||||
color: (COLOR_UP_3),
|
||||
color2: (COLOR_UP_1)
|
||||
instance border_color: #x6
|
||||
instance border_color2: #x4
|
||||
instance border_color3: #x3A
|
||||
|
||||
fn get_color(self) -> vec4 {
|
||||
let dither = Math::random_2d(self.pos.xy) * 0.04 * self.dither;
|
||||
return mix(self.color, self.color2, self.pos.y + dither)
|
||||
}
|
||||
|
||||
fn pixel(self) -> vec4 {
|
||||
let sdf = Sdf2d::viewport(self.pos * self.rect_size)
|
||||
sdf.box(
|
||||
self.inset.x + self.border_width,
|
||||
self.inset.y + self.border_width,
|
||||
self.rect_size.x - (self.inset.x + self.inset.z + self.border_width * 2.0),
|
||||
self.rect_size.y - (self.inset.y + self.inset.w + self.border_width * 2.0),
|
||||
max(1.0, self.radius)
|
||||
)
|
||||
sdf.fill_keep(self.get_color())
|
||||
if self.border_width > 0.0 {
|
||||
sdf.stroke(
|
||||
mix(
|
||||
mix(self.border_color, self.border_color2, clamp(self.pos.y * 10, 0, 1)),
|
||||
mix(self.border_color2, self.border_color3, self.pos.y),
|
||||
self.pos.y
|
||||
),
|
||||
self.border_width
|
||||
)
|
||||
}
|
||||
return sdf.result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FishPanelScrollY = <FishPanel> {
|
||||
height: Fill
|
||||
scroll_bars: <ScrollBars> {show_scroll_x: false, show_scroll_y: true}
|
||||
}
|
||||
|
||||
Home = {{Home}} {
|
||||
flow: Down
|
||||
margin: <SPACING_0> {}
|
||||
padding: {top: (SSPACING_0)}
|
||||
|
||||
<FishPanelScrollY> {
|
||||
width: Fill,
|
||||
height: Fill
|
||||
flow: Down,
|
||||
align: { y: 0.5}
|
||||
m = <View> {
|
||||
flow: Down,
|
||||
spacing: (SSPACING_2),
|
||||
|
||||
align: {x: 0.5, y: 1}
|
||||
label = <Label> {
|
||||
margin: {top: 1}
|
||||
draw_text: {
|
||||
text_style: <H2_TEXT_BOLD> {},
|
||||
color: (COLOR_DOWN_6)
|
||||
}
|
||||
text: "Help Me Choose"
|
||||
}
|
||||
getstarted = <CustomButton> {
|
||||
width: 250
|
||||
height: Fit
|
||||
text: "Get Started"
|
||||
draw_bg: {
|
||||
border_radius: 2.
|
||||
}
|
||||
}
|
||||
}
|
||||
l = <View> {
|
||||
align: {x: 0.5, y: 1}
|
||||
// padding: {top: (SSPACING_0), bottom: (SSPACING_2)}
|
||||
|
||||
footer = <Label> {
|
||||
margin: {bottom: (SSPACING_1)}
|
||||
|
||||
draw_text: {
|
||||
text_style: <H2_TEXT_BOLD> {},
|
||||
color: #000
|
||||
// color: (COLOR_UP_5)
|
||||
// color: (COLOR_UP_6)
|
||||
}
|
||||
text: ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
HomeScreen = <View> {
|
||||
width: Fill, height: Fill
|
||||
show_bg: true,
|
||||
draw_bg: {
|
||||
color: #fff
|
||||
}
|
||||
<Home> {}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Live, LiveHook, Widget)]
|
||||
pub struct Home {
|
||||
#[deref]
|
||||
view: View,
|
||||
}
|
||||
|
||||
impl Widget for Home {
|
||||
fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
|
||||
let actions = cx.capture_actions(|cx| self.view.handle_event(cx, event, scope));
|
||||
if self.view.button(id!(getstarted)).clicked(&actions) {
|
||||
let uid = self.widget_uid();
|
||||
cx.widget_action(
|
||||
uid,
|
||||
&scope.path,
|
||||
StackNavigationAction::NavigateTo(live_id!(default_choices_stack_view)),
|
||||
);
|
||||
log!("GET STARTED BUTTON CLICKED");
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_walk(&mut self, cx: &mut Cx2d, scope: &mut Scope, walk: Walk) -> DrawStep {
|
||||
let label = self.view.label(id!(footer));
|
||||
// NiManyatta © 2024
|
||||
let year = get_current_year();
|
||||
label.set_text_and_redraw(cx, &format!("NiManyatta © {}", year));
|
||||
self.view.draw_walk(cx, scope, walk)
|
||||
}
|
||||
}
|
1
nimanyatta_v001/src/home/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod home_screen;
|
10
nimanyatta_v001/src/lib.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
pub use makepad_widgets;
|
||||
pub mod app;
|
||||
pub mod default_choice;
|
||||
pub mod five;
|
||||
pub mod four;
|
||||
pub mod home;
|
||||
pub mod shared;
|
||||
pub mod three;
|
||||
pub mod two;
|
||||
pub mod utils;
|
3
nimanyatta_v001/src/main.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
nimanyatta_v001::app::app_main()
|
||||
}
|
46
nimanyatta_v001/src/shared/custom_button.rs
Normal file
|
@ -0,0 +1,46 @@
|
|||
use makepad_widgets::*;
|
||||
|
||||
live_design! {
|
||||
import makepad_draw::shader::std::*;
|
||||
import makepad_widgets::base::*;
|
||||
import makepad_widgets::theme_desktop_dark::*;
|
||||
|
||||
import crate::shared::styles::*;
|
||||
|
||||
CustomButton = <Button> {
|
||||
width: Fill, height: 34.
|
||||
text: "Welcome"
|
||||
draw_text: {
|
||||
text_style: <REGULAR_TEXT>{font_size: 12.},
|
||||
fn get_color(self) -> vec4 {
|
||||
// return #016def
|
||||
return mix(mix(#016def, #f0, self.hover), #0157c0, self.pressed)
|
||||
}
|
||||
}
|
||||
draw_bg: {
|
||||
border_radius: 8.
|
||||
fn pixel(self) -> vec4 {
|
||||
let border_color = #0157c0;
|
||||
// let border_color = #016def; //#0157c0
|
||||
let border_width = 0.5;
|
||||
let sdf = Sdf2d::viewport(self.pos * self.rect_size);
|
||||
let body = mix(mix(#f, #0157c0, self.hover), #d1, self.pressed);
|
||||
|
||||
sdf.box(
|
||||
1.,
|
||||
1.,
|
||||
self.rect_size.x - 2.0,
|
||||
self.rect_size.y - 2.0,
|
||||
self.border_radius
|
||||
)
|
||||
sdf.fill_keep(body)
|
||||
|
||||
sdf.stroke(
|
||||
border_color,
|
||||
border_width
|
||||
)
|
||||
return sdf.result
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
2
nimanyatta_v001/src/shared/mod.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
pub mod custom_button;
|
||||
pub mod styles;
|
97
nimanyatta_v001/src/shared/styles.rs
Normal file
|
@ -0,0 +1,97 @@
|
|||
use makepad_widgets::*;
|
||||
|
||||
live_design! {
|
||||
TITLE_TEXT = {
|
||||
font_size: (14),
|
||||
font: {path: dep("crate://makepad-widgets/resources/GoNotoKurrent-Regular.ttf")}
|
||||
}
|
||||
|
||||
REGULAR_TEXT = {
|
||||
font_size: (12),
|
||||
font: {path: dep("crate://makepad-widgets/resources/GoNotoKurrent-Regular.ttf")}
|
||||
}
|
||||
|
||||
TEXT_SUB = {
|
||||
font_size: (FONT_SIZE_SUB),
|
||||
font: {path: dep("crate://makepad-widgets/resources/GoNotoKurrent-Regular.ttf")}
|
||||
}
|
||||
H3_TEXT_REGULAR = {
|
||||
font_size: 9.0,
|
||||
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
|
||||
}
|
||||
|
||||
LOGO_MAKEPAD = dep("crate://self/resources/makepad.png")
|
||||
// LOGO_MAKEPAD = dep("crate://self/resources/makepad.svg")
|
||||
|
||||
CARD_CORNER_RADIUS = 20.
|
||||
CARD_HEIGHT = 550
|
||||
COLOR_PROFILE_CIRCLE = #xfff8ee
|
||||
// COLOR_DIVIDER = #x00000018
|
||||
COLOR_DIVIDER_DARK = #x00000044
|
||||
|
||||
FONT_SIZE_H2 = 9.5
|
||||
|
||||
HEIGHT_AUDIOVIZ = 150
|
||||
|
||||
SSPACING_0 = 0.0
|
||||
SSPACING_1 = 4.0
|
||||
SSPACING_2 = (SSPACING_1 * 2)
|
||||
SSPACING_3 = (SSPACING_1 * 3)
|
||||
SSPACING_4 = (SSPACING_1 * 4)
|
||||
|
||||
SPACING_0 = {top: (SSPACING_0), right: (SSPACING_0), bottom: (SSPACING_0), left: (SSPACING_0)}
|
||||
SPACING_1 = {top: (SSPACING_1), right: (SSPACING_1), bottom: (SSPACING_1), left: (SSPACING_1)}
|
||||
SPACING_2 = {top: (SSPACING_2), right: (SSPACING_2), bottom: (SSPACING_2), left: (SSPACING_2)}
|
||||
SPACING_3 = {top: (SSPACING_3), right: (SSPACING_3), bottom: (SSPACING_3), left: (SSPACING_3)}
|
||||
SPACING_4 = {top: (SSPACING_4), right: (SSPACING_4), bottom: (SSPACING_4), left: (SSPACING_4)}
|
||||
H2_TEXT_BOLD = {
|
||||
font_size: (FONT_SIZE_H2),
|
||||
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-SemiBold.ttf")}
|
||||
}
|
||||
H2_TEXT_REGULAR = {
|
||||
font_size: (FONT_SIZE_H2),
|
||||
font: {path: dep("crate://makepad-widgets/resources/IBMPlexSans-Text.ttf")}
|
||||
}
|
||||
|
||||
COLOR_DOWN_FULL = #000
|
||||
|
||||
COLOR_DOWN_0 = #x00000000
|
||||
COLOR_DOWN_1 = #x00000011
|
||||
COLOR_DOWN_2 = #x00000022
|
||||
COLOR_DOWN_3 = #x00000044
|
||||
COLOR_DOWN_4 = #x00000066
|
||||
COLOR_DOWN_5 = #x000000AA
|
||||
COLOR_DOWN_6 = #x000000CC
|
||||
|
||||
COLOR_UP_0 = #xFFFFFF00
|
||||
COLOR_UP_1 = #xFFFFFF0A
|
||||
COLOR_UP_2 = #xFFFFFF10
|
||||
COLOR_UP_3 = #xFFFFFF20
|
||||
COLOR_UP_4 = #xFFFFFF40
|
||||
COLOR_UP_5 = #xFFFFFF66
|
||||
COLOR_UP_6 = #xFFFFFFCC
|
||||
COLOR_UP_FULL = #xFFFFFFFF
|
||||
|
||||
COLOR_ALERT = #xFF0000FF
|
||||
COLOR_OSC = #xFFFF99FF
|
||||
COLOR_ENV = #xF9A894
|
||||
COLOR_FILTER = #x88FF88
|
||||
COLOR_FX = #x99EEFF
|
||||
COLOR_DEFAULT = (COLOR_UP_6)
|
||||
|
||||
COLOR_VIZ_1 = (COLOR_DOWN_2)
|
||||
COLOR_VIZ_2 = (COLOR_DOWN_6)
|
||||
COLOR_DIVIDER = (COLOR_DOWN_5)
|
||||
|
||||
// COLOR_BG = #xfff8ee
|
||||
// COLOR_BRAND = #xf88
|
||||
// COLOR_BRAND_HOVER = #xf66
|
||||
// COLOR_META_TEXT = #xaaa
|
||||
// COLOR_META = #xccc
|
||||
// COLOR_META_INV = #xfffa
|
||||
// COLOR_OVERLAY_BG = #x000000d8
|
||||
// COLOR_DIVIDER = #x00000018
|
||||
// COLOR_DIVIDER_DARK = #x00000044
|
||||
// COLOR_PROFILE_CIRCLE = #xfff8ee
|
||||
// COLOR_P = #x999
|
||||
}
|
1
nimanyatta_v001/src/three/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod three_screen;
|
61
nimanyatta_v001/src/three/three_screen.rs
Normal file
|
@ -0,0 +1,61 @@
|
|||
use makepad_widgets::widget::WidgetCache;
|
||||
use makepad_widgets::*;
|
||||
|
||||
live_design! {
|
||||
import makepad_draw::shader::std::*;
|
||||
import makepad_widgets::base::*;
|
||||
import makepad_widgets::theme_desktop_dark::*;
|
||||
|
||||
import crate::shared::styles::*;
|
||||
import crate::shared::custom_button::CustomButton;
|
||||
|
||||
ThreeScreen = <View> {
|
||||
width: Fill, height: Fill
|
||||
flow: Down
|
||||
show_bg: true,
|
||||
draw_bg: {
|
||||
color: #fff
|
||||
}
|
||||
<View> {
|
||||
flow: Down,
|
||||
spacing: (SSPACING_2),
|
||||
|
||||
align: {x: 0.5, y: 1}
|
||||
label = <Label> {
|
||||
margin: {top: 1}
|
||||
draw_text: {
|
||||
text_style: <H2_TEXT_BOLD> {},
|
||||
color: (COLOR_DOWN_6)
|
||||
}
|
||||
text: "Three"
|
||||
}
|
||||
// getstarted = <FishButton> {text: "Get Started"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Live, LiveHook, Widget)]
|
||||
pub struct Three {
|
||||
#[deref]
|
||||
view: View,
|
||||
#[rust]
|
||||
counter: usize,
|
||||
}
|
||||
|
||||
impl Widget for Three {
|
||||
fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
|
||||
let actions = cx.capture_actions(|cx| self.view.handle_event(cx, event, scope));
|
||||
if self.view.button(id!(button1)).clicked(&actions) {
|
||||
log!("BUTTON CLICKED {}", self.counter);
|
||||
self.counter += 1;
|
||||
let label = self.view.label(id!(label1));
|
||||
label.set_text_and_redraw(cx, &format!("Counter: {}", self.counter));
|
||||
let user_prompt1 = self.view.text_input(id!(message_input.input)).text();
|
||||
log!("Click to count: {}", user_prompt1);
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_walk(&mut self, cx: &mut Cx2d, scope: &mut Scope, walk: Walk) -> DrawStep {
|
||||
self.view.draw_walk(cx, scope, walk)
|
||||
}
|
||||
}
|
1
nimanyatta_v001/src/two/mod.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod two_screen;
|
61
nimanyatta_v001/src/two/two_screen.rs
Normal file
|
@ -0,0 +1,61 @@
|
|||
use makepad_widgets::widget::WidgetCache;
|
||||
use makepad_widgets::*;
|
||||
|
||||
live_design! {
|
||||
import makepad_draw::shader::std::*;
|
||||
import makepad_widgets::base::*;
|
||||
import makepad_widgets::theme_desktop_dark::*;
|
||||
|
||||
import crate::shared::styles::*;
|
||||
import crate::shared::custom_button::CustomButton;
|
||||
|
||||
TwoScreen = <View> {
|
||||
width: Fill, height: Fill
|
||||
flow: Down
|
||||
show_bg: true,
|
||||
draw_bg: {
|
||||
color: #fff
|
||||
}
|
||||
<View> {
|
||||
flow: Down,
|
||||
spacing: (SSPACING_2),
|
||||
|
||||
align: {x: 0.5, y: 1}
|
||||
label = <Label> {
|
||||
margin: {top: 1}
|
||||
draw_text: {
|
||||
text_style: <H2_TEXT_BOLD> {},
|
||||
color: (COLOR_DOWN_6)
|
||||
}
|
||||
text: "Two"
|
||||
}
|
||||
// getstarted = <FishButton> {text: "Get Started"}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Live, LiveHook, Widget)]
|
||||
pub struct Two {
|
||||
#[deref]
|
||||
view: View,
|
||||
#[rust]
|
||||
counter: usize,
|
||||
}
|
||||
|
||||
impl Widget for Two {
|
||||
fn handle_event(&mut self, cx: &mut Cx, event: &Event, scope: &mut Scope) {
|
||||
let actions = cx.capture_actions(|cx| self.view.handle_event(cx, event, scope));
|
||||
if self.view.button(id!(button1)).clicked(&actions) {
|
||||
log!("BUTTON CLICKED {}", self.counter);
|
||||
self.counter += 1;
|
||||
let label = self.view.label(id!(label1));
|
||||
label.set_text_and_redraw(cx, &format!("Counter: {}", self.counter));
|
||||
let user_prompt1 = self.view.text_input(id!(message_input.input)).text();
|
||||
log!("Click to count: {}", user_prompt1);
|
||||
}
|
||||
}
|
||||
|
||||
fn draw_walk(&mut self, cx: &mut Cx2d, scope: &mut Scope, walk: Walk) -> DrawStep {
|
||||
self.view.draw_walk(cx, scope, walk)
|
||||
}
|
||||
}
|
10
nimanyatta_v001/src/utils.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
|
||||
pub fn get_current_year() -> i32 {
|
||||
let now = SystemTime::now();
|
||||
let since_the_epoch = now.duration_since(UNIX_EPOCH).expect("Time went backwards");
|
||||
let in_seconds = since_the_epoch.as_secs();
|
||||
let seconds_per_year = 60 * 60 * 24 * 365;
|
||||
let current_year = 1970 + (in_seconds / seconds_per_year as u64) as i32;
|
||||
current_year
|
||||
}
|