git ssb

2+

mixmix / ticktack



Commit fc257fd3b75785431205902b7f48764d220ef8ca

add styling for h1 and attachment

mix irving committed on 4/10/2018, 10:06:11 PM
Parent: 9ae1c46f226c40c608560b66d0b5ca42ecce151b

Files changed

app/page/blogNew.jschanged
app/page/blogNew.mcsschanged
app/page/blogNew.jsView
@@ -1,6 +1,6 @@
11 const nest = require('depnest')
2-const { h, Struct, Value } = require('mutant')
2 +const { h, Struct, Value, when } = require('mutant')
33 const addSuggest = require('suggest-box')
44 const pull = require('pull-stream')
55 const marksum = require('markdown-summary')
66 const MediumEditor = require('medium-editor').MediumEditor
@@ -54,28 +54,30 @@
5454 var page = h('Page -blogNew', [
5555 api.app.html.sideNav(location),
5656 h('div.content', [
5757 h('div.container', [
58- h('div.field -channel', [
59- h('div.label', strings.channel),
60- channelInput
61- ]),
6258 h('div.field -title', [
63- h('div.label', strings.blogNew.field.title),
6459 h('input', {
6560 'ev-input': e => meta.title.set(e.target.value),
61 + className: when(meta.title, '', '-empty'),
6662 placeholder: strings.blogNew.field.title
6763 })
6864 ]),
65 + mediumComposer,
66 + h('div.field -attachment',
67 + AddFileButton({ api, filesById, meta, textArea: mediumComposer })
68 + ),
69 + h('div.field -channel', [
70 + h('div.label', strings.channel),
71 + channelInput
72 + ]),
6973 h('div.field -summary', [
7074 h('div.label', strings.blogNew.field.summary),
7175 h('input', {
7276 'ev-input': e => meta.summary.set(e.target.value),
7377 placeholder: strings.blogNew.field.summary
7478 })
7579 ]),
76- mediumComposer,
77- AddFileButton({ api, filesById, meta, textArea: mediumComposer }),
7880 composer
7981 ])
8082 ])
8183 ])
app/page/blogNew.mcssView
@@ -32,17 +32,67 @@
3232 $borderSubtle
3333 outline: none
3434 }
3535
36 + -title {
37 + margin: 0
3638
39 + input {
40 + font-size: 2em
41 + font-weight: bold
42 +
43 + padding-top: 2rem
44 + border: none
45 + border-radius: 0
46 +
47 + -empty {
48 + font-weight: normal
49 + font-style: italic
50 + }
51 + }
52 + }
53 +
54 + -attachment {
55 + margin-top: .5rem
56 + margin-left: 0
57 +
58 + /* copied from message.html.compose */
59 + input[type="file"] {
60 + border: none
61 + flex-grow: 0
62 +
63 + color: transparent
64 +
65 + ::-webkit-file-upload-button {
66 + visibility: hidden
67 + }
68 +
69 + ::before {
70 + $attachButton
71 + /* padding-top: .3rem */
72 +
73 + /* content: '📎' */
74 + content: url('file.png')
75 + font-size: 1rem
76 +
77 + outline: none
78 + white-space: nowrap
79 + -webkit-user-select: none
80 + }
81 +
82 + :active, :focus {
83 + outline: none
84 + box-shadow: none
85 + }
86 + }
87 + }
88 +
3789 -channel {}
38- -title {}
3990 }
4091
4192 div.editor{
4293 background-color: #fff
4394 padding: 1rem
44- margin-top: 2rem
4595 min-height: 30rem
4696 outline: none
4797 }
4898

Built with git-ssb-web