Skip to content

Commit

Permalink
css stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
payne911 committed Oct 15, 2020
1 parent 48bb61f commit c816396
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions project/useful_forks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@ const svg_literal_fork = '<svg class="octicon octicon-repo-forked v-align-text-b
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>';
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>';

const additional_css_literal = '#' + UF_ID_WRAPPER + ' {padding-bottom: 50px;}';
function toHtmlId(tag) {
return '#' + tag;
}
function addCss(id, content) {
return toHtmlId(id) + ' ' + content + ' ';
}
const additional_css_literal =
addCss(UF_ID_WRAPPER, '{padding-bottom: 50px;}')
+ addCss(UF_ID_MSG, '{color: red}');

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

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

function getElementById_$(id) {
return $('#' + id);
return $(toHtmlId(id));
}

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

/* Forks of forks. */
if (elem_ref.forks_count > 0) {
console.log("FROM ADD_FORK !!")
request_fork_page(1, elem_ref.owner.login, elem_ref.name);
}
}
Expand Down

0 comments on commit c816396

Please sign in to comment.