Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Moved the pdf from gdrive to repository. Closes #1644" #1646

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/Helpers/TemplateHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@ 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 removed resources/assets/pdf/sicp-en.pdf
Binary file not shown.
Binary file removed resources/assets/pdf/sicp-ru.pdf
Binary file not shown.
1 change: 0 additions & 1 deletion resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import correctionListener from './correction';

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

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