Commit 9b70108d00646124112662ec83dd9733d7afca7d
add custom icons
mix irving committed on 12/8/2017, 4:15:43 AMParent: 4f3123cd652a5603873f1d2e87d6016552e7b4c8
Files changed
app/html/context.js | changed |
app/html/context.mcss | changed |
app/html/header.js | changed |
app/html/header.mcss | changed |
app/page/page.mcss | changed |
app/page/settings.js | changed |
app/page/settings.mcss | changed |
app/page/userShow.js | changed |
assets/address_bk.png | added |
assets/address_bk_on.png | added |
assets/close.png | added |
assets/discover.png | added |
assets/edit.png | added |
assets/feed.png | added |
assets/feed_on.png | added |
assets/file.png | added |
assets/file2.png | added |
assets/maximize.png | added |
assets/minimize.png | added |
assets/settings.png | added |
assets/settings_on.png | added |
message/html/compose.mcss | changed |
app/html/context.js | ||
---|---|---|
@@ -3,8 +3,9 @@ | ||
3 | 3 | const pull = require('pull-stream') |
4 | 4 | const next = require('pull-next-step') |
5 | 5 | const get = require('lodash/get') |
6 | 6 | const isEmpty = require('lodash/isEmpty') |
7 | +const path = require('path') | |
7 | 8 | |
8 | 9 | exports.gives = nest('app.html.context') |
9 | 10 | |
10 | 11 | exports.needs = nest({ |
@@ -98,9 +99,12 @@ | ||
98 | 99 | |
99 | 100 | // Discover |
100 | 101 | Option({ |
101 | 102 | // 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 | + ]), | |
103 | 107 | label: strings.blogIndex.title, |
104 | 108 | selected: isDiscoverContext(location), |
105 | 109 | location: { page: 'blogIndex' }, |
106 | 110 | }) |
app/html/context.mcss | ||
---|---|---|
@@ -77,17 +77,17 @@ | ||
77 | 77 | |
78 | 78 | a img { |
79 | 79 | |
80 | 80 | } |
81 | + | |
81 | 82 | i { |
82 | 83 | $circleSmall |
83 | 84 | $colorPrimary |
84 | 85 | font-size: 1.3rem |
85 | 86 | display: flex |
86 | 87 | justify-content: center |
87 | 88 | align-items: center |
88 | 89 | } |
89 | - | |
90 | 90 | } |
91 | 91 | |
92 | 92 | div.label { |
93 | 93 | $markdownSmall |
app/html/header.js | ||
---|---|---|
@@ -1,7 +1,8 @@ | ||
1 | 1 | const nest = require('depnest') |
2 | 2 | const { h, computed, when } = require('mutant') |
3 | 3 | const get = require('lodash/get') |
4 | +const path = require('path') | |
4 | 5 | |
5 | 6 | exports.gives = nest('app.html.header') |
6 | 7 | |
7 | 8 | exports.needs = nest('keys.sync.id', 'first') |
@@ -28,16 +29,21 @@ | ||
28 | 29 | const isFeed = computed([isSettings], isSettings => !isSettings) |
29 | 30 | |
30 | 31 | return h('Header', [ |
31 | 32 | h('nav', [ |
32 | - h('i.fa', { | |
33 | + h('img.feed', { | |
34 | + src: when(isFeed, assetPath('feed_on.png'), assetPath('feed.png')), | |
33 | 35 | 'ev-click': () => push({page: 'blogIndex'}), |
34 | - className: when(isFeed, 'fa-commenting', 'fa-commenting-o') | |
35 | 36 | }), |
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')), | |
38 | 39 | 'ev-click': () => push({page: 'settings'}) |
39 | - }) | |
40 | + }), | |
40 | 41 | ]), |
41 | 42 | ]) |
42 | 43 | }) |
43 | 44 | } |
45 | + | |
46 | +function assetPath (name) { | |
47 | + return path.join(__dirname, '../../assets', name) | |
48 | +} | |
49 | + |
app/html/header.mcss | ||
---|---|---|
@@ -4,17 +4,24 @@ | ||
4 | 4 | $navFA |
5 | 5 | padding: 1rem 0 |
6 | 6 | |
7 | 7 | width: 100% |
8 | - height: 1rem | |
8 | + height: 1.5rem | |
9 | 9 | position: fixed |
10 | 10 | top: 0 |
11 | 11 | z-index: 99 |
12 | 12 | |
13 | 13 | display: flex |
14 | 14 | align-items: center |
15 | 15 | justify-content: center |
16 | 16 | |
17 | + img { | |
18 | + cursor: pointer | |
19 | + text-decoration: none | |
20 | + | |
21 | + margin: 0 2rem | |
22 | + } | |
23 | + | |
17 | 24 | (a) { |
18 | 25 | color: #222 |
19 | 26 | margin-right: 1rem |
20 | 27 | |
@@ -23,19 +30,4 @@ | ||
23 | 30 | } |
24 | 31 | } |
25 | 32 | } |
26 | 33 | |
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.mcss | ||
---|---|---|
@@ -1,9 +1,9 @@ | ||
1 | 1 | Page { |
2 | 2 | height: calc(100% - 3rem) /*needed for scrolling*/ |
3 | 3 | |
4 | 4 | $backgroundPrimary |
5 | - margin-top: 3rem | |
5 | + margin-top: 3.5rem | |
6 | 6 | |
7 | 7 | display: flex |
8 | 8 | |
9 | 9 | div.Context { |
app/page/settings.js | ||
---|---|---|
@@ -1,7 +1,8 @@ | ||
1 | 1 | const nest = require('depnest') |
2 | 2 | const { h, computed } = require('mutant') |
3 | 3 | const electron = require('electron') |
4 | +const path = require('path') | |
4 | 5 | |
5 | 6 | exports.gives = nest('app.page.settings') |
6 | 7 | |
7 | 8 | exports.needs = nest({ |
@@ -65,9 +66,10 @@ | ||
65 | 66 | h('section -name', [ |
66 | 67 | h('div.left', strings.settingsPage.section.name), |
67 | 68 | h('div.right', [ |
68 | 69 | 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 }) | |
70 | 72 | ]), |
71 | 73 | ]), |
72 | 74 | h('section -introduction', [ |
73 | 75 | h('div.left', strings.settingsPage.section.introduction), |
app/page/settings.mcss | ||
---|---|---|
@@ -30,9 +30,9 @@ | ||
30 | 30 | $circleLarge |
31 | 31 | margin-bottom: 1rem |
32 | 32 | } |
33 | 33 | |
34 | - i.fa { | |
34 | + i.fa, img { | |
35 | 35 | cursor: pointer |
36 | 36 | margin: 0 .5rem |
37 | 37 | |
38 | 38 | :hover { |
app/page/userShow.js | ||
---|---|---|
@@ -1,8 +1,9 @@ | ||
1 | 1 | const nest = require('depnest') |
2 | 2 | const { h, Array: MutantArray, computed, when, map } = require('mutant') |
3 | 3 | const pull = require('pull-stream') |
4 | 4 | const get = require('lodash/get') |
5 | +const path = require('path') | |
5 | 6 | |
6 | 7 | exports.gives = nest('app.page.userShow') |
7 | 8 | |
8 | 9 | exports.needs = nest({ |
@@ -33,9 +34,13 @@ | ||
33 | 34 | |
34 | 35 | const strings = api.translations.sync.strings() |
35 | 36 | |
36 | 37 | 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 | + ) | |
38 | 43 | const directMessageButton = Link({ page: 'threadNew', feed }, h('Button', strings.userShow.action.directMessage)) |
39 | 44 | |
40 | 45 | const BLOG_TYPES = ['blog', 'post'] |
41 | 46 |
assets/address_bk.png |
---|
assets/address_bk_on.png |
---|
assets/close.png |
---|
assets/discover.png |
---|
assets/edit.png |
---|
assets/feed.png |
---|
assets/feed_on.png |
---|
assets/file.png |
---|
assets/file2.png |
---|
assets/maximize.png |
---|
assets/minimize.png |
---|
assets/settings.png |
---|
assets/settings_on.png |
---|
message/html/compose.mcss | ||
---|---|---|
@@ -17,31 +17,33 @@ | ||
17 | 17 | |
18 | 18 | section.actions { |
19 | 19 | display: flex |
20 | 20 | flex-direction: row |
21 | - align-items: baseline | |
21 | + align-items: center | |
22 | 22 | justify-content: flex-end |
23 | 23 | |
24 | 24 | margin-top: .4rem |
25 | 25 | |
26 | 26 | input { flex-grow: 1 } |
27 | 27 | |
28 | 28 | input[type="file"] { |
29 | - padding: .5rem 0 | |
29 | + /* padding: .5rem 0 */ | |
30 | 30 | |
31 | - width: 2.5rem | |
32 | - height: 1.5rem | |
31 | + /* width: 2.5rem */ | |
32 | + /* height: 1.5rem */ | |
33 | + margin-left: .5rem | |
33 | 34 | color: transparent |
34 | 35 | |
35 | 36 | ::-webkit-file-upload-button { |
36 | 37 | visibility: hidden |
37 | 38 | } |
38 | 39 | |
39 | 40 | ::before { |
40 | 41 | $attachButton |
41 | - padding-top: .3rem | |
42 | + /* padding-top: .3rem */ | |
42 | 43 | |
43 | - content: '๐' | |
44 | + /* content: '๐' */ | |
45 | + content: url('file.png') | |
44 | 46 | font-size: 1rem |
45 | 47 | |
46 | 48 | outline: none |
47 | 49 | white-space: nowrap |
@@ -91,12 +93,12 @@ | ||
91 | 93 | |
92 | 94 | } |
93 | 95 | |
94 | 96 | $attachButton { |
95 | - background: #fff | |
97 | + /* background: #fff */ | |
96 | 98 | color: #666 |
97 | - padding: .5rem | |
98 | - border: 1px solid #b9b9b9 | |
99 | + /* padding: .5rem */ | |
100 | + /* border: 1px solid #b9b9b9 */ | |
99 | 101 | border-radius: 4rem |
100 | 102 | margin: 0 |
101 | 103 | cursor: pointer |
102 | 104 | } |
Built with git-ssb-web