Skip to content

Commit

Permalink
Merge pull request #363 from Steinbeck-Lab/fix-copyright-year
Browse files Browse the repository at this point in the history
fix: made the copyright year dynamic
  • Loading branch information
Kohulan authored Jan 28, 2025
2 parents 8ea54e3 + 589c105 commit a1fa939
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion app/Livewire/Terms.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ class Terms extends Component
public function mount()
{
$termsFile = Jetstream::localizedMarkdownPath('terms.md');
$this->terms = Str::markdown(file_get_contents($termsFile));
$content = file_get_contents($termsFile);

// Replace the hardcoded year with current year
$content = preg_replace('/Copyright \(c\) \d{4}/', 'Copyright (c) '.date('Y'), $content);

$this->terms = Str::markdown($content);
}

#[Layout('layouts.guest')]
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ features:

footer:
message: "COCONUT - Empowering Natural Product Research"
copyright: "© 2024 COCONUT Database"
copyright: "© 2025 COCONUT Database"

---

Expand Down
2 changes: 1 addition & 1 deletion resources/views/livewire/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class="absolute inset-0 -z-10 scale-75 rounded-lg bg-white/5 opacity-0 transitio
</div>
</a>
</div>
<p class="mt-8 text-center text-base text-gray-400"> © 2024 COCONUT. All rights reserved. </p>
<p class="mt-8 text-center text-base text-gray-400"> © {{ now()->year }} COCONUT. All rights reserved. </p>
<div class="mt-2 text-center text-base text-gray-400"><a target="_blank" href="/terms-of-service"
class="underline text-sm text-gray-600 hover:text-gray-900">Terms of Service</a> and <a
target="_blank" href="/privacy-policy"
Expand Down

0 comments on commit a1fa939

Please sign in to comment.