Skip to content

Commit

Permalink
Update citation details and integration
Browse files Browse the repository at this point in the history
  • Loading branch information
bkis committed Oct 4, 2023
1 parent ddc07c4 commit ab49855
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 6 deletions.
17 changes: 17 additions & 0 deletions resources/snippets/citation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Citation

Please cite resources as follows.
For external resources you can find citation details in the respective information/help texts.

## VedaWeb Platform
Kölligan, Daniel, Claes Neuefeind, Uta Reinöhl, Patrick Sahle,
Antje Casaretto, Anna Fischer, Börge Kiss, Natalie Korobzow,
Jürgen Rolshoven, Jakob Halfmann, Francisco Mondaca. VedaWeb.
Online Research Platform for Old Indic Texts.
University of Cologne. https://vedaweb.uni-koeln.de, accessed `<date of access>`.

## Morphological Glossing
Casaretto, Antje, Jakob Halfmann, Natalie Korobzow, Daniel Kölligan & Uta Reinöhl.
The morphologically glossed Rigveda - The Zurich annotation
corpus revised and extended. Hosted by VedaWeb - Online Research Platform for Old Indic Texts.
University of Cologne. https://vedaweb.uni-koeln.de, accessed `<date of access>`.
6 changes: 5 additions & 1 deletion resources/snippets/footerCredits.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
For further information on the VedaWeb project, its publications and the people involved, visit [vedaweb.uni-koeln.de](https://vedaweb.uni-koeln.de/)

**Citation:** VedaWeb. Online Research Platform for Old Indic Texts. University of Cologne. https://vedaweb.uni-koeln.de, accessed `<date of access>`.
**Cite as:** Kölligan, Daniel, Claes Neuefeind, Uta Reinöhl, Patrick Sahle,
Antje Casaretto, Anna Fischer, Börge Kiss, Natalie Korobzow,
Jürgen Rolshoven, Jakob Halfmann, Francisco Mondaca. VedaWeb.
Online Research Platform for Old Indic Texts.
University of Cologne. https://vedaweb.uni-koeln.de, accessed `<date of access>`.
14 changes: 9 additions & 5 deletions vedaweb-frontend/src/components/display/ContentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Row, Col, Affix, Spin, Icon, Drawer, Badge, Modal, Button } from 'antd'
import ContentLocation from "./ContentLocation";
import ContentFilterSwitch from "./ContentFilterSwitch";
import ErrorMessage from "../errors/ErrorMessage";
import CiteAsButton from "../widgets/CiteAsButton";

import "./ContentView.css";

Expand Down Expand Up @@ -178,7 +179,7 @@ class ContentView extends Component {
stanza={data.stanza}
hymnAbs={data.hymnAbs} />
}

{/** TOOLS BUTTON: TOGGLE CONTENT */}
<Button
type="default"
Expand Down Expand Up @@ -221,6 +222,9 @@ class ContentView extends Component {
Export
</Button>

{/** TOOLS BUTTON: CITE AS */}
<CiteAsButton />

</div>
</div>
</Affix>
Expand Down Expand Up @@ -388,7 +392,7 @@ class ContentView extends Component {

{line}&nbsp;

{ showMetricalData && !condensedView && v.metricalData &&
{ showMetricalData && !condensedView && v.metricalData &&
<span className="font-small gap-left-big light-grey main-font">
{v.metricalData[i].replace(/L/ig,"—").replace(/S/ig,"◡").replace(/ /ig,"\u3000") + "\u3000" +
"(" + v.metricalData[i].replace(/ /ig,"").length + ")"}
Expand Down Expand Up @@ -507,7 +511,7 @@ class ContentView extends Component {
**/}

{/** METRICAL DATA **/}
{/**
{/**
{stateStore.ui.isLayerVisible('metricaldata_')
&& data.metricalData &&
<div
Expand Down Expand Up @@ -623,7 +627,7 @@ class ContentView extends Component {
className="glossing content-block card"
ref={this.scrollTo}>
<h1>External Resources</h1>
{ !data.externalResources &&
{ !data.externalResources &&
<i>There are no references to external resources for this document.</i>
}
{ data.externalResources && data.externalResources.map((ext, i) => (
Expand Down Expand Up @@ -719,4 +723,4 @@ class ContentView extends Component {
}
}

export default withRouter(view(ContentView));
export default withRouter(view(ContentView));
69 changes: 69 additions & 0 deletions vedaweb-frontend/src/components/widgets/CiteAsButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import React, { Component } from "react";
import { Button, Modal, Icon } from 'antd';
import HtmlSnippet from "../utils/HtmlSnippet";


class CitaAsButton extends Component {

constructor(props){
super(props);
this.state = {show: false};
}

render() {

const QuoteSvg = () => (
<svg
viewBox="5 5 47 47"
focusable="false"
height="1em"
fill="currentColor">
<g>
<circle cx="18.5" cy="31.5" r="5.5"/>
<path d="M18.5,38c-3.584,0-6.5-2.916-6.5-6.5s2.916-6.5,6.5-6.5s6.5,2.916,6.5,6.5S22.084,38,18.5,38z
M18.5,27c-2.481,0-4.5,2.019-4.5,4.5s2.019,4.5,4.5,4.5s4.5-2.019,4.5-4.5S20.981,27,18.5,27z"/>
</g>
<g>
<circle cx="35.5" cy="31.5" r="5.5"/>
<path d="M35.5,38c-3.584,0-6.5-2.916-6.5-6.5s2.916-6.5,6.5-6.5s6.5,2.916,6.5,6.5S39.084,38,35.5,38z
M35.5,27c-2.481,0-4.5,2.019-4.5,4.5s2.019,4.5,4.5,4.5s4.5-2.019,4.5-4.5S37.981,27,35.5,27z"/>
</g>
<path d="M13,32c-0.553,0-1-0.447-1-1c0-7.72,6.28-14,14-14c0.553,0,1,0.447,1,1s-0.447,1-1,1
c-6.617,0-12,5.383-12,12C14,31.553,13.553,32,13,32z"/>
<path d="M30,32c-0.553,0-1-0.447-1-1c0-7.72,6.28-14,14-14c0.553,0,1,0.447,1,1s-0.447,1-1,1
c-6.617,0-12,5.383-12,12C31,31.553,30.553,32,30,32z"/>
</svg>
);

return (
<>
<Button
onClick={() => this.setState({show: true})}
type="default"
size="large"
title="Show citation details"
style={{marginLeft: '1rem'}}>
<Icon component={QuoteSvg} />
Cite As
</Button>

<Modal
title={null}
centered
footer={null}
maskClosable={true}
visible={this.state.show}
okButtonProps={{style: {display: 'none'}}}
cancelButtonProps={{style: {display: 'none'}}}
onCancel={() => this.setState({show: false})}
>

<HtmlSnippet id="citation"/>

</Modal>
</>
);
}
}

export default CitaAsButton;

0 comments on commit ab49855

Please sign in to comment.