1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 14:49:42 +02:00

Trello html and css tidy up

This commit is contained in:
EnesAlili 2016-09-12 01:29:26 +01:00
parent 8867b27152
commit ec0244dabc
6 changed files with 189 additions and 160 deletions

View file

@ -1,3 +1,8 @@
.section-trello-editor {
}
.section-trello-board { .section-trello-board {
width: 100%; width: 100%;
padding: 10px; padding: 10px;
@ -5,7 +10,6 @@
overflow: auto overflow: auto
} }
.section-trello-board-title { .section-trello-board-title {
font-weight: bold; font-weight: bold;
color: #fff; color: #fff;
@ -31,35 +35,51 @@
vertical-align: text-bottom; vertical-align: text-bottom;
} }
.section-trello-render { .section-trello-render {
.trello-table {
border: none!important;
margin: 0px !important;
table.trello-table { td {
border:none!important; border: none !important;
margin-left: 20px !important; vertical-align: top;
margin-bottom: 20px !important; }
} }
table.trello-table td { .heading {
border:none!important; font-size: 1.6rem;
padding: 20px 20px 0 0 !important; margin: 30px 0 0 0;
vertical-align: top;
} }
tbody.board-stats td { .trello-label {
padding-right: 40px!important; font-size: 11px;
} color: #fff;
padding: 0 8px;
span.trello-label { margin-right: 5px;
padding: 4px 10px; border-radius: 2px;
color: white; box-shadow: inset 0 -1px 0 rgba(0,0,0,.12);
border-radius: 3px; display: inline-block;
line-height: 22px;
text-shadow: 0 0 5px rgba(0,0,0,.2),0 0 2px #000; 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; color: white;
padding: 20px 20px; padding: 15px 20px;
width: 190px; width: 190px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
@ -69,27 +89,22 @@
margin-right: 20px; margin-right: 20px;
} }
.board-summary, .member-name {
font-size: 1.2rem;
}
.board-meta, .member-meta {
color: $color-gray;
}
.trello-avatar { .trello-avatar {
border-radius: 3px; border-radius: 4px;
margin-right: 10px; width: 36px;
height: 36px;
margin-right: 5px;
} }
h6 { > .single-trello-board {
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 {
width: 100%; width: 100%;
max-height: 600px; max-height: 600px;
padding: 10px; padding: 10px;

View file

@ -12,6 +12,8 @@
package trello package trello
const archiveTemplate = ` const archiveTemplate = `
<div class="section-trello-render">
{{if gt (len .Boards) 0}} {{if gt (len .Boards) 0}}
<div class="heading">Deleted and Archived Cards</div> <div class="heading">Deleted and Archived Cards</div>
<p>Changes since {{.Since}}.</p> <p>Changes since {{.Since}}.</p>
@ -30,9 +32,9 @@ const archiveTemplate = `
{{if eq $act.Type "deleteCard" }} {{if eq $act.Type "deleteCard" }}
Deleted: Deleted:
{{$act.Data.List.Name}} {{$act.Data.List.Name}}
{{if ne $act.Data.Card.Name ""}} {{if ne $act.Data.Card.Name ""}}
: {{$act.Data.Card.Name}} : {{$act.Data.Card.Name}}
{{if ne $act.Data.Text ""}} {{if ne $act.Data.Text ""}}
- {{$act.Data.Text}} - {{$act.Data.Text}}
{{end}} {{end}}
{{end}} {{end}}
@ -41,7 +43,7 @@ const archiveTemplate = `
{{end}} {{end}}
{{range $arch := $b.Archived}} {{range $arch := $b.Archived}}
Archived: Archived:
{{$arch.Name}} {{$arch.Name}}
{{if ne $arch.Desc ""}} {{if ne $arch.Desc ""}}
- {{$arch.Desc}} - {{$arch.Desc}}
{{end}} {{end}}
@ -54,4 +56,5 @@ const archiveTemplate = `
</table> </table>
</div> </div>
{{end}} {{end}}
</div>
` `

View file

@ -12,55 +12,57 @@
package trello package trello
const boardsTemplate = ` const boardsTemplate = `
{{if gt (len .Boards) 0}} <div class="section-trello-render">
<div class="heading">Boards</div> {{if gt (len .Boards) 0}}
<p>Changes since {{.Since}}.</p> <div class="heading">Boards</div>
<div class="section-trello-render"> <p>Changes since {{.Since}}.</p>
<table class="trello-table" class="width-100"> <div class="section-trello-render">
<tbody class="board-stats"> <table class="trello-table" class="width-100">
<tr> <tbody class="board-stats">
<td> <tr>
<span class="stat-number">{{len .Boards}}</span> Boards <td>
</td> <span class="stat-number">{{len .Boards}}</span>boards
<td> </td>
<span class="stat-number">{{.ListTotal}}</span> Lists <td>
</td> <span class="stat-number">{{.ListTotal}}</span>lists
<td> </td>
<span class="stat-number">{{.CardTotal}}</span> Cards <td>
</td> <span class="stat-number">{{.CardTotal}}</span>cards
<td> </td>
<span class="stat-number">{{len .MemberBoardAssign}}</span> Members <td>
</td> <span class="stat-number">{{len .MemberBoardAssign}}</span>members
</tr> </td>
</tbody> </tr>
</table> </tbody>
<table class="trello-table" class="width-100"> </table>
<tbody class="trello"> <table class="trello-table" class="width-100">
{{range $b := .Boards}} <tbody class="trello">
<tr> {{range $b := .Boards}}
<td> <tr>
<a href="{{ $b.Board.URL }}"> <td>
<span class="trello-board" style="background-color: {{$b.Board.Prefs.BackgroundColor}}">{{$b.Board.Name}}</span> <a href="{{ $b.Board.URL }}">
</a> <span class="trello-board" style="background-color: {{$b.Board.Prefs.BackgroundColor}}">{{$b.Board.Name}}</span>
</td> </a>
<td> </td>
<h6>There are {{ len $b.Actions }} actions for this board.</h6> <td>
<p> <div class="board-summary">There are {{ len $b.Actions }} actions for this board.</div>
{{range $act, $tot := $b.ActionSummary}} <span class="board-meta">
{{$act}} ({{$tot}}), {{range $act, $tot := $b.ActionSummary}}
{{end}} {{$act}} ({{$tot}}),
{{if gt (len $b.Archived) 0}} {{end}}
archive card ({{len $b.Archived}}). {{if gt (len $b.Archived) 0}}
{{else}} archive card ({{len $b.Archived}}).
no cards archived. {{else}}
{{end}} no cards archived.
<br> {{end}}
</p> <br>
</td> </span>
</tr> </td>
{{end}} </tr>
</tbody> {{end}}
</table> </tbody>
</div> </table>
{{end}} </div>
{{end}}
</div>
` `

View file

@ -12,24 +12,29 @@
package trello package trello
const labelsTemplate = ` const labelsTemplate = `
{{if gt (len .SharedLabels) 0}} <div class="section-trello-render">
<div class="heading">Labels</div>
<p>There are {{len .SharedLabels}} common labels across the boards.</p> <p>Activity since #date for team Documize boards: <a class="link" href="#">Board Name</a></p>
<div class="section-trello-render">
<table class="trello-table" class="width-100"> {{if gt (len .SharedLabels) 0}}
<tbody class="trello"> <div class="heading">Labels</div>
{{range $l := .SharedLabels}} <p>There are {{len .SharedLabels}} common labels across the boards.</p>
<tr> <div class="section-trello-render">
<td class="width-25"> <table class="trello-table" class="width-100">
<span class="trello-label" style="background-color: {{ $l.Color }}">{{ $l.Name }} ({{len $l.Boards}})</span> <tbody class="trello">
</td> {{range $l := .SharedLabels}}
<td class="width-75"> <tr>
{{range $idx, $brd := $l.Boards}}{{if gt $idx 0}}, {{end}}{{ $brd }}{{end}}. <td class="no-width">
</td> <span class="trello-label" style="background-color: {{ $l.Color }}">{{ $l.Name }} ({{len $l.Boards}})</span>
</tr> </td>
{{end}} <td>
</tbody> <a class="link" href="#">{{range $idx, $brd := $l.Boards}}{{if gt $idx 0}}</a>, {{end}}{{ $brd }}{{end}}.
</table> </td>
</div> </tr>
{{end}} {{end}}
</tbody>
</table>
</div>
{{end}}
</div>
` `

View file

@ -12,31 +12,33 @@
package trello package trello
const membersTemplate = ` const membersTemplate = `
{{if gt (len .Boards) 0}} <div class="section-trello-render">
<div class="heading">Member Stats</div> {{if gt (len .Boards) 0}}
<p> <div class="heading">Member Stats</div>
There are {{len .MemberBoardAssign}} members assigned to {{.CardAssignTotal}} cards of the total {{.CardTotal}} cards across {{len .Boards}} boards. <p>
</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"> <div class="section-trello-render">
<table class="trello-table" class="width-100"> <table class="trello-table no-width">
<tbody> <tbody>
{{range $m := .MemberBoardAssign}} {{range $m := .MemberBoardAssign}}
<tr> <tr>
<td> <td class="no-width">
<img class="trello-avatar" src="https://trello-avatars.s3.amazonaws.com/{{$m.AvatarHash}}/50.png" height="50" alt="Member Avatar"> <img class="trello-avatar" src="https://trello-avatars.s3.amazonaws.com/{{$m.AvatarHash}}/50.png" alt="Member Avatar">
</td> </td>
<td> <td>
<h6>{{$m.MemberName}}</h6> <div class="member-name">{{$m.MemberName}}</div>
<p> <div class="member-meta">
{{range $idx, $ac := $m.AssignCounts}}{{if gt $idx 0}}, {{end}}{{$ac.BoardName}} ({{$ac.Count}}){{end}}. {{range $idx, $ac := $m.AssignCounts}}{{if gt $idx 0}}, {{end}}{{$ac.BoardName}} ({{$ac.Count}}){{end}}.
</p> </div>
</td> </td>
</tr> </tr>
{{end}} {{end}}
</tbody> </tbody>
</table> </table>
</div> </div>
{{end}} {{end}}
</div>
` `

View file

@ -12,27 +12,29 @@
package trello package trello
const tradTemplate = ` const tradTemplate = `
{{if ne .Detail.Board.ID ""}} <div class="section-trello-render">
<div class="heading">Board: {{.Detail.Board.Name}}</div> {{if ne .Detail.Board.ID ""}}
<p class="non-printable-message">Non-printable</p> <div class="heading">Board: {{.Detail.Board.Name}}</div>
<div class="section-trello-render non-printable"> <p class="non-printable-message">Non-printable</p>
<p>There are {{ .Detail.CardCount }} cards across {{ .Detail.ListCount }} lists <div class="section-trello-render non-printable">
for board <a href="{{ .Detail.Board.URL }}">{{.Detail.Board.Name}}.</a></p> <p>There are {{ .Detail.CardCount }} cards across {{ .Detail.ListCount }} lists
<div class="trello-board" style="background-color: {{.Detail.Board.Prefs.BackgroundColor}}"> for board <a href="{{ .Detail.Board.URL }}">{{.Detail.Board.Name}}.</a></p>
<a href="{{ .Detail.Board.URL }}"><div class="trello-board-title">{{.Detail.Board.Name}}</div></a> <div class="single-trello-board" style="background-color: {{.Detail.Board.Prefs.BackgroundColor}}">
{{range $data := .Detail.Data}} <a href="{{ .Detail.Board.URL }}"><div class="trello-board-title">{{.Detail.Board.Name}}</div></a>
<div class="trello-list"> {{range $data := .Detail.Data}}
<div class="trello-list-title">{{ $data.List.Name }}</div> <div class="trello-list">
{{range $card := $data.Cards}} <div class="trello-list-title">{{ $data.List.Name }}</div>
<a href="{{ $card.URL }}"> {{range $card := $data.Cards}}
<div class="trello-card"> <a href="{{ $card.URL }}">
{{ $card.Name }} <div class="trello-card">
</div> {{ $card.Name }}
</a> </div>
{{end}} </a>
</div> {{end}}
{{end}} </div>
{{end}}
</div>
</div> </div>
</div> {{end}}
{{end}} </div>
` `