From acaae92c89633904fb84933cab8fc139d8d1f45c Mon Sep 17 00:00:00 2001 From: Melissa Wen Date: Sun, 16 Aug 2015 20:27:08 -0300 Subject: [PATCH] Adding software internal pages style --- css/article-page.css | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ css/general-article-pages.css | 0 css/main-content.css | 20 ++++++++++---------- css/software-pages.css | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ style.css | 10 +++++++--- theme.js | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 410 insertions(+), 15 deletions(-) create mode 100644 css/article-page.css delete mode 100644 css/general-article-pages.css diff --git a/css/article-page.css b/css/article-page.css new file mode 100644 index 0000000..0d05879 --- /dev/null +++ b/css/article-page.css @@ -0,0 +1,92 @@ +/*** General Definitions ***/ +#content .main-block #article-header h1.title{ + margin-bottom: 10px; + padding: 0px 0px 10px 0px; + color: #172738; + border-bottom: 1px solid #D3D6DE; + font-family: Arial, open_sansbold, Helvetica, sans-serif; + font-size: 34px; + font-variant: normal; + font-weight: bold; + line-height: 37px; + text-transform: capitalize; +} + +#content .main-block #article-header .publishing-info span{ + font-size: 12px; + color: #172738; + font-family: Arial; +} + +#content .main-block .article-body { + font-family: Arial ; + font-size: 15px; + line-height: 21px; +} + +/* For software internal pages */ + +#content .main-block .article-body h2 { + margin-bottom: 20px; + font-family: Arial; + font-size: 16px; + font-weight: bold; + line-height: 21px; +} + +#content .main-block .article-body h3 { + margin-bottom: 20px; + font-size: 15px; + line-height: 21px; + font-weight: bold; + font-family: Arial; +} + +#content .main-block .article-body p{ + margin-bottom: 22px; + font-family: arial; +} + +#content .main-block .article-body .zoomable-image, +#content .main-block .article-body img { + display: block; +} + +#content .main-block .article-body hr { + height: 0; + margin: 30px 0; + border: 0; + border-top: 1px solid rgba(0, 0, 0, 0.1); + border-bottom: 1px solid rgba(255, 255, 255, 0.3); +} + +#content .main-block .article-body #article-actions:last-child{ + padding-top: 10px; + border-top: 4px solid #2C4B6B; +} + +/*** Categories ***/ + +#content .main-block #article-cat h4 { + float: left; + margin: 13px 10px 10px 0; + min-height: 0px; + font-family: Arial; + font-size: 1.3em; + font-weight: 300; + text-decoration: initial; +} + +#content .main-block #article-cat a{ + float: left; + margin: 10px 10px 10px 0; + padding: 3px 10px; + color: #3E67B1; + background-color: #ECEDF1; + border: 1px solid #D3D6DE; + border-radius: 3px; + font-size: 12px; + text-decoration: initial; +} + +/*** end of categories ***/ diff --git a/css/general-article-pages.css b/css/general-article-pages.css deleted file mode 100644 index e69de29..0000000 --- a/css/general-article-pages.css +++ /dev/null diff --git a/css/main-content.css b/css/main-content.css index 5567e08..4e5b2dc 100644 --- a/css/main-content.css +++ b/css/main-content.css @@ -11,21 +11,21 @@ /*** Block Title ***/ #content .block-outer .block-title { + padding: 5px 8px 18px 7px; + margin: 0px 0px 2px 0px; background: #eee; - font-size: 12px; - text-align: left; border-bottom: none; - padding: 5px 8px 18px 7px; - text-transform: uppercase; + font-size: 12px; font-family: "open_sansbold", Arial, Helvetica, sans-serif; font-variant: normal; - margin: 0px 0px 2px 0px; + text-transform: uppercase; + text-align: left; + font-weight: 300; } #content .box-1 .block-title { - font-size: 18px; - text-transform: none; - font-family: "open_sansregular", Arial, Helvetica, sans-serif; - padding: 5px 8px 20px 10px; + padding: 5px 8px 20px 10px; + font-size: 18px; + font-family: "open_sansregular", Arial, Helvetica, sans-serif; + text-transform: none; } - diff --git a/css/software-pages.css b/css/software-pages.css index a5c13fa..d0281f2 100644 --- a/css/software-pages.css +++ b/css/software-pages.css @@ -193,3 +193,215 @@ } /*** end of Software Homepage ***/ + +/*** Categories and Tags block ***/ + +#content .box-1 .categories-and-tags-block { + border-top: 4px solid #4562b1; +} + +#content .box-1 .categories-and-tags-block .block-title { + background: none; + margin-top: 14px; + float: left; + font-size: 11px; +} + +#content .box-1 .categories-and-tags-block .block-title:last-child { + border-top: 1px solid #8b949b; + border-bottom: 1px solid #8b949b; +} + +#content .box-1 .categories-and-tags-block .category_cloud { + margin: 12px auto 10px 0px; + float: left; +} + +#content .box-1 .categories-and-tags-block .category_cloud a { + padding: 3px 6px; + margin: 10px 3px; + line-height: 28px; + background-color: #e9e8ed; + border: 1px solid #e9e8ed; + border-radius: 8px; + font-size: 11px; +} + +#content .box-1 .categories-and-tags-block .category_cloud a:hover { + background: #3a70d1; + color: white; + border-color: #3a70d1; +} + +#content .box-1 .categories-and-tags-block .category_cloud a:link { + text-decoration: none; +} + +/*** end of categories and tags block ***/ + +/*** Right bar ***/ + +/* Link-list block */ +#content .box-3 .block-title { + background: #eee; + color: #4562b1; + border-top: 4px solid #4562b1; + line-height: 15px; +} + +#content .box-3 .link-list-block li { + margin: 0; + padding: 0; + border-bottom: 1px solid #ddd; + border-top: none; +} + +#content .box-3 .link-list-block li a { + width: auto; + padding: 6px 5px 8px 18px; + background-color: #fff; + background-position: 0px 50%; + color: #2C66CE; + border-right: none; + border-top: 0px solid #64946E; + border-radius: 0 0 0 0; + font-weight: normal; + font-size: 14px; + line-height: 17px; +} + +#content .box-3 .link-list-block h3.empty + ul { + border-top: 1px solid #ddd; +} + +#content .box-3 .link-list-block li a.link-this-page, +#content .box-3 .link-list-block li a.link-this-page:hover { + border-right: none; +} + +#content .box-3 .link-list-block li a:hover { + background-color: #FFFFFF; + color: #000; +} + +#content .box-3 .link-list-block li a.link-this-page { + width: auto; + margin-left: 0px; + background-color: #ffffff; + font-weight: bold; +} + +/* Repository block */ +.box-3 #bt_repositorio, +.box-3 #bt_repositorio:active, +.box-3 #bt_repositorio:visited{ + display: block; + position: relative; + padding: 12px 10px; + background: #EAEBEE; + border-radius: 4px; + font-size: 12px; + font-family: open_sansbold, Arial, Helvetica, sans-serif; + font-weight: bold; + text-transform: uppercase; +} + +.box-3 #bt_repositorio::after{ + content: url('../images/right-arrow.png'); + position: absolute; + width: 18px; + right: 10px; + padding: 4px 0px 4px 2px; + margin-top: -2px; + background: #2C66CE; + color: #FFF; + border-radius: 4px; + font-size: 16px; + line-height: 20px; + text-align: center; +} + +.box-3 #content #bt_repositorio:hover{ + color: #FFF; + background: #2C66CE; + text-decoration: none; +} +/*** end of right bar ***/ + +/*** Software internal pages ***/ + +/* FAQ page */ + +#content .main-block .article-body ul.etapas-publicacao { + margin-bottom: 20px; +} + +#content .main-block .article-body ul.etapas-publicacao li { + margin-bottom: 10px; + list-style: none; + list-style-position: inside; +} + +#content .main-block .article-body ul.etapas-publicacao li strong { + padding: 2px 8px; + margin-right: 6px; + background: #333; + color: #fff; + float: left; + border-radius: 50%; +} + +#content .main-block .article-body .etapas-publicacao-2{ + font-weight: bold; +} + +/* Tutorial page */ + +#content .main-block .article-body p strong { + font-size: 16px; +} + +/* Manual page */ + +#content .main-block #article .folder-content .item-info { + padding: 30px 20px 32px 0px; + border-top: 1px solid #ccc; +} + +#content .main-block #article .folder-content .folder-item:last-child .item-info{ + border-bottom: 1px solid #ccc; +} + +#content .main-block #article .folder-content .item-icon { + display: block; + float: left; + margin: 2px 0px auto auto; + padding: 45px 40px 4px 10px; + background: #2C66CE url("../images/download-mini_icon.png") center center no-repeat; + border: 1px solid #2C66CE; + border-radius: 4px; +} + +#content .main-block #article .folder-content .item-icon a{ + display: none; +} + + +#content .main-block #article .folder-content .item-description{ + padding-left: 0px; + margin-left: 65px; +} + +#content .main-block #article .folder-content .item-description a{ + color: #172938; + font-size: 18px; + font-family: Arial; + font-weight: 700; +} + +#content .main-block #article .folder-content .item-date{ + padding-left: 0px; + margin-left: 65px; +} + +/*** end fo software internal pages ***/ diff --git a/style.css b/style.css index 7df443a..5463e02 100644 --- a/style.css +++ b/style.css @@ -6,14 +6,18 @@ @import url(css/footer.css); @import url(css/left-bar.css); @import url(css/home-page.css); +@import url(css/software-pages.css); +@import url(css/software-catalog-page.css); @import url(css/main-content.css); -@import url(css/general-article-pages.css); +@import url(css/article-page.css); +/* @import url(css/community-pages.css); @import url(css/software-pages.css); @import url(css/software-catalog-page.css); @import url(css/news-page.css); @import url(css/use-report.css); @import url(css/tooltips.css); +*/ @import url(font-awesome.min.css); /*@import url(http://fonts.googleapis.com/css?family=Open+Sans);*/ @@ -97,7 +101,7 @@ body { list-style:none; } -* h1,h2,h3,h4,h5,h6,pre,code { +* h1,h2,h3,h4,h5,h6 { color:inherit; font-family: arial; font-weight: 700; @@ -120,7 +124,7 @@ body { line-height: 21px; } -* h4,h5,h6,pre,code{ +* h4,h5,h6 { font-size: 16px; line-height: 21px; } diff --git a/theme.js b/theme.js index e89844c..b592ffb 100644 --- a/theme.js +++ b/theme.js @@ -121,10 +121,10 @@ $('#link-buscar').click(function(e) { function insert_notice_div(){ var notice = $('.display-content-block').find('li'); notice.each(function(){ - var $set = $(this).children(); + var $set = $(this).children(); for(var i=1, len = $set.length; i < len; i+=5){ $set.slice(i, i+5).wrapAll('
'); - } + } for(var i=2, len = $set.length; i < len; i+=3){ $set.slice(i, i+3).wrapAll('
'); } @@ -134,10 +134,97 @@ $('#link-buscar').click(function(e) { } + /* Finds all uploaded files from manuals page and sets its names on the right format */ + function set_uploaded_files_names() { + try { + var article = document.getElementById('article'); + var folderList = article.getElementsByClassName('folder-content')[0]; + var folderItens = folderList.getElementsByClassName('item-description'); + + for(var i = 0; i < folderItens.length; i++) { + split_file_extension(folderItens[i].getElementsByTagName('a')[0]); + } + } catch(e) { + + } + } + + /* Splits a file name from its extension. Example: example.pdf becomes example - PDF */ + function split_file_extension(element) { + var tokens = element.innerHTML.split('.'); + if(tokens.length == 2) { + var fileName = tokens[0]; + var fileExtension = tokens[1].toUpperCase(); + element.innerHTML = fileName + " - " + fileExtension; + } + } + + function set_tooltip_content() { + $('.star-tooltip').html("?"); + } + + function set_arrow_direction() { + var additional_data_bar = $('#comments-additional-information'); + var arrow = $('.comments-arrow-down'); + var state = 0; + + additional_data_bar.on('click', function() { + if(state === 0) { + arrow.attr('class', "comments-arrow-up") + state = 1; + } else { + state = 0; + arrow.attr('class', "comments-arrow-down"); + } + }); + } + + function set_use_report_content() { + $('.make-report-block .make-report-container .button-bar a span').html('avaliar o software'); + $('.make-report-block .make-report-container .make-report-message').html('Relate sua experiência ou do órgão/empresa com relação ao software.'); + $('.ratings-list .see-more a.icon-arrow-right-p').html('veja todos os relatos'); + $('.main-content .star-rate-data .star-rate-form .star-comment-container .button-bar input').attr('value', 'enviar relato'); + $('.main-content .star-rate-data .star-rate-form .star-rate-text').html('Avalie o software'); + $('.main-content .star-rate-data .star-rate-form .star-comment-container .formlabel').html('Depoimento sobre o software'); + $('.star-rate-form .star-comment-container .comments-display-fields span#comments-additional-information').html('Dados adicionais (órgãos e empresas)'); + $('.star-rate-form .star-comment-container .comments-software-extra-fields #input_institution_comments label').html('Nome do órgão ou empresa'); + $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-people-benefited label').html('Número de beneficiados'); + $('.star-rate-form .star-comment-container .comments-software-extra-fields .comments-software-saved-values label').html('Recursos economizados'); + } + + function add_top_tooltips(){ + $('#content span[title]').attr("data-toggle","tooltip"); + + $('[data-toggle="tooltip"]').tooltip({ + position: { + my: "center bottom-13", + at: "center top" + }, + tooltipClass: "ui-tooltip-top" + }); + } + + function add_bottom_tooltips(){ + $('#content span[title]').attr("data-toggle","tooltip"); + + $('[data-toggle="tooltip"]').tooltip({ + position: { + my: "center top+13", + at: "center bottom" + }, + tooltipClass: "ui-tooltip-bottom" + }); + } + $(document).ready(function(){ + add_top_tooltips(); set_events(); move_article_buttons(); add_link_to_article_div(); insert_notice_div(); + set_uploaded_files_names(); + set_tooltip_content(); + set_arrow_direction(); + set_use_report_content(); }); })(jQuery); -- libgit2 0.21.2