-
-
- {text}
+ const authors = this.props.metadata.authors;
+ if(!this.state.isOwner || authors.length < 2) return (
+
-
;
+ );
+ return (
+
+
+
+ {authors.length > 0 && (
+ -
+
+ {authors[0]}
+
+
+ )}
+
+ {authors.length > 1 && authors.slice(1).map((author, i)=>(
+ -
+
+ {author}
+
+
+
+ ))}
+
+
+ );
+
},
renderThemeDropdown : function(){
diff --git a/client/homebrew/editor/metadataEditor/metadataEditor.less b/client/homebrew/editor/metadataEditor/metadataEditor.less
index 6a4df1c46..cd4fb38a1 100644
--- a/client/homebrew/editor/metadataEditor/metadataEditor.less
+++ b/client/homebrew/editor/metadataEditor/metadataEditor.less
@@ -173,7 +173,51 @@
.colorButton(@red);
}
}
- .authors.field .value { line-height : 1.5em; }
+ .authors.field {
+ .tag {
+ font-weight:300;
+ transition:background-color 0.2s;
+
+ &.owner {
+ position: relative;
+ background-color:@silverLight;
+ min-width:25px;
+ display:grid;
+ place-items:center;
+ font-weight: 900;
+
+ &::after {
+ content: "\f521";
+ font-family: "Font Awesome 6 Free";
+ color:gold;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width:15px;
+ height:15px;
+ rotate:-25deg;
+ translate:-30% -50%;
+ transform: scaleY(0.7);
+ }
+ }
+ &:has(button) a {
+ padding-right:5px;
+ }
+ &:has(button:hover) {
+ background:#d97d7d;
+ }
+
+ button {
+ color:@red;
+ }
+
+
+ }
+ a {
+ color:black;
+ text-decoration:unset;
+ }
+ }
.themes.field {
& .dropdown-container {
@@ -275,13 +319,17 @@
}
.tag {
- padding : 0.3em;
+ padding : 0.35em;
margin : 2px;
- font-size : 0.9em;
+ font-size : 0.95em;
background-color : #DDDDDD;
border-radius : 0.5em;
.icon { #groupedIcon; }
+
+ button {
+ cursor : pointer;
+ }
}
.input-group {
diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx
index dc921ffbb..96edbd49c 100644
--- a/client/homebrew/editor/snippetbar/snippetbar.jsx
+++ b/client/homebrew/editor/snippetbar/snippetbar.jsx
@@ -188,7 +188,7 @@ const Snippetbar = createReactClass({
const snippets = this.state.snippets.filter((snippetGroup)=>snippetGroup.view === this.props.view);
if(snippets.length === 0) return null;
- return
+ return
{_.map(snippets, (snippetGroup)=>{
return ;
})
}
-
;
+ ;
},
replaceContent : function(item){
@@ -327,12 +327,14 @@ const SnippetGroup = createReactClass({
return _.map(snippets, (snippet)=>{
if(!snippet.subsnippets){
return (
-
+
+
+
);
} else if(snippet.subsnippets){
return (
diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less
index 88cdcbc00..e49e02044 100644
--- a/client/homebrew/editor/snippetbar/snippetbar.less
+++ b/client/homebrew/editor/snippetbar/snippetbar.less
@@ -3,6 +3,8 @@
@import (less) '@themes/fonts/5e/fonts.less';
.snippetBar {
+ --activeTriggerColor: inherit;
+ --menuColor : #DDDDDD;
@menuHeight : 25px;
position : relative;
display : flex;
@@ -16,12 +18,6 @@
text-transform: uppercase;
font-weight: 800;
- .snippets {
- display : flex;
- justify-content : flex-start;
- min-width : 499.35px; //must be controlled every time an item is added, must be hardcoded for the wrapping as it is applied
- }
-
.editors {
display : flex;
justify-content : flex-end;
@@ -118,23 +114,7 @@
}
}
}
- .snippetBarButton {
- display : inline-block;
- height : @menuHeight;
- padding : 0px 5px;
- font-size : 0.625em;
- font-weight : 800;
- line-height : @menuHeight;
- text-transform : uppercase;
- text-wrap : nowrap;
- cursor : pointer;
- &:hover, &.selected { background-color : #999999; }
- i {
- margin-right : 3px;
- font-size : 1.4em;
- vertical-align : middle;
- }
- }
+
.toggleMeta {
position : absolute;
top : 0px;
@@ -143,20 +123,15 @@
.tooltipLeft('Edit Brew Properties');
}
-
- .menu-wrapper {
- .menu-item:is(.snippets > .menu-wrapper > .menu-item):first-child {
- .caret {
- display: none;
- }
- }
- .menu-list {
- padding : 0px;
- background-color : #DDDDDD;
-
- }
+ .snippets {
+ display : flex;
+ justify-content : flex-start;
+ min-width : 565.95px; //must be controlled every time an item is added, must be hardcoded for the wrapping as it is applied
}
+ // removed caret for top level items, by request (makes buttons too wide).
+ .menu-wrapper .menu-item:is(.snippets > .menu-wrapper > .menu-item):first-child .caret { display: none; }
+
.menu-item {
position : relative;
display : flex;
@@ -166,9 +141,8 @@
padding : 5px;
cursor : pointer;
width: 100%;
- .animate(background-color);
&:is(.menu-list .menu-item) [class*="name"] {
- padding-inline: 8px;
+ padding-inline: 8px; // additional space between icon and name (helpful in Fonts menu especially).
}
.menu-name {
flex: 1;
@@ -214,8 +188,7 @@
}
}
.name { margin-right : auto; }
- .disabled { text-decoration : line-through; }
- .beta {
+ .status {
align-self : center;
padding : 4px 6px;
margin-left : 5px;
@@ -234,15 +207,8 @@
&:hover { background-color: unset; }
}
}
- .disabledSnippets {
- color: grey;
- cursor: not-allowed;
-
- &:hover { background-color: #DDDDDD;}
- }
-
}
-@container editor (width < 750px) {
+@container editor (width < 816px) {
.snippetBar {
.editors {
flex : 1;
diff --git a/client/homebrew/navbar/nav.jsx b/client/homebrew/navbar/nav.jsx
index 7af6bcb79..d9d3ebef5 100644
--- a/client/homebrew/navbar/nav.jsx
+++ b/client/homebrew/navbar/nav.jsx
@@ -1,21 +1,16 @@
import './navbar.less';
import React, { useState, useRef, useEffect } from 'react';
-import createReactClass from 'create-react-class';
-import _ from 'lodash';
import cx from 'classnames';
import NaturalCritIcon from '@components/svg/naturalcrit-d20.svg.jsx';
const Nav = {
- base : createReactClass({
- displayName : 'Nav.base',
- render : function(){
- return
;
- }
- }),
- logo : function(){
+ base : ({ children, className, ...props })=>{
+ return
;
+ },
+ logo : ()=>{
return
@@ -24,50 +19,26 @@ const Nav = {
;
},
- section : createReactClass({
- displayName : 'Nav.section',
- render : function(){
- return
- {this.props.children}
-
;
+ section : ({ children, className, ...props })=>{
+ return
+ {children}
+
;
+ },
+
+ item : ({ icon, href, newTab, onClick, color, children, className, ...props })=>{
+ const classes = cx('navItem', color, className);
+ if(href){
+ return
+ {children}
+ {icon && }
+ ;
+ } else {
+ return
;
}
- }),
-
- item : createReactClass({
- displayName : 'Nav.item',
- getDefaultProps : function() {
- return {
- icon : null,
- href : null,
- newTab : false,
- onClick : function(){},
- color : null
- };
- },
- handleClick : function(e){
- this.props.onClick(e);
- },
- render : function(){
- const classes = cx('navItem', this.props.color, this.props.className);
-
- let icon;
- if(this.props.icon) icon =
;
-
- const props = _.omit(this.props, ['newTab']);
-
- if(this.props.href){
- return
- {this.props.children}
- {icon}
- ;
- } else {
- return
- {this.props.children}
- {icon}
-
;
- }
- }
- }),
+ },
dropdown : function dropdown(props) {
props = Object.assign({}, props, {
diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx
index aadadbd3b..5cc02c986 100644
--- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx
+++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.jsx
@@ -39,9 +39,9 @@ const BrewItem = ({
if(!brew.editId) return null;
return (
-
-
-
+
);
};
@@ -52,7 +52,7 @@ const BrewItem = ({
if(brew.googleId && !brew.stubbed) editLink = brew.googleId + editLink;
return (
-
+
);
@@ -67,7 +67,7 @@ const BrewItem = ({
}
return (
-
+
);
@@ -82,7 +82,7 @@ const BrewItem = ({
}
return (
-
+
);
@@ -94,7 +94,7 @@ const BrewItem = ({
return (
-
+
);
@@ -102,7 +102,7 @@ const BrewItem = ({
return (
-
+
);
};
@@ -148,19 +148,20 @@ const BrewItem = ({
))}
-
- {brew.views}
+
+ {brew.views}
{brew.pageCount && (
-
- {brew.pageCount}
+
+ {brew.pageCount}
)}
- {moment(brew.updatedAt).fromNow()}
+ {moment(brew.updatedAt).fromNow()}
{renderStorageIcon()}
diff --git a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less
index 93685947c..d48248090 100644
--- a/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less
+++ b/client/homebrew/pages/basePages/listPage/brewItem/brewItem.less
@@ -89,7 +89,7 @@
&::before { content : '\f518'; }
}
}
- &:hover {
+ &:hover, &:focus-within {
.links { opacity : 1; }
}
&:nth-child(2n + 1) { margin-right : 0px; }
@@ -103,7 +103,7 @@
text-align : center;
background-color : fade(black, 60%);
opacity : 0;
- a {
+ a, button {
.animate(opacity);
display : block;
margin : 8px 0px;
@@ -111,6 +111,7 @@
color : white;
text-decoration : unset;
opacity : 0.6;
+ width : 100%;
&:hover { opacity : 1; }
i { cursor : pointer; }
}
diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx
index bc18bc5e5..58280db37 100644
--- a/client/homebrew/pages/editPage/editPage.jsx
+++ b/client/homebrew/pages/editPage/editPage.jsx
@@ -320,7 +320,7 @@ const EditPage = (props)=>{
// #5 - No unsaved changes, and has never been saved, hide the button
if(neverSaved)
- return