Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn the Beta tags in the snippet menus into links #3396

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions client/homebrew/editor/snippetbar/snippetbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,11 @@ const SnippetGroup = createClass({
return <div className='snippet' key={snippet.name} onClick={(e)=>this.handleSnippetClick(e, snippet)}>
<i className={snippet.icon} />
<span className='name'title={snippet.name}>{snippet.name}</span>
{snippet.experimental && <span className='beta'>beta</span>}
{snippet.subsnippets && <>
<i className='fas fa-caret-right'></i>
<div className='dropdown side'>
{this.renderSnippets(snippet.subsnippets)}
</div></>}
{snippet.experimental && <span className='beta'><a href={snippet.experimental.url} target="_blank" rel="noopener noreferrer">beta</a></span>}
<i className='fas fa-caret-right' style={snippet.subsnippets ? null : { visibility : 'hidden' }}></i>
<div className='dropdown side'>
{snippet.subsnippets ? this.renderSnippets(snippet.subsnippets) : null}
</div>
</div>;

});
Expand Down
11 changes: 10 additions & 1 deletion client/homebrew/editor/snippetbar/snippetbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
& ~ i {
margin-right : 0;
margin-left : 5px;
min-width : unset;
}
/* Fonts */
&.font {
Expand Down Expand Up @@ -171,8 +172,16 @@
font-family : monospace;
line-height : 1em;
color : white;
background : grey;
background-color : grey;
border-radius : 12px;
transition: background-color 0.3s ease;
&:hover {
background-color: rgb(190, 190, 190);
transition: background-color 0.3s ease;
}
a, a:visited {
color: inherit;
}
}
&:hover {
background-color : #999999;
Expand Down
2 changes: 1 addition & 1 deletion themes/V3/5ePHB/snippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = [
name : 'Index',
icon : 'fas fa-bars',
gen : indexGen,
experimental : true
experimental : { url: 'https://github.com/naturalcrit/homebrewery/pull/2755' }
}
]
},
Expand Down
95 changes: 46 additions & 49 deletions themes/V3/Blank/snippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,15 @@ module.exports = [
gen : WatercolorGen,
},
{
name : 'Watercolor Center',
icon : 'fac mask-center',
gen : ImageMaskGen.center,
experimental : true,
name : 'Watercolor Center',
icon : 'fac mask-center',
gen : ImageMaskGen.center,
},
{
name : 'Watercolor Edge',
icon : 'fac mask-edge',
gen : ImageMaskGen.edge('bottom'),
experimental : true,
subsnippets : [
name : 'Watercolor Edge',
icon : 'fac mask-edge',
gen : ImageMaskGen.edge('bottom'),
subsnippets : [
{
name : 'Top',
icon : 'fac position-top',
Expand All @@ -199,11 +197,10 @@ module.exports = [
]
},
{
name : 'Watercolor Corner',
icon : 'fac mask-corner',
gen : ImageMaskGen.corner,
experimental : true,
subsnippets : [
name : 'Watercolor Corner',
icon : 'fac mask-corner',
gen : ImageMaskGen.corner,
subsnippets : [
{
name : 'Top-Left',
icon : 'fac position-top-left',
Expand Down Expand Up @@ -307,8 +304,8 @@ module.exports = [
/**************** FONTS *************/
{
groupName : 'Fonts',
icon : 'fas fa-keyboard',
view : 'text',
icon : 'fas fa-keyboard',
view : 'text',
snippets : [
{
name : 'Open Sans',
Expand Down Expand Up @@ -341,59 +338,59 @@ module.exports = [
gen : dedent`{{font-family:MrEavesRemake Dummy Text}}`
},
{
name: 'Solbera Imitation',
icon: 'font SolberaImitationRemake',
gen: dedent`{{font-family:SolberaImitationRemake Dummy Text}}`
name : 'Solbera Imitation',
icon : 'font SolberaImitationRemake',
gen : dedent`{{font-family:SolberaImitationRemake Dummy Text}}`
},
{
name: 'Scaly Sans Small Caps',
icon: 'font ScalySansSmallCapsRemake',
gen: dedent`{{font-family:ScalySansSmallCapsRemake Dummy Text}}`
name : 'Scaly Sans Small Caps',
icon : 'font ScalySansSmallCapsRemake',
gen : dedent`{{font-family:ScalySansSmallCapsRemake Dummy Text}}`
},
{
name: 'Walter Turncoat',
icon: 'font WalterTurncoat',
gen: dedent`{{font-family:WalterTurncoat Dummy Text}}`
name : 'Walter Turncoat',
icon : 'font WalterTurncoat',
gen : dedent`{{font-family:WalterTurncoat Dummy Text}}`
},
{
name: 'Lato',
icon: 'font Lato',
gen: dedent`{{font-family:Lato Dummy Text}}`
name : 'Lato',
icon : 'font Lato',
gen : dedent`{{font-family:Lato Dummy Text}}`
},
{
name: 'Courier',
icon: 'font Courier',
gen: dedent`{{font-family:Courier Dummy Text}}`
name : 'Courier',
icon : 'font Courier',
gen : dedent`{{font-family:Courier Dummy Text}}`
},
{
name: 'Nodesto Caps Condensed',
icon: 'font NodestoCapsCondensed',
gen: dedent`{{font-family:NodestoCapsCondensed Dummy Text}}`
name : 'Nodesto Caps Condensed',
icon : 'font NodestoCapsCondensed',
gen : dedent`{{font-family:NodestoCapsCondensed Dummy Text}}`
},
{
name: 'Overpass',
icon: 'font Overpass',
gen: dedent`{{font-family:Overpass Dummy Text}}`
name : 'Overpass',
icon : 'font Overpass',
gen : dedent`{{font-family:Overpass Dummy Text}}`
},
{
name: 'Davek',
icon: 'font Davek',
gen: dedent`{{font-family:Davek Dummy Text}}`
name : 'Davek',
icon : 'font Davek',
gen : dedent`{{font-family:Davek Dummy Text}}`
},
{
name: 'Iokharic',
icon: 'font Iokharic',
gen: dedent`{{font-family:Iokharic Dummy Text}}`
name : 'Iokharic',
icon : 'font Iokharic',
gen : dedent`{{font-family:Iokharic Dummy Text}}`
},
{
name: 'Rellanic',
icon: 'font Rellanic',
gen: dedent`{{font-family:Rellanic Dummy Text}}`
name : 'Rellanic',
icon : 'font Rellanic',
gen : dedent`{{font-family:Rellanic Dummy Text}}`
},
{
name: 'Times New Roman',
icon: 'font TimesNewRoman',
gen: dedent`{{font-family:"Times New Roman" Dummy Text}}`
name : 'Times New Roman',
icon : 'font TimesNewRoman',
gen : dedent`{{font-family:"Times New Roman" Dummy Text}}`
}
]
},
Expand Down