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