diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2024-02-21 14:02:11 +0200 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2024-02-21 14:02:20 +0200 |
commit | 991cf1ce67e6410e9c049022db1fc37e9dc5c412 (patch) | |
tree | 1b0de9110e4d48b8a84bd98c1ebfa955e275c35e /web | |
parent | migrate single package page (diff) | |
download | soko-991cf1ce67e6410e9c049022db1fc37e9dc5c412.tar.gz soko-991cf1ce67e6410e9c049022db1fc37e9dc5c412.tar.bz2 soko-991cf1ce67e6410e9c049022db1fc37e9dc5c412.zip |
migrate graphiql & user preferences pages
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'web')
-rw-r--r-- | web/templates/api/explore/graphiql.tmpl | 25 | ||||
-rw-r--r-- | web/templates/layout/footer.tmpl | 49 | ||||
-rw-r--r-- | web/templates/layout/head.tmpl | 14 | ||||
-rw-r--r-- | web/templates/layout/header.tmpl | 6 | ||||
-rw-r--r-- | web/templates/layout/sitetitle.tmpl | 37 | ||||
-rw-r--r-- | web/templates/layout/tyriannav.tmpl | 38 | ||||
-rw-r--r-- | web/templates/user/preferences.tmpl | 49 | ||||
-rw-r--r-- | web/templates/user/preferences/arches.tmpl | 77 | ||||
-rw-r--r-- | web/templates/user/preferences/general.tmpl | 46 | ||||
-rw-r--r-- | web/templates/user/preferences/maintainers.tmpl | 44 | ||||
-rw-r--r-- | web/templates/user/preferences/packages.tmpl | 319 | ||||
-rw-r--r-- | web/templates/user/preferences/useflags.tmpl | 46 | ||||
-rw-r--r-- | web/templates/user/userheader.tmpl | 34 |
13 files changed, 0 insertions, 784 deletions
diff --git a/web/templates/api/explore/graphiql.tmpl b/web/templates/api/explore/graphiql.tmpl deleted file mode 100644 index 584b5fc..0000000 --- a/web/templates/api/explore/graphiql.tmpl +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <title>GraphiQL - Gentoo Packages</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta name="theme-color" content="#54487a"> - <meta name="description" content="Gentoo Packages GraphiQL GraphQL API Explorer"> - <link rel="icon" href="https://packages.gentoo.org/favicon.ico" type="image/x-icon"> - <script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> - <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> - <link rel="stylesheet" href="https://unpkg.com/graphiql/graphiql.min.css" /> - </head> - - <body> - <div id="graphiql"> - Loading... - </div> - <script src="https://unpkg.com/graphiql@0.17.5/graphiql.min.js" type="application/javascript"></script> - <script> - window.graphqlEndpoint = '{{ . }}'; - </script> - <script src="/assets/graphiql.js" type="application/javascript"></script> - </body> -</html> diff --git a/web/templates/layout/footer.tmpl b/web/templates/layout/footer.tmpl deleted file mode 100644 index 13125f6..0000000 --- a/web/templates/layout/footer.tmpl +++ /dev/null @@ -1,49 +0,0 @@ -{{define "footer"}} - <footer style="background-color: #fafafa; box-shadow:none!important;"> - <div class="container pt-4" style="border-top: 1px solid #dddddd;"> - <div class="row d-none"> - <div class="col-12 offset-md-2 col-md-7"> - <h3 class="footerhead">Gentoo Packages Database</h3> - <div class="row"> - <div class="col-xs-12 col-md-4"> - <span class="kk-group-header">Data as current of</span><br>{{ .LastUpdate.Format "2006-01-02 15:04:05" }} UTC - </div> - <div class="col-xs-12 col-md-4"> - </div> - <div class="col-xs-12 col-md-4"> - </div> - </div> - </div> - <div class="col-12 col-md-3"> - <h3 class="footerhead">Questions or comments?</h3> - Please feel free to <a href="https://www.gentoo.org/inside-gentoo/contact/">contact us</a>. - <p class="mt-2"><a href="https://gitweb.gentoo.org/sites/soko.git/">{{ .Version }}</a></p> - </div> - </div> - <div class="row"> - <div class="col-2 col-sm-2 col-md-2"> - <ul class="footerlinks three-icons"> - <li><a href="https://twitter.com/gentoo" title="@Gentoo on Twitter"><span class="fa fa-twitter fa-fw"></span></a></li> - <li><a href="https://www.facebook.com/gentoo.org" title="Gentoo on Facebook"><span class="fa fa-facebook fa-fw"></span></a></li> - <li><a href="https://www.reddit.com/r/Gentoo/" title="Gentoo on Reddit"><span class="fa fa-reddit-alien fa-fw"></span></a></li> - </ul> - </div> - <div class="col-8 col-sm-8 col-md-8"> - <strong>© 2001–2023 Gentoo Authors</strong><br> - <small> - Gentoo is a trademark of the Gentoo Foundation, Inc. - The contents of this document, unless otherwise expressly stated, are licensed under the - <a href="https://creativecommons.org/licenses/by-sa/4.0/" rel="license">CC-BY-SA-4.0</a> license. - The <a href="https://www.gentoo.org/inside-gentoo/foundation/name-logo-guidelines.html">Gentoo Name and Logo Usage Guidelines</a> apply. - </small> - </div> - <div class="col-2 col-sm-2 col-md-2 text-right"> - <strong><a class="text-dark" href="https://www.gentoo.org/inside-gentoo/contact/">Contact</a></strong><br> - <small> - {{ .Version }} - </small> - </div> - </div> - </div> - </footer> -{{end}} diff --git a/web/templates/layout/head.tmpl b/web/templates/layout/head.tmpl deleted file mode 100644 index f10018a..0000000 --- a/web/templates/layout/head.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{{define "head"}} - <head> - <title>{{.Title}}Gentoo Packages</title> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta name="theme-color" content="#54487a"> - <meta name="description" content="Gentoo Packages Database"> - <!-- link rel="stylesheet" media="screen" href="/packs/css/application-024b2074.css" /--> - <!-- script src="/packs/js/application-cfb73e71df8935c3a9ed.js"></script --> - <script src="/assets/application.js"></script> - <link rel="icon" href="https://packages.gentoo.org/favicon.ico" type="image/x-icon"> - <link rel="stylesheet" href="/assets/stylesheets.css" /> - </head> -{{end}} diff --git a/web/templates/layout/header.tmpl b/web/templates/layout/header.tmpl deleted file mode 100644 index 571a58b..0000000 --- a/web/templates/layout/header.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{define "header"}} - <header> - {{template "sitetitle"}} - {{template "tyrian-navbar" .}} - </header> -{{end}} diff --git a/web/templates/layout/sitetitle.tmpl b/web/templates/layout/sitetitle.tmpl deleted file mode 100644 index f528d70..0000000 --- a/web/templates/layout/sitetitle.tmpl +++ /dev/null @@ -1,37 +0,0 @@ -{{define "sitetitle"}} - <div class="site-title"> - <div class="container"> - <div class="row justify-content-between"> - <div class="logo"> - <a href="/" title="Back to the homepage" class="site-logo"> - <img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo" srcset="https://assets.gentoo.org/tyrian/site-logo.svg"> - </a> - <span class="site-label">Packages</span> - </div> - <div class="site-title-buttons"> - <div class="btn-group btn-group-sm"> - <a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span> <strong>Get Gentoo!</strong></a> - <div class="btn-group btn-group-sm"> - <a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> - <span class="fa fa-fw fa-map-o"></span> <span class="d-none d-sm-inline">gentoo.org sites</span> <span class="caret"></span> - </a> - <div class="dropdown-menu dropdown-menu-right"> - <a class="dropdown-item" href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a> - <a class="dropdown-item" href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span> Wiki</a> - <a class="dropdown-item" href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a> - <a class="dropdown-item" href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a> - <a class="dropdown-item" href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a> - <a class="dropdown-item" href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a> - <a class="dropdown-item" href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span> Infra Status</a> - </div> - </div> - </div> - </div> - </div> - </div> - </div> -{{end}} diff --git a/web/templates/layout/tyriannav.tmpl b/web/templates/layout/tyriannav.tmpl deleted file mode 100644 index 1a9325b..0000000 --- a/web/templates/layout/tyriannav.tmpl +++ /dev/null @@ -1,38 +0,0 @@ -{{define "tyrian-navbar"}} - <nav class="tyrian-navbar navbar navbar-dark navbar-expand-lg bg-primary" role="navigation"> - <div class="container"> - <div class="navbar-header"> - <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-main-collapse" aria-controls="navbar-main-collapse" aria-expanded="false" aria-label="Toggle navigation"> - <span class="navbar-toggler-icon"></span> - </button> - </div> - <div class="collapse navbar-collapse navbar-main-collapse" id="navbar-main-collapse"> - <ul class="navbar-nav mr-auto"> - <li class="nav-item {{ if (eq .Tab "home")}}active{{end}}"><a class="nav-link" href="/">Home</a></li> - <li class="nav-item {{ if (eq .Tab "packages")}}active{{end}}"><a class="nav-link" href="/categories">Packages</a></li> - <li class="nav-item {{ if (eq .Tab "maintainers")}}active{{end}}"><a class="nav-link" href="/maintainers">Maintainers</a></li> - <li class="nav-item {{ if (eq .Tab "useflags")}}active{{end}}"><a class="nav-link" href="/useflags">USE flags</a></li> - <li class="nav-item {{ if (eq .Tab "arches")}}active{{end}}"><a class="nav-link" href="/arches">Architectures</a></li> - <li class="nav-item {{ if (eq .Tab "about")}}active{{end}}"><a class="nav-link" href="/about">About</a></li> - </ul> - - {{- if ne .Tab "home" }} - <form class="form-inline inlinesearch" role="search" action="/packages/search" method="get"> - <div class="input-group"> - <div class="input-group-prepend"> - <span class="input-group-text" id="basic-addon1"><i class="fa fa-search" aria-hidden="true"></i></span> - </div> - <input class="form-control" name="q" type="text" placeholder="Find Packages" aria-label="Find Packages"> - </div> - </form> - {{- end -}} - - <!-- - <ul class="navbar-nav"> - <li class="nav-item"><a class="nav-link" href="/user/preferences"><i class="fa fa-user-circle-o" aria-hidden="true"></i></a></li> - </ul> - --> - </div> - </div> - </nav> -{{end}} diff --git a/web/templates/user/preferences.tmpl b/web/templates/user/preferences.tmpl deleted file mode 100644 index d7fe321..0000000 --- a/web/templates/user/preferences.tmpl +++ /dev/null @@ -1,49 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -{{template "head" .Header}} -<body> -{{template "header" .Header}} - -{{template "userheader" . }} - - -<div class="tab-content" id="myTabContent"> - - <div class="container mb-5"> - {{if eq .PageName "general"}} - {{template "general" .}} - {{else if eq .PageName "packages"}} - {{template "packages" .}} - {{else if eq .PageName "maintainers"}} - {{template "maintainers" .}} - {{else if eq .PageName "useflags"}} - {{template "useflags" .}} - {{else if eq .PageName "arches"}} - {{template "arches" .}} - {{end}} - </div> - -</div> - - -{{template "footer" .Application }} - -<script src="/assets/userpref.js"></script> -<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script> -<script> - if(document.getElementById("example1") != null && document.getElementById("example2") != null) { - new Sortable(example1, { - group: 'shared', - animation: 150, - ghostClass: 'bg-info' - }); - new Sortable(example2, { - group: 'shared', - animation: 150, - ghostClass: 'bg-info' - }); - } -</script> - -</body> -</html> diff --git a/web/templates/user/preferences/arches.tmpl b/web/templates/user/preferences/arches.tmpl deleted file mode 100644 index df1c653..0000000 --- a/web/templates/user/preferences/arches.tmpl +++ /dev/null @@ -1,77 +0,0 @@ -{{define "arches"}} - <div class="row"> - - <div class="col-2 mt-1"> - <div class="nav flex-column" role="tablist" aria-orientation="vertical" style="position: fixed;"> - <a class="nav-link user-pref-nav-link active" id="keywords-tab" href="#keywords" aria-controls="overview-settings">Keywords</a> - <a class="nav-link user-pref-nav-link" id="defaults-tab" href="#defaults">Defaults</a> - </div> - </div> - - <div class="col-10 mt-1"> - - <form method="post" action="/user/preferences/arches/visible"> - <h3 class="" id="keywords">Keywords</h3><hr class="mt-1"/> - <div class="row pl-3"> - <ul id="example1" class="list-group col-6"> - {{range $index, $keyword := .UserPreferences.Arches.Visible}} - <li class="list-group-item"> - <div class="form-check form-check-inline w-100"> - <input type="checkbox" id="visible-arches-{{$keyword}}" name="visible-arches" value="{{$keyword}}" {{if Contains $.UserPreferences.Arches.Visible $keyword}}checked{{end}}/> - <label class="form-check-label ml-1" for="visible-arches-{{$keyword}}">{{$keyword}}</label> <i class="fa fa-arrows ml-auto" aria-hidden="true"></i> - </div> - </li> - {{end}} - {{$counter := 0}} - {{range $index, $keyword := .UserPreferences.GetAllKeywords}} - {{if not (Contains $.UserPreferences.Arches.Visible $keyword)}} - {{$counter = add $counter 1}} - <li class="list-group-item"> - <div class="form-check form-check-inline w-100"> - <input type="checkbox" id="visible-arches-{{$keyword}}" name="visible-arches" value="{{$keyword}}" {{if Contains $.UserPreferences.Arches.Visible $keyword}}checked{{end}}/> - <label class="form-check-label ml-1" for="visible-arches-{{$keyword}}">{{$keyword}}</label> <i class="fa fa-arrows ml-auto" aria-hidden="true"></i> - </div> - </li> - {{end}} - - {{if eq (add (len $.UserPreferences.Arches.Visible) $counter) 16}} - </ul> - <ul id="example2" class="list-group col-6"> - {{end}} - {{end}} - </ul> - </div> - - <h3 class="mt-5" id="defaults">Defaults</h3><hr class="mt-1"/> - <div class="card"> - <div class="card-body"> - <div class="row"> - <div class="col-6"> - Default arch <select class="form-control" style="max-width: 200px;display: inline;" name="arches-default-arch" id="arches-default-arch"> - {{range $index, $keyword := .UserPreferences.GetAllKeywords}} - <option value="{{$keyword}}" {{if eq $.UserPreferences.Arches.DefaultArch $keyword}}selected{{end}}>{{$keyword}}</option> - {{end}} - </select> - </div> - <div class="col-6"> - Default page <select class="form-control" style="max-width: 150px;display: inline;" name="arches-default-page" id="arches-default-page"> - <option value="keyworded" {{if eq .UserPreferences.Arches.DefaultPage "keyworded"}}selected{{end}}>keyworded</option> - <option value="stable" {{if eq .UserPreferences.Arches.DefaultPage "stable"}}selected{{end}}>newly stable</option> - </select> - </div> - </div> - </div> - </div> - - <div class="row"> - <div class="col-12 mt-4"> - <button type="submit" class="float-right btn btn-sm btn-primary">Save</button> - <a class="float-right btn btn-sm btn-outline-danger mr-2" href="/user/preferences/arches/reset">Reset to Defaults</a> - </div> - </div> - - </form> - - </div> - </div> -{{end}} diff --git a/web/templates/user/preferences/general.tmpl b/web/templates/user/preferences/general.tmpl deleted file mode 100644 index bfc6883..0000000 --- a/web/templates/user/preferences/general.tmpl +++ /dev/null @@ -1,46 +0,0 @@ -{{define "general"}} - <form method="post" action="/user/preferences/general/layout"> - <div class="row"> - - <div class="col-5 offset-1 mt-1"> - <div class="card" style="background: transparent;"> - <div class="card-body"> - <img id="img1" alt="Recently Added Packages (default)" src="/assets/pgo3.png" style="width: 100%;cursor: pointer;" /> - </div> - </div> - <div class="text-center mt-2"> - <div class="form-check text-center form-check-inline" style="text-overflow: ellipsis;overflow: hidden;"> - <input type="radio" id="classicLandingpageLayout" name="landingpage-layout" value="classic" {{if eq .UserPreferences.General.LandingPageLayout "classic"}}checked{{end}}> - <label class="form-check-label ml-1" for="classicLandingpageLayout" style="overflow:hidden;text-overflow: ellipsis;" title="Recently Added Packages (default)">Recently Added Packages <i>(default)</i></label> - </div> - </div> - </div> - - <div class="col-5 mt-1"> - <div class="card" style="background: transparent;"> - <div class="card-body"> - <img id="img2" alt="Recently Visited Packages" src="/assets/pgo4.png" style="width: 100%;cursor: pointer;" /> - </div> - </div> - <div class="text-center mt-2"> - <div class="form-check text-center form-check-inline" style="text-overflow: ellipsis;overflow: hidden;"> - <input type="radio" id="fullLandingpageLayout" name="landingpage-layout" value="full" {{if eq .UserPreferences.General.LandingPageLayout "full"}}checked{{end}}> - <label class="form-check-label ml-1" for="fullLandingpageLayout" style="overflow:hidden;text-overflow: ellipsis;" title="Recently Visited Packages">Recently Visited Packages</label> - </div> - </div> - </div> - - <div class="col-10 offset-1 mt-4"> - <button type="submit" class="float-right btn btn-sm btn-primary">Save</button> - <a class="float-right btn btn-sm btn-outline-danger mr-2" href="/user/preferences/general/reset">Reset to Defaults</a> - </div> - - </div> - </form> - - <div id="myModal" class="modal"> - <span class="close">×</span> - <img class="modal-content" id="img01"> - <div id="caption"></div> - </div> -{{end}} diff --git a/web/templates/user/preferences/maintainers.tmpl b/web/templates/user/preferences/maintainers.tmpl deleted file mode 100644 index 561aad7..0000000 --- a/web/templates/user/preferences/maintainers.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -{{define "maintainers"}} - <form method="post" action="/user/preferences/maintainers/edit"> - <div class="row"> - <div class="col-12"> - <h3 class="mt-0" id="qa-report">Include Project Packages</h3> - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;"> - <input type="checkbox" id="include-packages" name="include-packages" value="true" {{if $.UserPreferences.Maintainers.IncludeProjectPackages }}checked{{end}} /> - <label class="form-check-label ml-1" for="include-packages" style="overflow:hidden;text-overflow: ellipsis;" title="">Include packages of projects the maintainer is part of</label> - </div> - <i>If this option is enabled, all packages, QA reports, pull requests and bugs of projects a maintainer is part of will be displayed as well on the maintainer page. That is, if <i>Larry</i> is part of the <i>Python</i> project, all packages, QA reports, pull requests and bugs of the Python project will be displayed as well on the maintainer page of <i>Larry</i>.<br/>Below you can furthermore specify projects that will be excluded on the maintainer page. E.g. if Larry is furthermore part of the proxy-maintainers project, and the project is marked below, packages of the proxy maintainers project won't be shown on Larry's maintainer page.</i> - </div> - - - <div class="col-12"> - <h3 class="mt-4 pt-3" id="qa-report">Excluded Projects</h3> - </div> - <div class="col-3"> - {{range $index, $project := .Projects}} - <ul class="list-group mb-2"> - <li class="list-group-item"> - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;height:21px;"> - <input type="checkbox" id="excluded-projects-{{$project.Email}}" name="excluded-projects" value="{{$project.Email}}" {{if (Contains $.UserPreferences.Maintainers.ExcludedProjects $project.Email) }}checked{{end}}/> - <label class="form-check-label ml-1" for="excluded-projects-{{$project.Email}}" style="overflow:hidden;text-overflow: ellipsis;height:21px;" title="{{$project.Name}}">{{$project.Name}}</label> - </div> - </li> - </ul> - {{if eq $index 40}} - </div><div class="col-3"> - {{else if eq $index 81}} - </div><div class="col-3"> - {{else if eq $index 122}} - </div><div class="col-3"> - {{end}} - {{end}} - </div> - - <div class="col-12 mt-4"> - <button type="submit" class="float-right btn btn-sm btn-primary">Save</button> - <a class="float-right btn btn-sm btn-outline-danger mr-2" href="/user/preferences/maintainers/reset">Reset to Defaults</a> - </div> - - </div> - </form> -{{end}} diff --git a/web/templates/user/preferences/packages.tmpl b/web/templates/user/preferences/packages.tmpl deleted file mode 100644 index ae4e9b2..0000000 --- a/web/templates/user/preferences/packages.tmpl +++ /dev/null @@ -1,319 +0,0 @@ -{{define "packages"}} - <div class="row"> - - <div class="col-2 mt-1"> - <div class="nav flex-column" role="tablist" aria-orientation="vertical" style="position: fixed;"> - <a class="nav-link user-pref-nav-link active" id="overview-tab" href="#overview" aria-controls="overview-settings">Overview</a> - <a class="nav-link user-pref-nav-link" id="dependencies-tab" href="#dependencies">Dependencies</a> - <a class="nav-link user-pref-nav-link" id="pull-requests-tab" href="#pull-requests" aria-controls="pull-requests-settings">Pull requests</a> - <a class="nav-link user-pref-nav-link" id="bugs-tab" href="#bugs" aria-controls="bugs-settings">Bugs</a> - <a class="nav-link user-pref-nav-link" id="security-tab" href="#security" aria-controls="security-settings">Security</a> - <a class="nav-link user-pref-nav-link" id="changelog-tab" href="#changelog" aria-controls="changelog-settings">Changelog</a> - <a class="nav-link user-pref-nav-link" id="qa-report-tab" href="#qa-report" aria-controls="qa-report-settings">QA report</a> - <a class="nav-link user-pref-nav-link" id="tabs-tab" href="#tabs" aria-controls="tabs-settings">Tabs</a> - </div> - </div> - - <div class="col-9 mt-1"> - - <form method="post" action="/user/preferences/packages/edit"> - - <h3 id="overview">Overview</h3><hr class="mt-1"/> - <h4 class="mb-1">Layout</h4> - - <div class="row"> - <div class="col-6 mt-1"> - <div class="card" style="background: transparent;"> - <div class="card-body"> - <img id="img1" alt="Versions + Metadata (default)" src="/assets/pgo2.png" style="width: 100%;cursor: pointer;" /> - </div> - </div> - <div class="text-center mt-2"> - <div class="form-check text-center form-check-inline" style="text-overflow: ellipsis;overflow: hidden;"> - <input type="radio" id="minimalOverviewLayout" name="overview-layout" value="minimal" {{if eq .UserPreferences.Packages.Overview.Layout "minimal"}}checked{{end}}> - <label class="form-check-label ml-1" for="minimalOverviewLayout" style="overflow:hidden;text-overflow: ellipsis;" title="Versions + Metadata (default)">Versions + Metadata <i>(default)</i></label> - </div> - </div> - </div> - - <div class="col-6 mt-1"> - <div class="card" style="background: transparent;"> - <div class="card-body"> - <img id="img2" alt="Versions + Metadata + Changelog" src="/assets/pgo1.png" onclick="document.getElementById('fullOverviewLayout').checked = true;" style="width: 100%;cursor: pointer;" /> - </div> - </div> - <div class="text-center mt-2"> - <div class="form-check text-center form-check-inline" style="text-overflow: ellipsis;overflow: hidden;"> - <input type="radio" id="fullOverviewLayout" name="overview-layout" value="full" {{if eq .UserPreferences.Packages.Overview.Layout "full"}}checked{{end}}> - <label class="form-check-label ml-1" for="fullOverviewLayout" style="overflow:hidden;text-overflow: ellipsis;" title="Versions + Metadata + Changelog">Versions + Metadata + Changelog</label> - </div> - </div> - </div> - </div> - - <h4 class="mt-4 mb-1">Keywords</h4> - <div class="row pl-3"> - <ul id="example1" class="list-group col-6"> - {{range $index, $keyword := .UserPreferences.Packages.Overview.Keywords}} - <li class="list-group-item"> - <div class="form-check form-check-inline w-100"> - <input type="checkbox" id="overview-keywords-{{$keyword}}" name="overview-keywords" value="{{$keyword}}" {{if Contains $.UserPreferences.Packages.Overview.Keywords $keyword}}checked{{end}}/> - <label class="form-check-label ml-1" for="overview-keywords-{{$keyword}}">{{$keyword}}</label> <i class="fa fa-arrows ml-auto" aria-hidden="true"></i> - </div> - </li> - {{end}} - {{$counter := 0}} - {{range $index, $keyword := .UserPreferences.GetAllKeywords}} - {{if not (Contains $.UserPreferences.Packages.Overview.Keywords $keyword)}} - {{$counter = add $counter 1}} - <li class="list-group-item"> - <div class="form-check form-check-inline w-100"> - <input type="checkbox" id="overview-keywords-{{$keyword}}" name="overview-keywords" value="{{$keyword}}" {{if Contains $.UserPreferences.Packages.Overview.Keywords $keyword}}checked{{end}}/> - <label class="form-check-label ml-1" for="overview-keywords-{{$keyword}}">{{$keyword}}</label> <i class="fa fa-arrows ml-auto" aria-hidden="true"></i> - </div> - </li> - {{end}} - - {{if eq (add (len $.UserPreferences.Packages.Overview.Keywords) $counter) 16}} - </ul> - <ul id="example2" class="list-group col-6"> - {{end}} - {{end}} - </ul> - </div> - - <h4 class="mt-4 mb-1">EAPI version</h4> - <div class="card"> - <div class="card-body"> - Show <select class="form-control form-control-sm ml-2" style="max-width: 100px;display: inline;" name="overview-eapi" id="overview-eapi"> - <option value="none" {{if eq .UserPreferences.Packages.Overview.EAPI "none"}}selected{{end}}>none</option> - <option value="column" {{if eq .UserPreferences.Packages.Overview.EAPI "column"}}selected{{end}}>in column</option> - <option value="inline" {{if eq .UserPreferences.Packages.Overview.EAPI "inline"}}selected{{end}}>inline</option> - </select> - </div> - </div> - - <h4 class="mt-4 mb-1">Outdated Versions</h4> - <div class="card"> - <div class="card-body"> - - <div class="form-check form-check-inline"> - <input type="checkbox" class="" id="overview-showOutdated" name="overview-showOutdated" value="true" {{if .UserPreferences.Packages.Overview.ShowOutdated}}checked{{end}}/> - <label class="form-check-label ml-1" for="overview-showOutdated">Show Outdated warnings?</label> - </div> - </div> - </div> - - <h4 class="mt-4 mb-1">Metadata</h4> - <div class="card"> - <div class="card-body"> - <div class="row"> - - <div class="col-4"> - <div class="form-check form-check-inline"> - <input type="checkbox" name="overview-metadata-fields" id="overview-metadata-fields-homepage" value="homepage" {{if Contains .UserPreferences.Packages.Overview.MetadataFields "homepage"}}checked{{end}}/> - <label class="form-check-label ml-1" for="overview-metadata-fields-homepage">Homepage</label> - </div> - </div> - <div class="col-4"> - <div class="form-check form-check-inline"> - <input type="checkbox" name="overview-metadata-fields" id="overview-metadata-fields-upstream" value="upstream" {{if Contains .UserPreferences.Packages.Overview.MetadataFields "upstream"}}checked{{end}}/> - <label class="form-check-label ml-1" for="overview-metadata-fields-upstream">Upstream</label> - </div> - </div> - <div class="col-4"> - <div class="form-check form-check-inline"> - <input type="checkbox" name="overview-metadata-fields" id="overview-metadata-fields-longdescription" value="longdescription" {{if Contains .UserPreferences.Packages.Overview.MetadataFields "longdescription"}}checked{{end}}/> - <label class="form-check-label ml-1" for="overview-metadata-fields-longdescription">Longdescription</label> - </div> - </div> - <div class="col-4"> - <div class="form-check form-check-inline"> - <input type="checkbox" name="overview-metadata-fields" id="overview-metadata-fields-useflags" value="useflags" {{if Contains .UserPreferences.Packages.Overview.MetadataFields "useflags"}}checked{{end}}/> - <label class="form-check-label ml-1" for="overview-metadata-fields-useflags">USE flags</label> - </div> - </div> - <div class="col-4"> - <div class="form-check form-check-inline"> - <input type="checkbox" name="overview-metadata-fields" id="overview-metadata-fields-license" value="license" {{if Contains .UserPreferences.Packages.Overview.MetadataFields "license"}}checked{{end}}/> - <label class="form-check-label ml-1" for="overview-metadata-fields-license">License</label> - </div> - </div> - <div class="col-4"> - <div class="form-check form-check-inline"> - <input type="checkbox" name="overview-metadata-fields" id="overview-metadata-fields-maintainers" value="maintainers" {{if Contains .UserPreferences.Packages.Overview.MetadataFields "maintainers"}}checked{{end}}/> - <label class="form-check-label ml-1" for="overview-metadata-fields-maintainers">Maintainers</label> - </div> - </div> - </div> - </div> - </div> - - <h4 class="mt-4 mb-1">Changelog</h4> - <div class="card"> - <div class="card-body"> - <div class="row"> - <div class="col-6"> - Layout <select class="form-control form-control-sm ml-1" style="max-width: 100px;display: inline;" name="overview-changelog-type" id="overview-changelog-type" disabled> - <option value="compact">default</option> - </select> - </div> - <div class="col-6"> - Size <input type="number" name="overview-changelog-size" class="form-control form-control-sm ml-1" style="width:150px;display: inline;" value="{{.UserPreferences.Packages.Overview.ChangelogLength }}" /> - </div> - </div> - </div> - </div> - - - <h3 class="mt-5" id="dependencies">Dependencies</h3><hr class="mt-1"/> - <div class="card"> - <div class="card-body"> - Default Page <select class="form-control form-control-sm ml-1" style="max-width: 200px;display: inline;" name="dependencies-default-page" id="dependencies-default-page"> - <option value="dependencies" {{if eq .UserPreferences.Packages.Dependencies.Default "dependencies"}}selected{{end}}>dependencies</option> - <option value="reverse-dependencies" {{if eq .UserPreferences.Packages.Dependencies.Default "reverse-dependencies"}}selected{{end}}>reverse-dependencies</option> - </select> - </div> - </div> - - - <h3 class="mt-5" id="pull-requests">Pull requests</h3><hr class="mt-1"/> - <div class="card"> - <div class="card-body"> - Layout <select class="form-control form-control-sm ml-1" style="max-width: 200px;display: inline;" name="pullrequests-layout" id="pullrequests-layout" disabled> - <option value="default" {{if eq .UserPreferences.Packages.PullRequests.Layout "default"}}selected{{end}}>default</option> - </select> - </div> - </div> - - - <h3 class="mt-5" id="bugs">Bugs</h3><hr class="mt-1"/> - <div class="card"> - <div class="card-body"> - Layout <select class="form-control form-control-sm ml-1" style="max-width: 200px;display: inline;" name="bugs-layout" id="bugs-layout" disabled> - <option value="default" {{if eq .UserPreferences.Packages.PullRequests.Layout "default"}}selected{{end}}>default</option> - </select> - </div> - </div> - - - <h3 class="mt-5" id="security">Security</h3><hr class="mt-1"/> - <div class="card"> - <div class="card-body"> - <div class="row"> - <div class="col-6"> - Layout <select class="form-control form-control-sm ml-1" style="max-width: 100px;display: inline;" name="security-layout" id="security-layout" disabled> - <option value="default">default</option> - </select> - </div> - <div class="col-6"> - <div class="form-check form-check-inline pt-2"> - <input type="checkbox" name="security-show-glsas" id="security-show-glsas" class="disabled" value="true" {{if .UserPreferences.Packages.Security.ShowGLSAs}}checked{{end}} disabled/> - <label class="form-check-label ml-1" style="color:grey;">Show GLSAs</label> - </div> - </div> - </div> - </div> - </div> - - - <h3 class="mt-5" id="changelog">Changelog</h3><hr class="mt-1"/> - <div class="card"> - <div class="card-body"> - <div class="row"> - <div class="col-6"> - Layout <select class="form-control form-control-sm ml-1" style="max-width: 100px;display: inline;" name="changelog-type" id="changelog-type" disabled> - <option value="compact">default</option> - </select> - </div> - <div class="col-6"> - Size <input type="number" name="changelog-size" class="form-control form-control-sm" style="display: inline;width: 150px;" value="{{.UserPreferences.Packages.Changelog.Size }}" /> - </div> - </div> - </div> - </div> - - <h3 class="mt-5" id="qa-report">QA Report</h3><hr class="mt-1"/> - <div class="row"> - <div class="col-4"> - {{range (CreateSlice 190)}} - <ul class="list-group mb-2"> - <li class="list-group-item"> - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;"> - <input type="checkbox" id="qareport-classes-{{.}}" name="qareport-classes" value="{{.}}" {{if not (ContainsInt $.UserPreferences.Packages.QAReport.ExcludedWarningClasses .) }}checked{{end}} /> - <label class="form-check-label ml-1" for="qareport-classes-{{.}}" style="overflow:hidden;text-overflow: ellipsis;" title="{{GetPkgcheckClass .}}">{{GetPkgcheckClass .}}</label> - </div> - </li> - </ul> - {{if eq . 63}} - </div><div class="col-4"> - {{else if eq . 127}} - </div><div class="col-4"> - {{end}} - {{end}} - </div> - </div> - - - <h3 class="mt-5" id="tabs">Visible Tabs</h3><hr class="mt-1"/> - <div class="card"> - <div class="card-body"> - <div style="columns:3;"> - - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;"> - <input type="checkbox" name="visible-tabs" id="visible-tabs-overview" value="Overview" {{if Contains .UserPreferences.Packages.Tabs.Visible "Overview"}}checked{{end}}/> - <label class="form-check-label ml-1" for="visible-tabs-overview" style="overflow:hidden;text-overflow: ellipsis;" title="Overview">Overview</label> - </div> - - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;"> - <input type="checkbox" name="visible-tabs" id="visible-tabs-dependencies" value="Dependencies" {{if Contains .UserPreferences.Packages.Tabs.Visible "Dependencies"}}checked{{end}}/> - <label class="form-check-label ml-1" for="visible-tabs-dependencies" style="overflow:hidden;text-overflow: ellipsis;" title="Dependencies">Dependencies</label> - </div> - - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;"> - <input type="checkbox" name="visible-tabs" id="visible-tabs-qa-report" value="QA report" {{if Contains .UserPreferences.Packages.Tabs.Visible "QA report"}}checked{{end}}/> - <label class="form-check-label ml-1" for="visible-tabs-qa-report" style="overflow:hidden;text-overflow: ellipsis;" title="QA report">QA report</label> - </div> - - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;"> - <input type="checkbox" name="visible-tabs" id="visible-tabs-pull-requests" value="Pull requests" {{if Contains .UserPreferences.Packages.Tabs.Visible "Pull requests"}}checked{{end}}/> - <label class="form-check-label ml-1" for="visible-tabs-pull-requests" style="overflow:hidden;text-overflow: ellipsis;" title="Pull Requests">Pull Requests</label> - </div> - - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;"> - <input type="checkbox" name="visible-tabs" id="visible-tabs-bugs" value="Bugs" {{if Contains .UserPreferences.Packages.Tabs.Visible "Bugs"}}checked{{end}}/> - <label class="form-check-label ml-1" for="visible-tabs-bugs" style="overflow:hidden;text-overflow: ellipsis;" title="Bugs">Bugs</label> - </div> - - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;"> - <input type="checkbox" name="visible-tabs" id="visible-tabs-security" value="Security" {{if Contains .UserPreferences.Packages.Tabs.Visible "Security"}}checked{{end}}/> - <label class="form-check-label ml-1" for="visible-tabs-security" style="overflow:hidden;text-overflow: ellipsis;" title="Security">Security</label> - </div> - - <div class="form-check form-check-inline" style="text-overflow: ellipsis;overflow: hidden; width: 100%;"> - <input type="checkbox" name="visible-tabs" id="visible-tabs-changelog" value="Changelog" {{if Contains .UserPreferences.Packages.Tabs.Visible "Changelog"}}checked{{end}}/> - <label class="form-check-label ml-1" for="visible-tabs-changelog" style="overflow:hidden;text-overflow: ellipsis;" title="Changelog">Changelog</label> - </div> - - </div> - </div> - </div> - <div class="row"> - <div class="col-12 mt-4"> - <button type="submit" class="float-right btn btn-sm btn-primary">Save</button> - <a class="float-right btn btn-sm btn-outline-danger mr-2" href="/user/preferences/packages/reset">Reset to Defaults</a> - </div> - </div> - - </form> - </div> - - </div> - - <div id="myModal" class="modal"> - <span class="close">×</span> - <img class="modal-content" id="img01"> - <div id="caption"></div> - </div> - -{{end}} diff --git a/web/templates/user/preferences/useflags.tmpl b/web/templates/user/preferences/useflags.tmpl deleted file mode 100644 index a59241e..0000000 --- a/web/templates/user/preferences/useflags.tmpl +++ /dev/null @@ -1,46 +0,0 @@ -{{define "useflags"}} - <form method="post" action="/user/preferences/useflags/edit"> - <div class="row"> - - <div class="col-5 offset-1 mt-1"> - <div class="card" style="background: transparent;"> - <div class="card-body"> - <img id="img1" alt="Popular USE flags (default)" src="/assets/pgo6.png" style="width: 100%;cursor: pointer;" /> - </div> - </div> - <div class="text-center mt-2"> - <div class="form-check text-center form-check-inline" style="text-overflow: ellipsis;overflow: hidden;"> - <input type="radio" id="BubbleUseflagDefaultPage" name="useflag-default-page" value="bubble" {{if eq .UserPreferences.Useflags.Layout "bubble"}}checked{{end}}> - <label class="form-check-label ml-1" for="BubbleUseflagDefaultPage" style="overflow:hidden;text-overflow: ellipsis;" title="Popular USE flags (default)">Popular USE flags <i>(default)</i></label> - </div> - </div> - </div> - - <div class="col-5 mt-1"> - <div class="card" style="background: transparent;"> - <div class="card-body"> - <img id="img2" alt="USE flags search" src="/assets/pgo5.png" style="width: 100%;cursor: pointer;" /> - </div> - </div> - <div class="text-center mt-2"> - <div class="form-check text-center form-check-inline" style="text-overflow: ellipsis;overflow: hidden;"> - <input type="radio" id="SearchUseflagDefaultPage" name="useflag-default-page" value="search" {{if eq .UserPreferences.Useflags.Layout "search"}}checked{{end}}> - <label class="form-check-label ml-1" for="SearchUseflagDefaultPage" style="overflow:hidden;text-overflow: ellipsis;" title="USE flags search">USE flags search</label> - </div> - </div> - </div> - - <div class="col-10 offset-1 mt-4"> - <button type="submit" class="float-right btn btn-sm btn-primary">Save</button> - <a class="float-right btn btn-sm btn-outline-danger mr-2" href="/user/preferences/useflags/reset">Reset to Defaults</a> - </div> - - </div> - </form> - - <div id="myModal" class="modal"> - <span class="close">×</span> - <img class="modal-content" id="img01"> - <div id="caption"></div> - </div> -{{end}} diff --git a/web/templates/user/userheader.tmpl b/web/templates/user/userheader.tmpl deleted file mode 100644 index 05fb535..0000000 --- a/web/templates/user/userheader.tmpl +++ /dev/null @@ -1,34 +0,0 @@ -{{define "userheader"}} - - <div class="kk-header-container"> - <div class="container"> - <div class="row"> - <div class="col-12"> - - <div class="row mt-3 pt-2"> - <div class="col-md-5"> - <h1 class="stick-top kk-package-title" id="package-title"> - <div> - <div class="kk-package-name" style="margin-left: 0px!important;"><span class="fa fa-fw fa-cog"></span><span class="ml-2">Preferences</span></div> - </div> - </h1> - </div> - <div class="col-md-7"> - <!-- You can customize the page contents to your needs here --> - </div> - - <div class="col-md-12 pt-4 mt-1"> - <nav class="nav kk-package-nav"> - <a class="nav-link {{if eq .PageName "general"}}active{{end}}" href="/user/preferences/general"><i class="fa fa-globe mr-1" aria-hidden="true"></i>General</a> - <a class="nav-link {{if eq .PageName "packages"}}active{{end}}" href="/user/preferences/packages"><i class="fa fa-cube mr-1" aria-hidden="true"></i>Packages</a> - <a class="nav-link {{if eq .PageName "maintainers"}}active{{end}}" href="/user/preferences/maintainers"><i class="fa fa-users mr-1" aria-hidden="true"></i>Maintainers</a> - <a class="nav-link {{if eq .PageName "useflags"}}active{{end}}" href="/user/preferences/useflags"><i class="fa fa-sliders mr-1" aria-hidden="true"></i>USE flags</a> - <a class="nav-link {{if eq .PageName "arches"}}active{{end}}" href="/user/preferences/arches"><i class="fa fa-server mr-1" aria-hidden="true"></i>Architectures</a> - </nav> - </div> - </div> - </div> - </div> - </div> - </div> -{{end}} |