Skip to content

Commit

Permalink
gaue2 many changes
Browse files Browse the repository at this point in the history
  • Loading branch information
theo-armour committed Oct 25, 2016
1 parent db440ca commit 3334a72
Show file tree
Hide file tree
Showing 29 changed files with 2,518 additions and 1,323 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,16 @@
for ( var i = 0; i < users.length; i++ ) {

user = users[ i ];

if ( user.startsWith('#') ) {

selUser.appendChild( document.createElement( 'optgroup' ) );
selUser.children[ i ].label = user.slice( 1 );
selUser.appendChild( document.createElement( 'optgroup' ) );
selUser.children[ i ].label = user.slice( 1 );

} else {

selUser.appendChild( document.createElement( 'option' ) );
selUser.children[ i ].text = user;
selUser.appendChild( document.createElement( 'option' ) );
selUser.children[ i ].text = user;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name=description content='
' >
<meta name=keywords content='Jaanga,GitHub API,CSS,HTML,JavaScript,GitHub,FOSS' >
<meta name=date content='2016-09-16' >
<meta name=date content='2016-10-23' >
</head>
<body>
<script src=https://cdnjs.cloudflare.com/ajax/libs/showdown/1.4.3/showdown.min.js ></script>
Expand All @@ -18,7 +18,7 @@

function init() {

COR.taglineHeader = 'A hard core howdy!' + b;
COR.taglineHeader += '+ a hard core howdy!' + b;

COR.initThreeColumns();

Expand All @@ -28,17 +28,17 @@

COR.getMenuDetailsTemplate() +

// COR.getMenuDetailsObjectProperties() +

COR.getMenuDetailsAbout() +

COR.getMenuFooter() +

b;

if ( window.self !== window.top ) { hamburger.style.left = '0px'; }
CORdetailsTemplate.setAttribute( 'open', 'open' );

detailsTemplate.setAttribute('open', 'open');
COR.contents = CORcontents;

if ( window.self !== window.top ) { hamburger.style.left = '0px'; }

}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
// Copyright &copy; 2016 Jaanga authors
// Copyright © 2016 Jaanga authors. MIT License


var b = '<br>';
var COR = {};

var API = API || {};
var COR = {};
var SER = SER || {};
var DAT = DAT || {};
var EUS = EUS || {};

API.token = '';

// move to DEF file
// Add USR defaults to COR?

COR.taglineHeader =

Expand All @@ -27,8 +28,12 @@

// COR.txt = '<p>lorem ipsum, quia dolor sit, amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?</p>';
COR.txt = '<p>GitHub API responses will appear here.</p>';

COR.converter = new showdown.Converter( { strikethrough: true, literalMidWordUnderscores: true, simplifiedAutoLink: true, tables: true });

COR.objectName = 'COR';



COR.initThreeColumns = function() {

Expand All @@ -53,7 +58,7 @@


COR.contents = document.body.appendChild( document.createElement( 'div' ) );
COR.contents.id = 'contents';
COR.contents.id = 'CORcontents';
COR.contents.innerHTML = '<h1>contents</h1><div id=divContents >' + COR.txt + '</div>';


Expand Down Expand Up @@ -93,7 +98,7 @@
'.butt2 { width: 108px; }' +
'.popUp { background-color: white; left: 150px; border: 1px solid red; opacity: 1.0; padding: 5px; position: absolute; width: 120px; z-index: 10; }' +

'#contents { border: 0px red solid; left: 24%; position: absolute; top: 0; width: 50%; }' +
'#CORcontents { border: 0px red solid; left: 24%; position: absolute; top: 0; width: 50%; }' +

// '#menu { box-sizing: border-box; background-color: #ccc; padding: 0 10px 0 10px; position: absolute; max-width: 20%; }' +
'#menu { background-color: #eee; height: ' + window.innerHeight + 'px; padding: 0 5px 0 10px; overflow-x: hidden; overflow-y: auto; position: fixed; max-width: 20%; }' +
Expand Down Expand Up @@ -157,11 +162,11 @@
'<p>Thank you <a href=https://developer.github.com/v3/ > GitHub API </a> ' +
// '<a href=http://threejs.org target="_blank">Mr.doob.</a></p>' +

'<p>Click the \'i in a circle\' info icon for more <a href=index.html#readme.md >help</a></p>' +
'<p>Click the \'i in a circle\' info icon for more <a href=index.html#readme.md >help</a></p>' + b +

'</details>' +

b;
'';

return menuDetailsAbout;

Expand All @@ -176,99 +181,58 @@
'<hr>' +

'<center>' +
'<a href=javascript:menu.scrollTop=0; style=text-decoration:none; onmouseover=pop2.style.display=""; onmouseout=pop2.style.display="none"; ><h1> &#x2766 <h1></a>' +
'<a href=javascript:COR.menu.scrollTop=0; style=text-decoration:none; onmouseover=pop2.style.display=""; onmouseout=pop2.style.display="none"; ><h1> &#x2766 <h1></a>' +
'</center>' +

'<div class=popUp id=pop2 style=display:none;bottom:100px; >' +
'Jaanga - your 3D happy place.<br>Click here to return to the top of the page' +
'Jaanga - your 3D happy place.<br>Click here to return to the top of the page' + b +
'</div>' +

b;
'';

return footer;

};

COR.getPageFooter = function() {

return '<hr>' + b +
'<center><h1>' +
'<a href=javascript:window.scrollTo(0,0); style=text-decoration:none; > &#x2766; </a>' +
'</h1></center>';

}




COR.getMenuDetailsTemplate = function() {

var menuDetailsTemplate =

'<details id=detailsTemplate >' +
'<details id=CORdetailsTemplate >' +

'<summary><h3>Template</h3></summary>' +

'<p id=pTemplate >' +

'<button > button </button>' + b +

COR.txt +
COR.txt + b +

'</p>' +

'</details>' +

b;

return menuDetailsTemplate;

};




COR.getMenuDetailsObjectProperties = function( obj ) {

obj = obj || COR.defaults;

var menuDetailsObjectProperties =

'<details> ' +

'<summary id=MenuSummaryObjectProperties ><h3>Object Properties: ' + ( obj.objectName || '' ) + ' </h3></summary>' +

'<p>' +
'<button onclick=properties.innerHTML=COR.getObjectProperties(COR.place); >Get place properties</button> ' +
'<button onclick=properties.innerHTML=COR.getObjectProperties(); >Get defaults</button> ' +
'</p>' +

'<p id=properties ></p>' + b +

'</details>' +

'';

return menuDetailsObjectProperties;
return menuDetailsTemplate;

};


// utils


// make more generic
COR.getObjectProperties = function( obj ) {

var keys, txt;
obj = obj || COR.defaults;

keys = Object.keys( obj );

txt = '';

for ( var i = 0; i < keys.length; i++ ) {

txt += '<tr><td>' + keys[ i ] + ': </td><td> ' + obj[ keys[ i ] ] + '</td></tr>';

}

MenuSummaryObjectProperties.innerHTML = '<h3>Object Properties: ' + ( obj.objectName || '' ) + '</h3>';

return '<table>' + txt + '</table>';

}


COR.requestFile = function( url, callback ) {

var xhr;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang=en >
<head>
<meta charset=utf-8 >
<title>API Key R1</title>
<title>API Authentication Access Token R1</title>
<meta name=viewport content='width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no' >
<meta name=description content='GitHub API
' >
Expand All @@ -12,26 +12,30 @@
<body>
<script src=https://cdnjs.cloudflare.com/ajax/libs/showdown/1.4.3/showdown.min.js ></script>
<script src=../0-cor-core/core-r1.js ></script>
<script src=../1-api-api-key/api-key-r1.js ></script>
<script src=../1-api-authentication/api-authentication-r1.js ></script>
<script>
// Copyright © 2016 Jaanga authors. MIT License

// https://developer.github.com/v3/#authentication


init();

function init() {

COR.taglineHeader = 'An API howdy!' + b;
COR.taglineHeader += '+ an API token howdy!' + b;

COR.initThreeColumns();

COR.menu.innerHTML =

COR.getMenuDetailsHeader() +

API.getMenuDetailsAPIKey() +
API.getMenuDetailsAPIAccessToken() +

COR.getMenuDetailsTemplate() +

API.getMenuDetailsAPIRates() +
// API.getMenuDetailsAPIRates() +

// COR.getMenuDetailsObjectProperties() +

Expand All @@ -41,7 +45,11 @@

b;

detailsTemplate.setAttribute('open', 'open');
APIapiAcessToken.setAttribute( 'open', 'open' );

APIapiRates.setAttribute( 'open', 'open' );

CORdetailsTemplate.setAttribute( 'open', 'open' );

API.getRateLimits();

Expand Down
Loading

0 comments on commit 3334a72

Please sign in to comment.