-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix UI issues of profile-card * create sample posts in the main page * allow users to see table of contents for top 2 level * document all the config variables and customizations in README.md * document usage of the theme in README.md Not an issue: * it do not occupy the entire screen * is not center aligned on mobile screens * no fixed size of background or profile image Resolves #2
- Loading branch information
Showing
9 changed files
with
163 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
function updateTableOfContents(content, tableOfContentsDiv) { | ||
let contents = $('<ul></ul>'); | ||
|
||
$.each(content.find('.card-body'), function(ind, element) { | ||
// console.log($(element)); | ||
for (let h1 = 1; h1 <= 6; h1++) { | ||
let tag1 = 'h' + h1 + '_' + ind; | ||
let header1 = $(element).find('h' + h1); | ||
if (header1.text()) { | ||
header1.attr('id', tag1); | ||
let content1 = $('<a />', {href: '#'+tag1, text: header1.text()}); | ||
content1 = $('<li />', {html: content1}); | ||
for (let h2 = h1 + 1; h2 <= 6; h2++) { | ||
let header2s = $(element).find('h'+h2); | ||
console.log('h'+h2, header2s); | ||
if (header2s.length > 0) { | ||
let level2 = $('<ul></ul>'); | ||
$.each(header2s, function(ind, element) { | ||
let tag2 = tag1 + '_' + ind; | ||
let header2 = $(element); | ||
header2.attr('id', tag2); | ||
let content2 = $('<a />', {href: '#'+tag2, text: header2.text()}); | ||
content2 = $('<li />', {html: content2}); | ||
level2.append(content2); | ||
}); | ||
content1.append(level2); | ||
break; | ||
} | ||
} | ||
contents.append(content1); | ||
console.log(header1); | ||
// $(table).append("<li>" + header + "</li>"); | ||
break; | ||
} | ||
} | ||
}); | ||
tableOfContentsDiv.append(contents); | ||
} | ||
|
||
function showTableOfContents(isShow) { | ||
const content = $('.content'); | ||
if (isShow) { | ||
let tableOfContents = $('<div />', {class: 'card-body', text: 'Table of contents:'}); | ||
tableOfContents = $('<div />', {class: 'card mt-1 mb-2', html: tableOfContents}); | ||
tableOfContents = $('<div />', {class: 'table-of-contents', html: tableOfContents}); | ||
content.parent().append(tableOfContents); | ||
content.addClass('col-sm-12 col-md-8 pl-2 pr-2'); | ||
tableOfContents.addClass('col-sm-12 col-md-4 pl-1 pr-1'); | ||
updateTableOfContents(content, $(tableOfContents.find('.card-body'))); | ||
} else { | ||
content.addClass('col-sm-12 col-md-12 pl-2 pr-1'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
--- | ||
layout: landing | ||
--- | ||
|
||
<div class="col-sm-12 col-md-8"></div> | ||
<div class="col-sm-12 col-md-4"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#### Other Repositories | ||
|
||
All my other repositories can be found at [material-jekyll](https://github.com/sudharkj/material-jekyll). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#### Interesting Repositories | ||
|
||
###### Ruby | ||
|
||
* [material-jekyll](https://github.com/sudharkj/material-jekyll): Jekyll theme supporting material design with bootstrap 4 for github pages. |