audio cartel ids now complete
This commit is contained in:
@@ -1,2 +1,13 @@
|
||||
|
||||
void 0;if(edlp.redirect){void 0;void 0;window.localStorage.setItem('edlp_origin_path',edlp.sys_path.replace(/^\//,''));window.localStorage.setItem('edlp_origin_url',window.location.pathname);window.localStorage.setItem('edlp_origin_hash',window.location.hash);window.location.replace(window.location.origin+'/'+edlp.lang_code);}else{void 0;}
|
||||
console.log('EDLP THEME HISTORY.js');
|
||||
// var edlp is provided by edlp_ajax.module file
|
||||
if(edlp.redirect){
|
||||
console.log('history redirect', edlp);
|
||||
console.log('window.location', window.location);
|
||||
window.localStorage.setItem('edlp_origin_path', edlp.sys_path.replace(/^\//, ''));
|
||||
window.localStorage.setItem('edlp_origin_url', window.location.pathname);
|
||||
window.localStorage.setItem('edlp_origin_hash', window.location.hash);
|
||||
// redirect to home
|
||||
window.location.replace(window.location.origin+'/'+edlp.lang_code);
|
||||
}else{
|
||||
console.log('history do not redirect');
|
||||
}
|
||||
|
||||
+1240
-42
File diff suppressed because it is too large
Load Diff
+2745
-1
File diff suppressed because one or more lines are too long
@@ -20,31 +20,38 @@
|
||||
animation: rotation 2s infinite linear;
|
||||
}
|
||||
|
||||
@mixin entrie-micro-square {
|
||||
display:inline-block;
|
||||
$s:8px;
|
||||
width:$s; height:$s;
|
||||
background-color: black;
|
||||
margin-right: 3px;
|
||||
&[tid='134']{background-color: var(--e-col-134);}
|
||||
&[tid='121']{background-color: var(--e-col-121);}
|
||||
&[tid='125']{background-color: var(--e-col-125);}
|
||||
&[tid='119']{background-color: var(--e-col-119);}
|
||||
&[tid='132']{background-color: var(--e-col-132);}
|
||||
&[tid='122']{background-color: var(--e-col-122);}
|
||||
&[tid='129']{background-color: var(--e-col-129);}
|
||||
&[tid='120']{background-color: var(--e-col-120);}
|
||||
&[tid='130']{background-color: var(--e-col-130);}
|
||||
&[tid='118']{background-color: var(--e-col-118);}
|
||||
&[tid='127']{background-color: var(--e-col-127);}
|
||||
&[tid='133']{background-color: var(--e-col-133);}
|
||||
&[tid='128']{background-color: var(--e-col-128);}
|
||||
&[tid='124']{background-color: var(--e-col-124);}
|
||||
&[tid='116']{background-color: var(--e-col-116);}
|
||||
&[tid='117']{background-color: var(--e-col-117);}
|
||||
&[tid='131']{background-color: var(--e-col-131);}
|
||||
&[tid='126']{background-color: var(--e-col-126);}
|
||||
&[tid='123']{background-color: var(--e-col-123);}
|
||||
@mixin entree-micro-square {
|
||||
white-space: nowrap;
|
||||
font-size: 0.5em;
|
||||
line-height: 0;
|
||||
letter-spacing: 0px;
|
||||
span{
|
||||
display:inline-block;
|
||||
$s:6px;
|
||||
width:$s; height:$s;
|
||||
background-color: black;
|
||||
margin-right: 2px;
|
||||
&[tid='134']{background-color: var(--e-col-134);}
|
||||
&[tid='121']{background-color: var(--e-col-121);}
|
||||
&[tid='125']{background-color: var(--e-col-125);}
|
||||
&[tid='119']{background-color: var(--e-col-119);}
|
||||
&[tid='132']{background-color: var(--e-col-132);}
|
||||
&[tid='122']{background-color: var(--e-col-122);}
|
||||
&[tid='129']{background-color: var(--e-col-129);}
|
||||
&[tid='120']{background-color: var(--e-col-120);}
|
||||
&[tid='130']{background-color: var(--e-col-130);}
|
||||
&[tid='118']{background-color: var(--e-col-118);}
|
||||
&[tid='127']{background-color: var(--e-col-127);}
|
||||
&[tid='133']{background-color: var(--e-col-133);}
|
||||
&[tid='128']{background-color: var(--e-col-128);}
|
||||
&[tid='124']{background-color: var(--e-col-124);}
|
||||
&[tid='116']{background-color: var(--e-col-116);}
|
||||
&[tid='117']{background-color: var(--e-col-117);}
|
||||
&[tid='131']{background-color: var(--e-col-131);}
|
||||
&[tid='126']{background-color: var(--e-col-126);}
|
||||
&[tid='123']{background-color: var(--e-col-123);}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -385,7 +392,7 @@ main[role="main"]{
|
||||
.cartel{
|
||||
// TODO: set max-width regarding responsive
|
||||
position: relative;
|
||||
max-width: 350px;
|
||||
// max-width: 350px;
|
||||
margin-left: 1em;
|
||||
background-color: white;
|
||||
opacity: 1;
|
||||
@@ -403,20 +410,18 @@ main[role="main"]{
|
||||
}
|
||||
.cartels{
|
||||
.first-cartel{
|
||||
|
||||
// visibility: hidden;
|
||||
.entrees{
|
||||
line-height: 0;
|
||||
span{
|
||||
@include entrie-micro-square;
|
||||
}
|
||||
@include entree-micro-square;
|
||||
}
|
||||
h2.node-title{
|
||||
margin:0.2em 0 0;
|
||||
font-size: 1em;
|
||||
font-size: 0.9em;
|
||||
font-weight: 600;
|
||||
}
|
||||
p{
|
||||
margin:0;
|
||||
font-size: 0.75em;
|
||||
font-size: 0.756em;
|
||||
}
|
||||
}
|
||||
.second-cartel{
|
||||
@@ -424,29 +429,49 @@ main[role="main"]{
|
||||
top: 0; left:0;
|
||||
background-color: white;
|
||||
height:100%; min-width: 100%;
|
||||
opacity: 0;
|
||||
opacity: 1;
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
white-space: nowrap;
|
||||
&>*{
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
white-space: normal;
|
||||
}
|
||||
.col-left{
|
||||
a{
|
||||
display: block;
|
||||
font-size: 0.90em;
|
||||
font-size: 0.82em;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.col-right{
|
||||
font-size: 0.75em;
|
||||
border-left:1px solid #1A1A1A;
|
||||
margin-left:5px; padding-left:5px;
|
||||
h3{
|
||||
font-size: 0.82em;
|
||||
margin:0;
|
||||
}
|
||||
p{
|
||||
font-size: 0.756em;
|
||||
margin:0;
|
||||
span.cat{
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover{
|
||||
.second-cartel{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
article:not(.has-second-cartel){
|
||||
.second-cartel{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -490,7 +515,13 @@ main[role="main"]{
|
||||
text-indent: 0;
|
||||
padding: 0.5em;
|
||||
margin:$s*1.2 0 0 $s*1.2;
|
||||
p{margin: 0;}
|
||||
p{
|
||||
font-size: 0.756em;
|
||||
margin:0;
|
||||
&:not(:last-of-type){
|
||||
margin: 0 0 0.4em 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
@@ -606,10 +637,7 @@ main[role="main"]{
|
||||
}
|
||||
}
|
||||
.entrees{
|
||||
line-height: 0;
|
||||
span{
|
||||
@include entrie-micro-square;
|
||||
}
|
||||
@include entree-micro-square;
|
||||
}
|
||||
a.audio-link{
|
||||
text-transform: capitalize;
|
||||
@@ -992,9 +1020,7 @@ main[role="main"]{
|
||||
}
|
||||
article{
|
||||
.entrees{
|
||||
span{
|
||||
@include entrie-micro-square;
|
||||
}
|
||||
@include entree-micro-square;
|
||||
}
|
||||
h2.node-title{
|
||||
margin:0 0 0.3em 0;
|
||||
@@ -1647,24 +1673,23 @@ footer{
|
||||
.inner{
|
||||
position: relative;
|
||||
.entrees{
|
||||
span{
|
||||
@include entrie-micro-square;
|
||||
}
|
||||
@include entree-micro-square;
|
||||
}
|
||||
.title{
|
||||
margin:0.3em 0;
|
||||
font-size: 1.2em;
|
||||
font-weight: 500;
|
||||
margin:0.2em 0 0;
|
||||
// margin:0.3em 0;
|
||||
font-size: 0.9em;
|
||||
font-weight: 600;
|
||||
}
|
||||
.description{
|
||||
p{
|
||||
margin:0;
|
||||
font-size: 0.75em;
|
||||
font-size: 0.756em;
|
||||
}
|
||||
}
|
||||
.chutier-icon{
|
||||
position:absolute;
|
||||
top:1em; right:1em;
|
||||
top:0.4em; right:0.4em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\Core\Link;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Template\Attribute;
|
||||
use Drupal\Component\Utility\Unicode;
|
||||
@@ -164,58 +165,50 @@ function edlptheme_preprocess_node__enregistrement__compo(&$vars){
|
||||
|
||||
function edlptheme_preprocess_node__enregistrement__player_cartel(&$vars){
|
||||
// dpm($vars);
|
||||
$node = $vars['node'];
|
||||
|
||||
$vars['col_left'] = false;
|
||||
$vars['col_right'] = false;
|
||||
|
||||
// if transcript not empty
|
||||
$url = Url::fromRoute('entity.node.canonical', ['node'=>$vars['node']->id()], array(
|
||||
'attributes' => array(
|
||||
'class' => ['link-transcript', 'ajax-link'],
|
||||
'viewmode'=>'transcript'
|
||||
)
|
||||
));
|
||||
$vars['link_transcript'] = array(
|
||||
'#title' => t("Lire le text."),
|
||||
'#type' => 'link',
|
||||
'#url' => $url,
|
||||
'#options'=>array(
|
||||
$transcript = $node->get('field_transcript_vo');
|
||||
if(!$transcript->isEmpty()){
|
||||
$vars['col_left'] = true;
|
||||
$url = Url::fromRoute('entity.node.canonical', ['node'=>$node->id()]);
|
||||
$url->setOptions(array(
|
||||
'attributes' => array(
|
||||
'class' => ['link-transcript', 'ajax-link'],
|
||||
'viewmode'=>'transcript',
|
||||
'data-drupal-link-system-path' => $url->getInternalPath()
|
||||
)
|
||||
)
|
||||
);
|
||||
// TODO: refacorize the link generator as following :
|
||||
// $url = Url::fromRoute('entity.taxonomy_term.canonical', ['taxonomy_term'=>$tid]);
|
||||
// $url->setOptions(array(
|
||||
// 'attributes' => array(
|
||||
// 'class' => ['index-link', 'ajax-link'],
|
||||
// 'viewmode'=>'index',
|
||||
// 'tid'=>$tid,
|
||||
// 'data-drupal-link-system-path' => $url->getInternalPath()
|
||||
// )
|
||||
// ));
|
||||
// $entree['index_link'] = Link::fromTextAndUrl('index', $url);
|
||||
));
|
||||
$vars['link_transcript'] = Link::fromTextAndUrl(t("Lire le text."), $url);
|
||||
}
|
||||
|
||||
// if article not empty
|
||||
$url = Url::fromRoute('entity.node.canonical', ['node'=>$vars['node']->id()], array(
|
||||
'attributes' => array(
|
||||
'class' => ['link-article', 'ajax-link'],
|
||||
'viewmode'=>'article'
|
||||
)
|
||||
));
|
||||
$vars['link_article'] = array(
|
||||
'#title' => t("Lire l'article."),
|
||||
'#type' => 'link',
|
||||
'#url' => $url,
|
||||
'#options' => array(
|
||||
'attributes'=>array(
|
||||
$article = $node->get('body');
|
||||
if(!$article->isEmpty()){
|
||||
$vars['col_left'] = true;
|
||||
$url = Url::fromRoute('entity.node.canonical', ['node'=>$node->id()]);
|
||||
$url->setOptions(array(
|
||||
'attributes' => array(
|
||||
'class' => ['link-article', 'ajax-link'],
|
||||
'viewmode'=>'article',
|
||||
'data-drupal-link-system-path' => $url->getInternalPath()
|
||||
)
|
||||
)
|
||||
);
|
||||
// if article or transcript
|
||||
$vars['col_left'] = true;
|
||||
));
|
||||
$vars['link_article'] = Link::fromTextAndUrl(t("Lire l'article."), $url);
|
||||
}
|
||||
|
||||
// if
|
||||
$vars['col_right'] = true;
|
||||
// relations (defined in edlp_corpus.module)
|
||||
if(isset($vars['content']['relations'])){
|
||||
// dpm($relations);
|
||||
$vars['col_right'] = true;
|
||||
}
|
||||
|
||||
if($vars['col_left'] || $vars['col_right']){
|
||||
$vars['second_cartel'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -78,6 +78,7 @@
|
||||
node.isSticky() ? 'node--sticky',
|
||||
not node.isPublished() ? 'node--unpublished',
|
||||
view_mode ? 'node--view-mode-' ~ view_mode|clean_class,
|
||||
second_cartel ? 'has-second-cartel',
|
||||
]
|
||||
%}
|
||||
{{ attach_library('classy/node') }}
|
||||
@@ -111,7 +112,7 @@
|
||||
{% endif %}
|
||||
{% if col_right %}
|
||||
<div class="col-right">
|
||||
right colume
|
||||
{{ content.relations }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user