theme for RDM site
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

162 lines
5.0 KiB

{#{{ dd(content) }}#}
{%
set node_classes = [
'node',
node.isPromoted() ? 'node-promoted',
node.isSticky() ? 'node-sticky',
not node.isPublished() ? 'node-unpublished',
view_mode ? 'node-view-mode-' ~ view_mode|clean_class,
]
%}
<article{{ attributes.addClass(node_classes) }}>
{{ title_prefix }}
{% if not page %}
<h2{{ title_attributes.addClass('node-title') }}>
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
</h2>
{% endif %}
{{ title_suffix }}
{% if display_submitted %}
<header class="node-header clear">
{% if node_author_pic %}
<div class="author-picture">{{ author_picture }}</div>
{% endif %}
<div{{ author_attributes.addClass('node-submitted-details') }}>
{% set createdDate = node.getCreatedTime|date('j F Y') %}
{% trans %}<span><i class="ficon-user submitted-icons"></i> {{ author_name }}</span><span><i class="ficon-calendar submitted-icons"></i> {{ createdDate }}</span>{% endtrans %}
{% if node_tags %}
{% if content.field_tags %}
<span><i class="ficon-tag submitted-icons"></i>
{% for item in content.field_tags %}
{% if item['#title'] %}
<a href="{{ item['#url']}}">{{ item['#title'] }}</a>{{ ',' }}
{% endif %}
{% endfor %}
</span>
{% endif %}
{% endif %}
{{ metadata }}
</div>
</header>
{% endif %}
<div{{ content_attributes.addClass('node-content clear') }}>
{#=============#}
{#Dummy Content#}
{#=============#}
<section class="citation-block">
<div class="icon"><i class="ficon-file"></i></div>
<div class="data-citation"><h3>Title</h3>
<span>
Elit consequatur quasi expedita sint consectetur. Ipsa obcaecati sed dolores exercitationem iste Voluptate ipsam nihil aperiam numquam asperiores Sequi iste ad commodi eligendi sunt? Amet possimus ratione est exercitationem blanditiis?
</span></div>
</section>
{#Table#}
<table class="rdm_metadata">
<tbody>
<tr id="creator">
<th class="label" scope="row">Creator(s)</th>
<td>
<div>{{ content.field_rdm_creator }}</div>
</td>
</tr>
<tr id="description">
<th class="label" scope="row">Description</th>
<td>
<div>{{ content.field_rdm_description[0] }}</div>
</td>
</tr>
<tr id="contibutors">
<th class="label" scope="row">Contributor(s)</th>
<td>
<div>{{ content.field_rdm_contributors }}</div>
</td>
</tr>
<tr id="subjects">
<th class="label" scope="row">Subjects</th>
<td>
<div>{{ content.field_subjects }}</div>
</td>
</tr>
{% if content.field_rdm_field_of_research[0] is not empty %}
<tr id="research_field">
<th class="label" scope="row">Field of Research</th>
<td>
<div>{{ content.field_rdm_field_of_research }}</div>
</td>
</tr>
{% endif %}
{% if content.field_rdm_publication_title[0] is not empty %}
<tr id="title">
<th class="label" scope="row">Publication Title</th>
<td>
<div>{{ content.field_rdm_publication_title }}</div>
</td>
</tr>
{% endif %}
{% if content.field_rdm_gemini_uri[0] is not empty %}
<tr id="uri">
<th class="label" scope="row">URI</th>
<td>
<div>{{ content.field_rdm_gemini_uri }}</div>
</td>
</tr>
{% endif %}
{% if content.field_rdm_publication_link[0] is not empty %}
<tr id="publication_link">
<th class="label" scope="row">Publication Link</th>
<td>
<div>{{ content.field_rdm_publication_link }}</div>
</td>
</tr>
<tr id="organization">
<th class="label" scope="row">Organization</th>
<td>
<div>{{ content.field_organization }}</div>
</td>
</tr>
{% if content.field_rdm_publication_link[0] is not empty %}
<tr id="link">
<th class="label" scope="row">Link</th>
<td>
<div>{{ content.field_rdm_publication_link }}</div>
</td>
</tr>
{% endif %}
</tbody>
</table>
{{ content.content_moderation_control }}
{{ content.links }}
{{ content.group_dataset }}
{#/table#}
{#{{ content }}#}
</div>
</article>
{#==========#}
{#JS for Tabs#}
{#==========#}
<script>
{#function openTab(evt, tabName) {#}
{#// Declare all variables#}
{#var i, tabcontent, tablinks;#}
{#// Get all elements with class="tabcontent" and hide them#}
{#tabcontent = document.getElementsByClassName("tabcontent");#}
{#for (i = 0; i < tabcontent.length; i++) {#}
{#tabcontent[i].style.display = "none";#}
{#}#}
{#// Get all elements with class="tablinks" and remove the class "active"#}
{#tablinks = document.getElementsByClassName("tablinks");#}
{#for (i = 0; i < tablinks.length; i++) {#}
{#tablinks[i].className = tablinks[i].className.replace(" active", "");#}
{#}#}
{#// Show the current tab, and add an "active" class to the button that opened the tab#}
{#document.getElementById(tabName).style.display = "block";#}
{#evt.currentTarget.className += " active";#}
{#}#}
{#document.getElementById("defaultOpen").click();#}
</script>