Update tailwind for twig
This commit is contained in:
parent
fa1d942d4e
commit
9510bf2e9b
4 changed files with 24 additions and 25 deletions
|
@ -63,17 +63,6 @@ class AntPages
|
|||
$antTwig = new AntTwig;
|
||||
$navHTML = $antTwig->renderWithTiwg($navTemplate, array('pages' =>$pages));
|
||||
|
||||
/*$navHTML = '';
|
||||
$baseURL = $currentConfig['baseURL'];
|
||||
foreach ($pages as $page) {
|
||||
if (!$page['showInNav']) {
|
||||
continue;
|
||||
}
|
||||
$url = "//" . str_replace('//', '/', $baseURL . $page['functionalPagePath']);
|
||||
$navEntry = str_replace('<!--AntCMS-PageLink-->', $url, $navTemplate);
|
||||
$navEntry = str_replace('<!--AntCMS-PageTitle-->', $page['pageTitle'], $navEntry);
|
||||
$navHTML .= $navEntry;
|
||||
}*/
|
||||
$cache->setCache($cacheKey, $navHTML);
|
||||
return $navHTML;
|
||||
}
|
||||
|
|
|
@ -30,12 +30,20 @@ class AntTools
|
|||
return $newPath;
|
||||
}
|
||||
|
||||
public static function repairURL($url)
|
||||
{
|
||||
$newURL = str_replace('\\\\', '/', $url);
|
||||
$newURL = str_replace('\\', '/', $newURL);
|
||||
$newURL = str_replace('//', '/', $newURL);
|
||||
|
||||
return $newURL;
|
||||
}
|
||||
/**
|
||||
* Repairs a URL by replacing backslashes with forward slashes and removing duplicate slashes.
|
||||
*
|
||||
* @param string $url The URL to repair. Note: this function will not work correctly if the URL provided has its own protocol (like HTTS://).
|
||||
* @return string The repaired URL
|
||||
*/
|
||||
public static function repairURL($url)
|
||||
{
|
||||
$newURL = str_replace('\\\\', '/', $url);
|
||||
$newURL = str_replace('\\', '/', $newURL);
|
||||
$newURL = str_replace('//', '/', $newURL);
|
||||
|
||||
return $newURL;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="<!--AntCMS-Description-->">
|
||||
<meta name="author" content="<!--AntCMS-Author-->">
|
||||
<meta name="keywords" content="<!--AntCMS-Keywords-->">
|
||||
<meta name="description" content="{{ AntCMSDescription }}">
|
||||
<meta name="author" content="{{ AntCMSAuthor }}">
|
||||
<meta name="keywords" content="{{ AntCMSKeywords }}">
|
||||
|
||||
<link href="<!--AntCMS-SiteLink-->Themes/Default/Assets/Dist/tailwind.css" rel="stylesheet">
|
||||
|
||||
<title><!--AntCMS-Title--></title>
|
||||
<title>{{ AntCMSTitle }}</title>
|
||||
</head>
|
||||
|
||||
<body class="bg-gray-50 dark:bg-zinc-800 text-gray-500 dark:text-gray-400">
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
<li>
|
||||
<a href="<!--AntCMS-PageLink-->" class="block py-2 pl-3 pr-4 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent"><!--AntCMS-PageTitle--></a>
|
||||
</li>
|
||||
{% for page in pages %}
|
||||
<li class="nav-item active">
|
||||
<a class="block py-2 pl-3 pr-4 text-gray-700 rounded hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 md:dark:hover:text-white dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent" href="{{ page.url }}">{{ page.pageTitle }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
Loading…
Add table
Reference in a new issue