Responsive view (#2750)

* Viewport meta tag

* responsive: dashboard

* responsive: issues page

* responsive: Explore page

* responsive: navbar, and some navbar css refactoring

* responsive: button for collapsing navbar in mobile view

* Mark the hamburger button as active when pressed

* better homepage for responsive views

* Bring back jump class in navbar

The class was necessary, because this way the
dropdown doesn't assume the contents of the
selected item.

* make repository homes responsive

* Make file view page responsive

* Make forms look good on responsive views

* make commits and commit diff view responsive

* issues and PRs

* responsive wiki

* Don't place auto-init far off the page

* Minor changes to amend broken stuff

minor improvements

- make login/sign up in navbar stackable
- make navbar in explore and sign in not stackable

Change selected class in TestPullCompare

Fix typo that happened when rebasing

fix dashboard on org view

improve profile UI

Use clearing on file diff to fix broken UI caused by floating elements

remove unresolved merge conflict, and | Sanitize

Fix repo home not loading
tokarchuk/v1.17
Morgan Bazalgette 7 years ago committed by Lunny Xiao
parent 2f8c65c885
commit 3d3faa2624
  1. 2
      integrations/pull_compare_test.go
  2. 2
      public/css/index.css
  3. 26
      public/js/index.js
  4. 52
      public/less/_base.less
  5. 5
      public/less/_dashboard.less
  6. 1
      public/less/_explore.less
  7. 14
      public/less/_form.less
  8. 10
      public/less/_home.less
  9. 60
      public/less/_repository.less
  10. 55
      templates/base/head.tmpl
  11. 2
      templates/explore/navbar.tmpl
  12. 2
      templates/repo/commits.tmpl
  13. 8
      templates/repo/commits_table.tmpl
  14. 2
      templates/repo/diff/box.tmpl
  15. 9
      templates/repo/diff/page.tmpl
  16. 12
      templates/repo/header.tmpl
  17. 9
      templates/repo/home.tmpl
  18. 32
      templates/repo/issue/list.tmpl
  19. 2
      templates/repo/issue/new_form.tmpl
  20. 6
      templates/repo/issue/view.tmpl
  21. 2
      templates/repo/issue/view_content.tmpl
  22. 2
      templates/repo/pulls/tab_menu.tmpl
  23. 8
      templates/repo/view_file.tmpl
  24. 14
      templates/repo/wiki/view.tmpl
  25. 2
      templates/user/auth/signin_navbar.tmpl
  26. 4
      templates/user/dashboard/dashboard.tmpl
  27. 4
      templates/user/dashboard/feeds.tmpl
  28. 12
      templates/user/dashboard/issues.tmpl
  29. 12
      templates/user/dashboard/navbar.tmpl
  30. 4
      templates/user/profile.tmpl

@ -18,7 +18,7 @@ func TestPullCompare(t *testing.T) {
req := NewRequest(t, "GET", "/user2/repo1/pulls")
resp := session.MakeRequest(t, req, http.StatusOK)
htmlDoc := NewHTMLParser(t, resp.Body)
link, exists := htmlDoc.doc.Find(".navbar").Find(".ui.green.button").Attr("href")
link, exists := htmlDoc.doc.Find(".ui.three.column.grid").Find(".ui.green.button").Attr("href")
assert.True(t, exists, "The template has changed")
req = NewRequest(t, "GET", link)

File diff suppressed because one or more lines are too long

@ -1531,11 +1531,11 @@ $(document).ready(function () {
$('.issue-checkbox').click(function() {
var numChecked = $('.issue-checkbox').children('input:checked').length;
if (numChecked > 0) {
$('.issue-filters').hide();
$('.issue-actions').show();
$('#issue-filters').hide();
$('#issue-actions').show();
} else {
$('.issue-filters').show();
$('.issue-actions').hide();
$('#issue-filters').show();
$('#issue-actions').hide();
}
});
@ -1568,6 +1568,7 @@ $(document).ready(function () {
initVueApp();
initTeamSettings();
initCtrlEnterSubmit();
initNavbarContentToggle();
// Repo clone url.
if ($('#repo-clone-url').length > 0) {
@ -2076,3 +2077,20 @@ function initFilterBranchTagDropdown(selector) {
$(".commit-button").click(function() {
$(this).parent().find('.commit-body').toggle();
});
function initNavbarContentToggle() {
var content = $('#navbar');
var toggle = $('#navbar-expand-toggle');
var isExpanded = false;
toggle.click(function() {
isExpanded = !isExpanded;
if (isExpanded) {
content.addClass('shown');
toggle.addClass('active');
}
else {
content.removeClass('shown');
toggle.removeClass('active');
}
});
}

@ -1,7 +1,7 @@
@footer-margin: 40px;
body {
font-family: "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
font-family: "Lato", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
background-color: #fff;
overflow-y: scroll;
-webkit-font-smoothing: antialiased;
@ -61,6 +61,7 @@ pre, code {
z-index: 900;
left: 0;
width: 100%;
margin: 0;
&.light {
background-color: white;
border-bottom: 1px solid #DDDDDD;
@ -86,18 +87,11 @@ pre, code {
.top.menu .menu {
z-index: 900;
}
.icon,
.octicon {
margin-right: 5px !important;
}
.head.link.item {
padding-right: 0 !important;
}
.avatar > .ui.image {
&.fitted {
margin-right: 0;
}
.avatar .octicon-triangle-down {
margin-top: 6.5px;
margin-right: .75em;
}
.searchbox {
background-color: rgb(244, 244, 244) !important;
@ -109,15 +103,24 @@ pre, code {
width: 16px;
text-align: center;
}
.right.menu {
.menu {
left: auto;
right: 0;
@media only screen and (max-width: 767px) {
#navbar:not(.shown) > *:not(:first-child) {
display: none;
}
.dropdown .menu {
margin-top: 0;
}
}
.right.stackable.menu {
// responsive fix: this makes sure that the right menu when the page
// is on mobile view will have elements stacked on top of each other.
// no, stackable won't work on right menus.
margin-left: auto;
display: flex;
display: -ms-flexbox;
-ms-flex-align: inherit;
align-items: inherit;
-ms-flex-direction: inherit;
flex-direction: inherit;
}
.ui {
@ -443,6 +446,23 @@ footer {
.generate-img(@n, (@i + 1));
}
// Conditional display
@media only screen and (min-width: 768px) {
.mobile-only, .ui.button.mobile-only {
display: none;
}
// has the same behaviour of sr-only, hiding the content for
// non-screenreaders, but is shown on mobile devices.
.sr-mobile-only {
.sr-only();
}
}
@media only screen and (max-width: 767px) {
.not-mobile {
display: none;
}
}
// Accessibility
.sr-only {
position: absolute;

@ -41,13 +41,10 @@
left: auto!important;
}
}
.ui.right .head.menu {
margin-top: -5px;
.item.active {
.right.stackable.menu > .item.active {
color: #d9453d;
}
}
}
/* Accomodate for Semantic's 1px hacks on .attached elements */
.dashboard-repos {

@ -13,6 +13,7 @@
.octicon {
width: 16px;
text-align: center;
margin-right: 5px;
}
}
}

@ -21,10 +21,11 @@
#create-page-form {
form {
margin: auto;
width: 800px!important;
.ui.message {
text-align: center;
}
@media only screen and (min-width: 768px) {
width: 800px!important;
.header {
padding-left: @create-page-form-input-padding+30px;
}
@ -44,6 +45,15 @@
width: 50%!important;
}
}
@media only screen and (max-width: 767px) {
.optional .title {
margin-left: 15px;
}
.inline.field > label {
display: block;
}
}
}
}
.signin {
@ -118,12 +128,14 @@
.selection.dropdown:not(.owner) {
width: 50%!important;
}
@media only screen and (min-width: 768px) {
#auto-init {
margin-left: @create-page-form-input-padding+15px;
}
}
}
}
}
.new.webhook {
form {

@ -7,12 +7,22 @@
h1, h2 {
font-family: 'PT Sans Narrow', sans-serif, 'Microsoft YaHei';
}
@media only screen and (max-width: 767px) {
h1 {
font-size: 3.5em;
}
h2 {
font-size: 2em;
}
}
@media only screen and (min-width: 768px) {
h1 {
font-size: 5.5em;
}
h2 {
font-size: 3em;
}
}
.octicon {
color: #5aa509;
font-size: 40px;

@ -4,11 +4,9 @@
padding-top: 15px;
padding-bottom: @footer-margin * 2;
.head {
.column {
padding-top: 5px !important;
padding-bottom: 5px !important;
}
.header-grid {
padding-top: 5px;
padding-bottom: 5px;
.ui.compact.menu {
margin-left: 1rem;
}
@ -34,6 +32,10 @@
margin-top: -1px;
font-size: 15px;
}
.button {
margin-top: 2px;
margin-bottom: 2px;
}
}
.tabs {
@ -55,6 +57,20 @@
.owner.dropdown {
min-width: 40% !important;
}
#file-buttons {
/* The reason for the !important is that Semantic itself has
margin-left: 0 !important on right items on mobile, which is mostly
to make sure elements which on menus would otherwise be on the right
align correctly with other elements when stacked.
Unfortunately, this brings some weird alignment on this particular
element, so we need to override it. */
margin-left: auto !important;
font-weight: normal;
.ui.button {
padding: 8px 10px;
font-weight: normal;
}
}
.metas {
.menu {
@ -133,7 +149,6 @@
}
#clone-panel {
margin-left: 5px;
width: 350px;
input {
@ -235,9 +250,10 @@
.header {
.icon {
font-size: 1em;
margin-top: -2px;
}
.file-actions {
margin-top: 0;
margin-bottom: -5px;
padding-left: 20px;
.btn-octicon {
display: inline-block;
@ -814,7 +830,6 @@
&.commits {
.header {
.ui.right {
.search {
input {
font-weight: normal;
@ -823,14 +838,15 @@
}
}
}
}
#commits-table {
thead {
th:first-of-type {
padding-left: 15px;
}
.sha {
&td {
text-align: center;
}
width: 140px;
}
}
@ -898,6 +914,9 @@
background-color: #dad8ff;
}
}
.ui.right {
margin-bottom: 15px;
}
}
.diff-box .header {
display: flex;
@ -1039,6 +1058,7 @@
max-width: 100%;
padding: 5px 5px 0 5px;
}
clear: right;
}
}
.code-view {
@ -1241,6 +1261,13 @@
}
}
}
@media only screen and (max-width: 767px) {
.dividing.header .stackable.grid .button {
margin-top: 2px;
margin-bottom: 2px;
}
}
}
&.settings {
@ -1437,7 +1464,7 @@
}
}
.issue-actions {
#issue-actions {
display: none;
}
@ -1651,3 +1678,16 @@ tbody.commit-list {
.commit-body {
white-space: pre-wrap;
}
@media only screen and (max-width: 767px) {
.ui.stackable.menu {
&.mobile--margin-between-items > .item {
margin-top: 5px;
margin-bottom: 5px;
}
&.mobile--no-negative-margins {
margin-left: 0;
margin-right: 0;
}
}
}

@ -2,6 +2,7 @@
<html>
<head data-suburl="{{AppSubUrl}}">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
@ -133,14 +134,16 @@
<noscript>{{.i18n.Tr "enable_javascript"}}</noscript>
{{if not .PageIsInstall}}
<div class="following bar light">
<div class="ui container">
<div class="ui grid">
<div class="column">
<div class="ui top secondary menu">
<a class="item brand" href="{{AppSubUrl}}/">
<div class="ui top secondary stackable main menu following bar light">
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<a href="{{AppSubUrl}}/" href="{{AppSubUrl}}/">
<img class="ui mini image" src="{{AppSubUrl}}/img/gitea-sm.png">
</a>
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
</div>
</div>
{{if .IsSigned}}
<a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
@ -151,18 +154,21 @@
{{end}}
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
{{/*<div class="item">
{{/*
<div class="item">
<div class="ui icon input">
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
<i class="search icon"></i>
</div>
</div>*/}}
</div>
*/}}
{{if .IsSigned}}
<div class="right menu">
<a href="{{AppSubUrl}}/notifications" class="ui head link jump item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
<div class="right stackable menu">
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
<span class="text">
<i class="octicon octicon-inbox"><span class="sr-only">{{.i18n.Tr "notifications"}}</span></i>
<i class="fitted octicon octicon-inbox"></i>
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
{{if .NotificationUnreadCount}}
<span class="ui red label">
@ -172,31 +178,33 @@
</span>
</a>
<div class="ui dropdown head link jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
<span class="text">
<i class="octicon octicon-plus"><span class="sr-only">{{.i18n.Tr "create_new"}}</span></i>
<i class="octicon octicon-triangle-down"></i>
<i class="fitted octicon octicon-plus"></i>
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
<i class="fitted octicon octicon-triangle-down not-mobile"></i>
</span>
<div class="menu">
<a class="item" href="{{AppSubUrl}}/repo/create">
<i class="octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
<i class="fitted octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
</a>
<a class="item" href="{{AppSubUrl}}/repo/migrate">
<i class="octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
<i class="fitted octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
</a>
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
<i class="octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
<i class="fitted octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
</a>
{{end}}
</div><!-- end content create new menu -->
</div><!-- end dropdown menu create new -->
<div class="ui dropdown head link jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
<span class="text avatar">
<img class="ui small rounded image" src="{{.SignedUser.RelAvatarLink}}">
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
<span class="text">
<img class="ui tiny avatar image" src="{{.SignedUser.RelAvatarLink}}">
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
<i class="octicon octicon-triangle-down" tabindex="-1"></i>
<span class="mobile-only">{{.SignedUser.Name}}</span>
<i class="fitted octicon octicon-triangle-down not-mobile" tabindex="-1"></i>
</span>
<div class="menu" tabindex="-1">
<div class="ui header">
@ -241,7 +249,7 @@
{{else}}
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
<div class="right menu">
<div class="right stackable menu">
{{if .ShowRegistrationButton}}
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
<i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
@ -253,9 +261,6 @@
</div><!-- end anonymous right menu -->
{{end}}
</div><!-- end top menu -->
</div><!-- end column -->
</div><!-- end grid -->
</div><!-- end container -->
</div><!-- end bar -->
{{end}}

@ -1,4 +1,4 @@
<div class="ui secondary pointing tabular top attached borderless menu navbar">
<div class="ui secondary pointing tabular top attached borderless stackable menu navbar">
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore/repos">
<span class="octicon octicon-repo"></span> {{.i18n.Tr "explore.repos"}}
</a>

@ -3,7 +3,7 @@
{{template "repo/header" .}}
<div class="ui container">
{{template "repo/sub_menu" .}}
<div class="ui secondary menu">
<div class="ui secondary stackable menu mobile--margin-between-items">
{{template "repo/branch_dropdown" .}}
<div class="fitted item">
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">

@ -1,7 +1,10 @@
<h4 class="ui top attached header">
<div class="ui stackable grid">
<div class="six wide column">
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
</div>
<div class="ten wide right aligned column">
{{if .PageIsCommits}}
<div class="ui right">
<form action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
<div class="ui tiny search input">
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
@ -13,10 +16,11 @@
</div>
<button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button>
</form>
</div>
{{else if .IsDiffCompare}}
<a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{ShortSha .BeforeCommitID}}</a> ... <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{ShortSha .AfterCommitID}}</a>
{{end}}
</div>
</div>
</h4>
{{if .Commits}}

@ -82,7 +82,7 @@
{{end}}
{{end}}
</h4>
<div class="ui attached table segment">
<div class="ui attached unstackable table segment">
{{if ne $file.Type 4}}
{{$isImage := (call $.IsImageFile $file.Name)}}
{{if and $isImage}}

@ -15,6 +15,8 @@
{{end}}
</div>
<div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
<div class="ui stackable grid">
<div class="nine wide column">
{{if .Author}}
<img class="ui avatar image" src="{{.Author.RelAvatarLink}}" />
{{if .Author.FullName}}
@ -27,7 +29,8 @@
<strong>{{.Commit.Author.Name}}</strong>
{{end}}
<span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
<div class="ui right">
</div>
<div class="seven wide right aligned column">
<div class="ui horizontal list">
{{if .Parents}}
<div class="item">
@ -39,10 +42,12 @@
{{end}}
</div>
{{end}}
<div class="mobile-only"></div>
<div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
<div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
</div>
</div>
</div><!-- end column -->
</div><!-- end grid -->
</div>
{{if .Commit.Signature}}
{{if .Verification.Verified }}

@ -1,9 +1,8 @@
<div class="header-wrapper">
{{with .Repository}}
<div class="ui container"><!-- start container -->
<div class="ui vertically padded grid head"><!-- start grid -->
<div class="column"><!-- start column -->
<div class="ui header">
<div class="ui container">
<div class="ui stackable grid header-grid">
<div class="ten wide column">
<div class="ui huge breadcrumb">
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
@ -12,8 +11,9 @@
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener" href="{{$.Mirror.Address}}">{{$.Mirror.Address}}</a></div>{{end}}
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
</div>
</div>
<div class="ui right">
<div class="ui six wide right aligned column">
<div class="ui compact labeled button" tabindex="0">
<a class="ui compact button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
<i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
@ -41,8 +41,6 @@
</div>
{{end}}
</div>
</div>
</div><!-- end column -->
</div><!-- end grid -->
</div><!-- end container -->
{{end}}

@ -24,7 +24,7 @@
{{end}}
</div>
{{template "repo/sub_menu" .}}
<div class="ui secondary menu">
<div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
{{if and .PullRequestCtx.Allowed .IsViewBranch}}
<div class="fitted item">
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{.Repository.Owner.Name}}:{{.BranchName}}">
@ -36,9 +36,9 @@
{{ $n := len .TreeNames}}
{{ $l := Subtract $n 1}}
<div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div>
<div class="right fitted item">
<div class="right fitted item" id="file-buttons">
{{if .Repository.CanEnableEditor}}
<div id="file-buttons" class="ui tiny blue buttons">
<div class="ui tiny blue buttons">
{{if .CanAddFile}}
<a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button">
{{.i18n.Tr "repo.editor.new_file"}}
@ -52,6 +52,9 @@
</div>
{{end}}
</div>
<div class="fitted item">
<!-- Only show clone panel in repository home page -->
{{if eq $n 0}}
<div class="ui action tiny input" id="clone-panel">

@ -2,10 +2,14 @@
<div class="repository">
{{template "repo/header" .}}
<div class="ui container">
<div class="navbar">
<div class="ui three column stackable grid">
<div class="column">
{{template "repo/issue/navbar" .}}
</div>
<div class="column center aligned">
{{template "repo/issue/search" .}}
<div class="ui right">
</div>
<div class="column right aligned">
{{if .PageIsIssueList}}
<a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
{{else}}
@ -14,7 +18,8 @@
</div>
</div>
<div class="ui divider"></div>
<div class="issue-filters">
<div id="issue-filters" class="ui stackable grid">
<div class="six wide column">
<div class="ui tiny basic status buttons">
<a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
<i class="octicon octicon-issue-opened"></i>
@ -25,9 +30,11 @@
{{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
</a>
</div>
<div class="ui right floated secondary filter menu">
</div>
<div class="ten wide right aligned column">
<div class="ui secondary filter stackable menu">
<!-- Label -->
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item" style="margin-left: auto">
<span class="text">
{{.i18n.Tr "repo.issues.filter_label"}}
<i class="dropdown icon"></i>
@ -101,15 +108,23 @@
</div>
</div>
</div>
<div class="issue-actions">
</div>
<div id="issue-actions" class="ui stackable grid">
<div class="six wide column">
<div class="ui basic status buttons">
<div class="ui green active basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_open"}}</div>
<div class="ui red active basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_close"}}</div>
</div>
</div>
<div class="ui secondary filter menu floated right">
{{/* Ten wide does not cope well and makes the columns stack.
This seems to be related to jQuery's hide/show: in fact, switching
issue-actions and issue-filters and having this ten wide will show
this one correctly, but not the other one. */}}
<div class="nine wide right aligned right floated column">
<div class="ui secondary filter stackable menu">
<!-- Labels -->
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item" style="margin-left: auto">
<span class="text">
{{.i18n.Tr "repo.issues.action_label"}}
<i class="dropdown icon"></i>
@ -160,6 +175,7 @@
</div>
</div>
</div>
</div>
<div class="issue list">
{{range .Issues}}

@ -1,4 +1,4 @@
<form class="ui comment form grid" action="{{EscapePound .Link}}" method="post">
<form class="ui comment form stackable grid" action="{{EscapePound .Link}}" method="post">
{{.CsrfTokenHtml}}
{{if .Flash}}
<div class="sixteen wide column">

@ -2,9 +2,11 @@
<div class="repository view issue pull">
{{template "repo/header" .}}
<div class="ui container">
<div class="navbar">
<div class="ui two column stackable grid">
<div class="column">
{{template "repo/issue/navbar" .}}
<div class="ui right">
</div>
<div class="column right aligned">
{{if .PageIsIssueList}}
<a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
{{else}}

@ -1,4 +1,4 @@
<div class="ui grid">
<div class="ui stackable grid">
{{if .Flash}}
<div class="sixteen wide column">
{{template "base/alert" .}}

@ -1,4 +1,4 @@
<div class="ui top attached pull tabular menu">
<div class="ui top attached pull tabular stackable menu">
<a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.RepoLink}}/pulls/{{.Issue.Index}}">
<span class="octicon octicon-comment-discussion"></span>
{{$.i18n.Tr "repo.pulls.tab_conversation"}}

@ -1,5 +1,7 @@
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
<h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}">
<div class="ui stackable grid">
<div class="ten wide column">
{{if .ReadmeExist}}
<i class="book icon ui left"></i>
{{if .ReadmeInList}}
@ -11,6 +13,8 @@
<i class="file text outline icon ui left"></i>
<strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}}</span>
{{end}}
</div>
<div class="six wide right aligned column">
{{if not .ReadmeInList}}
<div class="ui right file-actions">
<div class="ui buttons">
@ -34,8 +38,10 @@
{{end}}
</div>
{{end}}
</div>
</div>
</h4>
<div class="ui attached table segment">
<div class="ui attached table unstackable segment">
<div class="file-view {{if .IsMarkup}}markdown{{else if .IsRenderedHTML}}plain-text{{else if .IsTextFile}}code-view{{end}} has-emoji">
{{if .IsMarkup}}
{{if .FileContent}}{{.FileContent | Safe}}{{end}}

@ -3,7 +3,7 @@
{{template "repo/header" .}}
{{ $title := .title}}
<div class="ui container">
<div class="ui grid">
<div class="ui stackable grid">
<div class="ui ten wide column">
<div class="choose page">
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
@ -54,7 +54,15 @@
</div>
</div>
<div class="ui dividing header">
<div class="ui stackable grid">
<div class="eight wide column">
{{$title}}
<div class="ui sub header">
{{$timeSince := TimeSince .Author.When $.Lang}}
{{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
</div>
</div>
<div class="eight wide right aligned column">
{{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
<div class="ui right">
<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
@ -62,9 +70,7 @@
<a class="ui red small button delete-button" href="" data-url="{{.RepoLink}}/wiki/{{.PageURL}}/delete" data-id="{{.PageURL}}">{{.i18n.Tr "repo.wiki.delete_page_button"}}</a>
</div>
{{end}}
<div class="ui sub header">
{{$timeSince := TimeSince .Author.When $.Lang}}
{{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
</div>
</div>
</div>
{{if .FormatWarning}}

@ -1,5 +1,5 @@
{{if .EnableOpenIDSignIn}}
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
<a class="{{if .PageIsLogin}}active{{end}} item" href="{{AppSubUrl}}/user/login">
{{.i18n.Tr "auth.login_userpass"}}
</a>

@ -3,7 +3,7 @@
{{template "user/dashboard/navbar" .}}
<div class="ui container">
{{template "base/alert" .}}
<div class="ui grid">
<div class="ui mobile reversed stackable grid">
<div class="ten wide column">
{{template "user/dashboard/feeds" .}}
</div>
@ -27,7 +27,7 @@
v-cloak
>
<div>
<div v-if="!isOrganization" class="ui two item stackable tabable menu">
<div v-if="!isOrganization" class="ui two item tabable menu">
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.i18n.Tr "repository"}}</a>
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{.i18n.Tr "organization"}}</a>
</div>

@ -4,7 +4,7 @@
<img class="ui avatar image" src="{{.GetActAvatar}}" alt="">
</div>
<div class="ui grid">
<div class="ui fifteen wide column">
<div class="ui thirteen wide column">
<div class="{{if eq .GetOpType 5}}push news{{end}}">
<p>
<a href="{{AppSubUrl}}/{{.GetActUserName}}">{{.ShortActUserName}}</a>
@ -79,7 +79,7 @@
<p class="text italic light grey">{{TimeSince .GetCreate $.i18n.Lang}}</p>
</div>
</div>
<div class="ui one wide column">
<div class="ui three wide right aligned column">
<i class="text grey mega-octicon octicon-{{ActionIcon .GetOpType}}"></i>
</div>
</div>

@ -2,7 +2,7 @@
<div class="dashboard issues">
{{template "user/dashboard/navbar" .}}
<div class="ui container">
<div class="ui grid">
<div class="ui stackable grid">
<div class="four wide column">
<div class="ui secondary vertical filter menu">
<a class="{{if eq .ViewType "your_repositories"}}ui basic blue button{{end}} item" href="{{.Link}}?type=your_repositories&repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}">
@ -64,9 +64,17 @@
<div class="ui label">{{if not $.RepoID}}{{.Repo.FullName}}{{end}}#{{.Index}}</div>
<a class="title has-emoji" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}/issues/{{.Index}}">{{.Title}}</a>
{{range .Labels}}
{{with .Labels}}
{{/* If we have any labels, we should show them
with a 2.5 line height, this way they don't look
awful and they don't stack on top of each other,
especially on mobile views. */}}
<span style="line-height: 2.5">
{{range .}}
<a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{.Name}}</a>
{{end}}
</span>
{{end}}
{{if .NumComments}}
<span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>

@ -1,4 +1,6 @@
<div class="ui container">
<div class="ui secondary stackable menu">
<div class="item">
<div class="ui floating dropdown link jump">
<span class="text">
<img class="ui avatar image" src="{{.ContextUser.RelAvatarLink}}">
@ -26,11 +28,11 @@
</a>
</div>
</div>
</div>
{{if .ContextUser.IsOrganization}}
<div class="ui right">
<div class="ui secondary head menu">
<a class="{{if .PageIsNews}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard">
<div class="right stackable menu">
<a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard">
<i class="octicon octicon-rss"></i>&nbsp;{{.i18n.Tr "activities"}}
</a>
<a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues">
@ -39,15 +41,13 @@
<a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls">
<i class="octicon octicon-git-pull-request"></i>&nbsp;{{.i18n.Tr "pull_requests"}}
</a>
<div class="right menu">
<div class="item">
<a class="ui blue basic button" href="{{.ContextUser.HomeLink}}">
{{.i18n.Tr "home.view_home" (.ContextUser.ShortName 10)}}
</a>
</div>
</div>
</div>
</div>
{{end}}
</div>
</div>
<div class="ui divider"></div>

@ -1,7 +1,7 @@
{{template "base/head" .}}
<div class="user profile">
<div class="ui container">
<div class="ui grid">
<div class="ui stackable grid">
<div class="ui five wide column">
<div class="ui card">
{{if eq .SignedUserName .Owner.Name}}
@ -82,7 +82,7 @@
</div>
</div>
<div class="ui eleven wide column">
<div class="ui secondary pointing menu">
<div class="ui secondary stackable pointing menu">
<a class='{{if and (ne .TabName "activity") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}">
<i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
</a>

Loading…
Cancel
Save