Merge branch 'themes-3-1' into shigusegubu-themes3
This commit is contained in:
commit
41add4fc6a
20 changed files with 30 additions and 223 deletions
1
changelog.d/weight-loss.change
Normal file
1
changelog.d/weight-loss.change
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Reduced time taken processing theme by half
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
export default {
|
|
||||||
name: 'Attachment',
|
|
||||||
selector: '.Attachment',
|
|
||||||
notEditable: true,
|
|
||||||
validInnerComponents: [
|
|
||||||
'Border',
|
|
||||||
'Button',
|
|
||||||
'Input'
|
|
||||||
],
|
|
||||||
defaultRules: [
|
|
||||||
{
|
|
||||||
directives: {
|
|
||||||
roundness: 3
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Button',
|
|
||||||
parent: {
|
|
||||||
component: 'Attachment'
|
|
||||||
},
|
|
||||||
directives: {
|
|
||||||
background: '#FFFFFF',
|
|
||||||
opacity: 0.5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -8,9 +8,6 @@ export default {
|
||||||
'Text',
|
'Text',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
|
||||||
'RichContent',
|
|
||||||
'Attachment',
|
|
||||||
'PollGraph'
|
'PollGraph'
|
||||||
],
|
],
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
export default {
|
|
||||||
name: 'ListItem',
|
|
||||||
selector: '.list-item',
|
|
||||||
states: {
|
|
||||||
active: '.-active',
|
|
||||||
hover: ':is(:hover, :focus-visible, :has(:focus-visible)):not(.-non-interactive)'
|
|
||||||
},
|
|
||||||
validInnerComponents: [
|
|
||||||
'Text',
|
|
||||||
'Link',
|
|
||||||
'Icon',
|
|
||||||
'Border',
|
|
||||||
'Button',
|
|
||||||
'ButtonUnstyled',
|
|
||||||
'RichContent',
|
|
||||||
'Input',
|
|
||||||
'Avatar'
|
|
||||||
],
|
|
||||||
defaultRules: [
|
|
||||||
{
|
|
||||||
directives: {
|
|
||||||
background: '--bg',
|
|
||||||
opacity: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
state: ['active'],
|
|
||||||
directives: {
|
|
||||||
background: '--inheritedBackground, 10',
|
|
||||||
opacity: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
state: ['hover'],
|
|
||||||
directives: {
|
|
||||||
background: '--inheritedBackground, 10',
|
|
||||||
opacity: 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
state: ['hover', 'active'],
|
|
||||||
directives: {
|
|
||||||
background: '--inheritedBackground, 20',
|
|
||||||
opacity: 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -4,11 +4,7 @@ export default {
|
||||||
validInnerComponents: [
|
validInnerComponents: [
|
||||||
'Text',
|
'Text',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Input',
|
'Border'
|
||||||
'Border',
|
|
||||||
'ButtonUnstyled',
|
|
||||||
'Badge',
|
|
||||||
'Avatar'
|
|
||||||
],
|
],
|
||||||
states: {
|
states: {
|
||||||
hover: ':is(:hover, :focus-visible, :has(:focus-visible)):not(.disabled)',
|
hover: ':is(:hover, :focus-visible, :has(:focus-visible)):not(.disabled)',
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,7 @@ export default {
|
||||||
name: 'MobileDrawer',
|
name: 'MobileDrawer',
|
||||||
selector: '.mobile-drawer',
|
selector: '.mobile-drawer',
|
||||||
validInnerComponents: [
|
validInnerComponents: [
|
||||||
'Text',
|
'MenuItem'
|
||||||
'Link',
|
|
||||||
'Icon',
|
|
||||||
'Border',
|
|
||||||
'Button',
|
|
||||||
'ButtonUnstyled',
|
|
||||||
'Input',
|
|
||||||
'PanelHeader',
|
|
||||||
'MenuItem',
|
|
||||||
'Notification',
|
|
||||||
'Alert',
|
|
||||||
'UserCard'
|
|
||||||
],
|
],
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
{
|
{
|
||||||
|
|
@ -21,21 +10,6 @@ export default {
|
||||||
background: '--bg',
|
background: '--bg',
|
||||||
backgroundNoCssColor: 'yes'
|
backgroundNoCssColor: 'yes'
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'PanelHeader',
|
|
||||||
parent: { component: 'MobileDrawer' },
|
|
||||||
directives: {
|
|
||||||
background: '--fg',
|
|
||||||
shadow: [{
|
|
||||||
x: 0,
|
|
||||||
y: 0,
|
|
||||||
blur: 4,
|
|
||||||
spread: 0,
|
|
||||||
color: '#000000',
|
|
||||||
alpha: 0.6
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,7 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
|
||||||
'ButtonUnstyled',
|
|
||||||
'RichContent',
|
|
||||||
'Input',
|
|
||||||
'Avatar',
|
'Avatar',
|
||||||
'Attachment',
|
|
||||||
'PollGraph'
|
'PollGraph'
|
||||||
],
|
],
|
||||||
defaultRules: []
|
defaultRules: []
|
||||||
|
|
|
||||||
|
|
@ -6,29 +6,17 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
|
||||||
'ButtonUnstyled',
|
|
||||||
'Input',
|
|
||||||
'PanelHeader',
|
'PanelHeader',
|
||||||
'MenuItem',
|
|
||||||
'Post',
|
'Post',
|
||||||
'Notification',
|
'Notification',
|
||||||
'Alert',
|
'MenuItem'
|
||||||
'UserCard',
|
|
||||||
'Chat',
|
|
||||||
'Attachment',
|
|
||||||
'Tab',
|
|
||||||
'ListItem'
|
|
||||||
],
|
],
|
||||||
validInnerComponentsLite: [
|
validInnerComponentsLite: [
|
||||||
'Text',
|
'Text',
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
'PanelHeader'
|
||||||
'Input',
|
|
||||||
'PanelHeader',
|
|
||||||
'Alert'
|
|
||||||
],
|
],
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,7 @@ export default {
|
||||||
'Icon',
|
'Icon',
|
||||||
'Button',
|
'Button',
|
||||||
'ButtonUnstyled',
|
'ButtonUnstyled',
|
||||||
'Badge',
|
'Alert'
|
||||||
'Alert',
|
|
||||||
'Avatar'
|
|
||||||
],
|
],
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,7 @@ export default {
|
||||||
modal: '.modal'
|
modal: '.modal'
|
||||||
},
|
},
|
||||||
validInnerComponents: [
|
validInnerComponents: [
|
||||||
'Text',
|
'MenuItem'
|
||||||
'Link',
|
|
||||||
'Icon',
|
|
||||||
'Border',
|
|
||||||
'Button',
|
|
||||||
'ButtonUnstyled',
|
|
||||||
'Input',
|
|
||||||
'MenuItem',
|
|
||||||
'Post',
|
|
||||||
'UserCard'
|
|
||||||
],
|
],
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
font-family: var(--font);
|
font-family: var(--font);
|
||||||
|
|
||||||
&.-faint {
|
&.-faint {
|
||||||
|
color: var(--text);
|
||||||
/* stylelint-disable declaration-no-important */
|
/* stylelint-disable declaration-no-important */
|
||||||
--text: var(--textFaint) !important;
|
--text: var(--textFaint) !important;
|
||||||
--link: var(--linkFaint) !important;
|
--link: var(--linkFaint) !important;
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
export default {
|
|
||||||
name: 'RichContent',
|
|
||||||
selector: '.RichContent',
|
|
||||||
notEditable: true,
|
|
||||||
transparent: true,
|
|
||||||
validInnerComponents: [
|
|
||||||
'Text',
|
|
||||||
'FunText',
|
|
||||||
'Link'
|
|
||||||
],
|
|
||||||
defaultRules: [
|
|
||||||
{
|
|
||||||
directives: {
|
|
||||||
'--font': 'generic | inherit',
|
|
||||||
'--monoFont': 'generic | monospace',
|
|
||||||
textNoCssColor: 'yes'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -9,23 +9,9 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
|
||||||
'ButtonUnstyled',
|
|
||||||
'RichContent',
|
|
||||||
'Input',
|
|
||||||
'Avatar',
|
'Avatar',
|
||||||
'Attachment',
|
|
||||||
'PollGraph'
|
'PollGraph'
|
||||||
],
|
],
|
||||||
validInnerComponentsLite: [
|
|
||||||
'Text',
|
|
||||||
'Link',
|
|
||||||
'Icon',
|
|
||||||
'Border',
|
|
||||||
'ButtonUnstyled',
|
|
||||||
'RichContent',
|
|
||||||
'Avatar'
|
|
||||||
],
|
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
{
|
{
|
||||||
directives: {
|
directives: {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Text',
|
'Text',
|
||||||
'Icon',
|
'Icon',
|
||||||
|
// Optimization: don't put heavy components unless needed
|
||||||
'Button',
|
'Button',
|
||||||
'ButtonUnstyled',
|
'ButtonUnstyled',
|
||||||
'Input',
|
'Input',
|
||||||
|
|
|
||||||
|
|
@ -111,15 +111,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner-overlay,
|
.header-overlay {
|
||||||
.banner-image {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
right: -1.2em;
|
right: -1.2em;
|
||||||
left: -1.2em;
|
left: -1.2em;
|
||||||
top: -1.4em;
|
top: -1.4em;
|
||||||
padding: 0;
|
|
||||||
mask: linear-gradient(to top, transparent 0, white 5em) bottom no-repeat;
|
mask: linear-gradient(to top, transparent 0, white 5em) bottom no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner-overlay,
|
||||||
|
.banner-image {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
padding: 0;
|
||||||
border-top-left-radius: calc(var(--roundness) - 1px);
|
border-top-left-radius: calc(var(--roundness) - 1px);
|
||||||
border-top-right-radius: calc(var(--roundness) - 1px);
|
border-top-right-radius: calc(var(--roundness) - 1px);
|
||||||
}
|
}
|
||||||
|
|
@ -136,6 +141,7 @@
|
||||||
|
|
||||||
.banner-overlay {
|
.banner-overlay {
|
||||||
background-color: var(--profileTint);
|
background-color: var(--profileTint);
|
||||||
|
opacity: 0.5;
|
||||||
pointer-events: none; // let user copy bg url
|
pointer-events: none; // let user copy bg url
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,40 +2,10 @@ export default {
|
||||||
name: 'UserCard',
|
name: 'UserCard',
|
||||||
selector: '.user-card',
|
selector: '.user-card',
|
||||||
notEditable: true,
|
notEditable: true,
|
||||||
validInnerComponents: [
|
|
||||||
'Text',
|
|
||||||
'Link',
|
|
||||||
'Icon',
|
|
||||||
'Button',
|
|
||||||
'ButtonUnstyled',
|
|
||||||
'Input',
|
|
||||||
'RichContent',
|
|
||||||
'Alert'
|
|
||||||
],
|
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
{
|
{
|
||||||
directives: {
|
directives: {
|
||||||
background: '--bg',
|
'--profileTint': 'color | $alpha(--background 1)'
|
||||||
opacity: 0,
|
|
||||||
roundness: 3,
|
|
||||||
shadow: [{
|
|
||||||
x: 1,
|
|
||||||
y: 1,
|
|
||||||
blur: 4,
|
|
||||||
spread: 0,
|
|
||||||
color: '#000000',
|
|
||||||
alpha: 0.6
|
|
||||||
}],
|
|
||||||
'--profileTint': 'color | $alpha(--background 0.5)'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
parent: {
|
|
||||||
component: 'UserCard'
|
|
||||||
},
|
|
||||||
component: 'RichContent',
|
|
||||||
directives: {
|
|
||||||
opacity: 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,18 @@
|
||||||
<div class="user-card-inner">
|
<div class="user-card-inner">
|
||||||
<div class="user-info">
|
<div class="user-info">
|
||||||
<div class="user-identity">
|
<div class="user-identity">
|
||||||
<div class="banner-image">
|
<div class="header-overlay">
|
||||||
<img
|
<div class="banner-image">
|
||||||
:src="bannerImgSrc"
|
<img
|
||||||
|
:src="bannerImgSrc"
|
||||||
|
:class="{ 'hide-bio': hideBio }"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="banner-overlay"
|
||||||
:class="{ 'hide-bio': hideBio }"
|
:class="{ 'hide-bio': hideBio }"
|
||||||
>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
|
||||||
class="banner-overlay"
|
|
||||||
:class="{ 'hide-bio': hideBio }"
|
|
||||||
/>
|
|
||||||
<a
|
<a
|
||||||
v-if="avatarAction === 'zoom'"
|
v-if="avatarAction === 'zoom'"
|
||||||
class="user-info-avatar -link"
|
class="user-info-avatar -link"
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ export const generateTheme = (inputRuleset, callbacks, debug) => {
|
||||||
|
|
||||||
const themes3 = init({
|
const themes3 = init({
|
||||||
inputRuleset,
|
inputRuleset,
|
||||||
debug
|
debug: true
|
||||||
})
|
})
|
||||||
|
|
||||||
getCssRules(themes3.eager, debug).forEach(rule => {
|
getCssRules(themes3.eager, debug).forEach(rule => {
|
||||||
|
|
|
||||||
|
|
@ -244,9 +244,6 @@ export const convertTheme2To3 = (data) => {
|
||||||
case 'tooltip':
|
case 'tooltip':
|
||||||
rule.component = 'Popover'
|
rule.component = 'Popover'
|
||||||
break
|
break
|
||||||
case 'attachment':
|
|
||||||
rule.component = 'Attachment'
|
|
||||||
break
|
|
||||||
case 'ChatMessage':
|
case 'ChatMessage':
|
||||||
rule.component = 'Button'
|
rule.component = 'Button'
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ const components = {
|
||||||
Icon: null,
|
Icon: null,
|
||||||
Border: null,
|
Border: null,
|
||||||
PanelHeader: null,
|
PanelHeader: null,
|
||||||
Attachment: null,
|
|
||||||
Panel: null,
|
Panel: null,
|
||||||
Chat: null,
|
Chat: null,
|
||||||
ChatMessage: null,
|
ChatMessage: null,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue