Skip to content

Commit 557fd8f

Browse files
authored
Merge pull request element-hq#5578 from vector-im/matthew/status
Status.im theme
2 parents 73e7581 + 809dd08 commit 557fd8f

47 files changed

Lines changed: 1018 additions & 156 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎config.sample.json‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"default_hs_url": "https://matrix.org",
33
"default_is_url": "https://vector.im",
4+
"disable_custom_urls": false,
5+
"disable_guests": false,
6+
"disable_login_language_selector": false,
7+
"disable_3pid_login": false,
48
"brand": "Riot",
59
"integrations_ui_url": "https://scalar.vector.im/",
610
"integrations_rest_url": "https://scalar.vector.im/api",
@@ -10,6 +14,8 @@
1014
"feature_pinning": "labs"
1115
},
1216
"default_federate": true,
17+
"welcomePageUrl": "home.html",
18+
"default_theme": "light",
1319
"roomDirectory": {
1420
"servers": [
1521
"matrix.org"

‎docs/skinning thoughts.md‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
== Skinning refactor ==
2+
3+
matrix-react-sdk
4+
- base images
5+
- base CSS
6+
- all the components needed to build a workable app (including the top layer)
7+
8+
riot-web: the riot skin
9+
- riot-specific classes (e.g. login header/footer)
10+
- riot-specific themes
11+
- light
12+
- dark
13+
14+
i.e. the only things which should go into riot-web are bits which apply vector-specific skinning
15+
specifically "Stuff that any other brand would not want to use. (e.g. riot logos, links, T&Cs)"
16+
- Questions:
17+
- Electron app? (should probably be a separate repo in its own right? but might as well go here for now)
18+
- index.html & index.js? (should be in matrix-react-sdk, given the SDK is useless without them?)
19+
20+
ideally matrix-react-sdk itself should ship with a default skin which actually works built in.
21+
22+
status skin (can go in the same app for now)
23+
- has status theme
24+
- which inherits from riot light theme
25+
- how do we share graphics between skins?
26+
- shove them into react-sdk, or...
27+
- guess we do ../../vector/img
28+
- this means keeping the skin name in the images (unless /img is a shortcut to the right skin's images)
29+
30+
out of scope:
31+
- making the components more independent, so they can be used in isolation.
32+
- that said, the bits which should probably be used by being embeded into a different app:
33+
- login/reg
34+
- RoomView + RoomSettings
35+
- MessageComposer
36+
- RoomList
37+
- MemberList
38+
- MemberInfo
39+
- Voip UI
40+
- UserSettings
41+
- sharing different js-sdks between the different isolated modules
42+
43+
other changes:
44+
- how do we handle i18n?
45+
- each skin should really be its own i18n project. As long as all the commonality stuff is in matrix-react-sdk this shouldn't be too bad.
46+
- ability to associate components with a given skin
47+
- skins/vector/src <-- components
48+
- skins/vector/css
49+
- skins/vector/img
50+
- skins/vector/fonts
51+
- gather together themes (per skin) into a single place too
52+
- skins/vector/themes/foo/css
53+
- skins/vector/themes/foo/img
54+
- skins/vector/themes/foo/fonts
55+
- ideally riot-web would contain almost nothing but skins/vector directory.
56+
- ability to entirely replace CSS rather than override it for a given theme
57+
- e.g. if we replace `Login.js` with `StatusLogin.js`, then we should similarly be able to replace `_Login.scss` with `_StatusLogin.scss`.
58+
59+
random thoughts;
60+
- should we be able to change the entire skin at runtime (more like wordpress) - to the extent of replacing entire components?
61+
- might pose security issues if a theme can be swapped out to replace MatrixChat or other fundamental functionality at runtime
62+
- if so, perhaps skins & themes should converge...
63+
64+
-----------------
65+
66+
Immediate plan for Status:
67+
* Implement it as a theme for the riot skin
68+
* Ideally move skins to a sensible level (possibly even including src?)

‎res/home-status.html‎

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
<style type="text/css">
2+
3+
/* we deliberately inline style here to avoid flash-of-CSS problems, and to avoid
4+
* voodoo where we have to set display: none by default
5+
*/
6+
7+
.mx_HomePage_container {
8+
text-align: center;
9+
display: block ! important;
10+
width: 690px;
11+
margin: 20px;
12+
}
13+
14+
.mx_HomePage_header {
15+
margin-top: 37px;
16+
margin-left: 10px;
17+
width: 670px;
18+
box-sizing: border-box;
19+
font-size: 18px;
20+
background-color: #fff;
21+
box-shadow: 0px 2px 10px 0px rgba(48,55,81,0.05);
22+
border-radius: 5px;
23+
padding: 20px 80px 20px 80px;
24+
align-items: center;
25+
}
26+
27+
.mx_HomePage_header h1 {
28+
font-size: 29px;
29+
margin-bottom: 10px;
30+
}
31+
32+
.mx_HomePage_intro h2 {
33+
margin-top: 32px;
34+
font-size: 25px;
35+
color: #49555F;
36+
}
37+
38+
.mx_HomePage_intro {
39+
margin: auto;
40+
width: 600px;
41+
margin-top: 40px;
42+
margin-bottom: 40px;
43+
font-size: 18px;
44+
}
45+
46+
.mx_HomePage_coc {
47+
font-size: 16px;
48+
}
49+
50+
.mx_HomePage_coc a {
51+
color: #4360DF;
52+
}
53+
54+
.mx_HomePage_room, .mx_HomePage_telegram {
55+
float: left;
56+
background-color: #fff;
57+
box-shadow: 0px 2px 10px 0px rgba(48,55,81,0.05);
58+
border-radius: 5px;
59+
margin: 10px;
60+
width: 210px;
61+
height: 250px;
62+
display: flex;
63+
flex-direction: column;
64+
align-items: center;
65+
}
66+
67+
.mx_HomePage_telegram {
68+
background-color: transparent;
69+
border: 1px solid rgba(113, 129, 142, 0.2);
70+
box-shadow: none;
71+
display: flex;
72+
align-items: center;
73+
justify-content: center;
74+
flex-direction: column;
75+
font-size: 16px;
76+
line-height: 25px;
77+
box-sizing: border-box;
78+
}
79+
80+
.mx_HomePage_telegram a {
81+
text-transform: uppercase;
82+
color: #4360DF;
83+
font-size: 13px;
84+
font-family: PostGrotesk-Medium, Arial, Helvetica, Sans-Serif;
85+
font-weight: 600;
86+
opacity: 1.0;
87+
transition: opacity .2s ease;
88+
}
89+
90+
.mx_HomePage_telegram a:hover {
91+
opacity: 0.5;
92+
}
93+
94+
.mx_HomePage_room .mx_HomePage_icon {
95+
margin-top: 24px;
96+
margin-bottom: 16px;
97+
width: 50px;
98+
height: 50px;
99+
}
100+
101+
.mx_HomePage_room .mx_HomePage_name {
102+
display: block;
103+
font-family: PostGrotesk-Medium, Arial, Helvetica, Sans-Serif;
104+
font-weight: 600;
105+
font-size: 15px;
106+
color: #49555F;
107+
line-height: 25px;
108+
margin: 0px 12px 0px 12px;
109+
}
110+
111+
.mx_HomePage_room .mx_HomePage_desc {
112+
flex: 1;
113+
display: block;
114+
margin: 0px 12px 0px 12px;
115+
font-size: 14px;
116+
line-height: 20px;
117+
}
118+
119+
.mx_HomePage_button {
120+
align-self: normal;
121+
margin: 12px;
122+
border-radius: 8px;
123+
border: 1px solid rgba(199, 206, 209, 0.12);
124+
background-color: #6CC1F6;
125+
font-size: 13px;
126+
font-family: PostGrotesk-Medium, Arial, Helvetica, Sans-Serif;
127+
font-weight: 600;
128+
text-transform: uppercase;
129+
letter-spacing: 1px;
130+
color: #fff ! important;
131+
cursor: pointer;
132+
outline: none;
133+
padding: 14px;
134+
box-sizing: border-box;
135+
padding-left: 1.5em;
136+
padding-right: 1.5em;
137+
}
138+
139+
</style>
140+
141+
<div class="mx_HomePage_container">
142+
<div class="mx_HomePage_header">
143+
<div>
144+
<h1>Welcome to Status Community Chat, powered by Riot.</h1>
145+
<p>For contributors, developers and Ethereum-enthusiasts who care about the movement for decentralization.</p>
146+
</div>
147+
</div>
148+
149+
<div class="mx_HomePage_intro">
150+
<h2>Our rooms</h2>
151+
<p>Please abide by the channels discussion categories and remain on topic to the specific category details listed.</p>
152+
<p class="mx_HomePage_coc">Before posting please refer to our <a href="https://wiki.status.im/Code_of_conduct">Code of Conduct</a></p>
153+
</div>
154+
155+
156+
<div class="mx_HomePage_room">
157+
<img class="mx_HomePage_icon" src="themes/status/img/a.png">
158+
<span class="mx_HomePage_name">#announcements</span>
159+
<span class="mx_HomePage_desc">Company wide announcements.</span>
160+
<a class="mx_HomePage_button" href="#/room/#announcements:status.im">Join</a>
161+
</div>
162+
<div class="mx_HomePage_room">
163+
<img class="mx_HomePage_icon" src="themes/status/img/i.png">
164+
<span class="mx_HomePage_name">#introductions</span>
165+
<span class="mx_HomePage_desc">Newcomer introductions.</span>
166+
<a class="mx_HomePage_button" href="#/room/#introductions:status.im">Join</a>
167+
</div>
168+
<div class="mx_HomePage_room">
169+
<img class="mx_HomePage_icon" src="themes/status/img/g.png">
170+
<span class="mx_HomePage_name">#general</span>
171+
<span class="mx_HomePage_desc">General discussions of Status.</span>
172+
<a class="mx_HomePage_button" href="#/room/#general:status.im">Join</a>
173+
</div>
174+
<div class="mx_HomePage_room">
175+
<img class="mx_HomePage_icon" src="themes/status/img/d.png">
176+
<span class="mx_HomePage_name">#dev-status</span>
177+
<span class="mx_HomePage_desc">Contributing to our codebase? Building a DApp or a chatbot? We're here to help.</span>
178+
<a class="mx_HomePage_button" href="#/room/#dev-status:status.im">Join</a>
179+
</div>
180+
<div class="mx_HomePage_room">
181+
<img class="mx_HomePage_icon" src="themes/status/img/n.png">
182+
<span class="mx_HomePage_name">#news-articles</span>
183+
<span class="mx_HomePage_desc">Share news, articles related to Ethereum or projects you're excited about</span>
184+
<a class="mx_HomePage_button" href="#/room/#news-articles:status.im">Join</a>
185+
</div>
186+
<div class="mx_HomePage_telegram">
187+
<p>
188+
Interested in market and cryptocurrency type discussions?
189+
</p>
190+
<a href="https://t.me/StatusNetworkChat">Join Telegram</a>
191+
</div>
192+
</div>

‎scripts/copy-res.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ const INCLUDE_LANGS = [
4242
const COPY_LIST = [
4343
["res/manifest.json", "webapp"],
4444
["res/home.html", "webapp"],
45+
["res/home-status.html", "webapp"],
4546
["res/home/**", "webapp/home"],
4647
["res/{media,vector-icons}/**", "webapp"],
4748
["res/flags/*", "webapp/flags/"],
48-
["src/skins/vector/{fonts,img}/**", "webapp"],
49+
["src/skins/vector/{fonts,img,themes}/**", "webapp"],
4950
["node_modules/emojione/assets/svg/*", "webapp/emojione/svg/"],
5051
["node_modules/emojione/assets/png/*", "webapp/emojione/png/"],
5152
["./config.json", "webapp", { directwatch: 1 }],

‎src/components/views/globals/NewVersionBar.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default React.createClass({
4242
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog');
4343
Modal.createTrackedDialog('Display release notes', '', QuestionDialog, {
4444
title: _t("What's New"),
45-
description: <pre className="changelog_text">{releaseNotes}</pre>,
45+
description: <div className="mx_MatrixToolbar_changelog">{releaseNotes}</div>,
4646
button: _t("Update"),
4747
onFinished: (update) => {
4848
if(update && PlatformPeg.get()) {

‎src/components/views/login/VectorLoginFooter.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ limitations under the License.
1818

1919
var React = require('react');
2020
import { _t } from 'matrix-react-sdk/lib/languageHandler';
21+
import UserSettingsStore from 'matrix-react-sdk/lib/UserSettingsStore';
2122

2223
module.exports = React.createClass({
2324
displayName: 'VectorLoginFooter',
@@ -26,6 +27,9 @@ module.exports = React.createClass({
2627
},
2728

2829
render: function() {
30+
// FIXME: replace this with a proper Status skin
31+
if (UserSettingsStore.getTheme() === 'status') return <div/>;
32+
2933
return (
3034
<div className="mx_Login_links">
3135
<a href="https://medium.com/@RiotChat">blog</a>&nbsp;&nbsp;&middot;&nbsp;&nbsp;

‎src/components/views/login/VectorLoginHeader.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ module.exports = React.createClass({
3333

3434
render: function() {
3535
return (
36-
<div className="mx_Login_logo">
37-
<img src={this.props.icon || DEFAULT_LOGO_URI} alt="Riot"/>
36+
<div className="mx_Login_header">
37+
<div className="mx_Login_logo">
38+
<img src={this.props.icon || DEFAULT_LOGO_URI} alt="Riot"/>
39+
</div>
3840
</div>
3941
);
4042
}

‎src/header‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2015, 2016 OpenMarket Ltd
2+
Copyright 2017 New Vector Ltd
33

44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)