add a download link, visible only on mobile

This commit is contained in:
E. S. 2024-01-04 18:28:56 +00:00
parent 5721753705
commit 2e4728b61e
3 changed files with 7 additions and 1 deletions

View File

@ -73,6 +73,7 @@ a.head-item {
height: 18px;
}
}
&.is-download {display:none;}
&:hover {
border-radius: 4px;

View File

@ -36,6 +36,9 @@ a.head-item:active {
a.head-item:last-child > span {
border-right: 0;
}
a.head-item.is-download {
display: inline-block;
}
// blog
.blog-tags {

View File

@ -187,7 +187,7 @@ function getStaticVersion(string $name): string {
function renderHeader(SkinContext $ctx, string $theme): string {
$items = [
//['url' => '/articles/', 'label' => 'articles'],
['url' => '/#download', 'label' => 'download', 'type' => 'download'],
['url' => 'https://files.4in1.ws', 'label' => 'materials'],
['url' => '/contacts/', 'label' => 'contacts']
];
@ -237,6 +237,8 @@ switch ($type) {
case 'settings':
$class = ' is-settings';
break;
case 'download':
$class = ' is-download';
}
return <<<HTML
<a class="head-item{$class}" href="{$url}"{$args}>{$unsafe_label}</a>