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

implement HTML version of miniViz #9

Merged
merged 4 commits into from
Jul 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
151 changes: 68 additions & 83 deletions css/paperbuzzviz.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.title {
.paperbuzz-title {
font-size: 1.5em;
color: #789aa1;
text-decoration: underline;
Expand All @@ -8,23 +8,19 @@
font-size: 11px;
}

.axis line,
.axis path {
.paperbuzz-axis line,
.paperbuzz-axis path {
fill: none;
stroke: black;
stroke-width: 1;
shape-rendering: crispEdges;
}
.barsForTooltip {
fill: ffffff;
fill-opacity: 0;
}

.bar.main{
.paperbuzz-bar.main{
fill: #789aa1;
}

.bar.alt{
.paperbuzz-bar.alt{
fill: #304345;
}

Expand Down Expand Up @@ -92,15 +88,15 @@

.paperbuzz-control.active {
text-decoration: none;
color: grey;
color: black;
}

.paperbuzz-control.disabled {
/*.paperbuzz-control.disabled {
cursor: default;
text-decoration: none;
color: grey;
}

*/
.paperbuzz-control:hover {
background-color: transparent;
}
Expand All @@ -109,12 +105,7 @@
vertical-align: middle;
}

#built-with {
float: right;
font-size: .75em;
}

.paperbuzzTooltip {
.paperbuzz-tooltip {
line-height: 1;
font: 10px sans-serif;
padding: 4px;
Expand All @@ -125,7 +116,7 @@
}

/* Creates a small triangle extender for the tooltip */
.paperbuzzTooltip:after {
.paperbuzz-tooltip:after {
box-sizing: border-box;
display: inline;
font-size: 10px;
Expand All @@ -138,14 +129,14 @@
}

/* Style northward tooltips differently */
.paperbuzzTooltip.n:after {
.paperbuzz-tooltip.n:after {
margin: -1px 0 0 0;
top: 100%;
left: 0;
}

/* Paperbuzz mini */
.paperbuzz-mini-label {
#paperbuzz-mini {
width: 250px;
float: left;
margin-top: .5em;
Expand All @@ -158,7 +149,30 @@
-webkit-border-radius: 5px;
border-radius: 5px;
color: #28292b;

clear: both;
}

.paperbuzz-mini-total {
font-size: 3em;
color: #011a1f;
float: left;
}

.paperbuzz-mini-source {
color: #011a1f;
float: left;
padding: .4em;
}
.paperbuzz-mini-source > i{
padding-top: .4em;
padding-bottom: .em;
font-size: 1.15em;
vertical-align: middle;

}

.paperbuzz-mini-count {
margin-left: .2em;
}

/* Font icon css */
Expand All @@ -171,10 +185,10 @@
url('../fonts/icomoon.svg?846v#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
}


[class^="icon-"], [class*=" icon-"] {
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
speak: none;
Expand All @@ -183,82 +197,53 @@
font-variant: normal;
text-transform: none;
line-height: 1;

/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}

.icon-crossref:before {
.icon-crossref:before {
content: "\e90c";
}
.icon-datacite:before {
}
.icon-datacite:before {
content: "\e90b";
}
.icon-f1000:before {
}
.icon-f1000:before {
content: "\e90a";
}
.icon-hypothesis:before {
}
.icon-hypothesis:before {
content: "\e909";
}
.icon-cambia-lens:before {
}
.icon-cambia-lens:before {
content: "\e907";
}
.icon-stackexchange:before {
}
.icon-stackexchange:before {
content: "\e908";
color: #1e5397;
}
.icon-reddit-links:before {
}
.icon-reddit-links:before {
content: "\eac6";
}
.icon-web:before {
}
.icon-web:before {
content: "\e903";
}
.icon-wikipedia:before {
}
.icon-wikipedia:before {
content: "\e906";
}
.icon-newsfeed:before {
}
.icon-newsfeed:before {
content: "\e905";
}
.icon-facebook:before {
}
.icon-facebook:before {
content: "\e904";
}
.icon-reddit:before {
}
.icon-reddit:before {
content: "\e902";
}
.icon-wordpressdotcom:before {
}
.icon-wordpressdotcom:before {
content: "\e901";
}
.icon-twitter:before {
}
.icon-twitter:before {
content: "\e900";
}

/* miniViz */
.miniViz-title {
font-size: .9em;
color: #011a1f;
text-decoration: underline;
}

.miniViz-title:hover {
cursor: pointer;
}

.miniViz-total {
font-size: 3em;
color: #011a1f;
}

.miniViz-text {
font-size: .75em;
color: #011a1f;
}

.miniViz-count {
font-size: 1.15em;
/*padding-bottom: 0.4em;
padding-top: 0.4em;
font-weight: bold;
vertical-align: middle;*/
}
}

19 changes: 13 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
width: 800px;
font-family: arial
}

#built-with {
clear: both;
float: right;
font-size: .75em;
}

</style>

<link rel="stylesheet" type="text/css" href="css/paperbuzzviz.css" />
Expand All @@ -40,16 +47,16 @@ <h1>Paperbuzz Visualizations</h1>
graphheight: 150,
graphwidth: 300,
showTitle: true,
showMini: true,
showMini: false,

}

var paperbuzzviz = undefined;
//var doi = '10.1080/23800127.2017.1283122';
//var doi = '10.15252/embj.201695429';
//var doi = '10.1016/j.quaint.2011.07.044';
//var doi = '10.4236/sn.2017.62007';
//var doi = '10.2190/EC.43.3.f'
// var doi = '10.1080/23800127.2017.1283122';
// var doi = '10.15252/embj.201695429';
// var doi = '10.1016/j.quaint.2011.07.044';
// var doi = '10.4236/sn.2017.62007';
// var doi = '10.2190/EC.43.3.f'
var doi = '10.1038/nature.2017.22163';
d3.json('https://api.paperbuzz.org/v0/doi/' + doi, function(data) {
options.paperbuzzStatsJson = data
Expand Down
Loading