Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math-related fixes #180

Open
wants to merge 118 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
c860380
Support multiple paragraphs as content of a def-item.
obuchtala Feb 8, 2016
da07e8b
Allow def-list as block-type within paragraphs.
obuchtala Feb 8, 2016
bbdad6c
Do not break paragraphs when hitting unknown inline elements.
obuchtala Feb 8, 2016
0ad09dd
Convert type name for custom_annotations.
obuchtala Feb 8, 2016
c711e7b
Convert roman annotations.
obuchtala Feb 8, 2016
8c8655b
Extract specific-use from <aff>.
obuchtala Feb 9, 2016
7f15550
Fix require paths.
Feb 9, 2016
a6d5707
Consider <roman>, <sans-serif> and <styled-content> tags
Feb 9, 2016
d5b5238
Fix nested def-list conversion.
obuchtala Feb 12, 2016
9acf778
Skip converstion of broken references.
obuchtala Feb 12, 2016
a3c0bc5
Add support for appendices.
Feb 12, 2016
a70c60d
Query figures globally.
Feb 12, 2016
af383cf
lens-converter: add check for back element
pkra Feb 25, 2016
cc42407
Merge pull request #146 from pkra/patch-1
Feb 25, 2016
fda704f
Update lens_converter.js
pkra Mar 14, 2016
efffa9b
Update lens_converter.js
pkra Mar 23, 2016
1b62ed8
[content_panel_view] simplify scrolling to node
pkra Mar 31, 2016
8aa7dce
[lens_converter] add support for generic funding-statement
pkra Apr 7, 2016
40e05c3
Merge pull request #164 from AmerMathSoc/fundingInfo
Apr 20, 2016
be2e1bc
Merge pull request #156 from pkra/patch-2
Apr 20, 2016
ec999c6
Merge pull request #160 from pkra/patch-3
Apr 20, 2016
f188ee8
Update footnote node.
Apr 20, 2016
992f659
Convert footnotes.
obuchtala Apr 20, 2016
b791325
Footnote view implementation.
Apr 20, 2016
8447e73
Better error message for unsupported node types.
obuchtala Apr 20, 2016
51b7aa0
Catch all for footnotes.
obuchtala Apr 20, 2016
46f8a35
Convert inline nodes on paragraph level.
obuchtala Apr 20, 2016
8719cfe
[math extension] add support for HTML fragments
pkra Apr 19, 2016
4c691ba
check for MathJax before calling it
pkra Apr 25, 2016
b8a6ab7
Use HTTPS where possible
thewilkybarkid May 11, 2016
2fafc7a
Add class 'sm-generated' for generated footnote refs.
Jun 16, 2016
10c1609
Merge pull request #173 from elifesciences/footnote-support
Jun 16, 2016
440c886
Merge branch 'ams-fixes' into develop
obuchtala Jun 16, 2016
c6be068
Removed trailing comma.
obuchtala Apr 20, 2016
f6802ad
Simplified TextPropertyView.renderAnnotatedText().
obuchtala Jun 16, 2016
770610b
Extract keywords and funding info with annotations.
obuchtala Jun 16, 2016
aabaf97
Merge pull request #175 from elifesciences/rich-keywords
oliver7654 Jun 16, 2016
45e20cb
Repair cross references.
Jun 16, 2016
556218e
Make scrollTo implementation robust against relative positioning.
Jun 16, 2016
a4fe6f3
Merge pull request #176 from elifesciences/fix-cross-references
Jun 16, 2016
4129132
Merge pull request #179 from pkra/patch-1
Jun 24, 2016
2bd9afd
Merge pull request #177 from AmerMathSoc/html
Jun 29, 2016
0c396d6
Merge pull request #178 from AmerMathSoc/issue139
Jun 29, 2016
72c9090
Remove toggle_math_environment workflow.
Jun 29, 2016
83414dd
Merge pull request #181 from elifesciences/remove-zoom-formula
Jun 29, 2016
4796c79
Skip scroll into view if element already fully visible.
Jul 1, 2016
4a7eb39
Merge pull request #182 from elifesciences/fix-scrolling
Jul 1, 2016
8e2f237
Show figures et al. also when they are inside environments.
obuchtala Jul 4, 2016
5d21f5a
Show mark in content scrollbar for highlighted figures.
obuchtala Jul 4, 2016
8a1d6c7
Merge pull request #183 from elifesciences/figure-fixes
Jul 4, 2016
4d56d96
Apply all rules for showing figures within math environments.
obuchtala Jul 8, 2016
6616888
Experimental: only show figures in the resouce panel which are refere…
obuchtala Jul 8, 2016
d21cfed
Experimental: all figures in figures panel - unreferenced anchored on…
obuchtala Jul 8, 2016
b29ea97
Parse affiliation institution in two possible formats.
gnott Jul 14, 2016
54b831f
Merge branch 'https' of https://github.com/thewilkybarkid/lens into h…
gnott Jul 14, 2016
f04bbda
Merge pull request #186 from gnott/https
Jul 14, 2016
c807f2c
Merge pull request #184 from elifesciences/figure-fixes
Jul 17, 2016
b249598
Merge pull request #185 from gnott/feature-affiliation-institution
Aug 13, 2016
73f3a92
Fix wrong require path.
Oct 13, 2016
5ef89ef
Make some base styles less opinionated.
Oct 13, 2016
92836f0
Remove some hard-coded style definitions.
Oct 24, 2016
d80a5dc
Make article structure conform to new eLife standards.
Nov 14, 2016
fd17793
Adjust colors in cover node.
Nov 14, 2016
165d276
Improved date formatting.
Nov 22, 2016
9f6b8cc
Drop breadcrumbs in favor of a better structured Cover view.
Nov 22, 2016
0f9d595
Improve funding source extraction.
Nov 22, 2016
a154af7
Improvements for cover styles.
Nov 22, 2016
c30764c
Article Info style improvements.
Dec 4, 2016
42ab986
Include default style.
Dec 4, 2016
25003ba
Remove obsolete label style.
Dec 4, 2016
08a45ae
Fix margin for headings in publication info pane.
Dec 5, 2016
25483de
Link subjects and article type.
Dec 12, 2016
546d7f2
Underline active contributor.
Dec 12, 2016
ec16203
Hover style for article type.
Dec 14, 2016
9095b02
Strip leading zeros from date strings.
Dec 14, 2016
d431ddf
Supported hostname for eLife's API
giorgiosironi Mar 31, 2017
057c7f5
replaced instances of "publishing-cdn.elifesciences.org/" with "cdn.e…
Apr 7, 2017
f1173e5
changed a reference from s3 to the cdn
Apr 9, 2017
55db390
upgraded some plain http://elifesciences.org links to https://elifesc…
Apr 9, 2017
348152c
Merge pull request #195 from elifesciences/api_elifesciences_org
gnott Apr 10, 2017
334dc37
Merge branch 'develop' of github.com:elifesciences/lens into feat-new…
gnott Apr 11, 2017
fe1c57d
Merge pull request #197 from elifesciences/feat-new-cdn
gnott Apr 11, 2017
40a2771
Do not add list-item to a list unless it is a direct child element, f…
gnott Apr 14, 2017
e226faa
changed video urls to 'legacy--api' from 'master.api'
Apr 18, 2017
2d489ec
Merge pull request #199 from elifesciences/api_elifesciences_org
gnott Apr 18, 2017
1d38b4d
Merge pull request #198 from gnott/feature-fix-list-within-list
gnott Apr 18, 2017
33d555b
Add a comma between multiple subject values using CSS.
gnott Jun 21, 2017
bedfc77
Fix for equal contributions on eLife articles, and join them with a c…
gnott Jun 30, 2017
bc389ef
For eLife articles, show boxed-text in the content panel. Fixes showi…
gnott Jul 6, 2017
e6dd1f5
Merge pull request #203 from gnott/feature-contrib-equal-contributions
gnott Jul 6, 2017
dce676d
Merge branch 'develop' of github.com:elifesciences/lens into feature-…
gnott Jul 6, 2017
21ef5f2
Set the level 1 heading for appendices to Appendices, so it does not …
gnott Jul 7, 2017
2156239
Get the label for a box if available.
gnott Jul 7, 2017
6213cb8
Update comments.
gnott Jul 7, 2017
428b93d
Merge pull request #204 from gnott/feature-appendix-content
gnott Jul 7, 2017
50c47c7
Support parsing multiple table per table-wrap. Fixes #111.
gnott Jul 7, 2017
1bc10a0
Quick enhanceTables function for eLife to replace bold, italic, and t…
gnott Jul 8, 2017
782c51c
An HTML tag replacement method to link citation references in tables,…
gnott Jul 14, 2017
dfa9aa2
CSS style fix for table margin-bottom to take effect, now there can b…
gnott Jul 14, 2017
5b724d2
Merge branch 'develop' of github.com:elifesciences/lens into feature-…
gnott Jul 14, 2017
43f3f9c
Merge pull request #205 from gnott/feature-tables
gnott Jul 14, 2017
968a426
Do not render fig as a body node, otherwise it gets added first to th…
gnott Jan 9, 2018
f86820b
Merge pull request #212 from elifesciences/feature-figure-tweak
gnott Jan 9, 2018
93e83a9
elife_converter, set assets urls from video_data.
gnott Dec 6, 2019
297c999
Merge pull request #219 from elifesciences/elife-videos
gnott Dec 6, 2019
b75dfd2
Fix for focus link on some elife videos.
gnott Dec 12, 2019
c3813b2
Merge pull request #220 from elifesciences/elife-video-focus
gnott Dec 12, 2019
a24aa46
Update readme (#222)
NuclearRedeye Sep 30, 2020
77f1099
Update README.md
NuclearRedeye Sep 30, 2020
1b9057f
Fix figures panel not showing when none of the figures has a paragraph.
Jan 15, 2021
81b057f
Fix figures panel not showing when none of the figures has a paragraph.
Jan 30, 2021
e27ebce
Merge pull request #223 from DavidMorenoCortina/fix-figures-panel
gnott Feb 5, 2021
d302339
chore: add maintainers.txt file
NuclearRedeye Mar 11, 2021
29bfd7e
Change decision letter parsing for eLife articles.
gnott Mar 25, 2021
1d7d003
Merge pull request #224 from elifesciences/elife-decision-letter
gnott Mar 25, 2021
df1ff6e
Bump underscore version in dependencies.
gnott May 8, 2021
beec4c5
Merge pull request #225 from elifesciences/underscore
gnott May 8, 2021
f9d46f9
chore: update project maintainers
NuclearRedeye Apr 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 35 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

**Lens** provides a novel way of looking at content on the web. It is designed to make life easier for researchers, reviewers, authors and readers.

- **Read the [announcement](http://elifesciences.org/elife-news/lens)**
- **Watch the [introduction video](http://vimeo.com/67254579).**
- **See Lens in [action](http://lens.elifesciences.org/00778)**
- **Read the [announcement](https://elifesciences.org/elife-news/lens)**
- **Watch the [introduction video](https://vimeo.com/67254579).**
- **See Lens in [action](https://lens.elifesciences.org/00778)**

## Using Lens

Expand All @@ -29,33 +29,45 @@ However, now let's look into developing our own extensions.

### Prerequisites

For Lens development, you need to have Node.js >=0.10.x installed.
For Lens development, you need to have Node.js >=10.x installed.

You need to repeat that install step whenever you updated the screwdriver repo.

### Setup

1. Clone the `lens-starter` repository

```bash
$ git clone https://github.com/elifesciences/lens-starter.git
```
```bash
git clone https://github.com/elifesciences/lens-starter.git
cd lens-starter
```

2. Configure System

2. Fetch dependencies
As stated above, you'll need version 10.x of Node installed, and you'll also need version 2.7.x of Python available. You can use [nvm](https://github.com/nvm-sh/nvm) to manage which version of node to use on a per-project basis, and [PyEnv](https://github.com/pyenv/pyenv) to do the same for Python. With both of these tools setup, you can...

```bash
$ cd lens-starter
$ npm install
```
```bash
echo "lts/dubnium" > .nvmrc
nvm install
nvm use
echo "2.7.17" > .python-version
pyenv install
pvenv local
```

3. Run the server
3. Fetch dependencies

```bash
~/projects/lens-starter $ node server
Lens running on port 4001
http://127.0.0.1:4001/
```
```bash
npm install
```

4. Run the server

```bash
npm start
```

Then navigate to http://127.0.0.1:4001/ in your web browser.

### Converter

Expand Down Expand Up @@ -94,7 +106,7 @@ ElifeConverter.Prototype = function() {
return [baseURL, node.url].join('');
} else {
node.url = [
"http://cdn.elifesciences.org/elife-articles/",
"https://cdn.elifesciences.org/elife-articles/",
state.doc.id,
"/suppl/",
node.url
Expand Down Expand Up @@ -203,7 +215,7 @@ Lens can easily be extended with a customized panel. It can be used to show addi
- Pull in metrics (click count, number of articles citing that article etc.)
- Retrieve related articles dynamically (e.g. important ones that reference the existing one)

For demonstration we will look at the implementation of a simple Altmetrics panel. It will pull data asynchronously from the Altmetrics API (http://api.altmetric.com/v1/doi/10.7554/eLife.00005) and render the information in Lens.
For demonstration we will look at the implementation of a simple Altmetrics panel. It will pull data asynchronously from the Altmetrics API (https://api.altmetric.com/v1/doi/10.7554/eLife.00005) and render the information in Lens.

#### Panel Definition

Expand Down Expand Up @@ -241,7 +253,7 @@ AltmetricsController.Prototype = function() {
var doi = this.document.get('publication_info').doi;

$.ajax({
url: "http://api.altmetric.com/v1/doi/"+doi,
url: "https://api.altmetric.com/v1/doi/"+doi,
dataType: "json",
}).done(function(res) {
cb(null, res);
Expand Down Expand Up @@ -335,9 +347,9 @@ Mobile support has been removed with Lens 2.0 to reduce technical debt and itera

## Credits

Lens was developed in collaboration between [UC Berkeley](http://bioegrad.berkeley.edu/) graduate student [Ivan Grubisic](http://www.linkedin.com/pub/ivan-grubisic/26/353/739) and [eLife](http://elifesciences.org). The team of [Substance](http://substance.io) is helping with the technical execution.
Lens was developed in collaboration between [UC Berkeley](http://bioegrad.berkeley.edu/) graduate student [Ivan Grubisic](https://www.linkedin.com/pub/ivan-grubisic/26/353/739) and [eLife](https://elifesciences.org). The team of [Substance](http://substance.io) is helping with the technical execution.

Substantial contributions were made by [HighWire](highwire.org), which launched Lens for a number of science journals in fall 2014 (The Journal of Biological Chemistry, The Plant Cell, Journal of Lipid Research, mBio®, and more). [The American Mathematical Society (AMS)](http://ams.org/) made Lens ready for advanced rendering of math articles.
Substantial contributions were made by [HighWire](http://highwire.org), which launched Lens for a number of science journals in fall 2014 (The Journal of Biological Chemistry, The Plant Cell, Journal of Lipid Research, mBio®, and more). [The American Mathematical Society (AMS)](http://ams.org/) made Lens ready for advanced rendering of math articles.

Thanks go to the following people, who made Lens possible:

Expand Down
4 changes: 2 additions & 2 deletions article/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Lens Article
=====

The Lens Article Format is an implementation the [Substance Document Model](http://github.com/substance/document) dedicated to scientific content. It features basic content types such as paragraphs, headings, and various figure types such as images, tables and videos complete with captions and cross-references.
The Lens Article Format is an implementation the [Substance Document Model](https://github.com/substance/document) dedicated to scientific content. It features basic content types such as paragraphs, headings, and various figure types such as images, tables and videos complete with captions and cross-references.

The document defintions can be extended easily, so you can either create your own flavour or contribute to the Lens Article Format directly.

## Why creating another spec for scientific documents?

- XML-based formats such as NML are hard to consume by webclients
- Strict separation of content and style. Existing formats target print, and thus contain style information, which makes them hard to process by computer programs
- The greatest advantage of Lens Articles is that any of them can be viewed in [Lens](http://github.com/elifesciences/lens), a modern web-based interface for consuming science content.
- The greatest advantage of Lens Articles is that any of them can be viewed in [Lens](https://github.com/elifesciences/lens), a modern web-based interface for consuming science content.
4 changes: 2 additions & 2 deletions article/article_util.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ util.formatDate = function (pubDate) {
var parts = pubDate.split("-");
if (parts.length >= 3) {
// new Date(year, month [, day [, hours[, minutes[, seconds[, ms]]]]])
// Note: months are 0-based
// Note: months are 0-based, which are stripped using a regexp
var localDate = new Date(parts[0], parts[1]-1, parts[2]);
return localDate.toUTCString().slice(0, 16);
return localDate.toDateString().slice(4, 16).replace(/\b0+/g, '')
} else if (parts.length === 2) {
var month = parts[1].replace(/^0/, "");
var year = parts[0];
Expand Down
3 changes: 2 additions & 1 deletion article/nodes/_affiliation/affiliation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Affiliation.type = {
"country": "string",
"department": "string",
"institution": "string",
"label": "string"
"label": "string",
"specific_use": "string"
}
};

Expand Down
2 changes: 1 addition & 1 deletion article/nodes/citation/citation.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Citation.example = {
"citation_urls": [
{
"name": "PubMed",
"url": "http://www.ncbi.nlm.nih.gov/pubmed/19606141"
"url": "https://www.ncbi.nlm.nih.gov/pubmed/19606141"
}
]
};
Expand Down
4 changes: 0 additions & 4 deletions article/nodes/composite/composite_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ CompositeView.Prototype = function() {
// =============================
//

// Render Markup
// --------
//

this.render = function() {
NodeView.prototype.render.call(this);

Expand Down
22 changes: 12 additions & 10 deletions article/nodes/contributor/contributor.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Contributor
Contributor
--------------------------------------- */

.lens-article .resources .content-node.contributor .resource-header .name {
Expand All @@ -9,16 +9,16 @@ Contributor
}

.lens-article .content-node.contributor .content {

}

.lens-article .content-node.contributor .affiliation {
margin-top: 10px;
font-size: 14px;
margin-top: 12px;
margin-bottom: 12px;
}

.lens-article .content-node.contributor .contributor-bio {
padding-top: 30px;
padding-top: 30px;
}

.lens-article .content-node.contributor .contributor-bio .bio {
Expand All @@ -44,8 +44,10 @@ Contributor
margin-bottom: 20px;
}

.lens-article .content-node.contributor .label {
font-size: 14px;
margin-top: 20px;
color: #999;
}
.lens-article .content-node.contributor .contrib-label {
font-weight: 600;
}

.lens-article .content-node.contributor .contrib-data {
margin-bottom: 12px;
}
Loading