Skip to content

Commit

Permalink
feat(client): add webpack and babel themes
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroppy committed Jan 30, 2021
1 parent c79cfb8 commit da3b7b2
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 29 deletions.
5 changes: 4 additions & 1 deletion packages/client/assets/style/code.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@import './variable';
@import url('https://fonts.googleapis.com/css?family=Source+Code+Pro');

:root {
--color-white: #f5f5f5;
}

pre {
background: var(--color-white);
border-radius: 10px;
Expand Down
2 changes: 0 additions & 2 deletions packages/client/assets/style/commentsList.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import './variable';

.comments-list {
background: #333;
height: 100vh;
Expand Down
3 changes: 1 addition & 2 deletions packages/client/assets/style/common.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
@import 'modern-normalize/modern-normalize.css';
@import 'swiper/swiper.min.css';
@import 'swiper/components/a11y/a11y.min.css';
@import './variable.css';
@import './customize.css';
@import './sidebar.css';
@import './grid.css';

html {
color: var(--color-black);
color: #333;
font-size: 62.5%;
}

Expand Down
6 changes: 5 additions & 1 deletion packages/client/assets/style/host.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
@import './variable';
:root {
--color-main: #3498db;
--color-white: #f5f5f5;
--color-black: #333;
}

.disabled {
pointer-events: none;
Expand Down
6 changes: 3 additions & 3 deletions packages/client/assets/style/sidebar.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import './variable';

:root {
--color-cyan: #7bb7fa;
--color-white: #f5f5f5;
--color-black: #373a47;
}

.btn-sidebar {
Expand All @@ -21,7 +21,7 @@
}

.bm-menu {
background: #373a47;
background: var(--color-black);
padding: 16px;
}

Expand Down
8 changes: 8 additions & 0 deletions packages/client/assets/style/themes/babel.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* https://babeljs.io/ */

:root {
--title-color: #f5da55;
--base-color: hsla(0, 0%, 100%, 0.8);
--background-color: #3b3c38;
--link-color: rgba(245, 218, 85, 0.15);
}
6 changes: 6 additions & 0 deletions packages/client/assets/style/themes/default.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:root {
--title-color: #464646;
--base-color: #545454;
--background-color: #f5f5f5;
--link-color: #3498db;
}
8 changes: 8 additions & 0 deletions packages/client/assets/style/themes/webpack.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* https://webpack.js.org/ */

:root {
--title-color: #8dd6f9;
--base-color: #fff;
--background-color: #2b3a42;
--link-color: #86a5ba;
}
7 changes: 0 additions & 7 deletions packages/client/assets/style/variable.css

This file was deleted.

2 changes: 0 additions & 2 deletions packages/client/assets/style/view.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import './variable.css';

.fusuma-presenter-view {
height: 100vh;
width: 100vw;
Expand Down
37 changes: 27 additions & 10 deletions packages/fusuma/src/configs/templates/style.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,42 @@
:root {
--color-white: #f5f5f5;
--color-black: #333;
--color-cyan: #7bb7fa;
}
/* themes */
@import '@fusuma/client/assets/style/themes/default.css';
/* @import '@fusuma/client/assets/style/themes/babel.css'; */
/* @import '@fusuma/client/assets/style/themes/webpack.css'; */

/* set custom colors */
/* :root {
} */

html {
/* set the base font-size */
font-size: 62.5%;
}

h1,
h2 {
color: var(--title-color);
}

a {
color: var(--link-color);
}

.slide-background {
/* set the default background */
background: var(--color-white);
background: var(--background-color);

/* set the default font-color */
color: var(--color-black);
color: var(--base-color);
}

a {
/* set the default link color */
color: var(--color-cyan);
.slide-box {
/* set the default align */
text-align: center;

& > * {
/* set the slide width: the default is 80% */
/* width: 100px; */
}
}

/* https://hiroppy.github.io/fusuma/docs/guides/slide-syntax#declaring-section-title */
Expand Down
16 changes: 15 additions & 1 deletion samples/debug/style.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
/* @import '../../packages/client/assets/style/themes/default.css'; */
@import '../../packages/client/assets/style/themes/webpack.css';

@font-face {
font-family: Stratum;
src: url('./assets/StratumNo1.ttf');
}

/* background: #f5f5f5; */
.slide-background {
background: #f5f5f5;
background: var(--background-color);
color: var(--base-color);
}

.slide-box {
Expand All @@ -15,6 +20,15 @@
}
}

h1,
h2 {
color: var(--title-color);
}

a {
color: var(--link-color);
}

.file-loader-font {
font-family: Stratum;
font-size: 2rem;
Expand Down

0 comments on commit da3b7b2

Please sign in to comment.