mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 09:12:39 +00:00
Add preview texture to dropdown options
This commit is contained in:
@@ -139,6 +139,7 @@ const MetadataEditor = createClass({
|
|||||||
return _.map(Themes[renderer], (theme)=>{
|
return _.map(Themes[renderer], (theme)=>{
|
||||||
return <div className='item' key={''} onClick={()=>this.handleTheme(theme)} title={''}>
|
return <div className='item' key={''} onClick={()=>this.handleTheme(theme)} title={''}>
|
||||||
{`${theme.renderer} : ${theme.name}`}
|
{`${theme.renderer} : ${theme.name}`}
|
||||||
|
<img src={`/themes/${theme.renderer}/${theme.path}/dropdownTexture.png`}/>
|
||||||
</div>;
|
</div>;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -87,9 +87,6 @@
|
|||||||
.navDropdownContainer {
|
.navDropdownContainer {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
&:hover {
|
|
||||||
background-color: rgb(187, 187, 187);
|
|
||||||
}
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
font-style:italic;
|
font-style:italic;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
@@ -103,16 +100,30 @@
|
|||||||
i {
|
i {
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
|
&:hover {
|
||||||
|
background-color: @blue;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.navDropdown {
|
.navDropdown {
|
||||||
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
|
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.3);
|
||||||
.item {
|
.item {
|
||||||
padding: 3px 3px;
|
padding: 3px 3px;
|
||||||
border-top: 1px solid rgb(118, 118, 118);
|
border-top: 1px solid rgb(118, 118, 118);
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: white;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: @blue;
|
background-color: @blue;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
img {
|
||||||
|
mask-image: linear-gradient(90deg, transparent, black 20%);
|
||||||
|
-webkit-mask-image: linear-gradient(90deg, transparent, black 20%);
|
||||||
|
position: absolute;
|
||||||
|
right: 0px;
|
||||||
|
top: 0px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ fs.emptyDirSync('./build');
|
|||||||
const themeData = JSON.parse(fs.readFileSync(`./themes/Legacy/${dir}/settings.json`).toString());
|
const themeData = JSON.parse(fs.readFileSync(`./themes/Legacy/${dir}/settings.json`).toString());
|
||||||
themeData.path = dir;
|
themeData.path = dir;
|
||||||
themes.Legacy.push(themeData);
|
themes.Legacy.push(themeData);
|
||||||
|
//fs.copy(`./themes/Legacy/${dir}/dropdownTexture.png`, `./build/themes/Legacy/${dir}/dropdownTexture.png`);
|
||||||
const src = `./themes/Legacy/${dir}/style.less`;
|
const src = `./themes/Legacy/${dir}/style.less`;
|
||||||
((outputDirectory)=>{
|
((outputDirectory)=>{
|
||||||
less.render(fs.readFileSync(src).toString(), {
|
less.render(fs.readFileSync(src).toString(), {
|
||||||
@@ -68,6 +69,7 @@ fs.emptyDirSync('./build');
|
|||||||
const themeData = JSON.parse(fs.readFileSync(`./themes/V3/${dir}/settings.json`).toString());
|
const themeData = JSON.parse(fs.readFileSync(`./themes/V3/${dir}/settings.json`).toString());
|
||||||
themeData.path = dir;
|
themeData.path = dir;
|
||||||
themes.V3.push(themeData);
|
themes.V3.push(themeData);
|
||||||
|
fs.copy(`./themes/V3/${dir}/dropdownTexture.png`, `./build/themes/V3/${dir}/dropdownTexture.png`);
|
||||||
const src = `./themes/V3/${dir}/style.less`;
|
const src = `./themes/V3/${dir}/style.less`;
|
||||||
((outputDirectory)=>{
|
((outputDirectory)=>{
|
||||||
less.render(fs.readFileSync(src).toString(), {
|
less.render(fs.readFileSync(src).toString(), {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 5.9 KiB |
Reference in New Issue
Block a user