summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-19 12:31:23 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-19 12:31:23 +0900
commit4193b990c71c627cbbd206a3913f495c3db914ab (patch)
treeae5a9357c56c010681e24366b079ab0910ad3631 /src
parent[Client] Fix bug (diff)
downloadsharkey-4193b990c71c627cbbd206a3913f495c3db914ab.tar.gz
sharkey-4193b990c71c627cbbd206a3913f495c3db914ab.tar.bz2
sharkey-4193b990c71c627cbbd206a3913f495c3db914ab.zip
#183 :tada:
Diffstat (limited to 'src')
-rw-r--r--src/config.ts4
-rw-r--r--src/web/app/auth/script.js4
-rw-r--r--src/web/app/base.styl4
-rw-r--r--src/web/app/client/script.js16
-rw-r--r--src/web/app/desktop/script.js4
-rw-r--r--src/web/app/dev/script.js4
-rw-r--r--src/web/app/dev/style.styl6
-rw-r--r--src/web/app/mobile/script.js4
8 files changed, 23 insertions, 23 deletions
diff --git a/src/config.ts b/src/config.ts
index 54ed0826a4..64a6b7c9bf 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -79,10 +79,13 @@ interface Mixin {
secondary_scheme: string;
api_url: string;
auth_url: string;
+ about_url: string;
dev_url: string;
drive_url: string;
}
+export type Config = Source & Mixin;
+
export default function load() {
const config = yaml.safeLoad(fs.readFileSync(path, 'utf-8')) as Source;
@@ -104,6 +107,7 @@ export default function load() {
mixin.api_url = `${mixin.scheme}://api.${mixin.host}`;
mixin.auth_url = `${mixin.scheme}://auth.${mixin.host}`;
mixin.dev_url = `${mixin.scheme}://dev.${mixin.host}`;
+ mixin.about_url = `${mixin.scheme}://about.${mixin.host}`;
mixin.drive_url = `${mixin.secondary_scheme}://file.${mixin.secondary_host}`;
return Object.assign(config, mixin);
diff --git a/src/web/app/auth/script.js b/src/web/app/auth/script.js
index c0065c85fd..8c9138efaf 100644
--- a/src/web/app/auth/script.js
+++ b/src/web/app/auth/script.js
@@ -2,6 +2,10 @@
* Authorize Form
*/
+// Style
+//import './style.styl';
+require('./style.styl');
+
const riot = require('riot');
document.title = 'Misskey | アプリの連携';
require('./tags');
diff --git a/src/web/app/base.styl b/src/web/app/base.styl
index c35f66c9a5..5a1da3813f 100644
--- a/src/web/app/base.styl
+++ b/src/web/app/base.styl
@@ -1,7 +1,7 @@
@charset 'utf-8'
-$theme-color = convert(themeColor)
-$theme-color-foreground = convert(themeColorForeground)
+$theme-color = #f76d6c
+$theme-color-foreground = #fff
@import './reset'
diff --git a/src/web/app/client/script.js b/src/web/app/client/script.js
index d8531e9cc8..880500eb1b 100644
--- a/src/web/app/client/script.js
+++ b/src/web/app/client/script.js
@@ -2,18 +2,9 @@ const head = document.getElementsByTagName('head')[0];
const ua = navigator.userAgent.toLowerCase();
const isMobile = /mobile|iphone|ipad|android/.test(ua);
-if (isMobile) {
- mountMobile();
-} else {
- mountDesktop();
-}
+isMobile ? mountMobile() : mountDesktop();
function mountDesktop() {
- const style = document.createElement('link');
- style.setAttribute('href', '/_/resources/desktop/style.css');
- style.setAttribute('rel', 'stylesheet');
- head.appendChild(style);
-
const script = document.createElement('script');
script.setAttribute('src', '/_/resources/desktop/script.js');
script.setAttribute('async', 'true');
@@ -27,11 +18,6 @@ function mountMobile() {
meta.setAttribute('content', 'width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no');
head.appendChild(meta);
- const style = document.createElement('link');
- style.setAttribute('href', '/_/resources/mobile/style.css');
- style.setAttribute('rel', 'stylesheet');
- head.appendChild(style);
-
const script = document.createElement('script');
script.setAttribute('src', '/_/resources/mobile/script.js');
script.setAttribute('async', 'true');
diff --git a/src/web/app/desktop/script.js b/src/web/app/desktop/script.js
index b240e9ab98..3d25e9b1d5 100644
--- a/src/web/app/desktop/script.js
+++ b/src/web/app/desktop/script.js
@@ -2,6 +2,10 @@
* Desktop Client
*/
+// Style
+//import './style.styl';
+require('./style.styl');
+
require('chart.js');
require('./tags');
const riot = require('riot');
diff --git a/src/web/app/dev/script.js b/src/web/app/dev/script.js
index e0644c263b..94b17c85e5 100644
--- a/src/web/app/dev/script.js
+++ b/src/web/app/dev/script.js
@@ -2,6 +2,10 @@
* Developer Center
*/
+// Style
+//import './style.styl';
+require('./style.styl');
+
require('./tags');
const boot = require('../boot');
const route = require('./router');
diff --git a/src/web/app/dev/style.styl b/src/web/app/dev/style.styl
index a7e51b8943..4fd537709d 100644
--- a/src/web/app/dev/style.styl
+++ b/src/web/app/dev/style.styl
@@ -2,9 +2,3 @@
html
background-color #fff
-
-#init
- background #100f0f
-
- > p
- color $theme-color
diff --git a/src/web/app/mobile/script.js b/src/web/app/mobile/script.js
index 6f732da9cc..034010b62f 100644
--- a/src/web/app/mobile/script.js
+++ b/src/web/app/mobile/script.js
@@ -2,6 +2,10 @@
* Mobile Client
*/
+// Style
+//import './style.styl';
+require('./style.styl');
+
require('./tags');
const boot = require('../boot');
const mixins = require('./mixins');