mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	better tooltips
This commit is contained in:
		@@ -6,6 +6,28 @@
 | 
				
			|||||||
    background-color: #9e9e9e;
 | 
					    background-color: #9e9e9e;
 | 
				
			||||||
    cursor: pointer;
 | 
					    cursor: pointer;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  .material-tooltip {
 | 
				
			||||||
 | 
					      padding: 5px 20px 20px;
 | 
				
			||||||
 | 
					      border-radius: 10px;
 | 
				
			||||||
 | 
					      background: rgba(37, 36, 36);
 | 
				
			||||||
 | 
					      overflow: visible;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .material-tooltip .backdrop {
 | 
				
			||||||
 | 
					      display: none !important;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  .material-tooltip:after {
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    top: 100%;
 | 
				
			||||||
 | 
					    left: 50%;
 | 
				
			||||||
 | 
					    margin-left: -8px;
 | 
				
			||||||
 | 
					    width: 0;
 | 
				
			||||||
 | 
					    height: 0;
 | 
				
			||||||
 | 
					    border-style: solid;
 | 
				
			||||||
 | 
					    border-width: 15px 13px 0 13px;
 | 
				
			||||||
 | 
					    border-color: rgba(37, 36, 36) transparent transparent transparent;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="col s12 m3 sticky">
 | 
					<div class="col s12 m3 sticky">
 | 
				
			||||||
@@ -239,15 +261,29 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  function addToolTipToTokenElement(tokenElement, token) {
 | 
					  function addToolTipToTokenElement(tokenElement, token) {
 | 
				
			||||||
    M.Tooltip.init(tokenElement,
 | 
					    M.Tooltip.init(tokenElement,
 | 
				
			||||||
                   {"html": `<p>Token information</p>
 | 
					                   {"html": `<table>
 | 
				
			||||||
                             <p class="left-align">
 | 
					                               <tr>
 | 
				
			||||||
 | 
					                                 <th>Token information</th>
 | 
				
			||||||
 | 
					                                 <th>Source information</th>
 | 
				
			||||||
 | 
					                               </tr>
 | 
				
			||||||
 | 
					                               <tr>
 | 
				
			||||||
 | 
					                                 <td class="left-align">
 | 
				
			||||||
                                   word: ${token["word"]}<br>
 | 
					                                   word: ${token["word"]}<br>
 | 
				
			||||||
                                   lemma: ${token["lemma"]}<br>
 | 
					                                   lemma: ${token["lemma"]}<br>
 | 
				
			||||||
                                   pos: ${token["pos"]}<br>
 | 
					                                   pos: ${token["pos"]}<br>
 | 
				
			||||||
                               simple_pos: ${token["simple_pos"]}<br>
 | 
					                                   simple_pos: ${token["simple_pos"]}
 | 
				
			||||||
                               text: ${result["text_loopup"][token["text_id"]]["title"]}
 | 
					                                 </td>
 | 
				
			||||||
                             </p>`,
 | 
					                                 <td class="left-align">
 | 
				
			||||||
                   "position": "top"});
 | 
					                                   Title: ${result["text_loopup"][token["text_id"]]["title"]}<br>
 | 
				
			||||||
 | 
					                                   Author: ${result["text_loopup"][token["text_id"]]["title"]}<br>
 | 
				
			||||||
 | 
					                                   Publishing year: ${result["text_loopup"][token["text_id"]]["publishing_year"]}
 | 
				
			||||||
 | 
					                                 </td>
 | 
				
			||||||
 | 
					                               </tr>
 | 
				
			||||||
 | 
					                             </table>`,
 | 
				
			||||||
 | 
					                   "inDuration": 2500,
 | 
				
			||||||
 | 
					                   "margin": 15,
 | 
				
			||||||
 | 
					                   "position": "top",
 | 
				
			||||||
 | 
					                   "transitionMovement": 0});
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user