Template:Box: Difference between revisions

No edit summary
Use variable colors by default
Line 1: Line 1:
<div style="box-shadow: 0 0 0.2em #999999; border-radius: 0.2em; margin: 0.5em 0.5em 1em 0.5em; background: {{{background-content-color|#f8f9fa}}}; {{{style|}}};">
<div style="box-shadow: 0 0 0.2em #999999; border-radius: 0.2em; margin: 0.5em 0.5em 1em 0.5em; background: {{{background-content-color|var(--background-color-base)}}}; {{{style|}}};">
   <!-- Title Box -->
   <!-- Title Box -->
   <div style="background: {{{background-title-color|#eaecf0}}}; border-radius: 0.2em 0.2em 0 0; padding: 0.5em 1em 0.5em 1em; display: flex; align-items: center; {{#if:{{{center|}}}|justify-content: space-between;}}">
   <div style="background: {{{background-title-color|var(--background-color-neutral)}}}; border-radius: 0.2em 0.2em 0 0; padding: 0.5em 1em 0.5em 1em; display: flex; align-items: center; {{#if:{{{center|}}}|justify-content: space-between;}}">
     <!-- Icon -->
     <!-- Icon -->
     {{#if:{{{icon|}}}|<span style="opacity: 0.8; display: flex; align-items: center; margin-right: 0.5em; line-height: 50pxm;">[[File:{{{icon}}}|50px|left|link=|alt=]]</span>&#32;}}
     {{#if:{{{icon|}}}|<span style="opacity: 0.8; display: flex; align-items: center; margin-right: 0.5em; line-height: 50pxm;">[[File:{{{icon}}}|50px|left|link=|alt=]]</span>&#32;}}
     <!-- Title -->
     <!-- Title -->
     <div style="color: {{{title-color|#000000}}}; font-weight: bold; line-height: 50px;"><big>{{{title}}}</big></div>
     <div style="color: {{{title-color|var(--color-base)}}}; font-weight: bold; line-height: 50px;"><big>{{{title}}}</big></div>
     <!-- Link -->
     <!-- Link -->
     {{#if:{{{link|}}}|<div style="float: right; font-size: 0.7em;">[[{{{link}}}|<span style="color: {{{link-color|{{{title-color|#000000}}}}}};">{{{Link-text|{{{link-text|Link}}}}}}</span>]]</div>}}
     {{#if:{{{link|}}}|<div style="float: right; font-size: 0.7em;">[[{{{link}}}|<span style="color: {{{link-color|{{{title-color|var(--color-progressive)}}}}}};">{{{Link-text|{{{link-text|Link}}}}}}</span>]]</div>}}
     <!-- Trailing Icon -->
     <!-- Trailing Icon -->
     {{#if:{{{trailing-icon|}}}|<span style="opacity: 0.8; display: flex; align-items: center; margin-left: 0.5em; line-height: 50px;">[[File:{{{trailing-icon}}}|50px|left|link=|alt=]]</span>&#32;}}
     {{#if:{{{trailing-icon|}}}|<span style="opacity: 0.8; display: flex; align-items: center; margin-left: 0.5em; line-height: 50px;">[[File:{{{trailing-icon}}}|50px|left|link=|alt=]]</span>&#32;}}
   </div>
   </div>
   <!-- Content Box -->
   <!-- Content Box -->
   <div style="padding: 1em; padding-left: 1em;">
   <div style="padding: 1em; padding-left: 1em; color: var(--color-base);">
<!---->{{{content}}}{{clr}}
<!---->{{{content}}}{{clr}}
   </div>
   </div>
Line 49: Line 49:
"title-color": {
"title-color": {
"label": "Title color",
"label": "Title color",
"description": "Hexadecimal color code of the title text.",
"description": "CSS color of the title text.",
"example": "#339966",
"example": "#339966",
"type": "string",
"type": "string",
"default": "#FFFFFF"
"default": "var(--color-base)"
},
},
"style": {
"style": {
Line 61: Line 61:
"link-color": {
"link-color": {
"label": "Link color",
"label": "Link color",
"description": "Hexadecimal color code of the 'Edit' link.",
"description": "CSS color of the 'Edit' link.",
"example": "#339966",
"example": "#339966",
"type": "string",
"type": "string",
"default": "#999999"
"default": "var(--color-progressive)"
},
},
"background-title-color": {
"background-title-color": {
"label": "Title background color",
"label": "Title background color",
"description": "Hexadecimal color code of the title bar background.",
"description": "CSS color of the title bar background.",
"example": "#447FF5",
"example": "#447FF5",
"type": "string",
"type": "string",
"default": "#339966",
"default": "var(--background-color-base)",
"suggested": true
"suggested": true
},
},
"background-content-color": {
"background-content-color": {
"label": "Content background color",
"label": "Content background color",
"description": "Hexadecimal color code of the box content background.",
"description": "CSS color of the box content background.",
"example": "#339966",
"example": "#339966",
"type": "string",
"type": "string",
"default": "#F8F9FA"
"default": "var(--background-color-base)"
},
},
"Link-text": {
"Link-text": {