Compare commits

..

20 Commits

Author SHA1 Message Date
ppound f87b0603e2 Merge branch 'master' of git.library.upei.ca:code/lmmi_journal_theme 6 months ago
ppound 6ca7d04409 these files were changed on the prod server so commiting them 6 months ago
Paul Pound 4d6cf2c18f changed type to drupal custom theme so updates are put in the same directory 6 months ago
Paul Pound 9a6695c12f update info yml file for d10 support 7 months ago
Alexander O'Neill 2c6205455e ORCID styling by rdrew. 3 years ago
Alexander O'Neill 57c163c918 Add orcid.org prefix to links. 3 years ago
Alexander O'Neill 7650a14d79 Add tempalte for ORCID field. 3 years ago
Alexander O'Neill 34c68349b1 Fix white screen in article hero when image missing. 3 years ago
Alexander O'Neill 2dff644546 Add composer dependency on base theme. 3 years ago
Alexander O'Neill b485030630 Add composer.json. 3 years ago
rdrew 95957cbcde Merge branch 'master' of https://github.com/rdrew/lmmi_journal_theme 3 years ago
rdrew 6413aecd09 pdf print templates 3 years ago
rdrew 3b1b2389b1 d9 update 3 years ago
rdrew 313300bd9a Merge branch 'master' of https://github.com/rdrew/lmmi_journal_theme 4 years ago
rdrew ffe63a899d Merge branch 'master' of https://github.com/rdrew/lmmi_journal_theme 4 years ago
rdrew 420a7337b9 Merge branch 'master' of https://github.com/rdrew/lmmi_journal_theme 4 years ago
rdrew f600efa435 Merge branch 'master' of https://github.com/rdrew/lmmi_journal_theme 4 years ago
rdrew 6b54e710f4 Merge branch 'master' of https://github.com/rdrew/lmmi_journal_theme 4 years ago
rdrew 2b3b43a85e Merge branch 'master' of https://github.com/rdrew/lmmi_journal_theme 4 years ago
rdrew a54f17fb46 template stuff 4 years ago
  1. 25
      composer.json
  2. 40
      css_overrides.css
  3. 4
      lmmi_journal.info.yml
  4. 14
      package-lock.json
  5. 7
      templates/article_pages/article--hero.html.twig
  6. 2
      templates/article_pages/entity-print.html.twig
  7. 1
      templates/entity-print--node--page.html.twig
  8. 32
      templates/field--paragraph--field-contributor-orcid--author-with-affiliation.html.twig
  9. 3
      templates/landing-page/page--node--113.html.twig
  10. 22
      templates/news_articles/news--hero.html.twig
  11. 19
      templates/news_articles/news--hero.html.twig.old
  12. 56
      templates/views/views-view-fields--taxonomy-term.html.twig

25
composer.json

@ -0,0 +1,25 @@
{
"name": "roblib/lmmi_journal_theme",
"description": "Journal of LM Montgomery Studies theme, sub-theme of MagazinePlus",
"type": "drupal-custom-theme",
"keywords": [
"Drupal"
],
"homepage": "https://library.upei.ca/",
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"roblib/magazineplus_lmmi_journal": "dev-master"
},
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "Rob Drew",
"role": "Owner"
}
]
}

40
css_overrides.css

@ -30,5 +30,45 @@ p.hangingindent {
span.citeproc-container-title {
font-style: italic;
}
.page-node-173 .article-info {
display: none;
}
.page-node-173 .node__container {
display: block !important;
}
.masonry-item {
width: 30.5%;
background-color: #f6f6f2;
border: 0;
margin: 0.5%;
padding: 0;
}
.paragraph--type--author-with-affiliation {
display: flex;
}
img.orcid_logo {
width: 22px;
margin-bottom: 9px;
}
.orcid-short-link {
margin-left: 12px;
font-weight: normal;
font-style: normal;
font-size: smaller;
line-height: 2;
}
.teaser-card__body .field--name-field-affiliation-string {
display:none;
}
.field--name-field-journal-article-abstract {
background: #eee;
padding: .5em;
margin-bottom:1.5em;
p:last-child {
padding-bottom: 0;
}
}

4
lmmi_journal.info.yml

@ -1,7 +1,7 @@
name: LMMI Journal
type: theme
description: Subtheme of Magazine Plus
core: 8.x
core_version_requirement: ^8 || ^9 || ^10
# Defines the base theme
base theme: magazineplus
# Defines libraries group in which we can add css/js.
@ -10,7 +10,7 @@ libraries:
- lmmi_journal/global-scripts
- lmmi_journal/fonts
stylesheets-remove:
stylesheets-remove:
- core/themes/stable/css/views/views.module.css
- themes/custom/magazineplus_lmmi_journal/css/base/elements.css
- core/assets/vendor/jquery.ui/themes/base/theme.css

14
package-lock.json generated

@ -1506,7 +1506,7 @@
"dependencies": {
"readable-stream": {
"version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"dev": true,
"optional": true,
@ -1767,7 +1767,7 @@
},
"readable-stream": {
"version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"dev": true,
"optional": true,
@ -1847,7 +1847,7 @@
},
"readable-stream": {
"version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"dev": true,
"optional": true,
@ -2152,7 +2152,7 @@
"dependencies": {
"readable-stream": {
"version": "1.0.34",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
"integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"dev": true,
"optional": true,
@ -4884,9 +4884,9 @@
}
},
"hosted-git-info": {
"version": "2.8.9",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
"integrity": "sha1-l/I2l3vW4SVAiTD/bePuxigewEc=",
"dev": true
},
"html-comment-regex": {

7
templates/article_pages/article--hero.html.twig

@ -1,4 +1,7 @@
{% set imagePath = file_url(content.field_article_highlight_image|field_target_entity.image.entity.uri.value) %}
{% set imageValue = content.field_article_highlight_image|field_target_entity.image.entity.uri.value %}
{% if imageValue %}
{% set imagePath = file_url(imageValue) %}
{% endif %}
{% set articleType = content.field_article_type|field_value %}
{% set pubDate = content.field_publication_date_electroni|field_value %}
@ -35,7 +38,7 @@
<header style="background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('{{ imagePath }}')" class="article-title-banner node__header paragraph-responsive-typography-enabled article-header">
<header style="background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)){% if imagePath %}, url('{{ imagePath }}'){% endif %}" class="article-title-banner node__header paragraph-responsive-typography-enabled article-header">
<div class="container article-info--wrapper">
{% block title_area %}

2
templates/article_pages/entity-print.html.twig

@ -6,7 +6,7 @@
</head>
<body>
<div class="page">
{{ content }}
{{ content }}
</div>
</body>
</html>

1
templates/entity-print--node--page.html.twig

@ -125,3 +125,4 @@
</div>
</div>
</article>
<h1>test</h1>

32
templates/field--paragraph--field-contributor-orcid--author-with-affiliation.html.twig

@ -0,0 +1,32 @@
{#
/**
* @file
* Theme override for the ORCID field.
*
* This is an override of field.html.twig for the node title field. See that
* template for documentation about its details and overrides.
*
* Available variables:
* - attributes: HTML attributes for the containing span element.
* - items: List of all the field items. Each item contains:
* - attributes: List of HTML attributes for each item.
* - content: The field item content.
* - entity_type: The entity type to which the field belongs.
* - field_name: The name of the field.
* - field_type: The type of the field.
* - label_display: The display settings for the label.
*
* @see field.html.twig
*/
#}
{%
set classes = [
'field',
'field--name-' ~ field_name|clean_class,
'field--type-' ~ field_type|clean_class,
'field--label-' ~ label_display,
'orcid-short-link',
]
%}
<a href="https://orcid.org/{{ items.0 }}" {{ attributes.addClass(classes) }}><img class="orcid_logo" alt="ORCID logo" src="https://info.orcid.org/wp-content/uploads/2019/11/orcid_16x16.png" width="16" height="16" />
{#{{ items }}#}</a>

3
templates/landing-page/page--node--113.html.twig

@ -432,6 +432,9 @@
{% if main_content_animations == "enabled" %}
data-animate-effect="{{ main_content_animation_effect }}"
{% endif %}>
<hr>
<h2 class="text-center">L.M. Montgomery &amp; Vision Forum</h2>
{{ drupal_view('recent_articles_masonry', 'vision') }}
{% if page.content %}
{{ page.content }}
{% endif %}

22
templates/news_articles/news--hero.html.twig

@ -1,7 +1,10 @@
{% if not (node.field_article_highlight_image.isEmpty == true) and content.field_article_highlight_image is defined %}
{% set imagePath = file_url(content.field_article_highlight_image|field_target_entity.image.entity.uri.value) %}
<header style="background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('{{ imagePath }}')" class="article-title-banner node__header paragraph-responsive-typography-enabled article-header">
<div class="container article-info--wrapper">
{% else %}
<header class="no_image article-title-banner node__header paragraph-responsive-typography-enabled article-header">
{% endif %}
<div class="container article-info--wrapper">
{% block title_area %}
{{ title_prefix }}
<h1{{ title_attributes.addClass('article--title title') }}>
@ -13,19 +16,8 @@
{{ title_suffix }}
{% endblock %}
<section class="article-header--metadata">
<div class="left">
{#<div class="article--contributor">#}
{#Robert N. Drew#}
{#</div>#}
{#<div class="article--contributor__affiliation">University of Prince Edward Island</div>#}
</div>
<div class="right">
{#<div class="article--type">Article</div>#}
{#<div class="article--date-published">#}
{#Published September 20, 2018 #}
{#</div>#}
</div>
<div class="left"> </div>
<div class="right"> </div>
</section>
</div>
</header>

19
templates/news_articles/news--hero.html.twig.old

@ -0,0 +1,19 @@
{% set imagePath = file_url(content.field_article_highlight_image|field_target_entity.image.entity.uri.value) %}
<header style="background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('{{ imagePath }}')" class="article-title-banner node__header paragraph-responsive-typography-enabled article-header">
<div class="container article-info--wrapper">
{% block title_area %}
{{ title_prefix }}
<h1{{ title_attributes.addClass('article--title title') }}>
{{ label }}
</h1>
<h1{{ title_attributes.addClass('article--title title sr-only') }}>
{{ label }}
</h1>
{{ title_suffix }}
{% endblock %}
<section class="article-header--metadata">
<div class="left"> </div>
<div class="right"> </div>
</section>
</div>
</header>

56
templates/views/views-view-fields--taxonomy-term.html.twig

@ -0,0 +1,56 @@
{#{% if fields.field_article_type.content|striptags|trim == "Article" %}#}
{#{{dump(fields.field_article_type.content|striptags|trim)}}#}
{% if fields.field_article_type.content|striptags|trim == "Article" %}
{% set _icon_ = 'fa-file-text-o' %}
{% set _color_ = 'blue' %}
{% elseif fields.field_article_type.content|striptags|trim == "Peer-reviewed article" %}
{% set _icon_ = 'fa-users' %}
{% set _color_ = 'red' %}
{% elseif fields.field_article_type.content|striptags|trim == "Audio/visual art" %}
{% set _icon_ = 'fa-volume-up' %}
{% set _color_ = 'red' %}
{% elseif fields.field_article_type.content|striptags|trim == "Blog post" %}
{% set _icon_ = 'fa-rss' %}
{% set _color_ = 'green' %}
{% elseif fields.field_article_type.content|striptags|trim == "Creative writing" %}
{% set _icon_ = 'fa-pencil-square-o' %}
{% set _color_ = 'teal' %}
{% elseif fields.field_article_type.content|striptags|trim == "News" %}
{% set _icon_ = 'fa-newspaper-o' %}
{% set _color_ = 'purple' %}
{% elseif fields.field_article_type.content|striptags|trim == "Note" %}
{% set _icon_ = 'fa-envelope-open-o' %}
{% set _color_ = 'aqua' %}
{% elseif fields.field_article_type.content|striptags|trim == "Notice" %}
{% set _icon_ = 'fa-exclamation-circle' %}
{% set _color_ = 'teal' %}
{% else %}
{% set _icon_ = '' %}
{% set _color_ = '' %}
{% endif %}
<div class="{{_color_}} teaser-card card mb-4 shadow-sm">
{{ fields.field_article_highlight_image.content }}
<span class="teaser-card__icon">
<i class="fa {{_icon_}}" aria-hidden="true"></i>
</span>
<div class="teaser-card__category">
{{ fields.field_article_type.content }}
{#{% if fields.field_article_peer_reviewed.content |striptags|trim == "Yes" %}#}
{#<span class="peer-reviewed">#}
{#- peer reviewed#}
{#</span>#}
{#{% endif %}#}
</div>
<div class="teaser-card__body card-body">
<p class="teaser-card__title"> {{ fields.title.content }} </p>
<p class="teaser-card__author"> {{ fields.field_authors_and_affiliations.content }} </p>
</div>
{#<i class="fa fa-camera-retro"></i>#}
{#<i class="fa fa-newspaper-o" aria-hidden="true"></i>#}
{#<i class="fa fa-video-camera" aria-hidden="true"></i>#}
{#<i class="fa fa-file-text-o" aria-hidden="true"></i>#}
{#<i class="fa fa-film" aria-hidden="true"></i>#}
</div>
Loading…
Cancel
Save