Skip to content

Commit

Permalink
Merge pull request #1645 from artengin/iss1644
Browse files Browse the repository at this point in the history
Moved the pdf from gdrive to repository. Closes #1644
  • Loading branch information
fey authored Nov 8, 2024
2 parents 1876947 + 04f0ea5 commit 9b88dfe
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions app/Helpers/TemplateHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,4 @@ public static function getTitleContent(string $header): string
$name = __('layout.title.name_SICP');
return "{$header} - {$name}";
}

public static function getBookLink(string $locale): string
{
return match ($locale) {
'ru' => 'https://drive.google.com/file/d/1xc9r6txuTZMZ5lPy9YQuD1Dwv9spg7Nt/view?usp=sharing',
default => 'https://drive.google.com/file/d/1t3rlltwuU85ow7g0ZI6Kx7eY5n-Umh8p/view?usp=sharing',
};
}
}
Binary file added resources/assets/pdf/sicp-en.pdf
Binary file not shown.
Binary file added resources/assets/pdf/sicp-ru.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import correctionListener from './correction';

import.meta.glob([
'../assets/images/**',
'../assets/pdf/**',
]);

window.bootstrap = bootstrap;
Expand Down
3 changes: 1 addition & 2 deletions resources/views/layouts/_nav.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@php
use App\Helpers\TemplateHelper;
use App\Helpers\LocalizationHelper;
$currentLocale = LaravelLocalization::getCurrentLocale();
$locales = LaravelLocalization::getSupportedLocales();
Expand Down Expand Up @@ -29,7 +28,7 @@ class="nav-link p-2">{{ __('layout.nav.sicp_read') }}</a></li>
@endif
<li class="nav-item"><a href="{{ route('top.index') }}" class="nav-link p-2">{{ __('layout.nav.rating') }}</a>
</li>
<li class="nav-item"><a href="{{ TemplateHelper::getBookLink($currentLocale) }}"
<li class="nav-item"><a href="{{ Vite::asset("resources/assets/pdf/sicp-{$currentLocale}.pdf") }}" target="_blank"
class="nav-link link-info p-2">{{ __('layout.nav.sicp_book') }}</a></li>
</ul>
<ul class="navbar-nav ms-md-auto">
Expand Down

0 comments on commit 9b88dfe

Please sign in to comment.