Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

109 line
4.6 KiB

  1. <template>
  2. <menu v-if="!mobile" class="sidebar">
  3. <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-x close"
  4. fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path
  5. fill-rule="evenodd" d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0
  6. 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0
  7. 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"/> </svg>
  8. <img
  9. src="/assets/image/mintberry.jpg">
  10. <a href="" :class="active == 1 ? 'active' : ''">
  11. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
  12. fill="currentColor" class="bi bi-house" viewBox="0 0 16 16"> <path
  13. fill-rule="evenodd" d="M2 13.5V7h1v6.5a.5.5 0 0 0 .5.5h9a.5.5 0 0 0
  14. .5-.5V7h1v6.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2
  15. 13.5zm11-11V6l-2-2V2.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5z"/> <path
  16. fill-rule="evenodd" d="M7.293 1.5a1 1 0 0 1 1.414 0l6.647 6.646a.5.5 0 0
  17. 1-.708.708L8 2.207 1.354 8.854a.5.5 0 1 1-.708-.708L7.293 1.5z"/>
  18. </svg>
  19. <span>Home</span>
  20. </a>
  21. <a href="#new" :class="active == 2 ? 'active' : ''">
  22. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
  23. fill="currentColor" class="bi bi-journal-plus" viewBox="0 0 16 16"> <path
  24. fill-rule="evenodd" d="M8 5.5a.5.5 0 0 1 .5.5v1.5H10a.5.5 0 0 1 0 1H8.5V10a.5.5
  25. 0 0 1-1 0V8.5H6a.5.5 0 0 1 0-1h1.5V6a.5.5 0 0 1 .5-.5z"/> <path d="M3 0h10a2 2 0
  26. 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-1h1v1a1 1 0 0 0 1 1h10a1 1 0 0 0
  27. 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2z"/> <path d="M1
  28. 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1
  29. 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0
  30. 0 1 0 1h-2a.5.5 0 0 1 0-1H1z"/> </svg>
  31. <span>New</span>
  32. </a>
  33. <a href="#estimates" :class="active == 3 ? 'active' : ''">
  34. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
  35. fill="currentColor" class="bi bi-journals" viewBox="0 0 16 16"> <path d="M5
  36. 0h8a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2 2 2 0 0 1-2 2H3a2 2 0 0 1-2-2h1a1 1 0 0 0 1
  37. 1h8a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1H1a2 2 0 0 1 2-2h8a2 2 0 0 1 2
  38. 2v9a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1H3a2 2 0 0 1 2-2z"/> <path
  39. d="M1 6v-.5a.5.5 0 0 1 1 0V6h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5
  40. 0 0 1 1 0V9h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 2.5v.5H.5a.5.5 0 0 0 0
  41. 1h2a.5.5 0 0 0 0-1H2v-.5a.5.5 0 0 0-1 0z"/> </svg>
  42. <span>Estimates</span>
  43. </a>
  44. <a href="#settings" :class="active == 4 ? 'active' : ''">
  45. <svg width="15px" height="15px" viewBox="0 0 15 15" fill="none"
  46. xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd"
  47. clip-rule="evenodd" d="M5.944 0.5L5.858 0.936707L5.52901 2.53467C5.00301 2.73554
  48. 4.526 3.02037 4.095 3.35815L2.487 2.8205L2.05501 2.68658L1.83101
  49. 3.07233L0.723999 4.9231L0.5 5.3089L0.828003 5.5957L2.07201 6.65399C2.02701
  50. 6.93081 1.96901 7.20461 1.96901 7.49542C1.96901 7.78623 2.02701 8.0601 2.07201
  51. 8.33691L0.828003 9.3952L0.5 9.68201L0.723999 10.0677L1.83101 11.9186L2.05501
  52. 12.3053L2.487 12.1704L4.095 11.6328C4.526 11.9705 5.00301 12.2553 5.52901
  53. 12.4562L5.858 14.0541L5.944 14.4909H9.05501L9.142 14.0541L9.47 12.4562C9.996
  54. 12.2553 10.473 11.9705 10.904 11.6328L12.512 12.1704L12.944 12.3053L13.169
  55. 11.9186L14.275 10.0677L14.5 9.68201L14.171 9.3952L12.927 8.33691C12.973 8.0601
  56. 13.03 7.78623 13.03 7.49542C13.03 7.20461 12.973 6.93081 12.927 6.65399L14.171
  57. 5.5957L14.5 5.3089L14.275 4.9231L13.169 3.07233L12.944 2.68658L12.512
  58. 2.8205L10.904 3.35815C10.473 3.02037 9.996 2.73554 9.47 2.53467L9.142
  59. 0.936707L9.05501 0.5H5.944Z" stroke="currentColor" stroke-linecap="square"
  60. stroke-linejoin="round"/> <path fill-rule="evenodd" clip-rule="evenodd"
  61. d="M9.49963 7.49542C9.49963 8.5987 8.60363 9.49414 7.49963 9.49414C6.39563
  62. 9.49414 5.49963 8.5987 5.49963 7.49542C5.49963 6.39214 6.39563 5.49677 7.49963
  63. 5.49677C8.60363 5.49677 9.49963 6.39214 9.49963 7.49542Z" stroke="currentColor"
  64. stroke-linecap="square" stroke-linejoin="round"/> </svg>
  65. <span>Settings</span>
  66. </a>
  67. <a href="#sign-out" :class="active == 5 ? 'active' : ''">
  68. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-door-closed" viewBox="0 0 16 16">
  69. <path d="M3 2a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v13h1.5a.5.5 0 0 1 0 1h-13a.5.5 0 0 1 0-1H3V2zm1 13h8V2H4v13z"/>
  70. <path d="M9 9a1 1 0 1 0 2 0 1 1 0 0 0-2 0z"/>
  71. </svg>
  72. <span>Sign out</span>
  73. </a>
  74. <span>{{mobile}}</span>
  75. </menu>
  76. </template>
  77. <script>
  78. function checkMobile() {
  79. if (window.innerWidth < 720) {
  80. this.mobile = true
  81. } else {
  82. this.mobile = false
  83. }
  84. }
  85. export default {
  86. methods: { checkMobile },
  87. props: ['role', 'active'],
  88. data() {
  89. return {
  90. mobile: null
  91. }
  92. },
  93. created() {
  94. window.onresize = this.checkMobile
  95. this.checkMobile()
  96. }
  97. }
  98. </script>