Skip to content

Commit c816396

Browse files
committed
css stuff
1 parent 48bb61f commit c816396

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

project/useful_forks.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@ const svg_literal_fork = '<svg class="octicon octicon-repo-forked v-align-text-b
1111
const svg_literal_star = '<svg aria-label="star" height="16" class="octicon octicon-star v-align-text-bottom" viewBox="0 0 14 16" version="1.1" width="14" role="img"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"></path></svg>';
1212
const svg_literal_eye = '<svg class="octicon octicon-eye v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"></path></svg>';
1313

14-
const additional_css_literal = '#' + UF_ID_WRAPPER + ' {padding-bottom: 50px;}';
14+
function toHtmlId(tag) {
15+
return '#' + tag;
16+
}
17+
function addCss(id, content) {
18+
return toHtmlId(id) + ' ' + content + ' ';
19+
}
20+
const additional_css_literal =
21+
addCss(UF_ID_WRAPPER, '{padding-bottom: 50px;}')
22+
+ addCss(UF_ID_MSG, '{color: red}');
1523

16-
const UF_MSG_HEADER = "Useful forks";
24+
const UF_MSG_HEADER = "<b>Useful forks</b>";
1725
const UF_MSG_NO_FORKS = "No one forked this specific repository.";
1826
const UF_MSG_SCANNING = "Currently scanning all the forks.";
1927
const UF_MSG_EMPTY_FILTER = "All the forks have been filtered out: apparently none of the forks have done anything productive!";
20-
const UF_MSG_API_RATE = "Exceeded GitHub API rate-limits.";
28+
const UF_MSG_API_RATE = "<b>Exceeded GitHub API rate-limits.</b>";
2129
const UF_TABLE_SEPARATOR = "&nbsp;|&nbsp;";
2230

2331
const FORKS_PER_PAGE = 100; // enforced by GitHub API
@@ -57,7 +65,7 @@ function build_fork_element_html(table_body, combined_name, num_stars, num_watch
5765
}
5866

5967
function getElementById_$(id) {
60-
return $('#' + id);
68+
return $(toHtmlId(id));
6169
}
6270

6371
function commits_count(request, table_body, fork_username) {
@@ -116,7 +124,6 @@ function add_fork_elements(forkdata_array, user, repo) {
116124

117125
/* Forks of forks. */
118126
if (elem_ref.forks_count > 0) {
119-
console.log("FROM ADD_FORK !!")
120127
request_fork_page(1, elem_ref.owner.login, elem_ref.name);
121128
}
122129
}

0 commit comments

Comments
 (0)