diff --git a/resource/css/styles.css b/resource/css/styles.css index e241725bc..596aec5ec 100644 --- a/resource/css/styles.css +++ b/resource/css/styles.css @@ -24,7 +24,7 @@ h1, .prefLabel, .prefLabelLang, .notation { font-weight: bold; } -h2 { +h2, h3 { font-family: 'Fira Sans', sans-serif; font-size: 16px; } @@ -154,6 +154,19 @@ ul { width: 25px; } +/* Generic screen reader class + * Code from https://webaim.org/techniques/css/invisiblecontent/ + ***************************/ + +.sr-only { + position:absolute; + left:-10000px; + top:auto; + width:1px; + height:1px; + overflow:hidden; +} + /* topbar styles ***************************/ @@ -643,7 +656,7 @@ span.xl-pref-label > img { width: 100% !important; } -#vocabulary-list > div > h2, #vocabulary-list-wide > div > h2 { +#vocabulary-list > div > h2, #vocabulary-list > div > h3, #vocabulary-list-wide > div > h2, #vocabulary-list-wide > div > h3 { margin-bottom: 0; margin-top: 0; padding: 15px 0 15px 10px; @@ -651,30 +664,21 @@ span.xl-pref-label > img { .vocab-category { display: inline-block; - padding-left: 0; width: 100%; } -.vocab-category > ul > li, .vocab-category > h2 { +.vocab-category > h3 { display: inline-block; -} - -.vocab-category > h2 { margin: 0 0 5px 0; } -.vocab-category > ul > li { - display: block; -} - .vocab-category > ul { - display: inline-block; width: 72%; float: right; padding-left: 0; } -.vocab-category > li > h2 { +.vocab-category > li > h3 { margin-bottom: 5px; margin-top: 0; } @@ -1065,6 +1069,10 @@ li.sub-group { margin-bottom: 15px; } +.download-links a { + margin-left: 5px; +} + .count-type { padding-right: 20px; } @@ -1093,8 +1101,20 @@ li.sub-group { right: 0; } -.alert h2 { +.alert-danger { + font-size: 18px; +} + +.content .alert-danger p { + color: #fff; + font-weight: 500; margin: 5px 0 5px 0; + line-height: 1.1; +} + +.search-result-listing .deprecated-alert { + margin-left: 10px; + color: #D95F8A; } .alert-replaced a { @@ -1125,6 +1145,11 @@ li.sub-group { margin-bottom: 20px; } +.concept-info h3 { + margin: 0; + line-height: 22.85px; +} + .deprecated-concept * { color: #888; } @@ -1151,10 +1176,6 @@ li.sub-group { position: relative; } -.logo-header { - padding-left: 18%; -} - .property-value-column > .row > .col-xs-5 > .versal { word-wrap: break-word; } @@ -1331,6 +1352,22 @@ tr.replaced-by > td > ul > li > a { padding-left: 0; } +#vocab-info h2 { + font-size: 27px; + font-weight: 400; +} + +#vocab-info h3 { + font-weight: 400; + display: initial; +} + +#vocab-info > div > h3 { + font-weight: 500; + margin-bottom: 10px; + display: block; +} + #counts { max-width: 300px; } #statistics { max-width: 450px; } @@ -1358,8 +1395,9 @@ tr.replaced-by > td > ul > li > a { width: 25px; } -.pagination > li:last-child > a { +.pagination > li:nth-last-child(2) > a, .pagination > li:last-child > a { width: auto; + min-width: 26px; } .pagination { @@ -1371,7 +1409,7 @@ tr.replaced-by > td > ul > li > a { width: 310px; } -.nav-tabs, #groups > a { +.nav-tabs { background-color: #e0e4e7; border-bottom: none; } @@ -1380,7 +1418,7 @@ ul.nav-tabs > li { margin-bottom: 0; } -.nav-tabs > li > a, .nav-tabs > li > p, .nav-tabs > li.active > a, .nav-tabs > li.active > a:hover { +.sidebar-buttons .nav-tabs > li > a, .sidebar-buttons .nav-tabs > li > p, .sidebar-buttons .nav-tabs > li.active > a { background-color: #e6e9eb; border-radius: 0; border: 0; @@ -1389,8 +1427,23 @@ ul.nav-tabs > li { text-align: center; } +.nav-tabs > li:nth-of-type(even) > a { + background-color: #e0e4e7; +} + +.nav-tabs > li:nth-of-type(odd) > a { + background-color: #e6e9eb; +} + +.sidebar-buttons .nav-tabs > li.active > a { + background-color: #f6f7f8; +} + +.sidebar-buttons .nav-tabs > li > a:hover { + background-color: white; +} + #limit { - margin-top: -1px; width: 33%; } @@ -1402,9 +1455,6 @@ ul.nav-tabs > li { width: 34%; } -#alpha > a { -} - .nav-four-wide > li { width: 28%; } @@ -1413,32 +1463,18 @@ ul.nav-tabs > li { width: 16%; } -.nav-tabs > li.active > a { - background-color: #f6f7f8; -} - #hierarchy-disabled > *, #hierarchy-disabled > *:hover { background-color: #B9C1C6; color: #74787A; cursor: default; } -#changes > a { - background-color: #DEDFE0; -} - .nav-tabs > *:hover { background-color: #ffffff; } - -.change-list > span { - display: inline-block; - margin-top: 15px; -} - -.change-list > span:first-of-type { - margin: 0; +.change-list > h5 { + margin-bottom: 2px; } .content { @@ -1709,7 +1745,7 @@ p.autocomplete-label { * https://code.google.com/p/chromium/issues/detail?id=336476 ************************************/ -body, .versal, h1, h2, p, .versal-bold { +body, .versal, h1, h2, h3, p, .versal-bold { -webkit-animation-delay: 0.1s; -webkit-animation-name: fontfix; -webkit-animation-duration: 0.1s; @@ -1786,10 +1822,10 @@ body, .versal, h1, h2, p, .versal-bold { } @media (max-width: 340px) { - #vocab-info .vocab-info-literals > table > tbody > tr > th { + #vocab-info .vocab-info-literals .property-label { max-width: 120px; } - #vocab-info .vocab-info-literals > table > tbody > tr > td { + #vocab-info .vocab-info-literals .property-value-column { max-width: 180px; } } diff --git a/resource/js/docready.js b/resource/js/docready.js index ffaf9f024..db63c676c 100644 --- a/resource/js/docready.js +++ b/resource/js/docready.js @@ -97,6 +97,15 @@ $(function() { // DOCUMENT READY }); }); + var active_tab = $('li.active').attr('id'); + if (active_tab == 'groups') { + $('#sidebar > h4').remove(); + $('.sidebar-grey').before('

' + sr_only_translations.groups_listing + '

'); + } else if (active_tab == 'hierarchy') { + $('#sidebar > h4').remove(); + $('.sidebar-grey').before('

' + sr_only_translations.hierarchy_listing + '

'); + } + countAndSetOffset(); hideCrumbs(); @@ -104,8 +113,16 @@ $(function() { // DOCUMENT READY }); // if the hierarchy tab is active filling the jstree with data - if ($('#hierarchy').hasClass('active')) { invokeParentTree(getTreeConfiguration()); } - if ($('#groups').hasClass('active')) { invokeGroupTree(); } + if ($('#hierarchy').hasClass('active')) { + $('#sidebar > h4').remove(); + invokeParentTree(getTreeConfiguration()); + $('.sidebar-grey').before('

' + sr_only_translations.hierarchical_listing + '

'); + } + if ($('#groups').hasClass('active')) { + $('#sidebar > h4').remove(); + invokeGroupTree(); + $('.sidebar-grey').before('

' + sr_only_translations.groups_listing + '

'); + } var textColor = $('.search-parameter-highlight').css('color'); countAndSetOffset(); @@ -384,8 +401,8 @@ $(function() { // DOCUMENT READY $('.active').removeClass('active'); $('#changes').addClass('active'); $('.sidebar-grey').empty().prepend(spinner); - var $pagination = $('.pagination'); - if ($pagination) { $pagination.hide(); } + $('.pagination').hide(); + $('#sidebar > h4.sr-only').hide(); var targetUrl = event.target.href; $.ajax({ url : targetUrl, @@ -423,8 +440,10 @@ $(function() { // DOCUMENT READY $('.active').removeClass('active'); $('#hier-trigger').parent().addClass('active'); $('.pagination').hide(); + $('#sidebar > h4.sr-only').hide(); $content.append(''); invokeParentTree(getTreeConfiguration()); + $('.sidebar-grey').before('

' + sr_only_translations.hierarchy_listing + '

'); $('#hier-trigger').attr('href', '#'); return false; } @@ -444,13 +463,13 @@ $(function() { // DOCUMENT READY $('.active').removeClass('active'); var $clicked = $(this); $clicked.parent().addClass('active'); - var $pagination = $('.pagination'); - if ($pagination) { $pagination.hide(); } - if ($('.changes-navi')) { $('.changes-navi').hide(); } + $('.pagination').hide(); + $('#sidebar > h4.sr-only').hide(); $('.sidebar-grey').remove().prepend(spinner); $('#sidebar').append(''); if (window.history.pushState) { window.history.pushState({}, null, encodeURI(event.target.href)); } invokeGroupTree(); + $('.sidebar-grey').before('

' + sr_only_translations.groups_listing + '

'); return false; } ); @@ -489,20 +508,20 @@ $(function() { // DOCUMENT READY alpha_complete = false; var $content = $('.sidebar-grey'); $content.empty().prepend(spinner); - var targetUrl = event.target.href; + var targetUrl = event.currentTarget.href; $.ajax({ url : targetUrl, success : function(data) { updateSidebar(data); $('.nav').scrollTop(0); - if (window.history.pushState) { window.history.pushState({}, null, encodeURI(event.target.href)); } + if (window.history.pushState) { window.history.pushState({}, null, encodeURI(event.currentTarget.href)); } updateTitle(data); // take the content language buttons from the response $('.header-float .dropdown-menu').empty().append($('.header-float .dropdown-menu', data).html()); } }); } else { - var selectedLetter = $(event.target).text().trim(); + var selectedLetter = $(event.currentTarget).find("span:last-child").text().trim(); if (document.getElementsByName(selectedLetter).length === 0) { return false; } var offset = $('li[name=' + selectedLetter + ']').offset().top - $('body').offset().top - 5; $('.nav').scrollTop(offset); @@ -867,7 +886,7 @@ $(function() { // DOCUMENT READY alpha_complete = true; $('.alphabetical-search-results').append($loading); var parameters = $.param({'offset' : 250, 'clang': content_lang}); - var letter = '/' + ($('.pagination > .active')[0] ? $('.pagination > .active > a')[0].innerHTML : $('.pagination > li > a')[0].innerHTML); + var letter = '/' + ($('.pagination > .active')[0] ? $('.pagination > .active > a > span:last-child')[0].innerHTML : $('.pagination > li > a > span:last-child')[0].innerHTML); $.ajax({ url : vocab + '/' + lang + '/index' + letter, data : parameters, @@ -885,7 +904,7 @@ $(function() { // DOCUMENT READY function changeListWaypointCallback() { $('.change-list').append($loading); var parameters = $.param({'offset' : changeOffset, 'clang': content_lang}); - var lastdate = $('.change-list > span:last-of-type')[0].innerHTML; + var lastdate = $('.change-list > h5:last-of-type')[0].innerHTML; $.ajax({ url : vocab + '/' + lang + '/new', data : parameters, @@ -893,7 +912,7 @@ $(function() { // DOCUMENT READY $loading.detach(); if ($(data).find('.change-list').length === 1) { $('.change-list').append($(data).find('.change-list')[0].innerHTML); - var $lastdate = $('.change-list > span:contains(' + lastdate + ')'); + var $lastdate = $('.change-list > h5:contains(' + lastdate + ')'); if ($lastdate.length === 2) $lastdate[1].remove(); $('.change-list > p:last-of-type').remove(); @@ -1047,12 +1066,12 @@ $(function() { // DOCUMENT READY */ var $replaced = $('.replaced-by a'); if ($replaced.length > 0) { - var $replacedSpan = $('.replaced-by span'); - var undoUppercasing = $replacedSpan.text().substr(0,1) + $replacedSpan.text().substr(1).toLowerCase(); + var $replacedElem = $('.replaced-by h3'); + var undoUppercasing = $replacedElem.text().substr(0,1) + $replacedElem.text().substr(1).toLowerCase(); var html = '' for (var i = 0; i < $replaced.length; i++) { var replacedBy = '' + $replaced[i].innerHTML + ''; - html += '

' + undoUppercasing + ': ' + replacedBy + '

'; + html += '

' + undoUppercasing + ': ' + replacedBy + '

'; } $('.alert-danger').append(html); $(document).on('click', '#groups', diff --git a/resource/js/scripts.js b/resource/js/scripts.js index 5fbd57e51..c44910bdf 100644 --- a/resource/js/scripts.js +++ b/resource/js/scripts.js @@ -263,8 +263,6 @@ function countAndSetOffset() { $('.sidebar-grey').attr('style', function() { var pixels = $('.nav-tabs').height() + 2; // the 2 pixels are for the borders if ($('#sidebar > .pagination').is(':visible')) { pixels += $('.pagination').height(); } - var $changesNavi = $('.changes-navi'); - if ($changesNavi.is(':visible')) { pixels += $changesNavi.height(); } return 'height: calc(100% - ' + pixels + 'px) !important'; }); var $sidebar = $('#sidebar'); diff --git a/resource/translations/en/LC_MESSAGES/skosmos.mo b/resource/translations/en/LC_MESSAGES/skosmos.mo index f2fe4b21c..c376efb2f 100644 Binary files a/resource/translations/en/LC_MESSAGES/skosmos.mo and b/resource/translations/en/LC_MESSAGES/skosmos.mo differ diff --git a/resource/translations/fi/LC_MESSAGES/skosmos.mo b/resource/translations/fi/LC_MESSAGES/skosmos.mo index 074963743..00db9831d 100644 Binary files a/resource/translations/fi/LC_MESSAGES/skosmos.mo and b/resource/translations/fi/LC_MESSAGES/skosmos.mo differ diff --git a/resource/translations/skosmos_en.po b/resource/translations/skosmos_en.po index 2e4dbfae3..1070638c1 100644 --- a/resource/translations/skosmos_en.po +++ b/resource/translations/skosmos_en.po @@ -779,3 +779,9 @@ msgstr "Concept types" msgid "Skip to main" msgstr "Skip to main content" + +msgid "Available vocabularies and ontologies" +msgstr "Available vocabularies and ontologies" + +msgid "Search from selected vocabularies" +msgstr "Search from selected vocabularies" diff --git a/resource/translations/skosmos_fi.po b/resource/translations/skosmos_fi.po index 1cfc5d8b0..e1bdb2654 100644 --- a/resource/translations/skosmos_fi.po +++ b/resource/translations/skosmos_fi.po @@ -778,3 +778,9 @@ msgstr "Käsitteen tyypit" msgid "Skip to main" msgstr "Hyppää sisältöön" + +msgid "Available vocabularies and ontologies" +msgstr "Sanastot ja ontologiat" + +msgid "Search from selected vocabularies" +msgstr "Hae valituista sanastoista" diff --git a/resource/translations/skosmos_sv.po b/resource/translations/skosmos_sv.po index afe3622a8..a9bff30e2 100644 --- a/resource/translations/skosmos_sv.po +++ b/resource/translations/skosmos_sv.po @@ -776,3 +776,9 @@ msgstr "Typ av koncept" msgid "Skip to main" msgstr "Hoppa till innehållet" + +msgid "Available vocabularies and ontologies" +msgstr "Tillgängliga tesaurusar och ontologier" + +msgid "Search from selected vocabularies" +msgstr "Sök i utvalda vokabulärer" diff --git a/resource/translations/sv/LC_MESSAGES/skosmos.mo b/resource/translations/sv/LC_MESSAGES/skosmos.mo index 86ad57dc1..e1bb0860a 100644 Binary files a/resource/translations/sv/LC_MESSAGES/skosmos.mo and b/resource/translations/sv/LC_MESSAGES/skosmos.mo differ diff --git a/view/changes.twig b/view/changes.twig index 1d252490f..560827da5 100644 --- a/view/changes.twig +++ b/view/changes.twig @@ -3,24 +3,30 @@ {% block sidebar %} +

{% trans "Listing vocabulary concepts by newest additions" %}