git ssb

2+

mixmix / ticktack



Commit 9b70108d00646124112662ec83dd9733d7afca7d

add custom icons

mix irving committed on 12/8/2017, 4:15:43 AM
Parent: 4f3123cd652a5603873f1d2e87d6016552e7b4c8

Files changed

app/html/context.jschanged
app/html/context.mcsschanged
app/html/header.jschanged
app/html/header.mcsschanged
app/page/page.mcsschanged
app/page/settings.jschanged
app/page/settings.mcsschanged
app/page/userShow.jschanged
assets/address_bk.pngadded
assets/address_bk_on.pngadded
assets/close.pngadded
assets/discover.pngadded
assets/edit.pngadded
assets/feed.pngadded
assets/feed_on.pngadded
assets/file.pngadded
assets/file2.pngadded
assets/maximize.pngadded
assets/minimize.pngadded
assets/settings.pngadded
assets/settings_on.pngadded
message/html/compose.mcsschanged
app/html/context.jsView
@@ -3,8 +3,9 @@
33 const pull = require('pull-stream')
44 const next = require('pull-next-step')
55 const get = require('lodash/get')
66 const isEmpty = require('lodash/isEmpty')
7+const path = require('path')
78
89 exports.gives = nest('app.html.context')
910
1011 exports.needs = nest({
@@ -98,9 +99,12 @@
9899
99100 // Discover
100101 Option({
101102 // notifications: '!', //TODO - count this!
102- imageEl: h('i.fa.fa-binoculars'),
103+ // imageEl: h('i.fa.fa-binoculars'),
104+ imageEl: h('i', [
105+ h('img', { src: path.join(__dirname, '../../assets', 'discover.png') })
106+ ]),
103107 label: strings.blogIndex.title,
104108 selected: isDiscoverContext(location),
105109 location: { page: 'blogIndex' },
106110 })
app/html/context.mcssView
@@ -77,17 +77,17 @@
7777
7878 a img {
7979
8080 }
81+
8182 i {
8283 $circleSmall
8384 $colorPrimary
8485 font-size: 1.3rem
8586 display: flex
8687 justify-content: center
8788 align-items: center
8889 }
89-
9090 }
9191
9292 div.label {
9393 $markdownSmall
app/html/header.jsView
@@ -1,7 +1,8 @@
11 const nest = require('depnest')
22 const { h, computed, when } = require('mutant')
33 const get = require('lodash/get')
4+const path = require('path')
45
56 exports.gives = nest('app.html.header')
67
78 exports.needs = nest('keys.sync.id', 'first')
@@ -28,16 +29,21 @@
2829 const isFeed = computed([isSettings], isSettings => !isSettings)
2930
3031 return h('Header', [
3132 h('nav', [
32- h('i.fa', {
33+ h('img.feed', {
34+ src: when(isFeed, assetPath('feed_on.png'), assetPath('feed.png')),
3335 'ev-click': () => push({page: 'blogIndex'}),
34- className: when(isFeed, 'fa-commenting', 'fa-commenting-o')
3536 }),
36- h('i.fa', {
37- className: when(isSettings, 'fa-user', 'fa-user-o'),
37+ h('img.feed', {
38+ src: when(isSettings, assetPath('settings_on.png'), assetPath('settings.png')),
3839 'ev-click': () => push({page: 'settings'})
39- })
40+ }),
4041 ]),
4142 ])
4243 })
4344 }
45+
46+function assetPath (name) {
47+ return path.join(__dirname, '../../assets', name)
48+}
49+
app/html/header.mcssView
@@ -4,17 +4,24 @@
44 $navFA
55 padding: 1rem 0
66
77 width: 100%
8- height: 1rem
8+ height: 1.5rem
99 position: fixed
1010 top: 0
1111 z-index: 99
1212
1313 display: flex
1414 align-items: center
1515 justify-content: center
1616
17+ img {
18+ cursor: pointer
19+ text-decoration: none
20+
21+ margin: 0 2rem
22+ }
23+
1724 (a) {
1825 color: #222
1926 margin-right: 1rem
2027
@@ -23,19 +30,4 @@
2330 }
2431 }
2532 }
2633
27-$navFA {
28- i {
29- font-size: 1.4rem
30- margin: 0 1rem
31-
32- -active {
33- color: red
34- }
35-
36- :hover {
37- cursor: pointer
38- text-decoration: none
39- }
40- }
41-}
app/page/page.mcssView
@@ -1,9 +1,9 @@
11 Page {
22 height: calc(100% - 3rem) /*needed for scrolling*/
33
44 $backgroundPrimary
5- margin-top: 3rem
5+ margin-top: 3.5rem
66
77 display: flex
88
99 div.Context {
app/page/settings.jsView
@@ -1,7 +1,8 @@
11 const nest = require('depnest')
22 const { h, computed } = require('mutant')
33 const electron = require('electron')
4+const path = require('path')
45
56 exports.gives = nest('app.page.settings')
67
78 exports.needs = nest({
@@ -65,9 +66,10 @@
6566 h('section -name', [
6667 h('div.left', strings.settingsPage.section.name),
6768 h('div.right', [
6869 api.about.obs.name(feed),
69- h('i.fa.fa-pencil', { 'ev-click': editProfile })
70+ h('img', { src: path.join(__dirname, '../../assets', 'edit.png') })
71+ // h('i.fa.fa-pencil', { 'ev-click': editProfile })
7072 ]),
7173 ]),
7274 h('section -introduction', [
7375 h('div.left', strings.settingsPage.section.introduction),
app/page/settings.mcssView
@@ -30,9 +30,9 @@
3030 $circleLarge
3131 margin-bottom: 1rem
3232 }
3333
34- i.fa {
34+ i.fa, img {
3535 cursor: pointer
3636 margin: 0 .5rem
3737
3838 :hover {
app/page/userShow.jsView
@@ -1,8 +1,9 @@
11 const nest = require('depnest')
22 const { h, Array: MutantArray, computed, when, map } = require('mutant')
33 const pull = require('pull-stream')
44 const get = require('lodash/get')
5+const path = require('path')
56
67 exports.gives = nest('app.page.userShow')
78
89 exports.needs = nest({
@@ -33,9 +34,13 @@
3334
3435 const strings = api.translations.sync.strings()
3536
3637 const Link = api.app.html.link
37- const userEditButton = Link({ page: 'userEdit', feed }, h('i.fa.fa-pencil'))
38+ const userEditButton = Link(
39+ { page: 'userEdit', feed },
40+ // h('i.fa.fa-pencil')
41+ h('img', { src: path.join(__dirname, '../../assets', 'edit.png') })
42+ )
3843 const directMessageButton = Link({ page: 'threadNew', feed }, h('Button', strings.userShow.action.directMessage))
3944
4045 const BLOG_TYPES = ['blog', 'post']
4146
assets/address_bk.png
assets/address_bk.png
assets/address_bk_on.png
assets/address_bk_on.png
assets/close.png
assets/close.png
assets/discover.png
assets/discover.png
assets/edit.png
assets/edit.png
assets/feed.png
assets/feed.png
assets/feed_on.png
assets/feed_on.png
assets/file.png
assets/file.png
assets/file2.png
assets/file2.png
assets/maximize.png
assets/maximize.png
assets/minimize.png
assets/minimize.png
assets/settings.png
assets/settings.png
assets/settings_on.png
assets/settings_on.png
message/html/compose.mcssView
@@ -17,31 +17,33 @@
1717
1818 section.actions {
1919 display: flex
2020 flex-direction: row
21- align-items: baseline
21+ align-items: center
2222 justify-content: flex-end
2323
2424 margin-top: .4rem
2525
2626 input { flex-grow: 1 }
2727
2828 input[type="file"] {
29- padding: .5rem 0
29+ /* padding: .5rem 0 */
3030
31- width: 2.5rem
32- height: 1.5rem
31+ /* width: 2.5rem */
32+ /* height: 1.5rem */
33+ margin-left: .5rem
3334 color: transparent
3435
3536 ::-webkit-file-upload-button {
3637 visibility: hidden
3738 }
3839
3940 ::before {
4041 $attachButton
41- padding-top: .3rem
42+ /* padding-top: .3rem */
4243
43- content: '๐Ÿ“Ž'
44+ /* content: '๐Ÿ“Ž' */
45+ content: url('file.png')
4446 font-size: 1rem
4547
4648 outline: none
4749 white-space: nowrap
@@ -91,12 +93,12 @@
9193
9294 }
9395
9496 $attachButton {
95- background: #fff
97+ /* background: #fff */
9698 color: #666
97- padding: .5rem
98- border: 1px solid #b9b9b9
99+ /* padding: .5rem */
100+ /* border: 1px solid #b9b9b9 */
99101 border-radius: 4rem
100102 margin: 0
101103 cursor: pointer
102104 }

Built with git-ssb-web