Commit cb77972f authored by Daniel Suarez Souto's avatar Daniel Suarez Souto
Browse files

added date and issue to news and articles

parent 0f8bff25
......@@ -40,9 +40,11 @@
</div>
<div class="col-md-10" style="display: flex; flex-direction: row; justify-content: center; align-content: center;">
<h4 class="modal-title" id="myModalLabel" style="display: flex; justify-self: center; align-self: center;">
<a target="_blank" rel="noopener noreferrer"href$="{{getID(news)}}" style=" color: #fff; outline: 0 !important; text-decoration: none !important; display:inline-block; vertical-align: middle;" title="Open the new">{{getHeadline(news)}}</a>
<a target="_blank" rel="noopener noreferrer"href$="{{getID(news)}}" style=" color: #fff; outline: 0 !important; text-decoration: none !important; display:inline-block; vertical-align: middle;" title="Open the new">{{getHeadline(news)}} </a>
</h4>
</div>
<div class="col-md-2" style="display: flex; flex-direction: row; justify-content: center; align-content: center;">
<h4 style="color: white;color: white; display: flex; justify-self: center; align-self: center; font-style: italic;">{{getDate(news)}}</h4>
</div>
</div>
......@@ -97,7 +99,11 @@
</div>
<div class="modal-footer">
<a href$="{{getID(news)}}" target="_blank">
<button class="btn btn-info">Visit Site</button>
</a>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
......@@ -236,13 +242,11 @@
getEntityName: function(entity){
return entity['schema:name']
},
getDate: function(date){
if(fecha == null){
return("-");
}
var fecha = date.toString().split("-");
//console.log(fecha)
return fecha[2].split("T")[0]+"-"+fecha[1]+"-"+fecha[0]
getDate: function(news){
date = new Date(news['schema:datePublished']);
options = { month: 'long', day: 'numeric', year: 'numeric'}
return date.toLocaleDateString('en-US');
},
getBg: function(entity){
//console.log(entity)
......
......@@ -117,8 +117,20 @@ paper-icon-button.green:hover {
text-align: center;
}
img.style-scope.news-chart {
object-fit: contain;
max-height: 55px;
object-fit: contain;
max-height: 55px;
}
.btn.btn-info.style-scope.news-chart {
color: #fff;
background-color: #449dd5;
border-color: #449dd5;
}
.btn.btn-info.style-scope.news-chart:hover {
color: #fff;
background-color: #2979ab !important;
border-color: #2979ab !important;
}
button.news-chart:focus,
......@@ -126,3 +138,6 @@ button h4 a:focus {
outline: 0 !important;
}
.style-scope.news-chart:hover {
text-decoration: none;
}
\ No newline at end of file
......@@ -55,6 +55,9 @@
<div class="col-md-10" style="display: flex; flex-direction: row; justify-content: center; align-content: center;">
<h4 class="modal-title" id="myModalLabel" style="display: flex; justify-self: center; align-self: center; color: #fff;display:inline-block; vertical-align: middle;">{{getHeadline(news)}}</h4>
</div>
<div class="col-md-2" style="display: flex; flex-direction: row; justify-content: center; align-content: center;">
<h4 style="color: white;color: white; display: flex; justify-self: center; align-self: center; font-style: italic;">Issue: {{getIssue(news)}}</h4>
</div>
</div>
</div>
<div class="modal-body" style="height: 520px" >
......@@ -266,6 +269,9 @@
//console.log(news['@id'])
return news['@id']
},
getIssue: function(news){
return news["number"]
},
getDate: function(date){
var fecha = date.toString().split("-");
//console.log(fecha)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment