From a5d2e8c9c5f4c35c00f5369f1251ed8f1690a330 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 1 Sep 2017 06:56:44 +0000 Subject: [PATCH] styled the code history view slightly more --- codepot/src/codepot/views/code_history.php | 51 +++++++------ codepot/src/css/code.css | 88 +++++++++++++++------- 2 files changed, 87 insertions(+), 52 deletions(-) diff --git a/codepot/src/codepot/views/code_history.php b/codepot/src/codepot/views/code_history.php index 21351465..72eeca23 100644 --- a/codepot/src/codepot/views/code_history.php +++ b/codepot/src/codepot/views/code_history.php @@ -104,7 +104,7 @@ $this->load->view ( $h = $history[--$i]; $xfullpath = $this->converter->AsciiToHex (($fullpath == '')? '.': $fullpath); - print ""; + print ''; print ''; // Repository migration from googlecode revealed that it did not put // 'author' for initial project creation. So I've added the following check. @@ -119,38 +119,43 @@ $this->load->view ( } print ''; + + print ''; + + print ''; print ''; + print ''; - //print '
'; - print '
'; + print '
'; - print ''; + print '
'; - - print '
'; - print '
'; - print ''; + print '
'; print anchor ("code/file/{$project->id}/{$xfullpath}/{$h['rev']}", $h['rev']); - if (!empty($h['tag'])) - { - print ' '; - print ''; - print htmlspecialchars($h['tag']); - print ''; - } - print ''; print '
'; + print '
'; print '
'; - print ''; print codepot_unixtimetodispdate(strtotime($h['date'])); - print ''; print '
'; + print '
'; + print ''; - print ''; print ''; + print ''; + if (!empty($h['tag'])) + { + print ''; + print htmlspecialchars($h['tag']); + print ''; + } + print '
'; + + print ''; + + print ''; print '
'; if ($file['type'] == 'file') { @@ -161,18 +166,16 @@ $this->load->view ( '
' . $this->lang->line('Difference') . '
'); } - //print anchor ("code/revision/{$project->id}/{$xfullpath}/{$h['rev']}", - // '
' . $this->lang->line('Changes') . '
'); print anchor ("code/revision/{$project->id}/{$xfullpath}/{$h['rev']}", - sprintf('%s', base_url_make('/css/images/iconmonstr-script-4-240.png'), $this->lang->line('Changes'))); + sprintf('%s', base_url_make('/css/images/iconmonstr-script-4-240.png'), $this->lang->line('Changes'), 'Show revision changes')); print ' '; print anchor ("code/file/{$project->id}/{$xfullpath}/{$h['rev']}", - sprintf('%s', base_url_make('/css/images/iconmonstr-sitemap-7-240.png'), $this->lang->line('Changes'))); + sprintf('%s', base_url_make('/css/images/iconmonstr-sitemap-7-240.png'), $this->lang->line('Changes'), 'Show the repository')); print '
'; print ''; print ''; - print ''; + print ''; print ''; if ($h['review_count'] > 0) diff --git a/codepot/src/css/code.css b/codepot/src/css/code.css index 80cd794a..9cca8c10 100644 --- a/codepot/src/css/code.css +++ b/codepot/src/css/code.css @@ -222,25 +222,22 @@ background-color: #AABBFF; } -#code_history_result_table td.commit-author-td { - width: 1%; - vertical-align: top; - text-align: center; - padding-right: 1em; +#code_history_result_table tr { + border: none; } -#code_history_result_table img.commit-author-icon { - width: 3em; - height: 3em; +#code_history_result_table tr.commit-info-bottom { + border-bottom: 1px solid #F0F0F0; } #code_history_result_table td.commit-message-td { vertical-align: middle; line-height: 1.2em; + background-color: #F0F0F0; } #code_history_result_table td.commit-message-td:hover { - background-color: #F0F0F0; + background-color: #EAEAEA; } #code_history_result_table a.commit-message, @@ -251,37 +248,72 @@ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ - font-family: "DejaVu Sans Mono", consolas, monaco, "Andale Mono", monospace; + /*font-family: "DejaVu Sans Mono", consolas, monaco, "Andale Mono", monospace;*/ } -#code_history_result_table td.commit-revision-td { - display: flex; - flex-wrap: nowrap; - justify-content: space-between; +#code_history_result_table td.commit-author-td { + width: 0.1%; + vertical-align: top; + text-align: center; + padding-right: 1em; +} + +#code_history_result_table img.commit-author-icon { + width: 40px; + height: 40px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + +#code_history_result_table .commit-basic-info-subtable { + margin: 0; + padding: 0; + border: collapse; +} + +#code_history_result_table td.commit-revision-td, +#code_history_result_table td.commit-datetime-td, +#code_history_result_table td.commit-author-text-td { + width: 0.1%; + white-space: nowrap; + padding: 0 1em 0 0; vertical-align: middle; - line-height: 1.2em; + font-size: 0.9em; } -#code_history_result_table td.commit-revision-td:hover { - background-color: #F0F0F0; -} - -#code_history_result_table td.commit-revision-td div { - margin-right: 1em; -} - -#code_history_result_table .commit-revision-and-datetime { - display: flex; - flex-wrap: nowrap; - justify-content: flex-start; +#code_history_result_table td.commit-tag-td { + width: 99%; + white-space: nowrap; + padding: 0 0 0 0; vertical-align: middle; + font-size: 0.9em; +} + +#code_history_result_table .commit-revision, +#code_history_result_table .commit-datetime, +#code_history_result_table .commit-author-text, +#code_history_result_table .commit-tag { + border: 1px solid #FFFFFF; +} + +#code_history_result_table .commit-revision:hover, +#code_history_result_table .commit-author-text:hover { + border: 1px solid #CACACA; + /*background: #CACACA;*/ +} + +#code_history_result_table td.commit-actions-td { + vertical-align: middle; + text-align: center; + width: 1%; + vertical-align: top; } #code_history_result_table .commit-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; - vertical-align: middle; } /*-----------------------------------------------