Skip to content

Commit

Permalink
new examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Werner committed Dec 13, 2023
1 parent db90653 commit 54f153f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
23 changes: 11 additions & 12 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions web/src/ui/editor/BibtexViewer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { toJSON } from 'bibtex-parse-js'

const BibTeXViewer = ({ entry, setIsGood, isGood, short = false }) => {
const BibTeXViewer = ({ style={}, entry, setIsGood, isGood, short = false }) => {
if (!entry) return null
let parsedData
try {
Expand All @@ -23,7 +23,7 @@ const BibTeXViewer = ({ entry, setIsGood, isGood, short = false }) => {
}
console.log(data)
return (
<div className="bibtex-entry" style={{ display: 'inline' }}>
<div className="bibtex-entry" style={{ display: 'inline', ...style }}>
<i>{parsedData[0].entryType}</i>{' '}
<strong>{data.title}</strong>{' '}
{!short && (
Expand Down
6 changes: 4 additions & 2 deletions web/src/ui/editor/LibraryMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
UserInteractionMenu,
} from './PuzzleControls'

const isMobile = 'ontouchstart' in window || navigator.maxTouchPoints
const LibraryMenu = ({
activeTab,
setActiveTab,
Expand All @@ -55,15 +56,16 @@ const LibraryMenu = ({
.timeout(3000)
.emit('save_params', hash, { ...params, actions: updatedActions })
}

return (
<div>
<Button
type="primary"
icon={<BookOutlined />}
onClick={() => setCollapsed(!collapsed)}
style={{ width: '45vw', minWidth: '300' }}
style={{ width: isMobile ? "100vw" : '45vw', minWidth: '300' }}
>
<BibTeXViewer entry={meta} short setIsGood={() => null} isGood inline />
<BibTeXViewer style={{fontSize: "0.8em"}} entry={meta} short setIsGood={() => null} isGood inline />
<div style={{ maxWidth: '10vw', display: 'inline' }}>
{hash && (
<Progress
Expand Down

0 comments on commit 54f153f

Please sign in to comment.