git ssb

2+

mixmix / ticktack



Commit 1967ee98ce129f2ab3b072bcdeac1ad9f0990092

stylying

mix irving committed on 12/2/2017, 5:33:27 AM
Parent: 9de2656efd585098ef7eb72d618684bd03e34c37

Files changed

about/html/avatar.mcsschanged
app/html/blogNav.jschanged
app/html/scroller.mcsschanged
app/page/blogIndex.mcsschanged
app/page/blogNew.jschanged
app/page/blogSearch.mcsschanged
app/page/channel.jschanged
app/page/groupFind.jschanged
app/page/settings.jschanged
app/page/threadNew.jschanged
app/page/threadNew.mcsschanged
app/page/blogNew.mcssadded
main.jschanged
message/html/compose.jschanged
message/html/compose.mcsschanged
styles/button.mcsschanged
styles/markdown.mcsschanged
styles/mixins.jschanged
styles/patchSuggest.mcsschanged
about/html/avatar.mcssView
@@ -14,8 +14,8 @@
1414 $circleMedium
1515 }
1616
1717 -large {
18- $circleLarge
18+ $circlelarge
1919 }
2020 }
2121
app/html/blogNav.jsView
@@ -26,9 +26,9 @@
2626 'ev-click': goTo({ page: 'blogSearch' })
2727 }, strings.blogNav.blogSearch),
2828 ]),
2929 h('div.right', [
30- h('Button -primary', { 'ev-click': () => api.history.sync.push({ page: 'blogNew' }) }, strings.blogNew.actions.writeBlog),
30+ h('Button -strong', { 'ev-click': () => api.history.sync.push({ page: 'blogNew' }) }, strings.blogNew.actions.writeBlog),
3131 ])
3232 ])
3333 }
3434
app/html/scroller.mcssView
@@ -1,7 +1,5 @@
11 Scroller {
2- display: flex
3- flex-direction: column
42
53 overflow: auto
64 width: 100%
75 height: 100%
app/page/blogIndex.mcssView
@@ -1,8 +1,9 @@
11 Page -blogIndex {
22 div.content { padding: 0 }
33
44 div.Scroller.content {
5+
56 section.top {
67 position: sticky
78 left: 0
89 right: 0
@@ -17,9 +18,13 @@
1718 $maxWidth
1819 margin: .8rem auto
1920 padding: .5rem 2rem
2021
22+ display: flex
23+ flex-wrap: wrap
24+
2125 div.BlogCard {
26+ flex-basis: 100%
2227 border-bottom: 1px solid rgba(0,0,0, .1)
2328 }
2429 }
2530
app/page/blogNew.jsView
@@ -27,9 +27,9 @@
2727 title: Value(),
2828 })
2929
3030 const composer = api.message.html.compose(
31- { meta, shrink: false },
31+ { meta, placeholder: strings.blogNew.actions.writeBlog, shrink: false },
3232 (err, msg) => api.history.sync.push(err ? err : msg)
3333 )
3434
3535 const channelInput = h('input', {
@@ -38,20 +38,22 @@
3838 })
3939 var page = h('Page -blogNew', [
4040 api.app.html.context(location),
4141 h('div.content', [
42- h('div.field -channel', [
43- h('div.label', strings.channel),
44- channelInput
45- ]),
46- h('div.field -title', [
47- h('div.label', strings.blogNew.field.title),
48- h('input', {
49- 'ev-input': e => meta.title.set(e.target.value),
50- placeholder: strings.blogNew.field.title
51- }),
52- ]),
53- composer
42+ h('div.container', [
43+ h('div.field -channel', [
44+ h('div.label', strings.channel),
45+ channelInput
46+ ]),
47+ h('div.field -title', [
48+ h('div.label', strings.blogNew.field.title),
49+ h('input', {
50+ 'ev-input': e => meta.title.set(e.target.value),
51+ placeholder: strings.blogNew.field.title
52+ }),
53+ ]),
54+ composer
55+ ])
5456 ])
5557 ])
5658
5759 addSuggest(channelInput, (inputText, cb) => {
@@ -77,9 +79,9 @@
7779
7880 cb(null, suggestions)
7981 }, {cls: 'PatchSuggest.-channelHorizontal'}) // WARNING hacking suggest-box cls
8082
81- channelInput.addEventListener('suggestselect', (e) => channel.set(e.value))
83+ channelInput.addEventListener('suggestselect', (e) => meta.channel.set(e.value))
8284
8385 return page
8486 }
8587 }
app/page/blogSearch.mcssView
@@ -1,8 +1,9 @@
11 Page -blogSearch {
22 div.content { padding: 0 }
33
44 div.Scroller.content {
5+
56 section.top {
67 position: sticky
78 left: 0
89 right: 0
@@ -12,8 +13,9 @@
1213 background-color: #fff
1314
1415 div.search {
1516 border-top: 1px solid gainsboro
17+ border-bottom: 2px solid #f5f6f7
1618 padding: 1rem
1719
1820 div.input {
1921 max-width: 16rem
@@ -50,12 +52,17 @@
5052
5153 section.content {
5254 background-color: #fff
5355 $maxWidth
56+ padding: .5rem 2rem
5457 margin: .8rem auto
55- padding: .5rem 2rem
5658
59+ display: flex
60+ flex-wrap: wrap
61+
5762 div.BlogCard {
63+ flex-basis: 100%
64+
5865 border-bottom: 1px solid gainsboro
5966 }
6067 }
6168
app/page/channel.jsView
@@ -52,9 +52,9 @@
5252 const Link = api.app.html.link
5353
5454 // TODO change this to -channel
5555 return h('Page -home', {title: channel}, [
56- Link({ page: 'threadNew', channel }, h('Button -primary', strings.channel.action.newThread)),
56+ Link({ page: 'threadNew', channel }, h('Button -strong', strings.channel.action.newThread)),
5757 h('div.content', [ threadsHtmlObs ]),
5858 h('Button -showMore', {
5959 'ev-click': threadsHtmlObs.more,
6060 disabled: disableShowMore
app/page/groupFind.jsView
@@ -47,9 +47,9 @@
4747 return h('div.groupNotFound', [
4848 h('div.info', strings.groupFind.state.groupNotFound),
4949 Link(
5050 { page: 'threadNew', channel: input, flash: strings.groupFind.flash.createFirstThread },
51- h('Button -primary', strings.groupFind.action.newGroup)
51+ h('Button -strong', strings.groupFind.action.newGroup)
5252 )
5353 ])
5454 }
5555 })
app/page/settings.jsView
@@ -76,9 +76,9 @@
7676 ])
7777
7878 function Language (lang) {
7979 const selectLang = () => api.settings.sync.set({ language: lang })
80- const className = currentLanguage === lang ? '-primary' : ''
80+ const className = currentLanguage === lang ? '-strong' : ''
8181
8282 return h('Button -language',
8383 {
8484 'ev-click': () => selectLang(lang),
app/page/threadNew.jsView
@@ -46,25 +46,27 @@
4646
4747 return h('Page -threadNew', {title: strings.threadNew.pageTitle}, [
4848 api.app.html.context(location),
4949 h('div.content', [
50- h('div.field -to', [
51- h('div.label', strings.threadNew.field.to),
52- h('div.recps', [
53- h('div.recp', [
54- api.about.html.image(feed),
55- h('div.name', name)
50+ h('div.container', [
51+ h('div.field -to', [
52+ h('div.label', strings.threadNew.field.to),
53+ h('div.recps', [
54+ h('div.recp', [
55+ api.about.html.image(feed),
56+ h('div.name', name)
57+ ])
5658 ])
57- ])
58- ]),
59- h('div.field -subject', [
60- h('div.label', strings.threadNew.field.subject),
61- h('input', {
62- 'ev-input': e => meta.subject.set(e.target.value),
63- placeholder: strings.optionalField
64- }),
65- ]),
66- composer
59+ ]),
60+ h('div.field -subject', [
61+ h('div.label', strings.threadNew.field.subject),
62+ h('input', {
63+ 'ev-input': e => meta.subject.set(e.target.value),
64+ placeholder: strings.optionalField
65+ }),
66+ ]),
67+ composer
68+ ])
6769 ])
6870 ])
6971 }
7072
app/page/threadNew.mcssView
@@ -1,58 +1,69 @@
11 Page -threadNew {
22
33 div.content {
4- div.flash {
5- margin-bottom: 2rem;
6- background: #fff;
7- padding: 1rem;
8- }
4+ display: flex
95
10- div.field {
11- margin-bottom: .5rem
6+ div.container {
7+ flex-basis: 100%
128 $maxWidth
13-
14- display: flex
15- align-items: center
9+ margin: 0 auto
1610
17- div.label {
18- flex-basis: 4rem
19- padding-left: 1rem
20- margin-right: 1rem
11+ div.flash {
12+ margin-bottom: 2rem;
13+ background: #fff;
14+ padding: 1rem;
2115 }
2216
23- input {
24- flex-grow: 1
25- $fontBasic
26- padding: .6rem
27- }
28-
29- div.recps {
17+ div.field {
18+ margin-bottom: .5rem
19+ $maxWidth
20+
3021 display: flex
31-
32- div.recp {
33- padding: .3rem
34- min-width: 5rem
35- $borderSubtle
36- border-radius: 6rem
37- $backgroundPrimaryText
22+ align-items: center
3823
24+ div.label {
25+ flex-basis: 4rem
26+ padding-left: 1rem
3927 margin-right: 1rem
28+ }
4029
30+ input {
31+ flex-grow: 1
32+ $fontBasic
33+ padding: .6rem
34+ $borderSubtle
35+ border-radius: 4rem
36+ outline: none
37+ }
38+
39+ div.recps {
4140 display: flex
42- align-items: center
41+
42+ div.recp {
43+ padding: .3rem
44+ min-width: 5rem
45+ $borderSubtle
46+ border-radius: 6rem
47+ $backgroundPrimaryText
4348
44- img {
45- width: 2rem
46- height: 2rem
47- border-radius: 2rem
48- }
49+ margin-right: 1rem
4950
50- div.name {
51- margin: 0 .5rem
51+ display: flex
52+ align-items: center
53+
54+ img {
55+ width: 2rem
56+ height: 2rem
57+ border-radius: 2rem
58+ }
59+
60+ div.name {
61+ margin: 0 .5rem
62+ }
5263 }
53- }
54- }
64+ }
5565
66+ }
5667 }
5768 }
5869 }
app/page/blogNew.mcssView
@@ -1,0 +1,48 @@
1+Page -blogNew {
2+ div.Context {}
3+
4+
5+ div.content {
6+ display: flex
7+
8+ div.container {
9+ flex-basis: 100%
10+ $maxWidth
11+ margin: 0 auto
12+
13+
14+ div.field {
15+ margin-bottom: .5rem
16+ $maxWidth
17+
18+ display: flex
19+ align-items: center
20+
21+ div.label {
22+ flex-basis: 4rem
23+ padding-left: 1rem
24+ margin-right: 1rem
25+ }
26+
27+ input {
28+ flex-grow: 1
29+ $fontBasic
30+ padding: .6rem 1rem
31+
32+ border-radius: 4rem
33+ $borderSubtle
34+ outline: none
35+ }
36+
37+
38+ -channel {}
39+ -title {}
40+ }
41+ div.Compose {
42+ textarea {
43+ margin-top: 2rem
44+ }
45+ }
46+ }
47+ }
48+}
main.jsView
@@ -12,9 +12,10 @@
1212 const sockets = combine(
1313 //need some modules first
1414 {
1515 settings: require('patch-settings'),
16- translations: require('./translations/sync')
16+ translations: require('./translations/sync'),
17+ suggestions: require('patch-suggest'), // so that styles can be over-ridden
1718 },
1819 {
1920 about: require('./about'),
2021 app: require('./app'),
@@ -29,9 +30,8 @@
2930 state: require('./state/obs'),
3031 unread: require('./unread'),
3132 },
3233 {
33- suggestions: require('patch-suggest'),
3434 profile: require('patch-profile'),
3535 history: require('patch-history'),
3636 core: require('patchcore')
3737 }
message/html/compose.jsView
@@ -91,11 +91,11 @@
9191 else
9292 fileInput = h('input', { style: {visibility: 'hidden'} })
9393
9494 var showPreview = Value(false)
95- var previewBtn = h('Button -preview',
95+ var previewBtn = h('Button',
9696 {
97- className: when(showPreview, '-primary'),
97+ className: when(showPreview, '-strong', '-subtle'),
9898 'ev-click': () => showPreview.set(!showPreview())
9999 },
100100 when(showPreview, strings.blogNew.actions.edit, strings.blogNew.actions.preview)
101101 )
message/html/compose.mcssView
@@ -8,14 +8,12 @@
88 $fontBasic
99
1010 padding: 1rem
1111 border-radius: 1rem
12- border: none
12+ $borderSubtle
1313 margin-bottom: .5rem
1414
15- :focus {
16- outline: none
17- }
15+ outline: none
1816 }
1917
2018 section.actions {
2119 display: flex
@@ -95,9 +93,10 @@
9593
9694 $attachButton {
9795 background: #fff
9896 color: #666
97+ padding: .5rem
9998 border: 1px solid #b9b9b9
100- padding: .5rem
99+ border-radius: 4rem
101100 margin: 0
102101 cursor: pointer
103102 }
styles/button.mcssView
@@ -1,10 +1,10 @@
11 Button {
22 font-family: arial
33 $backgroundPrimaryText
44
5- min-width: 6rem
6- height: 1.2em
5+ min-width: 5rem
6+ height: 1.4em
77 padding: .2rem 1rem
88
99 border: 1px #b9b9b9 solid
1010 border-radius: 10rem
@@ -14,23 +14,31 @@
1414 display: flex
1515 justify-content: center
1616 align-items: center
1717
18+ :hover {
19+ opacity: .7
20+ }
21+ transition: all .1s ease-in
22+
1823 -subtle {
19- color: initial
24+ color: #555
2025 :hover {
2126 color: #222
2227 }
2328 }
2429
2530 -primary {
31+ $font
32+ $colorFontPrimary
33+ $borderPrimary
34+ }
35+
36+ -strong {
2637 $colorPrimary
2738 $font
2839 $borderPrimary
2940
30- :hover {
31- opacity: .9
32- }
3341 }
3442
3543 -channel {
3644 $backgroundPrimary
styles/markdown.mcssView
@@ -10,9 +10,9 @@
1010 p {
1111 a {
1212 img {
1313 display: block
14- margin: auto
14+ margin: .5rem auto
1515 }
1616 }
1717 }
1818
styles/mixins.jsView
@@ -16,9 +16,9 @@
1616 line-height: 1.2
1717 }
1818
1919 $maxWidth {
20- max-width: 1200px
20+ max-width: 1000px
2121 }
2222
2323 $maxWidthSmaller {
2424 max-width: 40rem
@@ -81,25 +81,25 @@
8181 min-width: 2.8rem
8282 min-height: 2.8rem
8383 width: 2.8rem
8484 height: 2.8rem
85- border-radius: 1.4rem
85+ border-radius: 4rem
8686 }
8787
8888 $circleMedium {
8989 min-width: 3.5rem
9090 min-height: 3.5rem
9191 width: 3.5rem
9292 height: 3.5rem
93- border-radius: 1.75rem
93+ border-radius: 4rem
9494 }
9595
9696 $circlelarge {
97- min-width: 5rem
98- min-height: 5rem
99- width: 5rem
100- height: 5rem
101- border-radius: 2.5rem
97+ min-width: 8rem
98+ min-height: 8rem
99+ width: 8rem
100+ height: 8rem
101+ border-radius: 8rem
102102 }
103103
104104 $markdownSmall {
105105 div.Markdown {
styles/patchSuggest.mcssView
@@ -1,6 +1,17 @@
11 PatchSuggest {
22 box-shadow: rgba(0,0,0,0.1) 4px 4px 10px
3+
4+ ul {
5+ li {
6+ img { $circleSmall }
7+
8+ small {
9+ div.key { font-size: 1rem }
10+ }
11+ }
12+ }
13+
314 }
415
516 PatchSuggest -channelHorizontal {
617 max-width: 50vw

Built with git-ssb-web