From e8d5bddcfebe45661aa98e8731864961682aff20 Mon Sep 17 00:00:00 2001 From: patrikx3 Date: Sun, 20 May 2018 14:42:05 +0200 Subject: [PATCH] p3x-robot sunday release 2018-5-20 14:42:05 --- .idea/gitlist.iml | 17 +- .idea/php.xml | 1 + INSTALL.md | 2 +- README.md | 4 +- artifacts/php-7.2-ubuntu.md | 2 +- changelog.md | 2 +- package.json | 2 +- public/js/{search-branch.js => browser.js} | 26 +-- public/js/bundle.js | 4 +- public/js/file.js | 46 +++-- public/js/global.js | 13 ++ .../js/{search-repositories.js => index.js} | 7 +- public/js/markdown.js | 4 +- public/js/themes.js | 36 ++-- public/less/blame-view.less | 45 ----- .../less/{branch-menu.less => browser.less} | 0 .../{clone-modal.less => clone-button.less} | 0 public/less/default.less | 54 ++--- public/less/{source-view.less => file.less} | 6 + public/less/markdown.less | 40 +--- public/less/repositories.less | 70 ------- public/less/search.less | 5 + public/less/stats.less | 37 ---- public/less/table.less | 24 --- public/less/tree.less | 102 ---------- public/less/treegraph.less | 28 +++ src/css-postfix | 2 +- twig/blame.twig | 37 ++-- twig/breadcrumb.twig | 85 +++++++- twig/{branch_menu.twig => browser.twig} | 3 +- twig/commit.twig | 31 +-- twig/commits_list.twig | 5 +- twig/error.twig | 4 +- twig/file.twig | 184 ++++++++++-------- twig/index.twig | 43 ++-- twig/layout_page.twig | 22 ++- twig/markdown.twig | 4 + twig/menu.twig | 2 +- twig/navigation.twig | 7 +- twig/search.twig | 56 ++---- twig/searchcommits.twig | 12 +- twig/stats.twig | 90 +++++---- twig/tree.twig | 92 +-------- twig/treegraph.twig | 1 + 44 files changed, 528 insertions(+), 729 deletions(-) rename public/js/{search-branch.js => browser.js} (81%) rename public/js/{search-repositories.js => index.js} (83%) delete mode 100644 public/less/blame-view.less rename public/less/{branch-menu.less => browser.less} (100%) rename public/less/{clone-modal.less => clone-button.less} (100%) rename public/less/{source-view.less => file.less} (96%) delete mode 100644 public/less/repositories.less create mode 100644 public/less/search.less delete mode 100644 public/less/stats.less delete mode 100644 public/less/table.less delete mode 100644 public/less/tree.less create mode 100644 public/less/treegraph.less rename twig/{branch_menu.twig => browser.twig} (96%) create mode 100644 twig/markdown.twig diff --git a/.idea/gitlist.iml b/.idea/gitlist.iml index 194ea0d4..109bfa89 100644 --- a/.idea/gitlist.iml +++ b/.idea/gitlist.iml @@ -3,22 +3,7 @@ - - - - - - - - - - - - - - - - + diff --git a/.idea/php.xml b/.idea/php.xml index 1a331d8a..87c82ec7 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -22,6 +22,7 @@ + diff --git a/INSTALL.md b/INSTALL.md index 88996014..7ede69c6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -116,7 +116,7 @@ UrlToolkit { --- -[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.20-689 +[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.23-706 [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) diff --git a/README.md b/README.md index 40750435..38bc1699 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ -# 🤖 P3X Gitlist v2.5.20-689 +# 🤖 P3X Gitlist v2.5.23-706 This is an open-source project. Star this repository if you like it, or even donate! Thank you so much! :) @@ -162,7 +162,7 @@ npm run watch --- -[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.20-689 +[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.23-706 [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) diff --git a/artifacts/php-7.2-ubuntu.md b/artifacts/php-7.2-ubuntu.md index b405aaec..d7186b97 100644 --- a/artifacts/php-7.2-ubuntu.md +++ b/artifacts/php-7.2-ubuntu.md @@ -20,7 +20,7 @@ sudo apt upgrade -y --- -[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.20-689 +[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.23-706 [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) diff --git a/changelog.md b/changelog.md index 2f6fd134..b56731e2 100644 --- a/changelog.md +++ b/changelog.md @@ -140,7 +140,7 @@ require('codemirror/mode/yaml/yaml'); --- -[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.20-689 +[**P3X-GITLIST**](https://pages.corifeus.com/gitlist) Build v2.5.23-706 [![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact) diff --git a/package.json b/package.json index 036b0ac6..f5dcaeaf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p3x-gitlist", - "version": "2.5.20-689", + "version": "2.5.23-706", "corifeus": { "postfix": "", "prefix": "p3x-", diff --git a/public/js/search-branch.js b/public/js/browser.js similarity index 81% rename from public/js/search-branch.js rename to public/js/browser.js index b9559b1c..4a074648 100644 --- a/public/js/search-branch.js +++ b/public/js/browser.js @@ -15,18 +15,18 @@ $(function() { const debounce = require('lodash/debounce') - const currentUrl = new URL(location) - if (window.gitlist.basepath !== '') { - currentUrl.pathname = currentUrl.pathname.substring(window.gitlist.basepath.length) - } - let paths = currentUrl.pathname.split('/'); + let paths = window.gitlist.getPaths(); let slice = 4 if (window.gitlist.browse_type === 'tree') { slice = 3 } paths = paths.slice(slice); - const path = paths.join('/') + let path = paths.join('/') + if (path !== '') { + path = `/${path}` + } + const baseUrl = `${window.gitlist.basepath}/${window.gitlist.repo}` const search_query = window.gitlist.search_query; @@ -35,25 +35,25 @@ $(function() { return `${baseUrl}/${options.checkout}`; }, commits: (options) => { - return `${baseUrl}/commits/${options.checkout}`; + return `${baseUrl}/commits/${options.checkout}${path}`; }, commit: (options) => { - return `${baseUrl}/commit/${options.checkout}`; + return `${baseUrl}/commit/${options.checkout}${path}`; }, stats: (options) => { - return `${baseUrl}/stats/${options.checkout}`; + return `${baseUrl}/stats/${options.checkout}${path}`; }, network: (options) => { - return `${baseUrl}/network/${options.checkout}`; + return `${baseUrl}/network/${options.checkout}${path}`; }, blob: (options) => { - return `${baseUrl}/blob/${options.checkout}/${path}`; + return `${baseUrl}/blob/${options.checkout}${path}`; }, blame: (options) => { - return `${baseUrl}/blame/${options.checkout}`; + return `${baseUrl}/blame/${options.checkout}${path}`; }, treegraph: (options) => { - return `${baseUrl}/treegraph/${options.checkout}`; + return `${baseUrl}/treegraph/${options.checkout}${path}`; }, search: (options) => { return { diff --git a/public/js/bundle.js b/public/js/bundle.js index 369f945a..fa87cab1 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -91,8 +91,8 @@ require('./gitgraph-draw') require('./markdown') require('./clone-buttons') require('./paginate') -require('./search-branch') -require('./search-repositories') +require('./browser') +require('./index.js') require('./file') require('./theme-switcher.js') require('./global') diff --git a/public/js/file.js b/public/js/file.js index a41425ca..27543ca1 100644 --- a/public/js/file.js +++ b/public/js/file.js @@ -74,18 +74,38 @@ ${branchInfo} }) }) - buttonEditCancel.click(() => { + const validateCodeIsSame = (snack = true) => { + value = gitlist.viewer.getValue(); + if (originalCode === value) { + if (snack) { + $.snackbar({ + content: 'The code has not changed. No saving.', + }) + } + return true; + } + return false; + } + + const close = () => { buttonEdit.show(); buttonEditSave.hide(); buttonEditCancel.hide(); - gitlist.viewer.setValue(originalCode) gitlist.viewer.setOption('readOnly', true) - $.snackbar({ - content: 'Cancelled editing, you changes reverted.', - }) + } + + buttonEditCancel.click(() => { + if (!validateCodeIsSame(false)) { + gitlist.viewer.setValue(originalCode) + $.snackbar({ + htmlAllowed: true, + content: 'The changes are reverted.', + }) + } + close(); }) - let filename = location.pathname.split('/'); + let filename = window.gitlist.getPaths(); filename = filename.slice(4).join('/'); const errorHandler = (e) => { @@ -97,16 +117,6 @@ ${branchInfo} console.error(e); } - const validateCodeIsSame = () => { - value = gitlist.viewer.getValue(); - if (originalCode === value) { - $.snackbar({ - content: 'The code has not changed. No saving.', - }) - return true; - } - return false; - } const commitModal = $('#p3x-gitlist-modal-commit'); buttonEditSave.click(async () => { @@ -155,6 +165,8 @@ ${branchInfo} return; } + commitModal.modal('hide'); + $.snackbar({ htmlAllowed: true, content: '  Saving ...' @@ -185,12 +197,12 @@ ${branchInfo} errorHandler(json); } else { originalCode = value; + close(); $.snackbar({ htmlAllowed: true, content: '  The file is saved.', }) } - commitModal.modal('hide'); } catch(e) { errorHandler(e); } diff --git a/public/js/global.js b/public/js/global.js index 052ad785..8bfb307a 100755 --- a/public/js/global.js +++ b/public/js/global.js @@ -16,6 +16,7 @@ const scrollIntoView = (el) => { } } +/* const regExpEmail = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; window.gitlist.validate = { @@ -23,6 +24,16 @@ window.gitlist.validate = { return regExpEmail.test(String(email)); } } +*/ + +window.gitlist.getPaths = () => { + const currentUrl = new URL(window.location) + if (window.gitlist.basepath !== '') { + currentUrl.pathname = currentUrl.pathname.substring(window.gitlist.basepath.length) + } + let paths = currentUrl.pathname.split('/'); + return paths; +} window.gitlist.clearInput = (name) => { const input = $(`[name=${name}]`) @@ -125,6 +136,8 @@ global.gitlist.scrollHash = function(element, event) { $(function () { $('.dropdown-toggle').dropdown(); + $('[data-toggle="tooltip"]').tooltip() + $body = $('body'); $head = $('head') diff --git a/public/js/search-repositories.js b/public/js/index.js similarity index 83% rename from public/js/search-repositories.js rename to public/js/index.js index b7eabcc9..d8ecd15a 100644 --- a/public/js/search-repositories.js +++ b/public/js/index.js @@ -2,7 +2,7 @@ $(function() { const List = require('list.js') - const id = 'repositories' + const id = 'p3x-gitlist-index' if ($(`#${id}`).length) { @@ -11,17 +11,16 @@ $(function() { const cookieName = 'p3x-gitlist-query-repo'; const value = Cookies.get(cookieName) const input = $('[name="query-repo"]') - const inputClear = $('#p3x-gitlist-repo-list-clear'); + const inputClear = $('#p3x-gitlist-index-list-clear'); input.keypress(() => { Cookies.set(cookieName, input.val(), window.gitlist.cookieSettings) }) input.val(value); - console.log(input) const listOptions = { - valueNames: ['name'], + valueNames: ['name', 'description'], indexAsync: true, }; const list = new List(id, listOptions); diff --git a/public/js/markdown.js b/public/js/markdown.js index 4f153a17..5bdecc37 100644 --- a/public/js/markdown.js +++ b/public/js/markdown.js @@ -23,6 +23,7 @@ $(function() { const kebabCase = require('lodash/kebabCase') markdownRenderer.heading = function (text, level, raw) { + level = level + 2; const ref = kebabCase(text).replace(/[^\x00-\xFF]/g, ""); const id = ref + '-parent'; const hover = ` onmouseenter="document.getElementById('${ref}').style.display = 'inline'" onmouseleave="document.getElementById('${ref}').style.display = 'none'" `; @@ -86,9 +87,8 @@ We are not loading everything, since it is about 500kb`) return `${highlighted}`; } - const mdContent = $('#md-content'); + const mdContent = $('#p3x-gitlist-readme'); if (mdContent.length) { - global.gitlist.setTheme(); const html = marked(mdContent.text(), { renderer: markdownRenderer }); diff --git a/public/js/themes.js b/public/js/themes.js index a82ab7ff..0817bf1a 100755 --- a/public/js/themes.js +++ b/public/js/themes.js @@ -1,22 +1,22 @@ const themes = { - "bootstrap-default": "/generated/css/bootstrap-default.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-solar": "/generated/css/bootstrap-solar.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-cerulean": "/generated/css/bootstrap-cerulean.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-cosmo": "/generated/css/bootstrap-cosmo.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-cyborg": "/generated/css/bootstrap-cyborg.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-darkly": "/generated/css/bootstrap-darkly.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-flatly": "/generated/css/bootstrap-flatly.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-journal": "/generated/css/bootstrap-journal.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-lumen": "/generated/css/bootstrap-lumen.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-paper": "/generated/css/bootstrap-paper.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-readable": "/generated/css/bootstrap-readable.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-sandstone": "/generated/css/bootstrap-sandstone.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-simplex": "/generated/css/bootstrap-simplex.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-slate": "/generated/css/bootstrap-slate.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-spacelab": "/generated/css/bootstrap-spacelab.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-superhero": "/generated/css/bootstrap-superhero.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-united": "/generated/css/bootstrap-united.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css", - "bootstrap-yeti": "/generated/css/bootstrap-yeti.62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5.css" + "bootstrap-default": "/generated/css/bootstrap-default.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-solar": "/generated/css/bootstrap-solar.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-cerulean": "/generated/css/bootstrap-cerulean.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-cosmo": "/generated/css/bootstrap-cosmo.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-cyborg": "/generated/css/bootstrap-cyborg.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-darkly": "/generated/css/bootstrap-darkly.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-flatly": "/generated/css/bootstrap-flatly.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-journal": "/generated/css/bootstrap-journal.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-lumen": "/generated/css/bootstrap-lumen.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-paper": "/generated/css/bootstrap-paper.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-readable": "/generated/css/bootstrap-readable.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-sandstone": "/generated/css/bootstrap-sandstone.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-simplex": "/generated/css/bootstrap-simplex.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-slate": "/generated/css/bootstrap-slate.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-spacelab": "/generated/css/bootstrap-spacelab.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-superhero": "/generated/css/bootstrap-superhero.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-united": "/generated/css/bootstrap-united.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css", + "bootstrap-yeti": "/generated/css/bootstrap-yeti.78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb.css" }; module.exports = themes; diff --git a/public/less/blame-view.less b/public/less/blame-view.less deleted file mode 100644 index 7917d376..00000000 --- a/public/less/blame-view.less +++ /dev/null @@ -1,45 +0,0 @@ -.p3x-gitlist-light { - .blame-view { - - td.blame-info { - } - td.blame-line { - pre { - overflow-x: auto; - white-space:pre-wrap; - } - } - tr { - } - tr:last-child { - } - .line { - } - .commit { - } - pre { - } - } -} - -.p3x-gitlist-dark { - .blame-view { - - td.blame-info { - } - td.blame-line { - - } - tr { - } - tr:last-child { - } - .line { - } - .commit { - } - pre { - } - } -} - diff --git a/public/less/branch-menu.less b/public/less/browser.less similarity index 100% rename from public/less/branch-menu.less rename to public/less/browser.less diff --git a/public/less/clone-modal.less b/public/less/clone-button.less similarity index 100% rename from public/less/clone-modal.less rename to public/less/clone-button.less diff --git a/public/less/default.less b/public/less/default.less index 668e9638..038f03fc 100644 --- a/public/less/default.less +++ b/public/less/default.less @@ -24,44 +24,29 @@ } } +.p3x-gitlist-button { + .btn { + margin-bottom: @padding-base-vertical !important; + } +} .p3x-gitlist-dark { #snackbar-container > div { border: 1px solid @navbar-default-border; } - pre { + code { overflow-x: auto; white-space:pre-wrap; } - pre.p3x-gitlist-code { + code.p3x-gitlist-code { background-color: lighten(@navbar-inverse-bg, 5%); color: @navbar-inverse-color; border-color: @navbar-inverse-border; } } - -.header { - margin-bottom: @line-height-computed; -} - - - -.space-right { - padding: 0 8px 0 0; -} - -.rss-icon { - color: @brand-danger; - font-size: @font-size-large; - - &:hover { - color: darken(@brand-danger, 15%); - } -} - .p3x-gitlist-markdown-heading-container { position: relative; } @@ -77,7 +62,7 @@ a.p3x-gitlist-markdown-heading-link { } .p3x-gitlist-breadcrumb-divider { - min-height: 8px; + min-height: @padding-base-vertical; display: block; clear: both;; } @@ -89,30 +74,19 @@ img.emoji { vertical-align: -0.1em; } -body { - font-size: 10pt !important; -} - .p3x-list-item-header { font-weight: bold !important; } -.p3x-gitlist-twig-file-button-row { - margin-bottom: 5px !important; -} - @import "network.less"; -@import "clone-modal.less"; +@import "clone-button.less"; @import "footer"; -@import "repositories"; @import "main-tabs"; -@import "tree"; -@import "source-view"; +@import "treegraph"; +@import "file"; @import "commits"; @import "commit-list"; -@import "stats"; -@import "blame-view"; @import "markdown"; -@import "table"; -@import "branch-menu"; -@import "overlay"; \ No newline at end of file +@import "browser"; +@import "overlay"; +@import "search"; \ No newline at end of file diff --git a/public/less/source-view.less b/public/less/file.less similarity index 96% rename from public/less/source-view.less rename to public/less/file.less index d3e99866..7b292119 100644 --- a/public/less/source-view.less +++ b/public/less/file.less @@ -1,3 +1,9 @@ +#p3x-gitlist-file-codemirror-exceeded { + display: none; + margin-bottom: @padding-base-horizontal; +} + + .p3x-gitlist-light { } diff --git a/public/less/markdown.less b/public/less/markdown.less index 7b31aeed..8b00e9f1 100644 --- a/public/less/markdown.less +++ b/public/less/markdown.less @@ -1,51 +1,17 @@ .p3x-gitlist-light { @import (less) '../../node_modules/highlight.js/styles/github.css'; - .readme-view { - border: 1px solid @navbar-default-border; - } - - .md-header { - padding: @padding-large-horizontal; - background-color: @navbar-default-bg; - color: @navbar-default-color; - line-height: @line-height-base; - border-bottom: 1px solid lighten(@navbar-default-border, 5%); - font-weight: bold; - } } .p3x-gitlist-dark { - @import (less) '../../node_modules/highlight.js/styles/tomorrow-night.css'; - - .readme-view { - border: 1px solid @navbar-inverse-border; - } - - .md-header { - padding: @padding-large-horizontal; - background-color: @navbar-inverse-bg; - color: @navbar-inverse-color; - line-height: @line-height-base; - border-bottom: 1px solid lighten(@navbar-inverse-border, 5%); - font-weight: bold; - } + @import (less) '../../node_modules/highlight.js/styles/dracula.css'; } - -.md-view { - width: 100%; - margin-bottom: @line-height-base; -} - -#md-content { - padding: @padding-large-vertical @padding-large-horizontal; - +#p3x-gitlist-readme { pre { padding: 0; - } - } + diff --git a/public/less/repositories.less b/public/less/repositories.less deleted file mode 100644 index 5e7df7d4..00000000 --- a/public/less/repositories.less +++ /dev/null @@ -1,70 +0,0 @@ -.p3x-gitlist-light { - .repository { - margin-bottom: @line-height-computed; - border: 1px solid @navbar-default-border; - - .repository-header { - border-bottom: 1px solid @navbar-default-border; - padding: 10px; - font-size: @font-size-base; - font-weight: 700; - background-color: @navbar-default-bg; - color: @navbar-default-color; - - a{ - color: @navbar-default-color !important; - } - - span.rss-icon { - font-size: @font-size-h3; - } - > .fa { - margin-right: 8px; - } - } - .repository-body { - padding: @padding-base-vertical @padding-base-horizontal; - - p { - margin: 0; - } - } - } -} - - -.p3x-gitlist-dark { - .repository { - margin-bottom: @line-height-computed; - border: 1px solid @navbar-inverse-border; - - .repository-header { - border-bottom: 1px solid @navbar-inverse-border; - padding: 10px; - font-size: @font-size-base; - font-weight: 700; - background-color: fade(@navbar-default-bg, 5%); - color: lighten(@navbar-default-link-color, 25%) !important; - - a{ - color: lighten(@navbar-default-link-color, 25%) !important; - } - - span.rss-icon { - font-size: @font-size-h3; - } - > .fa { - margin-right: 8px; - } - } - .repository-body { - padding: @padding-base-vertical @padding-base-horizontal; - - p { - margin: 0; - } - } - } - -} - diff --git a/public/less/search.less b/public/less/search.less new file mode 100644 index 00000000..445cf80f --- /dev/null +++ b/public/less/search.less @@ -0,0 +1,5 @@ +.p3x-gitlist-search-match { + overflow-x: auto; + white-space: pre; + margin: 0; +} diff --git a/public/less/stats.less b/public/less/stats.less deleted file mode 100644 index 82c1781f..00000000 --- a/public/less/stats.less +++ /dev/null @@ -1,37 +0,0 @@ - -.stats { - border: 1px solid @navbar-default-border; - border-radius: @border-radius-base; - - > thead > tr > th { - background-color: @navbar-default-bg; - color: @navbar-default-color; - padding: 8px; - line-height: @line-height-computed;; - text-align: left; - vertical-align: bottom; - border-bottom: 1px solid @navbar-default-border; - } - tbody td { - padding: 8px; - line-height: @line-height-computed; - text-align: left; - vertical-align: top; - border-bottom: 1px solid @gray-lighter; - - > .fa { - margin-right: 8px; - } - } - caption + thead tr:first-child th, - caption + thead tr:first-child td, - colgroup + thead tr:first-child th, - colgroup + thead tr:first-child td, - thead:first-child tr:first-child th, - thead:first-child tr:first-child td { - border-top: 0; - } - tbody tr:last-child td { - border-bottom: 0; - } -} diff --git a/public/less/table.less b/public/less/table.less deleted file mode 100644 index 704daf27..00000000 --- a/public/less/table.less +++ /dev/null @@ -1,24 +0,0 @@ -.p3x-gitlist-light { - -} - -.p3x-gitlist-dark { - - .table.table { - - border-color: @navbar-inverse-bg; - - th { - border-bottom-color: @navbar-inverse-bg; - background-color: @navbar-inverse-bg; - color: @navbar-inverse-color; - } - - } -} - -.table { - a { - text-decoration: none !important; - } -} \ No newline at end of file diff --git a/public/less/tree.less b/public/less/tree.less deleted file mode 100644 index 0037af82..00000000 --- a/public/less/tree.less +++ /dev/null @@ -1,102 +0,0 @@ - -.p3x-gitlist-light { - - .treegraph-button { - display: inline-block; - min-width: 80px; - text-align: right; - background-color: @navbar-default-bg; - color: @navbar-default-color !important; - padding-right: 2px; - } - - .tree { - border: 1px solid @navbar-default-border; - border-radius: @border-radius-base; - - > thead > tr > th { - background-color: @navbar-default-bg; - color: @navbar-default-color; - padding: 8px; - line-height: @line-height-computed;; - text-align: left; - vertical-align: bottom; - border-bottom: 1px solid @navbar-default-border; - } - tbody td { - padding: 8px; - line-height: @line-height-computed; - text-align: left; - vertical-align: top; - border-bottom: 1px solid @gray-lighter; - - > .fa { - margin-right: 8px; - } - } - caption + thead tr:first-child th, - caption + thead tr:first-child td, - colgroup + thead tr:first-child th, - colgroup + thead tr:first-child td, - thead:first-child tr:first-child th, - thead:first-child tr:first-child td { - border-top: 0; - } - tbody tr:last-child td { - border-bottom: 0; - } - } - -} - -.p3x-gitlist-dark { - - - .treegraph-button { - display: inline-block; - min-width: 80px; - text-align: right; - background-color: @navbar-inverse-bg; - color: @navbar-inverse-color !important; - padding-right: 2px; - } - - .tree { - border: 1px solid @navbar-inverse-border; - border-radius: @border-radius-base; - - > thead > tr > th { - background-color: @navbar-inverse-bg; - color: @navbar-inverse-color; - padding: 8px; - line-height: @line-height-computed;; - text-align: left; - vertical-align: bottom; - border-bottom: 1px solid @navbar-inverse-border; - } - tbody td { - padding: 8px; - line-height: @line-height-computed; - text-align: left; - vertical-align: top; - border-bottom: 1px solid @gray-lighter; - - > .fa { - margin-right: 8px; - } - } - caption + thead tr:first-child th, - caption + thead tr:first-child td, - colgroup + thead tr:first-child th, - colgroup + thead tr:first-child td, - thead:first-child tr:first-child th, - thead:first-child tr:first-child td { - border-top: 0; - } - tbody tr:last-child td { - border-bottom: 0; - } - } - - -} diff --git a/public/less/treegraph.less b/public/less/treegraph.less new file mode 100644 index 00000000..0b84d425 --- /dev/null +++ b/public/less/treegraph.less @@ -0,0 +1,28 @@ + +.p3x-gitlist-light { + + .treegraph-button { + display: inline-block; + min-width: 80px; + text-align: right; + background-color: @navbar-default-bg; + color: @navbar-default-color !important; + padding-right: 2px; + } + + +} + +.p3x-gitlist-dark { + + + .treegraph-button { + display: inline-block; + min-width: 80px; + text-align: right; + background-color: @navbar-inverse-bg; + color: @navbar-inverse-color !important; + padding-right: 2px; + } + +} diff --git a/src/css-postfix b/src/css-postfix index 0ded61c8..2cbb5668 100644 --- a/src/css-postfix +++ b/src/css-postfix @@ -1 +1 @@ -62b2d402b0eeaedaea45512565bea851c64ac40debfc02c05f73e192f1e385b5 \ No newline at end of file +78b1485abae4036cd37bb748ddac45156a449e81a8682e089e96526fa1d922fb \ No newline at end of file diff --git a/twig/blame.twig b/twig/blame.twig index e15019ac..257698d3 100644 --- a/twig/blame.twig +++ b/twig/blame.twig @@ -5,21 +5,34 @@ {% block title %}P3X GitList{% endblock %} {% block content %} - {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Blame', path:''}]} %} + {% embed 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Blame', path:''}, {dir: file, path:''}]} %} + + {% block left %} + {% if blames %} + + {% endif %} + {% endblock %} + + {% endembed %} + {% if blames %} -
-
-
{{ file }}
-
- {% for blame in blames %} - - - - +
+ +
{{ blame.line }}
+
{% endfor %} -
{{ blame.commitShort }}
{{ blame.line }}
-
+ {% else %} +

+ The blames. +

+ {% endif %} + + + + {% endblock %} diff --git a/twig/breadcrumb.twig b/twig/breadcrumb.twig index 4e7f5790..c9164403 100644 --- a/twig/breadcrumb.twig +++ b/twig/breadcrumb.twig @@ -1,8 +1,91 @@ -{% block extra %}{% endblock %} + + +
+ +
+
+ + +  RSS + + +  ZIP + + +  TAR + + {% if app.show_http_remote or app.show_ssh_remote %} + +  Clone + + {% endif %} + + {% block right %}{% endblock %} + +
+
+ +{% block left %}{% endblock %} + + +{% if app.show_http_remote or app.show_ssh_remote %} + + + + +{% endif %} +
diff --git a/twig/branch_menu.twig b/twig/browser.twig similarity index 96% rename from twig/branch_menu.twig rename to twig/browser.twig index 7fed8775..f282c335 100644 --- a/twig/branch_menu.twig +++ b/twig/browser.twig @@ -2,7 +2,7 @@ window.gitlist.browse_type = '{{ browse_type }}'; + diff --git a/twig/commit.twig b/twig/commit.twig index b60b8584..3b9ec163 100644 --- a/twig/commit.twig +++ b/twig/commit.twig @@ -19,24 +19,29 @@ - {% include 'breadcrumb.twig' with {breadcrumbs: [{dir: "Commit #{commit.hash}", path:''}]} %} -
-
-
+ {% embed 'breadcrumb.twig' with {breadcrumbs: [{dir: "Commit #{commit.hash}", path:''}]} %} + {% block right %} Browse code -
-
- {{ commit.message }} -
-
-
+ {% endblock %} + + {% block left %} +
+
+ {{ commit.message }} +
+
+ + {% endblock %} + + {% endembed %} +
{% if commit.body is not empty %}

{{ commit.body | nl2br }}

{% endif %} - + {{ commit.author.name }} authored on {{ commit.date | format_date }} {% if commit.author.email != commit.commiter.email %} @@ -56,9 +61,9 @@ {% for diff in commit.diffs %}
diff --git a/twig/commits_list.twig b/twig/commits_list.twig index 1639989c..ff232cd8 100644 --- a/twig/commits_list.twig +++ b/twig/commits_list.twig @@ -12,9 +12,9 @@ -  Browse +  Browse -  Changes +  Changes

{{ item.message }}

@@ -43,7 +43,6 @@ {% if page != 'searchcommits' %}
    - {% if pager.current != pager.last %}