|
11 | 11 | <title><%= [topic_title, subgroup_title].compact.join(' - ') %> | <%= group_title %> | <%= distro %> <%= version %></title>
|
12 | 12 | <link href="https://assets.openshift.net/content/subdomain.css" rel="stylesheet" type="text/css">
|
13 | 13 | <link href="<%= File.join(css_path, 'docs.css') %>" rel="stylesheet" />
|
14 |
| - <link href="https://assets.openshift.net/content/subdomain/touch-icon-precomposed.png" rel="apple-touch-icon-precomposed" type="image/png"> |
15 | 14 | <link href="_images/favicon32x32.png" rel="shortcut icon" type="image/png">
|
16 | 15 | <!--[if IE]><link rel="shortcut icon" href="https://assets.openshift.net/content/subdomain/favicon.ico"><![endif]-->
|
17 | 16 | <!-- or, set /favicon.ico for IE10 win -->
|
|
36 | 35 | </head>
|
37 | 36 | <body>
|
38 | 37 | <%= render("_templates/_topnav.html.erb", :distro_key => distro_key, :site_url => site_url) %>
|
| 38 | + |
| 39 | + |
39 | 40 | <div class="container">
|
40 | 41 | <p class="toggle-nav visible-xs pull-left">
|
41 | 42 | <button class="btn btn-default btn-sm" type="button" data-toggle="offcanvas">Toggle nav</button>
|
|
65 | 66 | <div class="col-xs-12 col-sm-9 col-md-9 main">
|
66 | 67 | <div class="page-header">
|
67 | 68 | <h1><%= article_title %></h1>
|
| 69 | + |
68 | 70 | </div>
|
69 | 71 | <%= content %>
|
| 72 | + |
| 73 | + <h4> Esse documento existe graças à contribuição de:</h4> |
| 74 | + <div id="contribuidores"></div> |
70 | 75 | </div>
|
71 | 76 | </div>
|
72 | 77 | </div>
|
|
89 | 94 | $("[id^='topicSubGroup']").on('hide.bs.collapse', function () {
|
90 | 95 | $(this).parent().find("[id^='sgSpan']").toggleClass("fa-caret-right fa-caret-down");
|
91 | 96 | });
|
| 97 | + |
| 98 | + // Script para pegar github de quem contribuiu para um documento específico |
| 99 | + var url = "https://api.github.com/repos/guardians-dsc/docs/commits?path=<%= navigation.find{|h| h[:id] == topic_id.split('::')[0]}[:topics][0][:path][2..-1] %>"; |
| 100 | + url = url.replace("html", "adoc"); |
| 101 | + var unique = []; |
| 102 | + $.getJSON(url, function(data) { |
| 103 | + var twitterList = $("<ul />"); |
| 104 | + $.each(data, function(index, item) { |
| 105 | + if(item.author && unique.indexOf(item.author.html_url) == -1) { |
| 106 | + $("<li />", { |
| 107 | + "text": item.author.html_url |
| 108 | + }).appendTo(twitterList); |
| 109 | + unique.push(item.author.html_url) |
| 110 | + } |
| 111 | + }); |
| 112 | + |
| 113 | + $("#contribuidores").fadeOut("fast", function() {$(this).empty().append(twitterList).fadeIn(1000);}); |
| 114 | + }) |
| 115 | + |
92 | 116 | });
|
93 | 117 | /*]]>*/
|
94 | 118 | </script>
|
|
0 commit comments