0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-07 01:12:44 +00:00

Merge pull request #3203 from 5e-Cleric/font-snippets

fonts as snippets
This commit is contained in:
Trevor Buckner
2024-01-12 11:48:26 -05:00
committed by GitHub
3 changed files with 185 additions and 64 deletions

View File

@@ -232,7 +232,7 @@ const SnippetGroup = createClass({
return _.map(snippets, (snippet)=>{ return _.map(snippets, (snippet)=>{
return <div className='snippet' key={snippet.name} onClick={(e)=>this.handleSnippetClick(e, snippet)}> return <div className='snippet' key={snippet.name} onClick={(e)=>this.handleSnippetClick(e, snippet)}>
<i className={snippet.icon} /> <i className={snippet.icon} />
<span className='name'>{snippet.name}</span> <span className='name'title={snippet.name}>{snippet.name}</span>
{snippet.experimental && <span className='beta'>beta</span>} {snippet.experimental && <span className='beta'>beta</span>}
{snippet.subsnippets && <> {snippet.subsnippets && <>
<i className='fas fa-caret-right'></i> <i className='fas fa-caret-right'></i>

View File

@@ -1,4 +1,6 @@
@import (less) './client/icons/customIcons.less'; @import (less) './client/icons/customIcons.less';
@import (less) '././././themes/fonts/5e/fonts.less';
.snippetBar{ .snippetBar{
@menuHeight : 25px; @menuHeight : 25px;
position : relative; position : relative;
@@ -144,6 +146,32 @@
margin-right: 0; margin-right: 0;
margin-left: 5px; margin-left: 5px;
} }
/* Fonts */
&.font {
height:auto;
&::before {
content:'F';
font-size:1.4em;
}
&.OpenSans {font-family: 'OpenSans';}
&.CodeBold {font-family: 'CodeBold';}
&.CodeLight {font-family: 'CodeLight';}
&.ScalySansRemake {font-family: 'ScalySansRemake';}
&.BookInsanityRemake {font-family: 'BookInsanityRemake';}
&.MrEavesRemake {font-family: 'MrEavesRemake';}
&.SolberaImitationRemake {font-family: 'SolberaImitationRemake';}
&.ScalySansSmallCapsRemake {font-family: 'ScalySansSmallCapsRemake';}
&.WalterTurncoat {font-family: 'WalterTurncoat';}
&.Lato {font-family: 'Lato';}
&.Courier {font-family: 'Courier';}
&.NodestoCapsCondensed {font-family: 'NodestoCapsCondensed';}
&.Overpass {font-family: 'Overpass';}
&.Davek {font-family: 'Davek';}
&.Iokharic {font-family: 'Iokharic';}
&.Rellanic {font-family: 'Rellanic';}
&.TimesNewRoman {font-family: 'Times New Roman';}
}
} }
.name { .name {
margin-right: auto; margin-right: auto;

View File

@@ -304,6 +304,99 @@ module.exports = [
} }
] ]
}, },
/**************** FONTS *************/
{
groupName : 'Fonts',
icon : 'fas fa-keyboard',
view : 'text',
snippets : [
{
name : 'Open Sans',
icon : 'font OpenSans',
gen : dedent`{{font-family:OpenSans Dummy Text}}`
},
{
name : 'Code Bold',
icon : 'font CodeBold',
gen : dedent`{{font-family:CodeBold Dummy Text}}`
},
{
name : 'Code Light',
icon : 'font CodeLight',
gen : dedent`{{font-family:CodeLight Dummy Text}}`
},
{
name : 'Scaly Sans Remake',
icon : 'font ScalySansRemake',
gen : dedent`{{font-family:ScalySansRemake Dummy Text}}`
},
{
name : 'Book Insanity Remake',
icon : 'font BookInsanityRemake',
gen : dedent`{{font-family:BookInsanityRemake Dummy Text}}`
},
{
name : 'Mr Eaves Remake',
icon : 'font MrEavesRemake',
gen : dedent`{{font-family:MrEavesRemake Dummy Text}}`
},
{
name: 'Solbera Imitation Remake',
icon: 'font SolberaImitationRemake',
gen: dedent`{{font-family:SolberaImitationRemake Dummy Text}}`
},
{
name: 'Scaly Sans Small Caps Remake',
icon: 'font ScalySansSmallCapsRemake',
gen: dedent`{{font-family:ScalySansSmallCapsRemake 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: '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: 'Overpass',
icon: 'font Overpass',
gen: dedent`{{font-family:Overpass 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: '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}}`
}
]
},
/**************** PAGE *************/ /**************** PAGE *************/