website: update to bootstrap 3

also, some initial work on making the 'faq' page data driven
This commit is contained in:
Jon Atkins
2013-12-23 03:09:39 +00:00
parent ca5e7a890a
commit e35c2d5a33
15 changed files with 112 additions and 9673 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -12,16 +12,3 @@ table .description {
font-style: italic; font-style: italic;
} }
.icon-chevron-desktop,
.icon-chevron-mobile {
background-image: url("../img/glyphicons-devices.png");
background-position: 0 0;
}
.nav-list > .active > a > .icon-chevron-desktop,
.nav-list > .active > a > .icon-chevron-mobile
{
background-image: url("../img/glyphicons-devices-white.png");
}
.icon-chevron-mobile {
background-position: 0 -14px;
}

View File

@ -6,7 +6,7 @@ include_once ( "userscript.php" );
function iitcDesktopDownload ( $build ) function iitcDesktopDownload ( $build )
{ {
$iitc_details = loadUserScriptHeader ( "$build/total-conversion-build.user.js" ); $iitc_details = loadUserScriptHeader ( "$build/total-conversion-build.user.js" );
$iitc_version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{1,6})/', '\1<small class="muted">.\2</small>', $iitc_details['@version'] ); $iitc_version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{1,6})/', '\1<small class="text-muted">.\2</small>', $iitc_details['@version'] );
print "<p>IITC version $iitc_version</p>\n"; print "<p>IITC version $iitc_version</p>\n";
@ -123,7 +123,7 @@ function iitcDesktopPluginDownloadTable ( $build )
$name = preg_replace ( '/^IITC plugin: /i', '', $details['@name'] ); $name = preg_replace ( '/^IITC plugin: /i', '', $details['@name'] );
# format extended version info in less prominent font # format extended version info in less prominent font
$version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{1,6})/', '\1<br><small class="muted">.\2</small>', $details['@version'] ); $version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{1,6})/', '\1<br><small class="text-muted">.\2</small>', $details['@version'] );
# remove unneeded prefix from description # remove unneeded prefix from description
$description = preg_replace ( '/^\[[^]]*\] */', '', $details['@description'] ); $description = preg_replace ( '/^\[[^]]*\] */', '', $details['@description'] );
@ -142,7 +142,7 @@ function iitcDesktopPluginDownloadTable ( $build )
if ( $category != "Deleted" ) if ( $category != "Deleted" )
{ {
print "<td class=\"download\" rowspan=\"2\"><a onclick=\"if(track){track('desktop','iitc-plugin-$basename','$build');}\" href=\"$path\" target=\"_blank\" class=\"btn btn-small btn-primary\" title=\"Download\"><i class=\"icon-download icon-white\"></i></a></td>"; print "<td class=\"download\" rowspan=\"2\"><a onclick=\"if(track){track('desktop','iitc-plugin-$basename','$build');}\" href=\"$path\" target=\"_blank\" class=\"btn btn-small btn-primary\" title=\"Download\"><span class=\"glyphicon glyphicon-download\"></span></a></td>";
} }
print "</tr>\n"; print "</tr>\n";

View File

@ -40,7 +40,7 @@ function iitcMobileDownload ( $apkfile )
$version = getMobileVersion ( $apkfile ); $version = getMobileVersion ( $apkfile );
$apk_version = $version['apk_version']; $apk_version = $version['apk_version'];
$iitc_version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{1,6})/', '\1<small class="muted">.\2</small>', $version['iitc_version'] ); $iitc_version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{1,6})/', '\1<small class="text-muted">.\2</small>', $version['iitc_version'] );
# we need an absolute link for the QR Code # we need an absolute link for the QR Code
# get the URL of this page itself # get the URL of this page itself

View File

@ -10,8 +10,8 @@
<meta name="author" content=""> <meta name="author" content="">
<!-- Le styles --> <!-- Le styles -->
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/bootstrap/css/bootstrap-responsive.css" rel="stylesheet"> <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet"> <link href="assets/css/style.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
@ -37,11 +37,10 @@ if ( file_exists ( 'tracking.php' ) )
<!-- ******** body ******** --> <!-- ******** body ******** -->
<body> <body>
<div class="container-fluid"> <div class="container">
<!-- **** page header **** --> <!-- **** page header **** -->
<div class="row-fluid"> <div class="header well">
<div class="span12 header well well-small">
<div class="media"> <div class="media">
<a class="pull-left" href="./"> <a class="pull-left" href="./">
<img class="media-object" src="assets/img/logo.png" title="IITC" alt="IITC Logo"> <img class="media-object" src="assets/img/logo.png" title="IITC" alt="IITC Logo">
@ -55,7 +54,6 @@ if ( file_exists ( 'tracking.php' ) )
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- **** top alert box **** --> <!-- **** top alert box **** -->
@ -73,7 +71,7 @@ if ( file_exists ( 'tracking.php' ) )
if ( file_exists ( "flag-stock-site-changed.txt" ) ) if ( file_exists ( "flag-stock-site-changed.txt" ) )
{ {
?> ?>
<div class="alert alert-block alert-error"> <div class="alert alert-block alert-danger">
<b>Note</b>: A change has been detected to the standard intel website. Such changes may break IITC. <b>Note</b>: A change has been detected to the standard intel website. Such changes may break IITC.
The developers have been notified of the update, and will be looking to fix things as soon as possible. The developers have been notified of the update, and will be looking to fix things as soon as possible.
See the <a href="https://plus.google.com/communities/105647403088015055797">IITC Community</a> See the <a href="https://plus.google.com/communities/105647403088015055797">IITC Community</a>
@ -83,31 +81,31 @@ if ( file_exists ( 'tracking.php' ) )
} }
?> ?>
<!-- <!--
<div class="alert alert-block alert-error"> <div class="alert alert-block alert-danger">
<b>IITC has yet again been broken by changes Niantic have made.</b> Further information/discussion on <b>IITC has yet again been broken by changes Niantic have made.</b> Further information/discussion on
<a href="xxxxxxxxxxxxxxxxxxx">this Google+ post</a>. <a href="xxxxxxxxxxxxxxxxxxx">this Google+ post</a>.
</div> </div>
--> -->
<!-- **** two column body area **** --> <!-- **** two column body area **** -->
<div class="row">
<div class="row-fluid">
<!-- **** navigation **** --> <!-- **** navigation **** -->
<div class="span3 well"> <div class="col-md-3">
<ul class="nav nav-list nowrap"> <div class="list-group nowrap">
<?php <?php
$pages = Array ( $pages = Array (
'home' => '<i class="icon-home"></i> Home', 'home' => '<span class="glyphicon glyphicon-home"></span> Home',
'news' => '<i class="icon-list"></i> News', 'news' => '<span class="glyphicon glyphicon-list"></span> News',
'faq' => '<i class="icon-question-sign"></i> FAQ', 'faq' => '<span class="glyphicon glyphicon-question-sign"></span> FAQ',
'desktop' => '<i class="icon-chevron-desktop"></i> Desktop', 'desktop' => '<span class="glyphicon glyphicon-chevron-right"></span> Desktop',
'mobile' => '<i class="icon-chevron-mobile"></i> Mobile', 'mobile' => '<span class="glyphicon glyphicon-chevron-right"></span> Mobile',
'test' => '<i class="icon-wrench"></i> Test Builds', 'test' => '<span class="glyphicon glyphicon-wrench"></span> Test Builds',
'developer' => '<i class="icon-cog"></i> Developers', 'developer' => '<span class="glyphicon glyphicon-cog"></span> Developers',
'about' => '<i class="icon-info-sign"></i> About', 'about' => '<span class="glyphicon glyphicon-info-sign"></span> About',
'donate' => '<i class="icon-gift"></i> Donate', 'donate' => '<span class="glyphicon glyphicon-gift"></span> Donate',
); );
$page = 'home'; $page = 'home';
@ -119,43 +117,47 @@ if ( ! array_key_exists ( $page, $pages ) )
foreach ( $pages as $key => $name ) foreach ( $pages as $key => $name )
{ {
# before 'desktop', add a nav-header # before 'desktop', start a sub-list for the download links
if ( $key == 'desktop' ) if ( $key == 'desktop' )
print "<li class=\"nav-header\">Downloads</li>"; print "<span class=\"list-group-item\"><div class=\"text-muted\"><span class=\"glyphicon glyphicon-download\"></span> Downloads</div><div class=\"list-group\">";
if ( $key == "home" ) if ( $key == "home" )
$url = "./"; $url = "./";
else else
$url = "?page=$key"; $url = "?page=$key";
print "<li".($page == $key ? ' class="active"' :'')."><a href=\"$url\">$name</a></li>\n"; print "<a class=\"list-group-item".($page == $key ? ' active' :'')."\" href=\"$url\">$name</a>\n";
# after 'mobile', add a horizontal separator # after 'test', end the above sub-list
if ( $key == 'test' ) if ( $key == 'test' )
print "<li class=\"divider\"></li>"; print "</div></span>";
} }
?> ?>
</ul> </div>
</div> </div>
<!-- **** end of navigation **** --> <!-- **** end of navigation **** -->
<!-- **** page body **** --> <!-- **** page body **** -->
<div class="span9 well"> <div class="col-md-9">
<div class="panel panel-default">
<div class="panel-body">
<?php <?php
include "page/$page.php"; include "page/$page.php";
?> ?>
</div> </div>
</div>
</div>
<!-- **** end of page body **** --> <!-- **** end of page body **** -->
</div> <!-- row - for navigation + page body --> </div> <!-- row - for navigation + page body -->
<!-- **** footer **** --> <!-- **** footer **** -->
<div class="alert alert-block alert-error"> <div class="alert alert-block alert-danger">
This site and the scripts are not officially affiliated with Ingress or Niantic Labs at Google. This site and the scripts are not officially affiliated with Ingress or Niantic Labs at Google.
Using these scripts is likely to be considered against the Ingress Terms of Service. Any use is at your own risk. Using these scripts is likely to be considered against the Ingress Terms of Service. Any use is at your own risk.
</div> </div>
@ -166,7 +168,7 @@ include "page/$page.php";
<!-- ******** javascript includes ******** --> <!-- ******** javascript includes ******** -->
<script src="http://code.jquery.com/jquery.js"></script> <script src="http://code.jquery.com/jquery.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
</body> </body>

View File

@ -1,25 +1,30 @@
<h2>Frequently Asked Questions</h2> <h2>Frequently Asked Questions</h2>
<ul>
<li> <?php
<h4 id="not-activated">I get a message saying my account isn't activated</h4>
$faq = Array (
'not-activated' => Array ( "I get a message saying my account isn't activated",
<<<'END'
<p> <p>
Occasionally the Niantic servers give this misleading message - what it should usually say is Occasionally the Niantic servers give this misleading message - what it should usually say is
"Failed to check account status - please reload to try again". IITC will, in most cases, retry for you. "Failed to check account status - please reload to try again".
</p> </p>
<p> <p>
Sometimes this is caused by server issues, and no amount of reloading will fix it. Come back later and try again. Sometimes this is caused by server issues, and no amount of reloading will fix it. Come back later and try again.
</p> </p>
<p> <p>
However, another reason for this message is your account being blocked/suspended by Niantic. There However, another reason for this message is your account being blocked/suspended by Niantic. There
are no (known) cases of this happening due to IITC use, but any use of bots, unofficial (e.g. iPhone) clients, are no (known) cases of this happening due to IITC use, but any use of bots, unofficial clients (e.g. iPhone, broot),
or other ingress mods could lead to this. In this case, the scanner app will also fail to work correctly. or other ingress mods (auto-drop/pickup apps) could lead to this. In this case, the scanner app will also fail
to work correctly ("Scan failed" error message).
</p> </p>
</li> END
),
<li> 'broken' => Array ( "No portals are displayed on the map/some portals are missing",
<h4 id="broken">No portals are displayed on the map/some portals are missing</h4> <<<'END'
Two common reasons. Two common reasons.
<ol> <ol>
<li>You have some portal layers turned off in the layer chooser</li> <li>You have some portal layers turned off in the layer chooser</li>
@ -27,17 +32,19 @@ Two common reasons.
</ol> </ol>
In the second case, wait 30 seconds for the next refresh, or drag the map a very small amount to perform an immediate In the second case, wait 30 seconds for the next refresh, or drag the map a very small amount to perform an immediate
refresh. refresh.
</li> END
),
<li> 'curved-lines' => Array ( "Long lines are drawn curved on the map",
<h4 id="curved-lines">Long lines are drawn curved on the map</h4> <<<'END'
This is a good thing. IITC has been updated (as of 0.13.0) to draw long links/fields correctly. If you want to understand This is a good thing. IITC has been updated (as of 0.13.0) to draw long links/fields correctly. If you want to understand
why they are drawn curved, see why they are drawn curved, see
<a href="http://gis.stackexchange.com/questions/6822/why-is-the-straight-line-path-across-continent-so-curved">here</a>. <a href="http://gis.stackexchange.com/questions/6822/why-is-the-straight-line-path-across-continent-so-curved">here</a>.
</li> END
),
<li> 'uninstall' => Array ( "How do I uninstall/disable IITC or plugins?",
<h4 id="uninstall">How do I uninstall/disable IITC or plugins?</h4> <<<'END'
This depends on your browser. This depends on your browser.
<ul> <ul>
<li><b>Chrome + Tampermonkey</b>: Click on the Tampermonkey icon (a dark square with two circles at the bottom) and choose 'Dashboard'.</li> <li><b>Chrome + Tampermonkey</b>: Click on the Tampermonkey icon (a dark square with two circles at the bottom) and choose 'Dashboard'.</li>
@ -46,9 +53,10 @@ This depends on your browser.
</ul> </ul>
From here you can remove/disable individual plugins or IITC itself. From here you can remove/disable individual plugins or IITC itself.
</li> </li>
),
<li> 'mobile-plugins' => Array ( "Is it possible to add external plugins to IITC Mobile?",
<h4 id="mobile-plugins">Is it possible to add external plugins to IITC Mobile?</h4> <<<'END'
Yes it is! Yes it is!
<ul> <ul>
<li>Create a folder named "IITC_Mobile" in your home directory.</li> <li>Create a folder named "IITC_Mobile" in your home directory.</li>
@ -61,10 +69,11 @@ Note:
<li>The filename has to end with *.user.js.</li> <li>The filename has to end with *.user.js.</li>
<li>If you don't know where to find your home directory: Enable dev-mode in the settings and follow the hint.</li> <li>If you don't know where to find your home directory: Enable dev-mode in the settings and follow the hint.</li>
</ul> </ul>
</li> END
),
<li> 'debug-data-tiles' => Array ( "What do the colours mean in 'DEBUG Data Tiles'",
<h4 id="debug-data-tiles">What do the colours mean in 'DEBUG Data Tiles'</h4> <<<'END'
The data from the Niantic server is download in square tiles. Sometimes requests fail. The colours show this status The data from the Niantic server is download in square tiles. Sometimes requests fail. The colours show this status
visually. The outline colour shows the state of the request: visually. The outline colour shows the state of the request:
<ul> <ul>
@ -88,10 +97,11 @@ The status message at the bottom-right of the screen gives a summary.
<li>If some requests failed, but no cached data was available (i.e. some red border/red fill) the status is 'Error'.</li> <li>If some requests failed, but no cached data was available (i.e. some red border/red fill) the status is 'Error'.</li>
</ul> </ul>
The tooltip for this message gives more details. The tooltip for this message gives more details.
</li> END
),
<li> 'no-penalty' => Array ( "Will Google/Niantic penalise me for using IITC?",
<h4 id="no-penalty">Will Google/Niantic penalise me for using IITC?</h4> <<<'END'
There have been rumours that Niantic/Google have been asking people to stop using IITC, and penalising users There have been rumours that Niantic/Google have been asking people to stop using IITC, and penalising users
with a loss of points for doing so. This, as far as we can tell, is a hoax. Consider the following: with a loss of points for doing so. This, as far as we can tell, is a hoax. Consider the following:
<ol> <ol>
@ -103,45 +113,52 @@ communication method available.</li>
</ol> </ol>
Some notes from a Hangout available <a href="https://plus.google.com/111333123856542807695/posts/QtiFdoRuh6w">here</a> Some notes from a Hangout available <a href="https://plus.google.com/111333123856542807695/posts/QtiFdoRuh6w">here</a>
with further details. with further details.
</li> END
),
<li> 'cheating' => Array ( "Isn't using IITC cheating/an unfair advantage?",
<h4 id="bluemap">What happened to the original blue map?</h4> <<<'END'
If you're asking about the default ingress map, this is available in the layer chooser, as "Default Ingress Map".
If you're wondering about the blue map available in the original IITC, this is no longer available by default, as we
far exceeded the free quota offered by Cloudmade, the map tile provider. However, there is a template plugin you can
use to add these back.
<ol>
<li>Install the <a href="?page=desktop#plugin-basemap-cloudmade">basemap-cloudmade plugin</a>.</li>
<li>Find the plugin.
In Chrome+Tampermonkey, choose 'Dashboard' from the Tampermonkey menu;
in Firefox+Greasemonkey, choose 'Manage user scripts' from the Greasemonkey menu.</li>
<li>Edit the plugin code, and follow the instructions within the file. You will need to register your own account
at Cloudmade.com, and obtain your own API key.</li>
</ol>
</li>
<li>
<h4 id="cheating">Isn't using IITC cheating/an unfair advantage?</h4>
IITC only uses data that is sent from the Ingress servers to the browser - it just displays it in an easy to use format. IITC only uses data that is sent from the Ingress servers to the browser - it just displays it in an easy to use format.
With the right skills it is already possible to see this data using the browser debugging console, and With the right skills it is already possible to see this data using the browser debugging console, and
there were, and continue to be, other browser add-ons that display this data - just not widely available. there were, and continue to be, other browser add-ons that display this data - just not widely available.
Having a good quality, feature rich add-on, available to all - Enlightened and Resistance - ensures one side does not Having a good quality, feature rich add-on, available to all - Enlightened and Resistance - ensures one side does not
have an unfair advantage. have an unfair advantage.
</li> END
),
<li> 'export' => Array ( "Can you add an export feature?",
<h4 id="export">Can you add an export feature?</h4> <<<'END'
No. As it stands IITC is tolerated, but not officially accepted, by Niantic/Google. Adding in features that No. As it stands IITC is tolerated, but not officially accepted, by Niantic/Google. Adding in features that
allow exporting of data outside the browser environment, or break additional Ingress terms of service allow exporting of data outside the browser environment, or break additional Ingress terms of service
is likely to trigger a takedown request from Google. is likely to trigger a takedown request from Google.
</li> END
),
<li> 'otherapp' => Array ( "I used another <i>{ingress mod/IITC plugin}</i> and it's broken - can you fix it?",
<h4 id="otherapp">I used another <i>{ingress mod/IITC plugin}</i> and it's broken - can you fix it?</h4> <<<'END'
Probably not, no. If the plugin is not listed on this site, it's not part of my IITC distribution. Probably not, no. If the plugin is not listed on this site, it's not part of my IITC distribution.
I do accept new plugins (see the Developer page for links to Github), but I do not accept any that I do accept new plugins (see the Developer page for links to Github), but I do not accept any that
allow export of Ingress data outside of the browser or make use of data not retrieved by the standard intel website. allow export of Ingress data outside of the browser or make use of data not retrieved by the standard intel website.
</li> END
</ul> ),
);
print "<ul>";
foreach ( $faq as $name => $value )
{
$title = $value[0];
$body = $value[1];
print "<li><h4 id=\"$name\">$title</h4>\n";
print "$body\n";
print "</li>\n";
}
print "</ul>";
?>

View File

@ -48,7 +48,7 @@ if ( file_exists($apkfile) )
} }
else else
{ {
print "<div class=\"alert alert-error\">Error: <b>$apkfile</b> not found</div>\n"; print "<div class=\"alert alert-danger\">Error: <b>$apkfile</b> not found</div>\n";
} }
?> ?>

View File

@ -6,7 +6,7 @@ needing to build it yourself. Automated scripts should update these builds withi
<a href="https://github.com/jonatkins/ingress-intel-total-conversion/commits/master">committed</a> to Github. <a href="https://github.com/jonatkins/ingress-intel-total-conversion/commits/master">committed</a> to Github.
</p> </p>
<div class="alert alert-block alert-error"> <div class="alert alert-block alert-danger">
Test builds are built automatically. They could be <b>broken at any time</b>. If you have any doubts about using Test builds are built automatically. They could be <b>broken at any time</b>. If you have any doubts about using
unstable software, please use the standard <a href="?page=desktop">desktop</a> or <a href="?page=mobile">mobile</a> unstable software, please use the standard <a href="?page=desktop">desktop</a> or <a href="?page=mobile">mobile</a>
builds. builds.
@ -28,7 +28,7 @@ if ( array_key_exists ( 'build', $_REQUEST ) )
} }
if ( $path != "test" ) if ( $path != "test" )
print "<div class=\"alert alert-block alert-error\"><b>NOTE</b>: A non-standard test build, <b>$path</b>, is currently selected. The notes <b>may not apply!</b> <a href=\"?page=test\">Return to the standard test build</a>.</div>"; print "<div class=\"alert alert-block alert-danger\"><b>NOTE</b>: A non-standard test build, <b>$path</b>, is currently selected. The notes <b>may not apply!</b> <a href=\"?page=test\">Return to the standard test build</a>.</div>";
$timestamp_file = $path . "/.build-timestamp"; $timestamp_file = $path . "/.build-timestamp";
@ -81,7 +81,7 @@ if ( file_exists($apkfile) )
} }
else else
{ {
print "<div class=\"alert alert-error\">Error: <b>$apkfile</b> not found</div>\n"; print "<div class=\"alert alert-danger\">Error: <b>$apkfile</b> not found</div>\n";
} }