Skip to content

Commit

Permalink
页面footer添加统计埋点区域
Browse files Browse the repository at this point in the history
  • Loading branch information
mylxsw committed May 6, 2019
1 parent 8386c8f commit d5c94f7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ npm-debug.log
yarn-error.log
.env
.env.local
/old2
/old2
custom/
15 changes: 15 additions & 0 deletions app/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,4 +452,19 @@ function ldap_enabled(): bool
}

return $enabled;
}

/**
* 站长统计代码区域
*
* @return string
*/
function statistics(): string
{
$customFile = base_path('custom');
if (file_exists("{$customFile}/statistics.html")) {
return file_get_contents("{$customFile}/statistics.html");
}

return '';
}
6 changes: 5 additions & 1 deletion resources/views/layouts/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@
@if(!isset($noheader) || !$noheader)
<footer class="footer">
<div class="@yield('container-style')">
<p>&copy; {{ date('Y') }} {{ config('wizard.copyright', 'AICODE.CC') }} <a class="fa fa-github" target="_blank" href="https://github.com/mylxsw/wizard"></a></p>
<p>
&copy; {{ date('Y') }} {{ config('wizard.copyright', 'AICODE.CC') }}
<a class="fa fa-github" target="_blank" href="https://github.com/mylxsw/wizard"></a>
{!! statistics() !!}
</p>
</div>
</footer>
@endif
Expand Down

0 comments on commit d5c94f7

Please sign in to comment.