Skip to content

Commit

Permalink
Revert: HTML formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe committed Jun 26, 2024
1 parent 36726aa commit 0ad35bc
Showing 1 changed file with 120 additions and 132 deletions.
252 changes: 120 additions & 132 deletions src/_layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,141 +3,129 @@

<!DOCTYPE html>
<html lang="zh">

<head>
<meta charset="utf-8">
<title>{% if short-title %}{{short-title}}{% else %}{{title}}{% endif %} | {{site.title}}</title>
<link rel="icon" href="/assets/images/cn/flutter-icon.png">
<link rel="apple-touch-icon" href="/assets/images/cn/flutter-320px.png">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="#ffffff">

{% unless strip_fonts == true -%}
<link rel="preconnect" href="https://fonts.googleapis.cn">
<link rel="preconnect" href="https://fonts.gstatic.cn" crossorigin>
{% endunless -%}

{%- if isProduction == true -%}
<!-- <meta name="google-site-verification" content="{{ site.google_site_verification }}"> -->
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({
'gtm.start':
new Date().getTime(), event: 'gtm.js'
}); var f = d.getElementsByTagName(s)[0],
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src
'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', '{{ site.google_tag_manager_id }}');
</script>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o),
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', '{{ site.google_analytics_id }}', 'auto');
ga('send', 'pageview');
</script>
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?459029b086376519fc9bf43c184e2a4f";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
{% endif -%}

{% assign desc = description | default: site.description | strip_html | strip_newlines | truncate: 160 -%}
{% unless desc and desc != '' or page.url contains '/posts' or page.url contains '/community' -%}
{% assign error = page.url | append: ' must have a description specified!' -%}
{{ error | throw_error }}
{% endunless %}

{% assign og_image_path = image.path | default: layout.image.path | default: site.default_share_image -%}

<meta name="description" content="{{desc | escape}}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@flutterchina">

<meta property="og:title" content="{{title | escape}}">
<meta property="og:url" content="{{site.url | append: page_url}}">
<meta property="og:description" content="{{desc | escape}}">
<meta property="og:image" content="{{site.url | append: og_image_path}}">

{% unless strip_fonts == true -%}
<link rel="preconnect" href="{{site.flutter-files-cn}}">
<link href="{{site.flutter-files-cn}}fonts/flutter/fonts.css" rel="stylesheet">
<link href="{{site.flutter-files-cn}}fonts/material-icons/material-icons-symbols-outlined.css" rel="stylesheet">
<!-- <link href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap" rel="stylesheet">
<head>
<meta charset="utf-8">
<title>{% if short-title %}{{short-title}}{% else %}{{title}}{% endif %} | {{site.title}}</title>
<link rel="icon" href="/assets/images/cn/flutter-icon.png">
<link rel="apple-touch-icon" href="/assets/images/cn/flutter-320px.png">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="#ffffff">

{% unless strip_fonts == true -%}
<link rel="preconnect" href="https://fonts.googleapis.cn">
<link rel="preconnect" href="https://fonts.gstatic.cn" crossorigin>
{% endunless -%}

{%- if isProduction == true -%}
<!-- <meta name="google-site-verification" content="{{ site.google_site_verification }}"> -->
<script>
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','{{ site.google_tag_manager_id }}');
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics_id }}', 'auto');
ga('send', 'pageview');
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?459029b086376519fc9bf43c184e2a4f";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
{% endif -%}

{% assign desc = description | default: site.description | strip_html | strip_newlines | truncate: 160 -%}
{% unless desc and desc != '' or page.url contains '/posts' or page.url contains '/community' -%}
{% assign error = page.url | append: ' must have a description specified!' -%}
{{ error | throw_error }}
{% endunless %}

{% assign og_image_path = image.path | default: layout.image.path | default: site.default_share_image -%}

<meta name="description" content="{{desc | escape}}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@flutterchina">

<meta property="og:title" content="{{title | escape}}">
<meta property="og:url" content="{{site.url | append: page_url}}">
<meta property="og:description" content="{{desc | escape}}">
<meta property="og:image" content="{{site.url | append: og_image_path}}">

{% unless strip_fonts == true -%}
<link rel="preconnect" href="{{site.flutter-files-cn}}">
<link href="{{site.flutter-files-cn}}fonts/flutter/fonts.css" rel="stylesheet">
<link href="{{site.flutter-files-cn}}fonts/material-icons/material-icons-symbols-outlined.css" rel="stylesheet">
<!-- <link href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Google+Sans+Text:wght@400;500;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Google+Sans+Mono:wght@400;500;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet" /> -->
{% endunless -%}

{% if diff2html -%}
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/bundles/css/diff2html.min.css" integrity="sha256-IMBK4VNZp0ivwefSn51bswdsrhk0HoMTLc2GqFHFBXg=" crossorigin="anonymous" referrerpolicy="no-referrer" /> -->
<!-- docs.flutter.cn -->
<link rel="stylesheet" href="{{ '/assets/js/[email protected]/diff2html.min.css' | append: cache_bust }}">
{% endif -%}

<script>
window.__CALLBACKS = [];
</script>

<link rel="stylesheet" href="{{ '/assets/css/main.css' | append: cache_bust }}">
{% if css -%}
{% for cssFile in css -%}
{% assign asset_path = '/assets/css/{{cssFile}}' -%}
<link rel="stylesheet" href="{{ asset_path | append: cache_bust }}">
{% endfor -%}
{% endif -%}
</head>
<body{% if body_class %} class="{{ body_class }}" {% endif %}>

<!-- {% render cookie-notice.html %}-->

{%- if isProduction == true -%}
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id={{ site.google_tag_manager_id }}" height="0" width="0"
style="display:none;visibility:hidden">
</iframe>
</noscript>
{% endif -%}

<div id="overlay-under-drawer"></div>

{% include header.html %}

{% render banner.html %}

{{ content }}

{% render footer.html %}

<script src="https://cdn.staticfile.net/jquery/3.7.0/jquery.min.js"
integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdn.staticfile.net/popper.js/1.16.1/umd/popper.min.js"
integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdn.staticfile.net/bootstrap/4.6.2/js/bootstrap.min.js"
integrity="sha512-7rusk8kGPFynZWu26OKbTeI+QPoYchtxsmPeBqkHIEXJxeun4yJ4ISYe7C6sz9wdxeE1Gk3VxsIWgCZTc+vX3g=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- <script src="https://cdn.staticfile.net/js-cookie/3.0.5/js.cookie.min.js" integrity="sha512-nlp9/l96/EpjYBx7EP7pGASVXNe80hGhYAUrjeXnu/fyF5Py0/RXav4BBNs7n5Hx1WFhOEOWSAVjGeC3oKxDVQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>-->

<script src="{{ '/assets/js/tabs.js' | append: cache_bust }}"></script>
<script src="{{ '/assets/js/archive.js' | append: cache_bust }}"></script>
<script src="{{ '/assets/js/main.js' | append: cache_bust }}"></script>

{% if js -%}
{% for jsFile in js -%}
<script src="{{ jsFile.url | default: js }}" {% if jsFile.defer %}defer{% endif %}></script>
{% endfor -%}
{% endif -%}
{% endunless -%}

</body>
{% if diff2html -%}
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/bundles/css/diff2html.min.css" integrity="sha256-IMBK4VNZp0ivwefSn51bswdsrhk0HoMTLc2GqFHFBXg=" crossorigin="anonymous" referrerpolicy="no-referrer" /> -->
<!-- docs.flutter.cn -->
<link rel="stylesheet" href="{{ '/assets/js/[email protected]/diff2html.min.css' | append: cache_bust }}">
{% endif -%}

<script>
window.__CALLBACKS = [];
</script>

<link rel="stylesheet" href="{{ '/assets/css/main.css' | append: cache_bust }}">
{% if css -%}
{% for cssFile in css -%}
{% assign asset_path = '/assets/css/{{cssFile}}' -%}
<link rel="stylesheet" href="{{ asset_path | append: cache_bust }}">
{% endfor -%}
{% endif -%}
</head>
<body{% if body_class %} class="{{ body_class }}"{% endif %}>

<!-- {% render cookie-notice.html %}-->

{%- if isProduction == true -%}
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id={{ site.google_tag_manager_id }}"
height="0" width="0" style="display:none;visibility:hidden">
</iframe>
</noscript>
{% endif -%}

<div id="overlay-under-drawer"></div>

{% include header.html %}

{% render banner.html %}

{{ content }}

{% render footer.html %}

<script src="https://cdn.staticfile.net/jquery/3.7.0/jquery.min.js" integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdn.staticfile.net/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdn.staticfile.net/bootstrap/4.6.2/js/bootstrap.min.js" integrity="sha512-7rusk8kGPFynZWu26OKbTeI+QPoYchtxsmPeBqkHIEXJxeun4yJ4ISYe7C6sz9wdxeE1Gk3VxsIWgCZTc+vX3g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- <script src="https://cdn.staticfile.net/js-cookie/3.0.5/js.cookie.min.js" integrity="sha512-nlp9/l96/EpjYBx7EP7pGASVXNe80hGhYAUrjeXnu/fyF5Py0/RXav4BBNs7n5Hx1WFhOEOWSAVjGeC3oKxDVQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>-->

<script src="{{ '/assets/js/tabs.js' | append: cache_bust }}"></script>
<script src="{{ '/assets/js/archive.js' | append: cache_bust }}"></script>
<script src="{{ '/assets/js/main.js' | append: cache_bust }}"></script>

{% if js -%}
{% for jsFile in js -%}
<script src="{{ jsFile.url | default: js }}" {% if jsFile.defer %}defer{% endif %}></script>
{% endfor -%}
{% endif -%}

</body>
</html>

0 comments on commit 0ad35bc

Please sign in to comment.