Изменения документа 02. Деятельность СЗН
Редактировал(а) Мария Дужая 2024/08/15 14:18
От версии 4.1
отредактировано Admin Admin
на 2024/05/21 02:10
на 2024/05/21 02:10
Изменить комментарий:
К данной версии нет комментариев
К версии 4.2
отредактировано Admin Admin
на 2024/05/21 15:15
на 2024/05/21 15:15
Изменить комментарий:
К данной версии нет комментариев
Сводка
-
Свойства страницы (2 изменено, 0 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Теги
-
... ... @@ -1,1 +1,1 @@ 1 -Гендриксон 1 +Гендриксон|Кнопки - Содержимое
-
... ... @@ -1,78 +1,23 @@ 1 1 (% class="box infomessage" %) 2 -((( 3 3 **Деятельность СЗН** 4 -))) 5 5 6 -((( 7 7 **Координатор**: Оксана Павловна Гендриксон 8 -))) 9 -((( 5 + 10 10 **Краткое описание**: Данный раздел содержит материалы по деятельности Службы занятости населения. 11 -))) 12 12 13 -{{html clean="false"}} 14 -<head> 15 - <style> 16 - @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400&display=swap'); 17 17 18 - ul.button-list { 19 - padding: 0; 20 - list-style-type: none; 21 - display: flex; 22 - flex-wrap: wrap; 23 - } 24 - 25 - .button-link { 26 - a:link, a:active, a:visited { 27 - display: flex; 28 - align-items: center; 29 - justify-content: center; 30 - width: 280px; 31 - height: 75px; 32 - font-family: 'Montserrat', sans-serif; 33 - font-size: 14px; 34 - font-weight: 600; 35 - cursor: pointer; 36 - text-align: center; 37 - text-decoration: none; 38 - color: #3e7cbc; 39 - background-color: #ffffff; 40 - border: none; 41 - border-radius: 10px; 42 - box-shadow: 0 0 9px rgba(0, 0, 0, 0.25); 43 - margin: 0 10px 10px 10px; 44 - padding: 0 10px; 45 - } 46 - } 47 - 48 - .button-link:hover { 49 - a:link, a:active, a:visited { 50 - background-color: rgba(0, 0, 0, 0.03); 51 - } 52 - } 53 - 54 - .button-link.small-font { 55 - a:link, a:active, a:visited { 56 - font-size: 13px; 57 - } 58 - } 59 - </style> 60 -</head> 61 -{{/html}} 62 - 63 63 {{velocity}} 64 -{{html clean="false"}} 65 - <b>Подразделы:</b><br><br> 66 - <ul class="button-list"> 67 -{{/html}} 68 -#set($maxUncutTitle = 100) 69 -#set($maxTitleWithoutFontReduction = 80) 10 +#set($buttonsValues = [ 11 + {"title": "Материалы", "ref": "02\. Деятельность СЗН.Материалы.WebHome"}, 12 + {"title": "Направления деятельности", "ref": "02\. Деятельность СЗН.Направления деятельности.WebHome"} 13 +]) 14 +{{html clean="false"}} <ul class="custom-button-list"> {{/html}} 15 +#set($maxUncutTitle = 120) 16 +#set($maxTitleWithoutFontReduction = 90) 70 70 71 -#set($pubRefs = $doc.getChildrenReferences()) 72 72 #set($entries = []) 73 -#foreach($pubRef in $pubRefs) 74 - #set($pub = $xwiki.getDocument($pubRef)) 75 - #set($title = $pub.getTitle()) 19 +#foreach($button in $buttonsValues) 20 + #set($title = $button.title) 76 76 #if($title.length() > $maxUncutTitle) 77 77 #set($shortTitle = $title.substring(0, $maxUncutTitle)) 78 78 #set($shortTitle = $shortTitle + "...") ... ... @@ -79,22 +79,21 @@ 79 79 #else 80 80 #set($shortTitle = $title) 81 81 #end 82 - #set($map = {"title": $shortTitle, "ref": $ pubRef, "doc": $pub})27 + #set($map = {"title": $shortTitle, "ref": $button.ref}) 83 83 #set($discard = $entries.add($map)) 84 84 #end 85 85 86 -#foreach($entry in $ collectiontool.sort($entries, "title:asc"))31 +#foreach($entry in $entries) 87 87 #set($pubRef = $entry.ref) 88 - #set($pub = $entry.doc) 89 89 #set($title = $entry.title) 90 90 91 91 #if($title.length() > $maxTitleWithoutFontReduction) 92 92 ## При передаче в class переменной почему-то из неё берётся значение до первого пробела 93 93 ## поэтому случай, когда два CSS-класса, прописывается вручную 94 - (% class="button -linksmall-font" %)38 + (% class="custom-button small-font" %) 95 95 [[$title>>$pubRef]] 96 96 #else 97 - (% class="button -link" %)41 + (% class="custom-button" %) 98 98 [[$title>>$pubRef]] 99 99 #end 100 100 #end