fix: remove jquery

This commit is contained in:
Kazhnuz Klappsthul 2023-05-03 13:18:11 +02:00
parent 2d0c1fda68
commit 8d1cb11b08
5 changed files with 22 additions and 21 deletions

File diff suppressed because one or more lines are too long

View File

@ -19,8 +19,6 @@
<!-- CSS -->
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet"/>
<script src="<?php echo get_template_directory_uri();?>/dep/jquery/jquery.js"></script>
</head>
<!-- Début du vrai HTML -->

View File

@ -1,8 +1,6 @@
var length = 35;
$(function(){
$(".pretty-link").each(function(i){
var str = $(this).text().replace("https://", "");
$(this).text(str);
});
});
document.querySelectorAll('.pretty-link').forEach(function (i) {
var str = i.textContent.replace('https://', '');
i.textContent = str;
});

View File

@ -1,11 +1,18 @@
var length = 35;
const LENGHT = 35;
$(function(){
$(".trim-that a, .limit").each(function(i){
len=$(this).text().length;
if(len>length)
{
$(this).text($(this).text().substr(0,(length-3))+'...');
}
});
function limitString(str) {
len = str.length;
if (len > LENGHT) {
return str.substr(0, (LENGHT - 3)) + '...';
} else {
return str;
}
}
document.querySelectorAll('.trim-that a').forEach(function (i) {
i.textContent = limitString(i.textContent);
});
document.querySelectorAll('.limit').forEach(function (i) {
i.textContent = limitString(i.textContent);
});

View File

@ -11,8 +11,8 @@
</div>
</article>
<div class="card head-primary">
<h2 class="card-header">Liste de mes réseaux sociaux</h2>
<div class="card head-secondary" id="social-network-card">
<h2 class="card-header"><i class="fa fa-comments" aria-hidden="true"></i> Me retrouver</h2>
<table>
<thead>
<tr>