btn_monolit.go 849 B

12345678910111213141516171819202122232425262728293031323334
  1. // package btn_monolit -- обработчик для показа блока монолита
  2. package btn_monolit
  3. import (
  4. _ "embed"
  5. "gitp78su.ipnodns.ru/svi/kern/wui"
  6. . "gitp78su.ipnodns.ru/svi/kern/wui/wtypes"
  7. )
  8. type BtnMonolit struct {
  9. btn IWuiButton
  10. }
  11. // NewBtnMonolit -- возвращает новую кнопку монолита
  12. func NewBtnMonolit() *BtnMonolit {
  13. sf := &BtnMonolit{}
  14. sf.btn = wui.NewWuiButton("Monolit", sf.clickMonolit)
  15. sf.btn.Hx().Target().Set("#monolit")
  16. return sf
  17. }
  18. // Html -- возвращает HTML-представление кнопки
  19. func (sf *BtnMonolit) Html() string {
  20. return sf.btn.Html()
  21. }
  22. //go:embed block_monolit.html
  23. var strBlockMonolit string
  24. // Событие клика по кнопке
  25. func (sf *BtnMonolit) clickMonolit(dict map[string]string) string {
  26. return strBlockMonolit
  27. }