mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Convert common/tpl/*_layout files to template v2
This commit is contained in:
parent
9d5dff5371
commit
e0c396bb3e
3 changed files with 65 additions and 46 deletions
|
|
@ -1,82 +1,99 @@
|
||||||
|
<config version="2" />
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{$lang_type = Context::getLangType()}" class="xe-mobilelayout"|cond="$m">
|
<html lang="{{ $lang_type = Context::getLangType() }}" class="xe-mobilelayout"|if="$m">
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<!-- META -->
|
<!-- META -->
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="generator" content="Rhymix">
|
<meta name="generator" content="Rhymix">
|
||||||
<meta name="viewport" content="{config('mobile.viewport') ?? HTMLDisplayHandler::DEFAULT_VIEWPORT}" />
|
<meta name="viewport" content="{{ config('mobile.viewport') ?? HTMLDisplayHandler::DEFAULT_VIEWPORT }}" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<block loop="Context::getMetaTag() => $no, $val">
|
@foreach (Context::getMetaTag() as $val)
|
||||||
<meta http-equiv="{$val['name']}"|cond="$val['is_http_equiv']" name="{$val['name']}"|cond="!$val['is_http_equiv']" content="{$val['content']}" />
|
<meta http-equiv="{{ $val['name'] }}"|if="$val['is_http_equiv']" name="{{ $val['name'] }}"|if="!$val['is_http_equiv']" content="{{ $val['content'] }}" />
|
||||||
</block>
|
@endforeach
|
||||||
<meta name="csrf-token" content="{\Rhymix\Framework\Session::getGenericToken()}" />
|
<meta name="csrf-token" content="{{ \Rhymix\Framework\Session::getGenericToken()|noescape }}" />
|
||||||
|
|
||||||
<!-- TITLE -->
|
<!-- TITLE -->
|
||||||
<title>{Context::getBrowserTitle()}</title>
|
<title>{{ Context::getBrowserTitle() }}</title>
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- CSS -->
|
||||||
<block loop="Context::getCssFile(true) => $key, $css_file">
|
@foreach (Context::getCssFile(true) as $css_file)
|
||||||
<link rel="stylesheet" href="{$css_file['file']}" media="{$css_file['media']}"|cond="$css_file['media'] != 'all'" />
|
<link rel="stylesheet" href="{{ $css_file['file']|noescape }}" media="{{ $css_file['media']|noescape }}"|if="$css_file['media'] !== 'all'" />
|
||||||
</block>
|
@endforeach
|
||||||
|
|
||||||
<!-- JS -->
|
<!-- JS -->
|
||||||
<block loop="Context::getJsFile('head', true) => $key, $js_file">
|
@foreach (Context::getJsFile('head', true) as $js_file)
|
||||||
<script src="{$js_file['file']}"></script>
|
<script src="{{ $js_file['file']|noescape }}"></script>
|
||||||
</block>
|
@endforeach
|
||||||
|
|
||||||
<!-- RSS -->
|
<!-- RSS -->
|
||||||
<link rel="alternate" type="application/rss+xml" title="RSS" href="{$rss_url}" cond="isset($rss_url) && $rss_url" />
|
@if (!empty($rss_url))
|
||||||
<link rel="alternate" type="application/rss+xml" title="Site RSS" href="{$general_rss_url}" cond="isset($general_rss_url) && $general_rss_url" />
|
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ $rss_url }}" />
|
||||||
<link rel="alternate" type="application/atom+xml" title="Atom" href="{$atom_url}" cond="isset($atom_url) && $atom_url" />
|
@endif
|
||||||
<link rel="alternate" type="application/atom+xml" title="Site Atom" href="{$general_atom_url}" cond="isset($general_atom_url) && $general_atom_url" />
|
@if (!empty($general_rss_url))
|
||||||
|
<link rel="alternate" type="application/rss+xml" title="Site RSS" href="{{ $general_rss_url }}" />
|
||||||
|
@endif
|
||||||
|
@if (!empty($atom_url))
|
||||||
|
<link rel="alternate" type="application/atom+xml" title="Atom" href="{{ $atom_url }}" />
|
||||||
|
@endif
|
||||||
|
@if (!empty($general_atom_url))
|
||||||
|
<link rel="alternate" type="application/atom+xml" title="Site Atom" href="{{ $general_atom_url }}" />
|
||||||
|
@endif
|
||||||
|
|
||||||
<!-- ICONS AND OTHER LINKS -->
|
<!-- ICONS AND OTHER LINKS -->
|
||||||
<link cond="Context::getCanonicalURL()" rel="canonical" href="{Context::getCanonicalURL()}" />
|
@if (!empty($canonical_url = Context::getCanonicalURL()))
|
||||||
<link cond="$favicon_url" rel="shortcut icon" href="{$favicon_url}" />
|
<link rel="canonical" href="{{ $canonical_url }}" />
|
||||||
<link cond="$mobicon_url" rel="apple-touch-icon" href="{$mobicon_url}" />
|
@endif
|
||||||
|
@if (!empty($favicon_url))
|
||||||
|
<link rel="shortcut icon" href="{$favicon_url}" />
|
||||||
|
@endif
|
||||||
|
@if (!empty($mobicon_url))
|
||||||
|
<link rel="apple-touch-icon" href="{$mobicon_url}" />
|
||||||
|
@endif
|
||||||
|
|
||||||
<!-- OTHER HEADERS -->
|
<!-- OTHER HEADERS -->
|
||||||
<block loop="Context::getOpenGraphData() => $og_metadata">
|
@foreach (Context::getOpenGraphData() as $og_metadata)
|
||||||
<meta property="{$og_metadata['property']}" content="{$og_metadata['content']}" />
|
<meta property="{$og_metadata['property']}" content="{$og_metadata['content']}" />
|
||||||
</block>
|
@endforeach
|
||||||
{Context::getHtmlHeader()|noescape}
|
{{ Context::getHtmlHeader()|noescape }}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<!-- BODY START -->
|
<!-- BODY START -->
|
||||||
<body{Context::getBodyClass()|noescape}>
|
<body{{ Context::getBodyClass()|noescape }}>
|
||||||
|
|
||||||
<!-- COMMON JS VARIABLES -->
|
<!-- COMMON JS VARIABLES -->
|
||||||
<script>
|
<script>
|
||||||
var default_url = "{\Rhymix\Framework\URL::encodeIdna(Context::getDefaultUrl(null, RX_SSL))}";
|
var default_url = @json(\Rhymix\Framework\URL::encodeIdna(Context::getDefaultUrl(null, RX_SSL)));
|
||||||
var current_url = "{\Rhymix\Framework\URL::encodeIdna($current_url)}";
|
var current_url = @json(\Rhymix\Framework\URL::encodeIdna($current_url));
|
||||||
var request_uri = "{\Rhymix\Framework\URL::encodeIdna($request_uri)}";
|
var request_uri = @json(\Rhymix\Framework\URL::encodeIdna($request_uri));
|
||||||
var current_lang = xe.current_lang = "{$lang_type}";
|
var current_lang = xe.current_lang = @json($lang_type);
|
||||||
var current_mid = {json_encode(isset($mid) ? $mid : null)};
|
var current_mid = @json($mid ?? null);
|
||||||
var http_port = {Context::get("_http_port") ?: 'null'};
|
var http_port = @json(Context::get("_http_port") ?: null);
|
||||||
var https_port = {Context::get("_https_port") ?: 'null'};
|
var https_port = @json(Context::get("_https_port") ?: null);
|
||||||
var enforce_ssl = {$site_module_info->security === 'always' ? 'true' : 'false'};
|
var enforce_ssl = @json($site_module_info->security === 'always' ? true : false);
|
||||||
var cookies_ssl = {config('session.use_ssl_cookies') ? 'true' : 'false'};
|
var cookies_ssl = @json(config('session.use_ssl_cookies') ? true : false);
|
||||||
var rewrite_level = {intval(\Rhymix\Framework\Router::getRewriteLevel())};
|
var rewrite_level = @json(intval(\Rhymix\Framework\Router::getRewriteLevel()));
|
||||||
if (detectColorScheme) detectColorScheme();
|
if (detectColorScheme) detectColorScheme();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- PAGE CONTENT -->
|
<!-- PAGE CONTENT -->
|
||||||
{Context::getBodyHeader()|noescape}
|
{{ Context::getBodyHeader()|noescape }}
|
||||||
{$content|noescape}
|
{{ $content|noescape }}
|
||||||
{Context::getHtmlFooter()|noescape}
|
{{ Context::getHtmlFooter()|noescape }}
|
||||||
{"\n\n"}
|
{{ "\n\n" }}
|
||||||
|
|
||||||
<!-- ETC -->
|
<!-- ETC -->
|
||||||
<div id="rhymix_waiting" class="wfsr" data-message="{$lang->msg_call_server}" cond="!$m"></div>
|
@desktop
|
||||||
|
<div id="rhymix_waiting" class="wfsr" data-message="@lang('msg_call_server')"></div>
|
||||||
|
@enddesktop
|
||||||
<div id="rhymix_alert"></div>
|
<div id="rhymix_alert"></div>
|
||||||
<div id="rhymix_debug_panel"></div>
|
<div id="rhymix_debug_panel"></div>
|
||||||
<div id="rhymix_debug_button"></div>
|
<div id="rhymix_debug_button"></div>
|
||||||
|
|
||||||
<!-- BODY JS -->
|
<!-- BODY JS -->
|
||||||
<block loop="Context::getJsFile('body', true) => $key, $js_file">
|
@foreach (Context::getJsFile('body', true) as $js_file)
|
||||||
<script src="{$js_file['file']}"></script>
|
<script src="{{ $js_file['file']|noescape }}"></script>
|
||||||
</block>
|
@endforeach
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
{$content|noescape}
|
@version(2)
|
||||||
|
{{ $content|noescape }}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
<load target="../../modules/admin/tpl/css/admin.bootstrap.css" />
|
@version(2)
|
||||||
<load target="../../modules/admin/tpl/css/admin.css" />
|
@load('../../modules/admin/tpl/css/admin.bootstrap.css')
|
||||||
|
@load('../../modules/admin/tpl/css/admin.css')
|
||||||
<div class="x popup">
|
<div class="x popup">
|
||||||
{$content|noescape}
|
{{ $content|noescape }}
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
jQuery(function() {
|
jQuery(function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue