mirror of
https://github.com/documize/community.git
synced 2025-07-22 06:39:43 +02:00
Trello html and css tidy up
This commit is contained in:
parent
8867b27152
commit
ec0244dabc
6 changed files with 189 additions and 160 deletions
|
@ -1,3 +1,8 @@
|
|||
.section-trello-editor {
|
||||
|
||||
}
|
||||
|
||||
|
||||
.section-trello-board {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
|
@ -5,7 +10,6 @@
|
|||
overflow: auto
|
||||
}
|
||||
|
||||
|
||||
.section-trello-board-title {
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
|
@ -31,35 +35,51 @@
|
|||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
|
||||
.section-trello-render {
|
||||
.trello-table {
|
||||
border: none!important;
|
||||
margin: 0px !important;
|
||||
|
||||
table.trello-table {
|
||||
border:none!important;
|
||||
margin-left: 20px !important;
|
||||
margin-bottom: 20px !important;
|
||||
td {
|
||||
border: none !important;
|
||||
vertical-align: top;
|
||||
}
|
||||
}
|
||||
|
||||
table.trello-table td {
|
||||
border:none!important;
|
||||
padding: 20px 20px 0 0 !important;
|
||||
vertical-align: top;
|
||||
.heading {
|
||||
font-size: 1.6rem;
|
||||
margin: 30px 0 0 0;
|
||||
}
|
||||
|
||||
tbody.board-stats td {
|
||||
padding-right: 40px!important;
|
||||
}
|
||||
|
||||
span.trello-label {
|
||||
padding: 4px 10px;
|
||||
color: white;
|
||||
border-radius: 3px;
|
||||
.trello-label {
|
||||
font-size: 11px;
|
||||
color: #fff;
|
||||
padding: 0 8px;
|
||||
margin-right: 5px;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 -1px 0 rgba(0,0,0,.12);
|
||||
display: inline-block;
|
||||
line-height: 22px;
|
||||
text-shadow: 0 0 5px rgba(0,0,0,.2),0 0 2px #000;
|
||||
}
|
||||
|
||||
span.trello-board {
|
||||
.board-stats {
|
||||
margin-bottom: 10px;
|
||||
td {
|
||||
color: $color-gray;
|
||||
padding: 20px 40px 30px 0px !important;
|
||||
}
|
||||
.stat-number {
|
||||
font-family: "open_sanslight";
|
||||
font-size: 40px;
|
||||
margin-right: 20px;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
.trello-board {
|
||||
color: white;
|
||||
padding: 20px 20px;
|
||||
padding: 15px 20px;
|
||||
width: 190px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
@ -69,27 +89,22 @@
|
|||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.board-summary, .member-name {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.board-meta, .member-meta {
|
||||
color: $color-gray;
|
||||
}
|
||||
|
||||
.trello-avatar {
|
||||
border-radius: 3px;
|
||||
margin-right: 10px;
|
||||
border-radius: 4px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 18px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p.board-stats {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
span.stat-number {
|
||||
font-family: "open_sanslight";
|
||||
font-size: 50px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
> .trello-board {
|
||||
> .single-trello-board {
|
||||
width: 100%;
|
||||
max-height: 600px;
|
||||
padding: 10px;
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
package trello
|
||||
|
||||
const archiveTemplate = `
|
||||
<div class="section-trello-render">
|
||||
|
||||
{{if gt (len .Boards) 0}}
|
||||
<div class="heading">Deleted and Archived Cards</div>
|
||||
<p>Changes since {{.Since}}.</p>
|
||||
|
@ -30,9 +32,9 @@ const archiveTemplate = `
|
|||
{{if eq $act.Type "deleteCard" }}
|
||||
Deleted:
|
||||
{{$act.Data.List.Name}}
|
||||
{{if ne $act.Data.Card.Name ""}}
|
||||
: {{$act.Data.Card.Name}}
|
||||
{{if ne $act.Data.Text ""}}
|
||||
{{if ne $act.Data.Card.Name ""}}
|
||||
: {{$act.Data.Card.Name}}
|
||||
{{if ne $act.Data.Text ""}}
|
||||
- {{$act.Data.Text}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
@ -41,7 +43,7 @@ const archiveTemplate = `
|
|||
{{end}}
|
||||
{{range $arch := $b.Archived}}
|
||||
Archived:
|
||||
{{$arch.Name}}
|
||||
{{$arch.Name}}
|
||||
{{if ne $arch.Desc ""}}
|
||||
- {{$arch.Desc}}
|
||||
{{end}}
|
||||
|
@ -54,4 +56,5 @@ const archiveTemplate = `
|
|||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
`
|
||||
|
|
|
@ -12,55 +12,57 @@
|
|||
package trello
|
||||
|
||||
const boardsTemplate = `
|
||||
{{if gt (len .Boards) 0}}
|
||||
<div class="heading">Boards</div>
|
||||
<p>Changes since {{.Since}}.</p>
|
||||
<div class="section-trello-render">
|
||||
<table class="trello-table" class="width-100">
|
||||
<tbody class="board-stats">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="stat-number">{{len .Boards}}</span> Boards
|
||||
</td>
|
||||
<td>
|
||||
<span class="stat-number">{{.ListTotal}}</span> Lists
|
||||
</td>
|
||||
<td>
|
||||
<span class="stat-number">{{.CardTotal}}</span> Cards
|
||||
</td>
|
||||
<td>
|
||||
<span class="stat-number">{{len .MemberBoardAssign}}</span> Members
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="trello-table" class="width-100">
|
||||
<tbody class="trello">
|
||||
{{range $b := .Boards}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ $b.Board.URL }}">
|
||||
<span class="trello-board" style="background-color: {{$b.Board.Prefs.BackgroundColor}}">{{$b.Board.Name}}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<h6>There are {{ len $b.Actions }} actions for this board.</h6>
|
||||
<p>
|
||||
{{range $act, $tot := $b.ActionSummary}}
|
||||
{{$act}} ({{$tot}}),
|
||||
{{end}}
|
||||
{{if gt (len $b.Archived) 0}}
|
||||
archive card ({{len $b.Archived}}).
|
||||
{{else}}
|
||||
no cards archived.
|
||||
{{end}}
|
||||
<br>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="section-trello-render">
|
||||
{{if gt (len .Boards) 0}}
|
||||
<div class="heading">Boards</div>
|
||||
<p>Changes since {{.Since}}.</p>
|
||||
<div class="section-trello-render">
|
||||
<table class="trello-table" class="width-100">
|
||||
<tbody class="board-stats">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="stat-number">{{len .Boards}}</span>boards
|
||||
</td>
|
||||
<td>
|
||||
<span class="stat-number">{{.ListTotal}}</span>lists
|
||||
</td>
|
||||
<td>
|
||||
<span class="stat-number">{{.CardTotal}}</span>cards
|
||||
</td>
|
||||
<td>
|
||||
<span class="stat-number">{{len .MemberBoardAssign}}</span>members
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="trello-table" class="width-100">
|
||||
<tbody class="trello">
|
||||
{{range $b := .Boards}}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ $b.Board.URL }}">
|
||||
<span class="trello-board" style="background-color: {{$b.Board.Prefs.BackgroundColor}}">{{$b.Board.Name}}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="board-summary">There are {{ len $b.Actions }} actions for this board.</div>
|
||||
<span class="board-meta">
|
||||
{{range $act, $tot := $b.ActionSummary}}
|
||||
{{$act}} ({{$tot}}),
|
||||
{{end}}
|
||||
{{if gt (len $b.Archived) 0}}
|
||||
archive card ({{len $b.Archived}}).
|
||||
{{else}}
|
||||
no cards archived.
|
||||
{{end}}
|
||||
<br>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
`
|
||||
|
|
|
@ -12,24 +12,29 @@
|
|||
package trello
|
||||
|
||||
const labelsTemplate = `
|
||||
{{if gt (len .SharedLabels) 0}}
|
||||
<div class="heading">Labels</div>
|
||||
<p>There are {{len .SharedLabels}} common labels across the boards.</p>
|
||||
<div class="section-trello-render">
|
||||
<table class="trello-table" class="width-100">
|
||||
<tbody class="trello">
|
||||
{{range $l := .SharedLabels}}
|
||||
<tr>
|
||||
<td class="width-25">
|
||||
<span class="trello-label" style="background-color: {{ $l.Color }}">{{ $l.Name }} ({{len $l.Boards}})</span>
|
||||
</td>
|
||||
<td class="width-75">
|
||||
{{range $idx, $brd := $l.Boards}}{{if gt $idx 0}}, {{end}}{{ $brd }}{{end}}.
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="section-trello-render">
|
||||
|
||||
<p>Activity since #date for team Documize boards: <a class="link" href="#">Board Name</a></p>
|
||||
|
||||
{{if gt (len .SharedLabels) 0}}
|
||||
<div class="heading">Labels</div>
|
||||
<p>There are {{len .SharedLabels}} common labels across the boards.</p>
|
||||
<div class="section-trello-render">
|
||||
<table class="trello-table" class="width-100">
|
||||
<tbody class="trello">
|
||||
{{range $l := .SharedLabels}}
|
||||
<tr>
|
||||
<td class="no-width">
|
||||
<span class="trello-label" style="background-color: {{ $l.Color }}">{{ $l.Name }} ({{len $l.Boards}})</span>
|
||||
</td>
|
||||
<td>
|
||||
<a class="link" href="#">{{range $idx, $brd := $l.Boards}}{{if gt $idx 0}}</a>, {{end}}{{ $brd }}{{end}}.
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
`
|
||||
|
|
|
@ -12,31 +12,33 @@
|
|||
package trello
|
||||
|
||||
const membersTemplate = `
|
||||
{{if gt (len .Boards) 0}}
|
||||
<div class="heading">Member Stats</div>
|
||||
<p>
|
||||
There are {{len .MemberBoardAssign}} members assigned to {{.CardAssignTotal}} cards of the total {{.CardTotal}} cards across {{len .Boards}} boards.
|
||||
</p>
|
||||
<div class="section-trello-render">
|
||||
{{if gt (len .Boards) 0}}
|
||||
<div class="heading">Member Stats</div>
|
||||
<p>
|
||||
There are {{len .MemberBoardAssign}} members assigned to {{.CardAssignTotal}} cards of the total {{.CardTotal}} cards across {{len .Boards}} boards.
|
||||
</p>
|
||||
|
||||
<div class="section-trello-render">
|
||||
<table class="trello-table" class="width-100">
|
||||
<tbody>
|
||||
<div class="section-trello-render">
|
||||
<table class="trello-table no-width">
|
||||
<tbody>
|
||||
|
||||
{{range $m := .MemberBoardAssign}}
|
||||
<tr>
|
||||
<td>
|
||||
<img class="trello-avatar" src="https://trello-avatars.s3.amazonaws.com/{{$m.AvatarHash}}/50.png" height="50" alt="Member Avatar">
|
||||
</td>
|
||||
<td>
|
||||
<h6>{{$m.MemberName}}</h6>
|
||||
<p>
|
||||
{{range $idx, $ac := $m.AssignCounts}}{{if gt $idx 0}}, {{end}}{{$ac.BoardName}} ({{$ac.Count}}){{end}}.
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
{{range $m := .MemberBoardAssign}}
|
||||
<tr>
|
||||
<td class="no-width">
|
||||
<img class="trello-avatar" src="https://trello-avatars.s3.amazonaws.com/{{$m.AvatarHash}}/50.png" alt="Member Avatar">
|
||||
</td>
|
||||
<td>
|
||||
<div class="member-name">{{$m.MemberName}}</div>
|
||||
<div class="member-meta">
|
||||
{{range $idx, $ac := $m.AssignCounts}}{{if gt $idx 0}}, {{end}}{{$ac.BoardName}} ({{$ac.Count}}){{end}}.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
`
|
||||
|
|
|
@ -12,27 +12,29 @@
|
|||
package trello
|
||||
|
||||
const tradTemplate = `
|
||||
{{if ne .Detail.Board.ID ""}}
|
||||
<div class="heading">Board: {{.Detail.Board.Name}}</div>
|
||||
<p class="non-printable-message">Non-printable</p>
|
||||
<div class="section-trello-render non-printable">
|
||||
<p>There are {{ .Detail.CardCount }} cards across {{ .Detail.ListCount }} lists
|
||||
for board <a href="{{ .Detail.Board.URL }}">{{.Detail.Board.Name}}.</a></p>
|
||||
<div class="trello-board" style="background-color: {{.Detail.Board.Prefs.BackgroundColor}}">
|
||||
<a href="{{ .Detail.Board.URL }}"><div class="trello-board-title">{{.Detail.Board.Name}}</div></a>
|
||||
{{range $data := .Detail.Data}}
|
||||
<div class="trello-list">
|
||||
<div class="trello-list-title">{{ $data.List.Name }}</div>
|
||||
{{range $card := $data.Cards}}
|
||||
<a href="{{ $card.URL }}">
|
||||
<div class="trello-card">
|
||||
{{ $card.Name }}
|
||||
</div>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="section-trello-render">
|
||||
{{if ne .Detail.Board.ID ""}}
|
||||
<div class="heading">Board: {{.Detail.Board.Name}}</div>
|
||||
<p class="non-printable-message">Non-printable</p>
|
||||
<div class="section-trello-render non-printable">
|
||||
<p>There are {{ .Detail.CardCount }} cards across {{ .Detail.ListCount }} lists
|
||||
for board <a href="{{ .Detail.Board.URL }}">{{.Detail.Board.Name}}.</a></p>
|
||||
<div class="single-trello-board" style="background-color: {{.Detail.Board.Prefs.BackgroundColor}}">
|
||||
<a href="{{ .Detail.Board.URL }}"><div class="trello-board-title">{{.Detail.Board.Name}}</div></a>
|
||||
{{range $data := .Detail.Data}}
|
||||
<div class="trello-list">
|
||||
<div class="trello-list-title">{{ $data.List.Name }}</div>
|
||||
{{range $card := $data.Cards}}
|
||||
<a href="{{ $card.URL }}">
|
||||
<div class="trello-card">
|
||||
{{ $card.Name }}
|
||||
</div>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue