Wiki Pages style

stable
Xavier Julián 2016-06-10 13:03:40 +02:00 committed by David Barragán Merino
parent 7c87a3c671
commit b0f990492d
10 changed files with 156 additions and 152 deletions

View File

@ -1459,6 +1459,7 @@
"DELETE_LIGHTBOX_TITLE": "Delete Wiki Page", "DELETE_LIGHTBOX_TITLE": "Delete Wiki Page",
"DELETE_LINK_TITLE": "Delete Wiki link", "DELETE_LINK_TITLE": "Delete Wiki link",
"NAVIGATION": { "NAVIGATION": {
"HOME": "Main Page",
"SECTION_NAME": "Links", "SECTION_NAME": "Links",
"ACTION_ADD_LINK": "Add link", "ACTION_ADD_LINK": "Add link",
"ALL_PAGES": "All pages" "ALL_PAGES": "All pages"

View File

@ -1,10 +1,15 @@
doctype html doctype html
div.wrapper(ng-controller="WikiPagesListController as ctrl", div.wrapper(
ng-init="section='wiki'") ng-controller="WikiPagesListController as ctrl"
ng-init="section='wiki'"
)
tg-project-menu tg-project-menu
sidebar.menu-secondary.extrabar(ng-if="linksVisible") sidebar.menu-secondary.extrabar(ng-if="linksVisible")
section.wiki-nav(tg-wiki-nav, ng-model="wikiLinks") section.wiki-nav(
tg-wiki-nav
ng-model="wikiLinks"
)
section.main.wiki section.main.wiki
header header
h1 h1
@ -33,12 +38,20 @@ div.wrapper(ng-controller="WikiPagesListController as ctrl",
translate="WIKI.PAGES_LIST_COLUMNS.MODIFIED" translate="WIKI.PAGES_LIST_COLUMNS.MODIFIED"
) )
div.row.table-main(ng-repeat="wikipage in wikipages track by wikipage.slug") .row.table-main(ng-repeat="wikipage in wikipages track by wikipage.slug")
div.title-field .title-field
a(href="", tg-nav="project-wiki-page:project=project.slug,slug=wikipage.slug") a(
| {{wikipage.slug}} href=""
div.editions-field {{wikipage.editions}} tg-nav="project-wiki-page:project=project.slug,slug=wikipage.slug"
div.creator-field(tg-user-display, tg-user-id="{{wikipage.owner}}") ) {{wikipage.slug}}
div.created-field(tg-bo-bind="wikipage.created_date|momentFormat:'DD MMM YYYY HH:mm'") .editions-field {{wikipage.editions}}
div.last-modifier-field(tg-user-display, tg-user-id="{{wikipage.last_modifier}}") .creator-field(
div.modified-field(tg-bo-bind="wikipage.modified_date|momentFormat:'DD MMM YYYY HH:mm'") tg-user-display
tg-user-id="{{wikipage.owner}}"
)
.created-field(tg-bo-bind="wikipage.created_date|momentFormat:'DD MMM YYYY HH:mm'")
.last-modifier-field(
tg-user-display
tg-user-id="{{wikipage.last_modifier}}"
)
.modified-field(tg-bo-bind="wikipage.modified_date|momentFormat:'DD MMM YYYY HH:mm'")

View File

@ -1,11 +1,27 @@
header header
h1(translate="WIKI.NAVIGATION.SECTION_NAME") h1(translate="WIKI.NAVIGATION.SECTION_NAME")
a(href="", tg-nav="project-wiki-list:project=project.slug", translate="WIKI.NAVIGATION.ALL_PAGES")
nav nav
ul
li.wiki-link
a.link-title(
href=""
tg-nav="project-wiki-list:project=project.slug"
translate="WIKI.NAVIGATION.ALL_PAGES"
)
li.wiki-link
a.link-title(
href=""
tg-nav="project-wiki:project=project.slug"
translate="WIKI.NAVIGATION.HOME"
)
ul.sortable ul.sortable
li.wiki-link(ng-repeat="link in wikiLinks", data-id!="{{ $index }}", tg-bind-scope) li.wiki-link(ng-repeat="link in wikiLinks", data-id!="{{ $index }}", tg-bind-scope)
<% if (addWikiLinkPermission) { %>
tg-svg.dragger(svg-icon="icon-drag") tg-svg.dragger(svg-icon="icon-drag")
<% } %>
a.link-title(title!="{{ link.title }}", href!="{{ link.url }}") {{ link.title }} a.link-title(title!="{{ link.title }}", href!="{{ link.url }}") {{ link.title }}
<% if (deleteWikiLinkPermission) { %> <% if (deleteWikiLinkPermission) { %>

View File

@ -1,14 +1,14 @@
div.wiki-times-edited .wiki-username-edition
span.number <%- totalEditions %> .avatar
span.description(translate="WIKI.SUMMARY.TIMES_EDITED") img(src!="<%- user.imgUrl %>" alt!="<%- user.name %>")
.wiki-user-modification
span.description(translate="WIKI.SUMMARY.LAST_MODIFICATION")
span.username <%- user.name %>
div.wiki-last-modified .wiki-last-modified
span.number <%- lastModifiedDate %> span.number <%- lastModifiedDate %>
span.description(translate="WIKI.SUMMARY.LAST_EDIT") span.description(translate="WIKI.SUMMARY.LAST_EDIT")
div.wiki-username-edition .wiki-times-edited
figure.avatar span.number <%- totalEditions %>
img(src!="<%- user.imgUrl %>" alt!="<%- user.name %>") span.description(translate="WIKI.SUMMARY.TIMES_EDITED")
div.wiki-user-modification
span.description(translate="WIKI.SUMMARY.LAST_MODIFICATION")
span.username <%- user.name %>

View File

@ -4,7 +4,10 @@ div.wrapper(ng-controller="WikiDetailController as ctrl",
ng-init="section='wiki'") ng-init="section='wiki'")
tg-project-menu tg-project-menu
sidebar.menu-secondary.extrabar(ng-if="linksVisible") sidebar.menu-secondary.extrabar(ng-if="linksVisible")
section.wiki-nav(tg-wiki-nav, ng-model="wikiLinks") section.wiki-nav(
tg-wiki-nav
ng-model="wikiLinks"
)
section.main.wiki section.main.wiki
header header
h1 h1
@ -12,7 +15,6 @@ div.wrapper(ng-controller="WikiDetailController as ctrl",
span.green(translate="PROJECT.SECTION.WIKI") span.green(translate="PROJECT.SECTION.WIKI")
div.summary.wiki-summary(tg-wiki-summary, ng-model="wiki", ng-if="wiki.id")
h2.wiki-title(ng-bind='wikiTitle') h2.wiki-title(ng-bind='wikiTitle')
section.wiki-content( section.wiki-content(
tg-editable-wysiwyg, tg-editable-wysiwyg,
@ -20,6 +22,12 @@ div.wrapper(ng-controller="WikiDetailController as ctrl",
ng-model="wiki" ng-model="wiki"
) )
div.summary.wiki-summary(
tg-wiki-summary
ng-model="wiki"
ng-if="wiki.id"
)
tg-attachments-full( tg-attachments-full(
ng-if="wiki.id" ng-if="wiki.id"
obj-id="wiki.id" obj-id="wiki.id"

View File

@ -11,6 +11,9 @@
padding: .3rem 0; padding: .3rem 0;
text-align: left; text-align: left;
width: 100%; width: 100%;
@include breakpoint(tablet) {
flex-direction: column;
}
@for $i from 1 through 8 { @for $i from 1 through 8 {
.width-#{$i} { .width-#{$i} {
flex-basis: 50px; flex-basis: 50px;

View File

@ -1,11 +1,17 @@
.wiki { .wiki {
.wysiwyg {
margin-bottom: 0;
}
.wiki-title { .wiki-title {
@include font-type(light); @include font-type(light);
@include font-size(larger); @include font-size(xxlarge);
margin-bottom: 0;
padding: 1rem;
} }
.remove { .remove {
@include font-size(small); @include font-size(small);
color: $gray-light; color: $gray-light;
cursor: pointer;
&:hover { &:hover {
color: $red-light; color: $red-light;
transition: color .1s linear; transition: color .1s linear;
@ -22,8 +28,8 @@
} }
.wiki-content { .wiki-content {
@include cursor-progress; @include font-size(large);
margin-bottom: 2rem; max-width: 1024px;
position: relative; position: relative;
&.editable { &.editable {
&:hover { &:hover {
@ -91,93 +97,3 @@
top: .4rem; top: .4rem;
} }
} }
.wiki-pages-table {
display: flex;
margin-bottom: 2rem;
&.empty {
display: none;
}
.row {
&:hover {
background: lighten($primary, 65%);
transition: background .2s ease-in;
}
.icon {
display: inline;
}
}
.title {
@include font-size(medium);
@include font-type(bold);
border-bottom: 1px solid $gray-light;
&:hover {
background: transparent;
}
div {
cursor: pointer;
}
.votes {
color: $gray;
}
}
.table-main {
@include font-size(small);
border-bottom: 1px solid darken($whitish, 4%);
}
.avatar {
align-items: center;
display: flex;
img {
width: 35px;
}
figcaption {
flex-basis: 60%;
flex-grow: 1;
margin-left: .5rem;
}
}
.title-field {
overflow: hidden;
padding-right: 1rem;
width: 100%;
a {
@include ellipsis(100%);
display: block;
}
span {
vertical-align: middle;
&:first-child {
margin-right: .5rem;
}
}
}
.editions-field,
.created-field,
.modified-field,
.creator-field ,
.last-modifier-field {
flex-basis: 140px;
flex-grow: 1;
flex-shrink: 0;
padding: 0 1rem;
position: relative;
text-align: left;
}
.creator-field ,
.last-modifier-field {
display: flex;
flex-basis: 180px;
flex-direction: row;
.user-avatar {
flex-grow: 0;
img {
height: 48px;
}
}
.user-full-name {
flex-grow: 1;
padding: .5rem;
}
}
}

View File

@ -47,9 +47,6 @@
} }
.wiki-nav { .wiki-nav {
ul {
border-top: 1px solid $gray-light;
}
.add-button { .add-button {
color: $white; color: $white;
display: block; display: block;

View File

@ -0,0 +1,48 @@
.wiki-pages-table {
display: flex;
.row {
padding: .5rem;
}
.title {
@include font-size(medium);
@include font-type(bold);
}
.table-main {
@include font-size(small);
}
.title-field {
flex-basis: 180px;
flex-grow: 1;
flex-shrink: 0;
}
.created-field,
.created-field,
.modified-field {
flex-basis: 10vw;
flex-grow: 0;
flex-shrink: 0;
margin-right: .5rem;
}
.editions-field {
flex-basis: 80px;
flex-grow: 0;
flex-shrink: 0;
margin-right: .5rem;
}
.creator-field,
.last-modifier-field {
align-items: center;
display: flex;
flex-basis: 200px;
.user-avatar {
flex-grow: 0;
img {
height: 2rem;
}
}
.user-full-name {
flex-grow: 1;
padding: .5rem;
}
}
}

View File

@ -1,28 +1,30 @@
.wiki-summary { .wiki-summary {
align-items: center; align-items: center;
flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
margin-top: 1rem;
&.summary {
background: $whitish;
color: $gray;
}
div { div {
display: flex; display: flex;
justify-content: space-between; margin-right: 1.25rem;
margin-right: 1rem;
}
.number {
line-height: 2rem;
top: 0;
} }
.wiki-user-modification { .wiki-user-modification {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
} }
figure { .avatar {
margin-right: .3rem; margin-right: .5rem;
width: 32px; width: 2.25rem;
}
img {
height: 100%;
width: 100%;
} }
.username { .username {
@include font-size(large); @include font-size(large);
color: $primary-light;
white-space: nowrap; white-space: nowrap;
} }
} }