ERL in corp app for fortage
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.
 
 
 
 
 
 

112 lines
3.5 KiB

  1. %% -*- mode: nitrogen -*-
  2. -module (index).
  3. -compile(export_all).
  4. -include_lib("nitrogen_core/include/wf.hrl").
  5. -inclide(db).
  6. %-include(portage).
  7. main() -> #template { file="./site/templates/bare.html" }.
  8. title() -> "Welcome APP_WEBPORT".
  9. body() ->
  10. #container_12 { body=[
  11. #grid_8 { alpha=true, prefix=2, suffix=2, omega=true, body=inner_body() }
  12. ]}.
  13. inner_body() ->
  14. [
  15. #panel{id="form_Auth", class="form_Auth", style="color: #444;", body=[
  16. #p{
  17. body=[
  18. #label{text="User"},
  19. #textbox{id="Username", style="float: right;", placeholder="test"}
  20. ]
  21. },
  22. #p{
  23. body=[
  24. #label{text="Password"},
  25. #password{id="Password", style="float: right;", placeholder="test"}
  26. ]
  27. },
  28. #link{ postback=click, body=[
  29. #panel{class="button_auth", text="Войти"}
  30. ]}
  31. ] }
  32. ].
  33. viewScreen() ->
  34. wf:replace(form_Auth, #panel{id="splash", class="splash",
  35. body=[
  36. #panel{class="block", text="Загрузка...",
  37. body=[
  38. #link{id="pkgsload", postback=loadpackages, body=[
  39. #panel{class="button_auth", text="GO"}
  40. ]}
  41. ]
  42. }
  43. ]}
  44. ).
  45. %wf:wire(pkgsload, #event { type=click, actions=home() }),
  46. init_app()->
  47. MenuApp=[#list{class="nav-group" , style="height: 100vh; background: #2e323e; width: 220px; ", body=[
  48. #h5{class="nav-group-title", text="Меню"},
  49. #link{class="nav-group-item active", body=[
  50. #span{class="icon icon-home", style="height: auto", text="Приложения"}
  51. ]},
  52. #span{class="nav-group-item" , body=[
  53. #span{ class="icon icon-download",style="height: auto", text="Установленные"}
  54. ]},
  55. #span{ class="nav-group-item", body=[
  56. #span{ class="icon icon-folder",style="height: auto", text="Рекомендации"}
  57. ]},
  58. #span{ class="nav-group-item", body=[
  59. #span{ class="icon icon-signal", style="height: auto", text="Овелееи"}
  60. ]},
  61. #span{ class="nav-group-item", body=[
  62. #span{ class="icon icon-print", style="height: auto", text="Настройки"}
  63. ]},
  64. #span{ class="nav-group-item", body=[
  65. #span{ class="icon icon-cloud", style="height: auto", text="Документация"}
  66. ]}
  67. ]}],
  68. Top=[#textbox{id="inS", class="form-control", style="width: 50vw; float: left; color: #444; ", placeholder="Введите имя пакета" },
  69. #link{ class="", body=[#panel{ class="btn", text="Поиск"}] },
  70. #link{ class="", body=[#panel{ class="btn", text="Отладка"}] },
  71. #list{},
  72. #link{id="userBtn", style="float: right", body=[#panel{ class="userAdvatar", text="User"}] }
  73. ],
  74. wf:replace(splash, #panel{id="app", body=[
  75. #panel{id="top", class="toollbar-actions", style="padding-left: 25%; padding-top: 10px; padding-botton: 10px;", body=[Top]},
  76. #panel{id="conteiner", class="window-content", style="float: left; width: 100vw; ",
  77. body=[MenuApp]}
  78. ]}).
  79. event(click) ->
  80. viewScreen();
  81. event(loadpackages) ->
  82. init_app();
  83. event(findpckg) ->
  84. ok;
  85. event(vieAllPackaes) ->
  86. ok;
  87. event(viewoverlays) ->
  88. ok;
  89. event(vProfile) ->
  90. ok;
  91. event(veiwsettings) ->
  92. ok.