summaryrefslogtreecommitdiff
path: root/js/view
Commit message (Collapse)AuthorAgeFilesLines
* Render package details on the client.David Thompson2015-01-303-18/+94
| | | | | | | | | | | | * js/routes.js: Add new route. * js/controller/packageInfo.js: New file. * js/view/packageInfo.js: New file. * js/model/packages.js (guix.packages.PackagesByName): New function. * js/view/ui.js (guix.ui.licenseList): New function. * js/view/packages.js (guix.packages.view): Render package links as Mithril URLs. Remove factorized inner 'renderLicese' function. * guix-web/view/html.scm (javascripts): Add new JS files. (view-package): Delete.
* js: layout: Update copyright year in footer.David Thompson2015-01-301-1/+1
| | | | * js/view/layout.js (guix.withLayout): Add © 2015.
* js: Fix display when there are 0 search resultsDavid Thompson2015-01-301-1/+1
| | | | | | | | | | * js/controller/packages.js (guix.packages.packages): Default to empty array. * js/model/packages.js (guix.packages.Pager.currentPage): Always return an array * js/view/packages.js (guix.packages.view): Show spinner when there are 0 packages loaded from the server, not when there are 0 pages of results.
* js: Factorize headerWithBadge function.David Thompson2015-01-303-8/+9
| | | | | | * js/view/ui.js (guix.ui.headerWithBadge): New function. * js/view/packages.js (guix.view.packages): Use it. * js/view/generations.js (guix.view.generations): Likewise.
* js: Extract modal creation function.David Thompson2015-01-302-17/+42
| | | | | | * js/view/ui.js: New file. * guix-web/view/html.scm (javascripts): Add it. * js/view/packages.js (guix.packages.view): Use 'guix.ui.modal' function.
* css: Improve appearance of counter badges next to headers.David Thompson2015-01-302-2/+2
| | | | | | | * css/guix.css (.header .badge): New style. * js/view/generations.js (guix.generations.view): Add 'header' class to h2 element. * js/view/packages.js (guix.packages.view): Likewise.
* js: Extract pagination model.David Thompson2014-10-161-14/+12
| | | | | | | | | | * js/utils.js (guix.clamp): New function. * js/controller/packages.js (guix.packages.controller): Remove 'pages', 'currentPageIndex', and 'pageSize' properties. Add 'pager' prop. Delete 'paginate', 'currentPage', 'isFirstPage', 'isLastPage', and 'isCurrentPage' methods. * js/model/packages.js (guix.packages.Pager): New function. * js/view/packages.js (guix.packages.view): Use new Pager API.
* Add generations view.David Thompson2014-10-162-4/+64
| | | | | | | | | | | | * guix-web/controller.scm (controller): Add '/generations' route. * guix-web/package.scm (profile-generations*): New procedure. * guix-web/view.scm (generations-json): New procedure. (javascripts): Add new JS files. * js/model/generations.js: New file. * js/controller/generations.js: New file. * js/view/generations.js: New file. * js/view/layout.js (guix.withLayout): Add 'Generations' navbar entry. * js/routes.js: Add '/generations' route.
* js: Hook up navbar to routes.David Thompson2014-10-151-1/+6
| | | | | * js/view/layout.js (guix.withLayout): Add click handler for 'Packages' link.
* js: Add loading spinner to packages page.David Thompson2014-10-152-3/+9
| | | | | | | | | | | * css/guix.css: Add spinner styles. * js/controller/packages.js (guix.packages.view): Explicitly redraw after loading packages. * js/model/packages.js (guix.packages.Packages): Load packages in the background. * js/view/layout.js (guix.withLayout): Cast elem to array if needed. * js/view/packages.js (guix.packages.view): Render spinner when there are no packages to display.
* Render footer on client instead of server.David Thompson2014-10-151-13/+38
| | | | | | | * guix-web/view.scm (main-layout): Remove footer. (all-packages): Remove '#guix' div. (librejs): Add container and logo. * js/view/layout.js (guix.withLayout): Render footer.
* js: Break package components into model/view/controller files.David Thompson2014-10-151-0/+251
| | | | | | | | | * js/packages.js: Delete. * js/model/packages.js: New file. * js/view/packages.js: New file. * js/controller/packages.js: New file. * js/routes.js: Use new namespace for packages. * guix-web/view.scm (javascripts): Add new JS files.
* Restructure JavaScript files.David Thompson2014-10-151-0/+33
* js/guix-packages.js: Delete. * js/mithril.js: Delete. * js/underscore.js: Delete. * js/lib/mithril.js: New file. * js/lib/underscore.js: New file. * js/packages.js: New file. * js/routes.js: New file. * js/utils.js: New file. * js/view/layout.js: New file. * guix-web/view.scm (javascripts): Add new files. Delete old ones. * css/guix.css (logo): New class. * images/logo.png: Shrink logo.