mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
HTML: Restructure html folder
This changes the HTML part of GitX to be more consistent -- we now use a "views" directory where every web view has it's own directory. Furthermore, GitX-wide Javascript is added in the "lib" directory. The same is true for CSS in the "css" directory. Every view can have its own custom CSS and JS, and those are put in the views directory (without JS or CSS prefix directories).
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
body {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#title {
|
||||
padding: 0px;
|
||||
padding-left: 5px;
|
||||
border-bottom: 1px solid black;
|
||||
margin: 0px;
|
||||
font-weight: 500;
|
||||
background-color: #ECF3FD;
|
||||
font-size: 100%;
|
||||
position: fixed;
|
||||
font-family: Helvetica;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
var showFileChanges = function(file, cached) {
|
||||
// New file?
|
||||
var diff = $("diff");
|
||||
|
||||
if (file.status == 0)
|
||||
{
|
||||
var contents = file.unstagedChanges();
|
||||
if (contents)
|
||||
diff.innerHTML = contents.escapeHTML();
|
||||
else
|
||||
diff.innerHTML = "Could not display changes";
|
||||
|
||||
diff.style.display= '';
|
||||
$('title').innerHTML = "New file: " + file.path;
|
||||
} else {
|
||||
diff.style.display = 'none';
|
||||
if (cached)
|
||||
diff.innerHTML = file.cachedChangesAmend_(Controller.amend()).escapeHTML();
|
||||
else
|
||||
diff.innerHTML = file.unstagedChanges().escapeHTML();
|
||||
highlightDiffs();
|
||||
diff.style.display = '';
|
||||
$("title").innerHTML = "Changes for " + file.path;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Diff for file</title>
|
||||
<link rel="stylesheet" href="../../css/GitX.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="../../lib/GitX.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../lib/md5.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../lib/diffHighlighter.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../../lib/keyboardNavigation.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
||||
<link rel="stylesheet" href="commit.css" type="text/css" media="screen" title="no title" charset="utf-8">
|
||||
<script src="commit.js" type="text/javascript" chahrset="utf-8"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 id='title'>Nothing to commit</h1>
|
||||
|
||||
<div id="notification" style="display:none;">
|
||||
<img src="../../images/spinner.gif" alt="Spinner" id="spinner"></img>
|
||||
<div id="notification_message"></div>
|
||||
</div>
|
||||
|
||||
<pre>
|
||||
<code class="diffcode" id='diff'>
|
||||
Nothing to commit (working directory clean)
|
||||
</code>
|
||||
</pre>
|
||||
</body>
|
||||
Reference in New Issue
Block a user