Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: dtinth/dtinth.github.com
base: b4bd22b7f7
...
head fork: dtinth/dtinth.github.com
compare: 0ce9b087a5
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
View
98 categories.js
@@ -0,0 +1,98 @@
+
+/*global category overrideLanguage overrideDescription */
+
+category('Web / AJAX Applications'
+, 'ttycast'
+, 'dtinthstagram'
+, 'i2DX'
+, 'DtWiki'
+, 'friendlist'
+, 'dtinth.github.com'
+)
+
+category('Web Toys'
+, 'typentilt'
+, 'scenesetter'
+, 'gps'
+, 'reminder'
+)
+
+category('User Scripts / User Styles'
+, 'dark-facebook'
+)
+
+category('Productivity'
+, 'vim-colors-dtinth256'
+, '.vimrc'
+)
+
+
+category('Command-Line Utilities'
+, 'GrowlToTheTunes'
+, 'stfu', 'pmd', 'tos3'
+, 'ablend', 'ssc2nd', 'sm2tap', 'OJN2BMS'
+, 'KrazyRenderer'
+)
+
+category('Firefox / XUL'
+, 'xulrunner-twclient'
+, 'twclient2'
+)
+
+category('Node.js / JavaScript'
+, 'bms.js'
+, 'twcs.js'
+)
+
+category('PHP'
+, 'json_pretty'
+, 'dtdocs'
+, 'oauthdamnit'
+, 'DtBMS'
+)
+
+category('Others'
+, 'soundplayer'
+, 'PoweredByOrion'
+, 'UCN-BMSE'
+, 'o2mania-bms-launcher'
+, 'compiz-windowcapture'
+)
+
+category('Obsolete'
+, 'crew-standings'
+, 'crewracing'
+, 'crew-to-play'
+)
+
+category('unlist'
+, 'readtweet', 'sound-slicer'
+, 'LiveStyl'
+, 'express-gzip'
+, 'remote-itunes-notify'
+, 'canvasrenderer2'
+)
+
+
+// language override
+
+overrideLanguage({
+ 'dtinth.github.com': 'JavaScript'
+, 'typentilt': 'JavaScript'
+, 'gps': 'JavaScript'
+, 'reminder': 'JavaScript'
+, 'dark-facebook': 'Stylus + JavaScript'
+})
+
+overrideDescription({
+ 'dtinth.github.com': 'This web page\'s source code.'
+})
+
+
+
+
+
+
+
+
+
View
54 css.css
@@ -1,54 +0,0 @@
-html, body, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-dl, dt, dd, ol, ul, li, form, img, table, tbody, tfoot, thead, tr, th, td {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- vertical-align: baseline;
-}
-body {
- font: 14.67px Verdana, sans-serif;
- background: transparent;
-}
-select, input, textarea, button {
- font: 100% Verdana, sans-serif;
-}
-
-
-/* dark theme */
-body.dark {
- background: #353433 url(http://tw.dt.in.th/homepage/tile-bg.gif) repeat-x;
- color: #e9e8e7;
-}
-body.dark h1 {
- color: #8b8685;
- text-align: center;
- padding-top: 100px;
- padding-bottom: 40px;
-}
-body.dark h1, .big-heading {
- font: bold 72pt FreeSans, Free Sans, Helvetica, Arial, sans-serif;
-}
-body.dark a {
- color: #c9c8c7;
-}
-body.dark .footer {
- color: #555657;
-}
-body.dark .footer a {
- color: #6d6e6f;
- text-decoration: none;
-}
-
-
-/* global styles */
-.pad {
- padding: 1em 3em;
-}
-.footer, .center {
- text-align: center;
-}
-.footer {
- padding-bottom: 40px;
- padding-top: 20px;
-}
View
52 generate.php
@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<html><head>
-<meta charset="utf-8"><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-<title>dtinth's HTML Stuff!</title>
-<link rel="stylesheet" href="css.css">
-<link rel="stylesheet" href="home.css">
-<meta property="fb:admins" content="1658509977" />
-</head><body class="dark">
-
-<h1>my html stuff</h1>
-<div class="content-pad center">
- <p>I'll put links to my HTML projects here.</p><?php
-
-$list = array(
- 'crew-standings' => '',
- 'crew-to-play' => 'http://blog.dt.in.th/2011/02/crew-to-play/',
- 'reminder' => '',
- 'scenesetter' => '',
- 'friendlist' => '',
- 'gps' => 'http://blog.dt.in.th/2011/04/gps/',
- 'crewracing' => '',
-);
-
-echo '
- <table>';
-
-foreach ($list as $k => $v) {
- echo '
- <tr>
- <th><a href="' . $k . '/">' . $k . '</a></th>
- <td><a href="https://github.com/dtinth/' . $k . '">repo</a></td>';
-
- if (!empty($v)) {
- echo '
- <td><a href="' . $v . '">blog</a></td>';
- }
-
- echo '
- </tr>';
-}
-
-echo '
- </table>
-';
-
-?></div>
-<div class="footer">
- <p>for more details: <b><a href="https://github.com/dtinth">github.com/dtinth</a></b></p>
-</div>
-
-</body></html>
View
21 home.css
@@ -1,21 +0,0 @@
-p {
- padding-bottom: 10px;
-}
-a {
- font-weight: bold;
-}
-table {
- margin: 0 auto;
-}
-th {
- text-align: right;
-}
-td {
- text-align: center;
- padding-left: 10px;
-}
-td a:link,
-td a:visited {
- color: #757473;
- text-decoration: none;
-}
View
92 index.html
@@ -1,51 +1,49 @@
<!DOCTYPE html>
-<html><head>
-<meta charset="utf-8"><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-<title>dtinth's HTML Stuff!</title>
-<link rel="stylesheet" href="css.css">
-<link rel="stylesheet" href="home.css">
-<meta property="fb:admins" content="1658509977" />
-</head><body class="dark">
+<meta charset=utf-8>
+<title>dtinth's Projects on GitHub</title>
+<link href="http://dt.in.th/bootstrap-dtinthstyle/css/bootstrap.min.css" rel="stylesheet" />
+<link href="http://dt.in.th/bootstrap-dtinthstyle/css/bootstrap-responsive.min.css" rel="stylesheet" />
+<style>
+.loading { text-align: center; }
+.repository .name { margin-bottom: -6px; }
+p.links { text-align: center; margin-bottom: 0; }
+.links, .links a { color: #8b8685; }
+</style>
+<body>
-<h1>my html stuff</h1>
-<div class="content-pad center">
- <p>I'll put links to my HTML projects here.</p>
- <table>
- <tr>
- <th><a href="crew-standings/">crew-standings</a></th>
- <td><a href="https://github.com/dtinth/crew-standings">repo</a></td>
- </tr>
- <tr>
- <th><a href="crew-to-play/">crew-to-play</a></th>
- <td><a href="https://github.com/dtinth/crew-to-play">repo</a></td>
- <td><a href="http://blog.dt.in.th/2011/02/crew-to-play/">blog</a></td>
- </tr>
- <tr>
- <th><a href="reminder/">reminder</a></th>
- <td><a href="https://github.com/dtinth/reminder">repo</a></td>
- </tr>
- <tr>
- <th><a href="scenesetter/">scenesetter</a></th>
- <td><a href="https://github.com/dtinth/scenesetter">repo</a></td>
- </tr>
- <tr>
- <th><a href="friendlist/">friendlist</a></th>
- <td><a href="https://github.com/dtinth/friendlist">repo</a></td>
- </tr>
- <tr>
- <th><a href="gps/">gps</a></th>
- <td><a href="https://github.com/dtinth/gps">repo</a></td>
- <td><a href="http://blog.dt.in.th/2011/04/gps/">blog</a></td>
- </tr>
- <tr>
- <th><a href="crewracing/">crewracing</a></th>
- <td><a href="https://github.com/dtinth/crewracing">repo</a></td>
- </tr>
- </table>
-</div>
-<div class="footer">
- <p>for more details: <b><a href="https://github.com/dtinth">github.com/dtinth</a></b></p>
+<div class="container">
+ <h1>Thai's Projects on GitHub</h1>
+ <p class="links">
+ <a href="https://github.com/dtinth"><strong>View GitHub Profile</strong></a>
+ / <a href="http://dt.in.th">dt.in.th</a> (website)
+ / <a href="http://me.dt.in.th">me.dt.in.th</a> (blog)
+ </p>
+ <div class="loading" id="loading">
+ <p><b>Now loading repositories...</b></p>
+ <p id="noscript">(JavaScript is required)</p>
+ </div>
+ <div id="repos">
+ </div>
</div>
+<script>
+document.getElementById('noscript').style.display = 'none'
+var categories = []
+ , languageOverride = {}
+ , descriptionOverride = {}
+ , repoData
+function loadRepoData(data) { repoData = data }
+function overrideLanguage(data) { languageOverride = data }
+function overrideDescription(data) { descriptionOverride = data }
+function category(name) {
+ var cat = { name: name, repositories: [] }
+ var arr = [].slice.call(arguments, 1)
+ categories.push(cat)
+ for (var i = 0; i < arr.length; i ++) {
+ cat.repositories.push(arr[i])
+ }
+}
+</script>
+<script src="https://api.github.com/users/dtinth/repos?per_page=100&amp;sort=pushed&amp;callback=loadRepoData"></script>
+<script src="categories.js"></script>
+<script src="repositories.js"></script>
-</body></html>
View
118 repositories.js
@@ -0,0 +1,118 @@
+
+/*global repoData categories languageOverride descriptionOverride*/
+/*jshint browser:true*/
+
+(function() {
+
+ function main() {
+ document.getElementById('loading').style.display = 'none'
+ var data = repoData.data
+ , i
+ for (i = 0; i < categories.length; i ++) {
+ category(categories[i])
+ }
+ for (i = 0; i < data.length; i ++) {
+ repository(data[i])
+ }
+ display()
+ }
+
+ function C(nodeName, className) {
+ var el = document.createElement(nodeName)
+ if (className) el.className = className
+ return el
+ }
+
+ var mapRepoNameToCategory = {}
+ , repositoryMap = {}
+ , uncategorized = []
+ , forks = []
+
+ function category(cat) {
+ for (var i = 0; i < cat.repositories.length; i ++) {
+ mapRepoNameToCategory[cat.repositories[i]] = cat
+ }
+ }
+
+ function repository(repo) {
+ var object = Repository(repo)
+ repositoryMap[repo.name] = object
+ if (!mapRepoNameToCategory[repo.name]) {
+ if (repo.fork) {
+ forks.push(repo.name)
+ } else {
+ uncategorized.push(repo.name)
+ }
+ }
+ }
+
+ function Repository(repo) {
+ function renderTo(container) {
+ var el = C('div', 'repository')
+ , header = C('h3', 'name')
+ , p = C('p', 'description')
+ , language
+
+ language = languageOverride[repo.name] || repo.language || ''
+
+ header.innerHTML = '<a href="' + repo.html_url + '">'
+ + repo.name + '</a> <small>' + language + '</small>'
+ p.innerHTML = descriptionOverride[repo.name] || repo.description
+ el.appendChild(header)
+ el.appendChild(p)
+ container.appendChild(el)
+ }
+ return {
+ renderTo: renderTo
+ }
+ }
+
+ function display() {
+ if (uncategorized.length > 0) {
+ displayCategory('New Uncategorized Repositories', uncategorized)
+ }
+ for (var i = 0; i < categories.length; i ++) {
+ var category = categories[i]
+ if (category.name != 'unlist') {
+ displayCategory(category.name, category.repositories)
+ }
+ }
+ displayCategory('Forks', forks)
+ }
+
+ function displayCategory(name, repositories) {
+ var el = C('div', 'category span6')
+ , h2 = C('h2')
+ , list = C('div', 'repo-list')
+ h2.innerHTML = name
+ el.appendChild(C('hr'))
+ el.appendChild(h2)
+ el.appendChild(list)
+ for (var i = 0; i < repositories.length; i ++) {
+ displayRepository(repositories[i], list)
+ }
+ show(el)
+ }
+
+ function displayRepository(name, parent) {
+ repositoryMap[name].renderTo(parent)
+ }
+
+ var rowCount = null
+ , rowElement
+
+ function show(el) {
+ if (rowCount == null || rowCount == 2) {
+ rowCount = 0
+ rowElement = C('div', 'row')
+ document.getElementById('repos').appendChild(rowElement)
+ }
+ rowElement.appendChild(el)
+ rowCount++
+ }
+
+ main()
+
+})()
+
+

No commit comments for this range

Something went wrong with that request. Please try again.