Skip to content
Snippets Groups Projects
Commit 392cbe93 authored by NGPixel's avatar NGPixel
Browse files

refactor: dev optimizations + improvements

parent 3dc9b925
No related branches found
No related tags found
No related merge requests found
Showing
with 294 additions and 622 deletions
**/node_modules/**
**/*.min.js
assets/**
client/libs/**
coverage/**
repo/**
data/**
......
......@@ -80,7 +80,6 @@ Vue.component('login', () => import(/* webpackMode: "eager" */ './components/log
Vue.component('nav-header', () => import(/* webpackMode: "eager" */ './components/nav-header.vue'))
Vue.component('navigator', () => import(/* webpackMode: "eager" */ './components/navigator.vue'))
Vue.component('setup', () => import(/* webpackChunkName: "setup" */ './components/setup.vue'))
Vue.component('toggle', () => import(/* webpackMode: "eager" */ './components/toggle.vue'))
let bootstrap = () => {
// ====================================
......
......@@ -4,49 +4,71 @@
.pa-3.pt-4
.headline.primary--text Developer Tools
.subheading.grey--text ¯\_(ツ)_/¯
v-tabs(color='grey lighten-4', fixed-tabs, slider-color='primary', show-arrows)
v-tab Graph API Playground
v-tab Graph API Map
v-tab-item(:transition='false', :reverse-transition='false')
v-tabs(v-model='selectedTab', color='grey lighten-4', fixed-tabs, slider-color='primary', show-arrows, @input='tabChanged')
v-tab(key='0') Graph API Playground
v-tab(key='1') Graph API Map
v-tabs-items(v-model='selectedTab')
v-tab-item(key='0', :transition='false', :reverse-transition='false')
#graphiql
v-tab-item(key='1', :transition='false', :reverse-transition='false')
#voyager
</template>
<script>
import React from 'react'
import ReactDOM from 'react-dom'
import GraphiQL from 'graphiql'
import { Voyager } from 'graphql-voyager'
import 'graphiql/graphiql.css'
import 'graphql-voyager/dist/voyager.css'
const fetcher = (qry, respType) => {
return fetch('/graphql', {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(qry),
credentials: 'include'
}).then(response => {
if (respType === 'json') {
return response.json()
} else {
return response.text()
}
}).then(responseBody => {
try {
return JSON.parse(responseBody)
} catch (error) {
return responseBody
}
})
}
export default {
data() {
return {}
return {
selectedTab: '0'
}
},
mounted() {
this.renderGraphiQL()
},
methods: {
tabChanged (tabId) {
switch (tabId) {
case '1':
this.renderVoyager()
break
}
},
renderGraphiQL() {
ReactDOM.render(
React.createElement(GraphiQL, {
fetcher: graphQLParams => {
return fetch('/graphql', {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(graphQLParams),
credentials: 'include'
}).then(function (response) {
return response.text()
}).then(function (responseBody) {
try {
return JSON.parse(responseBody)
} catch (error) {
return responseBody
}
})
},
fetcher: qry => fetcher(qry, 'text'),
query: null,
response: null,
variables: null,
......@@ -55,6 +77,15 @@ export default {
}),
document.getElementById('graphiql')
)
},
renderVoyager() {
ReactDOM.render(
React.createElement(Voyager, {
introspection: qry => fetcher({ query: qry }, 'json'),
workerURI: '/js/voyager.worker.js'
}),
document.getElementById('voyager')
)
}
}
}
......@@ -79,85 +110,9 @@ export default {
background-color: initial;
box-shadow: initial;
}
}
.cm-s-wikijs-dark.CodeMirror {
background: darken(mc('grey','900'), 3%);
color: #e0e0e0;
}
.cm-s-wikijs-dark div.CodeMirror-selected {
background: mc('blue','800');
}
.cm-s-wikijs-dark .cm-matchhighlight {
background: mc('blue','800');
}
.cm-s-wikijs-dark .CodeMirror-line::selection, .cm-s-wikijs-dark .CodeMirror-line > span::selection, .cm-s-wikijs-dark .CodeMirror-line > span > span::selection {
background: mc('red', '500');
}
.cm-s-wikijs-dark .CodeMirror-line::-moz-selection, .cm-s-wikijs-dark .CodeMirror-line > span::-moz-selection, .cm-s-wikijs-dark .CodeMirror-line > span > span::-moz-selection {
background: mc('red', '500');
}
.cm-s-wikijs-dark .CodeMirror-gutters {
background: darken(mc('grey','900'), 6%);
border-right: 1px solid mc('grey','900');
}
.cm-s-wikijs-dark .CodeMirror-guttermarker {
color: #ac4142;
}
.cm-s-wikijs-dark .CodeMirror-guttermarker-subtle {
color: #505050;
}
.cm-s-wikijs-dark .CodeMirror-linenumber {
color: mc('grey','800');
}
.cm-s-wikijs-dark .CodeMirror-cursor {
border-left: 1px solid #b0b0b0;
}
.cm-s-wikijs-dark span.cm-comment {
color: mc('orange','800');
}
.cm-s-wikijs-dark span.cm-atom {
color: #aa759f;
}
.cm-s-wikijs-dark span.cm-number {
color: #aa759f;
}
.cm-s-wikijs-dark span.cm-property, .cm-s-wikijs-dark span.cm-attribute {
color: #90a959;
}
.cm-s-wikijs-dark span.cm-keyword {
color: #ac4142;
}
.cm-s-wikijs-dark span.cm-string {
color: #f4bf75;
}
.cm-s-wikijs-dark span.cm-variable {
color: #90a959;
}
.cm-s-wikijs-dark span.cm-variable-2 {
color: #6a9fb5;
}
.cm-s-wikijs-dark span.cm-def {
color: #d28445;
}
.cm-s-wikijs-dark span.cm-bracket {
color: #e0e0e0;
}
.cm-s-wikijs-dark span.cm-tag {
color: #ac4142;
}
.cm-s-wikijs-dark span.cm-link {
color: #aa759f;
}
.cm-s-wikijs-dark span.cm-error {
background: #ac4142;
color: #b0b0b0;
}
.cm-s-wikijs-dark .CodeMirror-activeline-background {
background: mc('grey','900');
}
.cm-s-wikijs-dark .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}
#voyager {
height: calc(100vh - 250px);
}
</style>
<template lang='pug'>
v-card(flat)
v-card(color='grey lighten-5')
.pa-3.pt-4
.headline.primary--text Editor
.subheading.grey--text Configure the content editor
v-tabs(color='grey lighten-4', fixed-tabs, slider-color='primary', show-arrows)
v-tab(key='settings'): v-icon settings
v-tab(key='code') Markdown
v-tab-item(key='settings', :transition='false', :reverse-transition='false')
v-card.pa-3
v-form
v-radio-group(v-model='selectedEditor')
v-radio(v-for='(editor, n) in editors', :key='n', :label='editor.text', :value='editor.value', color='primary')
v-divider
v-btn(color='primary')
v-icon(left) chevron_right
| Set Editor
v-btn(icon)
v-icon.grey--text refresh
v-tab-item(key='code', :transition='false', :reverse-transition='false')
v-card.pa-3
v-form
v-subheader Editor Configuration
.body-1 This editor has no configuration options you can modify.
</template>
<script>
export default {
data() {
return {
editors: [
{ text: 'Markdown (default)', value: 'code' }
],
selectedEditor: 'code'
}
}
}
</script>
<style lang='scss'>
</style>
<template lang='pug'>
v-card(flat)
v-card(flat, color='grey lighten-5').pa-3.pt-4
.headline.blue--text.text--darken-2 Groups
.subheading.grey--text Manage groups
v-card
v-card-title
v-btn(color='primary', dark)
v-icon(left) add
| New Group
v-btn(icon)
v-icon.grey--text refresh
v-spacer
v-text-field(append-icon='search', label='Search', single-line, hide-details, v-model='search')
v-data-table(
v-model='selected'
:items='items',
:headers='headers',
:search='search',
:pagination.sync='pagination',
:rows-per-page-items='[15]'
select-all,
hide-actions,
disable-initial-sort
)
template(slot='headers', slot-scope='props')
tr
th(width='50')
th.text-xs-right(
width='80'
:class='[`column sortable`, pagination.descending ? `desc` : `asc`, pagination.sortBy === `id` ? `active` : ``]'
@click='changeSort(`id`)'
)
v-icon(small) arrow_upward
| ID
th.text-xs-left(
v-for='header in props.headers'
:key='header.text'
:width='header.width'
:class='[`column sortable`, pagination.descending ? `desc` : `asc`, header.value === pagination.sortBy ? `active` : ``]'
@click='changeSort(header.value)'
)
| {{ header.text }}
v-icon(small) arrow_upward
template(slot='items', slot-scope='props')
tr(:active='props.selected')
td
v-checkbox(hide-details, :input-value='props.selected', color='blue darken-2', @click='props.selected = !props.selected')
td.text-xs-right {{ props.item.id }}
td {{ props.item.name }}
td {{ props.item.userCount }}
td: v-btn(icon): v-icon.grey--text.text--darken-1 more_horiz
template(slot='no-data')
v-alert(icon='warning', :value='true') No users to display!
.text-xs-center.py-2(v-if='items.length > 15')
v-pagination(v-model='pagination.page', :length='pages')
</template>
<script>
export default {
data() {
return {
selected: [],
pagination: {},
items: [
{ id: 1, name: 'Administrators', userCount: 1 },
{ id: 2, name: 'Users', userCount: 23 }
],
headers: [
{ text: 'Name', value: 'name' },
{ text: 'Users', value: 'userCount', width: 200 },
{ text: '', value: 'actions', sortable: false, width: 50 }
],
search: ''
}
},
computed: {
pages () {
if (this.pagination.rowsPerPage == null || this.pagination.totalItems == null) {
return 0
}
return Math.ceil(this.pagination.totalItems / this.pagination.rowsPerPage)
}
},
methods: {
changeSort (column) {
if (this.pagination.sortBy === column) {
this.pagination.descending = !this.pagination.descending
} else {
this.pagination.sortBy = column
this.pagination.descending = false
}
},
toggleAll () {
if (this.selected.length) {
this.selected = []
} else {
this.selected = this.items.slice()
}
}
}
}
</script>
<style lang='scss'>
</style>
<template lang='pug'>
v-container(fluid, fill-height)
v-layout(row wrap)
v-flex(xs12)
.headline.primary--text Content Rendering
.subheading.grey--text Configure how content is rendered
</template>
<script>
export default {
data() {
return {}
}
}
</script>
<style lang='scss'>
</style>
<template lang='pug'>
v-container(fluid, fill-height)
v-layout(row wrap)
v-flex(xs12)
.headline.primary--text Statistics
.subheading.grey--text Useful information about your wiki
</template>
<script>
export default {
data() {
return {}
}
}
</script>
<style lang='scss'>
</style>
......@@ -82,9 +82,13 @@ const router = new VueRouter({
{ path: '/dashboard', component: () => import(/* webpackChunkName: "admin" */ './admin-dashboard.vue') },
{ path: '/general', component: () => import(/* webpackChunkName: "admin" */ './admin-general.vue') },
{ path: '/locale', component: () => import(/* webpackChunkName: "admin" */ './admin-locale.vue') },
{ path: '/stats', component: () => import(/* webpackChunkName: "admin" */ './admin-stats.vue') },
{ path: '/theme', component: () => import(/* webpackChunkName: "admin" */ './admin-theme.vue') },
{ path: '/groups', component: () => import(/* webpackChunkName: "admin" */ './admin-groups.vue') },
{ path: '/users', component: () => import(/* webpackChunkName: "admin" */ './admin-users.vue') },
{ path: '/auth', component: () => import(/* webpackChunkName: "admin" */ './admin-auth.vue') },
{ path: '/rendering', component: () => import(/* webpackChunkName: "admin" */ './admin-rendering.vue') },
{ path: '/editor', component: () => import(/* webpackChunkName: "admin" */ './admin-editor.vue') },
{ path: '/logging', component: () => import(/* webpackChunkName: "admin" */ './admin-logging.vue') },
{ path: '/search', component: () => import(/* webpackChunkName: "admin" */ './admin-search.vue') },
{ path: '/storage', component: () => import(/* webpackChunkName: "admin" */ './admin-storage.vue') },
......
<template lang="pug">
.login(:class='{ "is-error": error }')
.login-container(:class='{ "is-expanded": strategies.length > 1, "is-loading": isLoading }')
.login-providers(v-show='strategies.length > 1')
button(v-for='strategy in strategies', :class='{ "is-active": strategy.key === selectedStrategy }', @click='selectStrategy(strategy.key, strategy.useForm)', :title='strategy.title')
em(v-html='strategy.icon')
span {{ strategy.title }}
.login-providers-fill
.login-frame(v-show='screen === "login"')
h1 {{ siteTitle }}
h2 {{ $t('auth:loginRequired') }}
input(type='text', ref='iptEmail', v-model='username', :placeholder='$t("auth:fields.emailUser")')
input(type='password', ref='iptPassword', v-model='password', :placeholder='$t("auth:fields.password")', @keyup.enter='login')
button.button.is-blue.is-fullwidth(@click='login')
span {{ $t('auth:actions.login') }}
.login-frame(v-show='screen === "tfa"')
.login-frame-icon
svg.icons.is-48(role='img')
title {{ $t('auth:tfa.title') }}
use(xlink:href='#nc-key')
h2 {{ $t('auth:tfa.subtitle') }}
input(type='text', ref='iptTFA', v-model='securityCode', :placeholder='$t("auth:tfa.placeholder")', @keyup.enter='verifySecurityCode')
button.button.is-blue.is-fullwidth(@click='verifySecurityCode')
span {{ $t('auth:tfa.verifyToken') }}
.login-copyright
span {{ $t('footer.poweredBy') }}
a(href='https://wiki.js.org', rel='external', title='Wiki.js') Wiki.js
v-app
.login(:class='{ "is-error": error }')
.login-container(:class='{ "is-expanded": strategies.length > 1, "is-loading": isLoading }')
.login-providers(v-show='strategies.length > 1')
button(v-for='strategy in strategies', :class='{ "is-active": strategy.key === selectedStrategy }', @click='selectStrategy(strategy.key, strategy.useForm)', :title='strategy.title')
em(v-html='strategy.icon')
span {{ strategy.title }}
.login-providers-fill
.login-frame(v-show='screen === "login"')
h1.text-xs-center.display-1 {{ siteTitle }}
h2.text-xs-center.subheading {{ $t('auth:loginRequired') }}
v-text-field(solo, ref='iptEmail', v-model='username', :placeholder='$t("auth:fields.emailUser")')
v-text-field.mt-2(
solo,
ref='iptPassword',
v-model='password',
:append-icon='hidePassword ? "visibility" : "visibility_off"',
:append-icon-cb='() => (hidePassword = !hidePassword)',
:type='hidePassword ? "password" : "text"',
:placeholder='$t("auth:fields.password")',
@keyup.enter='login'
)
v-btn.mt-3(block, large, color='primary', @click='login') {{ $t('auth:actions.login') }}
.login-frame(v-show='screen === "tfa"')
.login-frame-icon
svg.icons.is-48(role='img')
title {{ $t('auth:tfa.title') }}
use(xlink:href='#nc-key')
h2 {{ $t('auth:tfa.subtitle') }}
input(type='text', ref='iptTFA', v-model='securityCode', :placeholder='$t("auth:tfa.placeholder")', @keyup.enter='verifySecurityCode')
button.button.is-blue.is-fullwidth(@click='verifySecurityCode')
span {{ $t('auth:tfa.verifyToken') }}
.login-copyright
span {{ $t('footer.poweredBy') }}
a(href='https://wiki.js.org', rel='external', title='Wiki.js') Wiki.js
</template>
<script>
......@@ -41,6 +50,7 @@ export default {
screen: 'login',
username: '',
password: '',
hidePassword: true,
securityCode: '',
loginToken: '',
isLoading: false
......@@ -408,10 +418,7 @@ export default {
width: 400px;
padding: 1rem;
color: mc('grey', '700');
display: flex;
justify-content: center;
flex-direction: column;
text-align: center;
display: block;
@include until($tablet) {
width: 100%;
......@@ -421,7 +428,7 @@ export default {
h1 {
font-size: 2rem;
font-weight: 600;
font-weight: 400;
color: mc('light-blue', '700');
text-shadow: 1px 1px 0 #FFF;
padding: 0;
......@@ -436,47 +443,6 @@ export default {
padding: 0;
margin: 0 0 25px 0;
}
form {
display: flex;
flex-direction: column;
}
input[type=text], input[type=password] {
width: 100%;
border: 1px solid rgba(mc('blue-grey','500'), .5);
border-radius: 3px;
background-color: rgba(255,255,255,.9);
box-shadow: inset 0 0 0 3px rgba(255,255,255, .25);
padding: 0 15px;
height: 40px;
margin: 0 0 10px 0;
color: mc('grey', '700');
font-weight: 600;
font-size: .8rem;
transition: all 0.4s ease;
text-align: center;
&:focus {
outline: none;
border-color: mc('light-blue','500');
background-color: rgba(255,255,255,1);
box-shadow: inset 0 0 8px rgba(mc('light-blue','500'), .5);
color: mc('light-blue', '800');
}
}
.button {
background-image: linear-gradient(to bottom, mc('blue', '400') 0%, mc('blue', '600') 50%, mc('blue', '700') 100%);
background-repeat: no-repeat;
background-size: 100% 200%;
&:hover {
background-position-y: 100%;
}
}
}
&-tfa {
......
<template lang="pug">
.toggle(:class='{ "is-active": value }', @click='changeToggle')
.toggle-container
.toggle-pin
.toggle-text {{ desc }}
</template>
<script>
export default {
name: 'toggle',
props: ['value', 'desc'],
data () {
return { }
},
methods: {
changeToggle() {
this.$emit('input', !this.value)
}
}
}
</script>
......@@ -4,20 +4,15 @@
@import "base/base";
@import 'base/icons';
@import "../libs/animate/animate";
// @import "../libs/animate/animate";
@import 'components/button';
@import 'components/markdown-content';
@import 'components/navigator';
@import 'components/toggle';
@import 'components/typography';
// @import '../libs/twemoji/twemoji-awesome';
@import '../libs/prism/prism.css';
// @import 'node_modules/diff2html/dist/diff2html.min';
@import 'node_modules/graphiql/graphiql';
@import 'pages/welcome';
@import 'layout/_rtl';
......
......@@ -42,15 +42,6 @@ .is-hidden {
display: none !important;
}
.is-hidden-until-scroll {
max-height: 0;
overflow: hidden;
transition: all .6s ease;
}
.is-sticky .is-hidden-until-scroll {
max-height: 30px;
}
.is-hidden-mobile {
@include mobile {
display: none !important;
......
......@@ -325,27 +325,3 @@ @function material-color($color-name, $color-variant: '500') {
@function mc($color-name, $color-variant: '500') {
@return material-color($color-name, $color-variant);
}
@mixin md-elevation-0 {
box-shadow: none !important;
}
@mixin md-elevation-1 {
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
}
@mixin md-elevation-2 {
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}
@mixin md-elevation-3 {
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.3);
}
@mixin md-elevation-4 {
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.3);
}
@mixin md-elevation-5 {
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.3);
}
\ No newline at end of file
.button {
background-color: mc('orange','600');
color: #FFF;
border: 1px solid mc('orange','700');
border-radius: 3px;
display: inline-flex;
height: 40px;
align-items: center;
padding: 0 15px;
font-size: 13px;
font-weight: 600;
font-family: $core-font-standard;
margin: 0;
transition: all .4s ease;
cursor: pointer;
text-decoration: none;
text-transform: uppercase;
span {
font-weight: 600;
display: inline-flex;
align-items: center;
line-height: 14px;
height: 14px;
}
i {
margin-right: 8px;
font-size: 14px;
line-height: 14px;
height: 14px;
}
&:focus {
outline: none;
border-color: #FFF;
}
&:hover {
background-color: mc('orange','800');
text-decoration: none;
}
@each $color, $colorvalue in $material-colors {
&.is-#{$color} {
background-color: mc($color, '600');
border-color: mc($color,'700');
color: #FFF;
&.is-outlined {
background-color: #FFF;
color: mc($color,'700');
}
&.is-inverted {
background-color: rgba(mc($color, '800'), 0);
border-color: mc($color, '500');
}
&:hover {
background-color: mc($color,'800');
color: #FFF;
animation: none;
}
&:focus {
box-shadow: inset 0 0 0 3px rgba(255,255,255, .4);
}
}
}
&.is-icon-only {
i {
margin-right: 0;
}
}
&.is-featured {
animation: btnInvertedPulse .6s ease alternate infinite;
}
&.is-fullwidth {
width: 100%;
text-align: center;
justify-content: center;
}
&.is-disabled, &:disabled {
background-color: mc('grey', '300');
border: 1px solid mc('grey','400');
color: mc('grey', '500');
cursor: default;
transition: none;
&:hover {
background-color: mc('grey', '300') !important;
color: mc('grey', '500') !important;
}
}
&.is-small {
height: 30px;
}
}
.button-group {
.button {
border-radius: 0;
margin-left: 1px;
&:first-child {
margin-left: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
&:last-child {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
}
}
@include keyframes(btnInvertedPulse) {
0% {
background-color: rgba(mc('grey', '500'), 0);
}
100% {
background-color: rgba(mc('grey', '500'), 0.25);
}
}
.panel-aside {
background-color: mc('blue-grey', '800');
border: 1px solid mc('blue-grey', '800');
border-bottom-left-radius: 8px;
padding: 20px;
color: mc('blue-grey','100');
label {
color: #FFF;
}
}
.panel {
background-color: #FFF;
box-shadow: 0 0 12px 0 rgba(mc('grey','800'), .10), 1px 6px 8px 0 rgba(mc('grey','800'), .10);
padding: 0 0 1px 0;
border-radius: 4px;
.panel-title {
border-bottom: 1px solid darken($color-bg, 5%);
padding: 0 15px;
color: $color-text;
font-size: 16px;
font-weight: 500;
display: flex;
align-items: center;
justify-content: space-between;
height: 40px;
&.is-featured {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
background-color: mc('blue', '700');
background-image: linear-gradient(to bottom, mc('blue', '700') 0%, mc('blue', '800') 100%);
border-bottom-color: mc('blue', '900');
box-shadow: inset 0 0 0 1px mc('blue', '600'), inset 0 0 0px 2px rgba(mc('blue', '800'), .5);
color: #FFF;
> i::before {
@include spinner(#FFF, 0.4s, 18px);
}
}
& + .panel-content {
box-shadow: inset 0 0 0 1px #FFF, inset 0 30px 80px -25px mc('blue', '100');
}
> span {
font-weight: 500;
}
> i {
display: flex;
width: 18px;
align-items: center;
&::before {
content: " ";
@include spinner(mc($primary,'500'), 0.4s, 18px);
}
}
}
.panel-content {
padding: 0 15px;
&.is-text {
padding: 25px;
p + p, p + h3 {
margin-top: 25px;
}
h3 {
margin-bottom: 15px;
font-weight: 500;
}
ul li {
color: mc('grey', '700');
}
strong {
font-weight: 500;
color: mc($primary,'800');
}
}
}
.panel-footer {
display: flex;
align-items: center;
justify-content: flex-end;
height: 50px;
background-color: $color-bg;
padding: 0 15px;
margin: 0 1px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
position: relative;
.button + .button {
margin-left: 10px;
}
}
+ .panel {
margin-top: 25px;
}
}
.toggle {
display: inline-flex;
align-items: center;
height: 24px;
cursor: pointer;
margin: 5px 5px 5px 0;
& + & {
margin-left: 15px;
}
&-container {
display: inline-flex;
align-items: center;
height: 24px;
width: 50px;
background-color: mc('blue-grey', '200');
border-radius: 12px;
padding: 2px;
transition: background-color .5s ease;
}
&-pin {
display: flex;
background-color: #FFF;
border-radius:10px;
height: 20px;
width: 20px;
transition: all .5s ease;
}
&-text {
padding-left: 10px;
color: mc('grey', '700');
font-size: 12px;
}
&:hover {
.toggle-container {
background-color: mc('grey', '400');
}
}
&.is-active {
.toggle-container {
background-color: mc('indigo', '500');
}
.toggle-pin {
margin-left: 28px;
}
}
}
/* THEME OVERRIDE - START */
@each $color, $colorvalue in $material-colors {
.is-primary-#{$color} .toggle {
&.is-active {
.toggle-container {
background-color: mc($color, '500');
}
}
}
}
/* THEME OVERRIDE - END */
h1 {
font-size: 28px;
}
h2 {
font-size: 18px;
}
h3 {
font-size: 16px;
}
@each $color, $colorvalue in $material-colors {
i.is-#{$color} {
color: mc($color, '600');
}
}
\ No newline at end of file
@charset "utf-8";
$primary: 'indigo';
@import "base/variables";
@import "base/colors";
@import "base/reset";
@import "base/mixins";
@import "base/fonts";
@import "base/base";
@import "libs/animate";
@import 'components/button';
@import 'components/grid';
@import 'components/typography';
@import 'pages/error';
module.exports = {
plugins: {
'autoprefixer': {},
'cssnano': {
preset: ['default', {
discardComments: {
removeAll: true
}
}]
},
'postcss-flexbugs-fixes': {},
'postcss-flexibility': {}
}
}
{
"disallowDuplicateAttributes": true,
"disallowIdAttributeWithStaticValue": true,
"disallowMultipleLineBreaks": true,
"requireClassLiteralsBeforeAttributes": true,
"requireIdLiteralsBeforeAttributes": true,
"requireLineFeedAtFileEnd": true,
"requireLowerCaseAttributes": true,
"requireLowerCaseTags": true,
"requireSpaceAfterCodeOperator": true,
"requireStrictEqualityOperators": true,
"validateAttributeQuoteMarks": "'",
"validateAttributeSeparator": ", ",
"validateDivTags": true,
"validateIndentation": 2
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment