Изменения документа 02. Деятельность СЗН

Редактировал(а) Мария Дужая 2024/08/15 14:18

От версии 4.2
отредактировано Admin Admin
на 2024/05/21 15:15
Изменить комментарий: К данной версии нет комментариев
К версии 4.1
отредактировано Admin Admin
на 2024/05/21 02:10
Изменить комментарий: К данной версии нет комментариев

Сводка

Подробности

Свойства страницы
Теги
... ... @@ -1,1 +1,1 @@
1 -Гендриксон|Кнопки
1 +Гендриксон
Содержимое
... ... @@ -1,23 +1,78 @@
1 1  (% class="box infomessage" %)
2 +(((
2 2  **Деятельность СЗН**
4 +)))
3 3  
6 +(((
4 4  **Координатор**: Оксана Павловна Гендриксон
5 -
8 +)))
9 +(((
6 6  **Краткое описание**: Данный раздел содержит материалы по деятельности Службы занятости населения.
11 +)))
7 7  
13 +{{html clean="false"}}
14 +<head>
15 + <style>
16 + @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400&display=swap');
8 8  
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 +
9 9  {{velocity}}
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)
64 +{{html clean="false"}}
65 + <b>Подразделы:</b><br><br>
66 + <ul class="button-list">
67 +{{/html}}
68 +#set($maxUncutTitle = 100)
69 +#set($maxTitleWithoutFontReduction = 80)
17 17  
71 +#set($pubRefs = $doc.getChildrenReferences())
18 18  #set($entries = [])
19 -#foreach($button in $buttonsValues)
20 - #set($title = $button.title)
73 +#foreach($pubRef in $pubRefs)
74 + #set($pub = $xwiki.getDocument($pubRef))
75 + #set($title = $pub.getTitle())
21 21   #if($title.length() > $maxUncutTitle)
22 22   #set($shortTitle = $title.substring(0, $maxUncutTitle))
23 23   #set($shortTitle = $shortTitle + "...")
... ... @@ -24,21 +24,22 @@
24 24   #else
25 25   #set($shortTitle = $title)
26 26   #end
27 - #set($map = {"title": $shortTitle, "ref": $button.ref})
82 + #set($map = {"title": $shortTitle, "ref": $pubRef, "doc": $pub})
28 28   #set($discard = $entries.add($map))
29 29  #end
30 30  
31 -#foreach($entry in $entries)
86 +#foreach($entry in $collectiontool.sort($entries, "title:asc"))
32 32   #set($pubRef = $entry.ref)
88 + #set($pub = $entry.doc)
33 33   #set($title = $entry.title)
34 34  
35 35   #if($title.length() > $maxTitleWithoutFontReduction)
36 36   ## При передаче в class переменной почему-то из неё берётся значение до первого пробела
37 37   ## поэтому случай, когда два CSS-класса, прописывается вручную
38 - (% class="custom-button small-font" %)
94 + (% class="button-link small-font" %)
39 39   [[$title>>$pubRef]]
40 40   #else
41 - (% class="custom-button" %)
97 + (% class="button-link" %)
42 42   [[$title>>$pubRef]]
43 43   #end
44 44  #end