Skip to content

Commit

Permalink
Merge branch 'master' into addLockRoutes-naturalcrit#3326
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Ambatte authored Sep 18, 2024
2 parents c8bacab + a8e5a96 commit 05c1d31
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 48 deletions.
9 changes: 6 additions & 3 deletions client/homebrew/editor/snippetbar/snippetbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,12 @@ const Snippetbar = createClass({
});
};

this.setState({
historyExists : historyExists(this.props.brew)
});
if(historyExists(this.props.brew) != this.state.historyExists){
this.setState({
historyExists : !this.state.historyExists
});
};

},

mergeCustomizer : function(oldValue, newValue, key) {
Expand Down
74 changes: 33 additions & 41 deletions client/homebrew/navbar/navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
display : flex;
align-items : center;
&:last-child .navItem { border-left : 1px solid #666666; }

&:has(.brewTitle) {
flex-grow : 1;
min-width : 300px;
}
}
// "NaturalCrit" logo
.navLogo {
Expand Down Expand Up @@ -69,6 +74,10 @@
.navItem {
#backgroundColorsHover;
.animate(background-color);
display : flex;
align-items : center;
justify-content : center;
height : 100%;
padding : 8px 12px;
font-size : 10px;
font-weight : 800;
Expand All @@ -94,39 +103,20 @@
animation-duration : 2s;
}
}
&.editTitle { // this is not needed at all currently - you used to be able to edit the title via the navbar.
padding : 2px 12px;
input {
width : 250px;
padding : 2px;
margin : 0;
font-family : 'Open Sans', sans-serif;
font-size : 12px;
font-weight : 800;
color : white;
text-align : center;
background-color : transparent;
border : 1px solid @blue;
outline : none;
}
.charCount {
display : inline-block;
margin-left : 8px;
color : #666666;
text-align : right;
vertical-align : bottom;
&.max { color : @red; }
}
}
&.brewTitle {
flex-grow : 1;
display : block;
width : 100%;
overflow : hidden;
font-size : 12px;
font-weight : 800;
color : white;
text-align : center;
text-transform : initial;
background-color : transparent;
text-overflow : ellipsis;
text-transform : initial;
white-space : nowrap;
background-color : transparent;
}

// "The Homebrewery" logo
&.homebrewLogo {
.animate(color);
Expand Down Expand Up @@ -240,23 +230,25 @@
}
.navDropdownContainer {
position : relative;
height : 100%;

.navDropdown {
position: absolute;
top: 28px;
right: 0px;
z-index: 10000;
width: max-content;
min-width:100%;
max-height: calc(100vh - 28px);
overflow: hidden auto;
display: flex;
flex-direction: column;
align-items: flex-end;
position : absolute;
//top: 28px;
right : 0px;
z-index : 10000;
display : flex;
flex-direction : column;
align-items : flex-end;
width : max-content;
min-width : 100%;
max-height : calc(100vh - 28px);
overflow : hidden auto;
.navItem {
position : relative;
display : flex;
justify-content : space-between;
align-items : center;
justify-content : space-between;
width : 100%;
border : 1px solid #888888;
border-bottom : 0;
Expand All @@ -278,10 +270,10 @@
overflow : hidden auto;
color : white;
text-decoration : none;
background-color : #333333;
border-top : 1px solid #888888;
scrollbar-color : #666666 #333333;
scrollbar-width : thin;
background-color : #333333;
border-top : 1px solid #888888;
.clear {
position : absolute;
top : 50%;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@
"stylelint-config-recommended": "^14.0.1",
"supertest": "^7.0.0"
}
}
}
40 changes: 37 additions & 3 deletions themes/V3/Blank/snippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ module.exports = [
icon : 'font MrEavesRemake',
gen : dedent`{{font-family:MrEavesRemake Dummy Text}}`
},
{
name : 'Pagella',
icon : 'font Pagella',
gen : dedent`{{font-family:Pagella Dummy Text}}`
},
{
name : 'Solbera Imitation',
icon : 'font SolberaImitationRemake',
Expand Down Expand Up @@ -426,22 +431,40 @@ module.exports = [
]
},

/**************** PAGE *************/
/**************** LAYOUT *************/

{
groupName : 'Print',
icon : 'fas fa-print',
view : 'style',
snippets : [
{
name : 'A3 Page Size',
icon : 'far fa-file',
gen : dedent`/* A3 Page Size */
.page {
width : 297mm;
height : 420mm;
}\n\n`,
},
{
name : 'A4 Page Size',
icon : 'far fa-file',
gen : dedent`/* A4 Page Size */
.page{
.page {
width : 210mm;
height : 296.8mm;
}\n\n`
},
{
name : 'A5 Page Size',
icon : 'far fa-file',
gen : dedent`/* A5 Page Size */
.page {
width : 148mm;
height : 210mm;
}\n\n`,
},
{
name : 'Square Page Size',
icon : 'far fa-file',
Expand All @@ -453,6 +476,17 @@ module.exports = [
columns : unset;
}\n\n`
},
{
name : 'Card Page Size',
icon : 'far fa-file',
gen : dedent`/* Card Size */
.page {
width : 63.5mm;
height : 88.9mm;
padding : 5mm;
columns : unset;
}\n\n`
},
{
name : 'Ink Friendly',
icon : 'fas fa-tint',
Expand All @@ -468,5 +502,5 @@ module.exports = [
}\n\n`
},
]
}
},
];
1 change: 1 addition & 0 deletions themes/V3/Blank/style.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import (less) './themes/fonts/Blank/fonts.less';
@import (less) './themes/fonts/5e/fonts.less';
@import (less) './themes/assets/assets.less';
@import (less) './themes/fonts/iconFonts/elderberryInn.less';
Expand Down
46 changes: 46 additions & 0 deletions themes/fonts/Blank/fonts.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
TeX Gyre Pagella
License:
% Copyright 2007--2018 for TeX Gyre extensions by B. Jackowski,
% J.M. Nowacki et al. (on behalf of TeX Users Groups). Vietnamese
% characters were added by Han The Thanh.
%
% This work can be freely used and distributed under
% the GUST Font License (GFL -- see GUST-FONT-LICENSE.txt)
% which is actually an instance of the LaTeX Project Public License
% (LPPL -- see http://www.latex-project.org/lppl.txt ).
%
% This work has the maintenance status "maintained". The Current Maintainer
% of this work is Bogus\l{}aw Jackowski and Janusz M. Nowacki.
%
% This work consists of the files listed
% in the MANIFEST-TeX-Gyre-Pagella.txt file.
*/

@font-face {
font-family: Pagella;
src: url('../../../fonts/Blank/texgyrepagella-regular.woff2');
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: Pagella;
src: url('../../../fonts/Blank/texgyrepagella-bold.woff2');
font-weight: bold;
font-style: normal;
}

@font-face {
font-family: Pagella;
src: url('../../../fonts/Blank/texgyrepagella-italic.woff2');
font-weight: normal;
font-style: italic;
}

@font-face {
font-family: Pagella;
src: url('../../../fonts/Blank/texgyrepagella-bolditalic.woff2');
font-weight: bold;
font-style: italic;
}
Binary file added themes/fonts/Blank/texgyrepagella-bold.woff2
Binary file not shown.
Binary file not shown.
Binary file added themes/fonts/Blank/texgyrepagella-italic.woff2
Binary file not shown.
Binary file added themes/fonts/Blank/texgyrepagella-regular.woff2
Binary file not shown.

0 comments on commit 05c1d31

Please sign in to comment.