halo-theme-xinac-fantastic/layout/layout.ftl

182 lines
8.9 KiB
Plaintext
Raw Normal View History

2020-03-27 10:31:36 +00:00
<#macro layout title,canonical>
<#include "common/head.ftl">
2019-10-02 16:15:37 +00:00
<#include "common/navbar.ftl">
<#include "common/widget.ftl">
<#include "common/module.ftl">
<!DOCTYPE html>
2020-04-07 04:01:07 +00:00
<html lang="zh-CN">
2019-10-02 16:15:37 +00:00
<head>
2020-04-07 04:01:07 +00:00
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
2019-10-02 16:15:37 +00:00
<title>${title!}</title>
2020-04-07 04:01:07 +00:00
<meta name="keywords" content="${meta_keywords!}" />
<meta name="description" content="${meta_description!}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="${title!}" />
<meta property="og:url" content="${canonical}" />
<meta property="og:site_name" content="${title!}" />
<meta property="og:description" content="${meta_description!}" />
<meta property="og:locale" content="zh-CN" />
<meta property="og:image" content="${user.avatar!}" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="${title!}" />
<meta name="twitter:description" content="${meta_description!}" />
<meta name="twitter:image" content="${user.avatar!}" />
2019-10-02 16:15:37 +00:00
2020-04-07 04:01:07 +00:00
<link rel="canonical" href="${canonical!}" />
<link rel="alternative" href="${atom_url!}" title="${blog_title!}" type="application/atom+xml" />
2019-10-02 16:15:37 +00:00
<@global.head />
2020-04-07 04:01:07 +00:00
<link rel="stylesheet" href="${settings.cdn_bulma_css!}" />
<link rel="stylesheet" href="${settings.cdn_fontawesome_css!}" />
<link href="${settings.cdn_google_fonts!}/css?family=Fira+Sans&display=swap" rel="stylesheet" />
2019-10-02 16:15:37 +00:00
<style>
body > .footer,
body > .navbar,
body > .section {
opacity: 0
}
</style>
<#if is_post?? || is_sheet?? || is_journal??>
2019-10-02 16:15:37 +00:00
<style>
.content code .number {
background-color: transparent;
border-radius: 0;
display: unset;
font-size: 1em;
2019-10-02 16:15:37 +00:00
margin-right: 0;
padding: 0;
vertical-align: unset;
}
2020-02-29 11:19:36 +00:00
.tag {
font-size: 1em !important;
padding-right: 0 !important;
padding-left: 0 !important;
}
2020-02-29 11:19:36 +00:00
.attr-name {
padding-left: 0.75em !important;
}
2019-10-02 16:15:37 +00:00
</style>
</#if>
<#if is_post?? || is_sheet?? || is_journal??>
2020-04-07 04:01:07 +00:00
<link rel="stylesheet" href="${settings.cdn_lightgallery_css!}" />
<link rel="stylesheet" href="${settings.cdn_justifiedGallery_css!}" />
2019-10-02 16:15:37 +00:00
</#if>
2020-04-02 09:58:19 +00:00
<link rel="stylesheet" href="${theme_base!}/source/lib/outdatedbrowser/outdatedbrowser.min.css" />
<script src="${settings.cdn_pace_js!}"></script>
2019-10-02 16:15:37 +00:00
2020-04-07 04:01:07 +00:00
<link rel="stylesheet" href="${theme_base!}/source/css/style.css" />
<link rel="stylesheet" href="${theme_base!}/source/css/bundle.css" />
<link rel="stylesheet" href="${theme_base!}/source/css/back-to-top.css" />
2019-10-14 14:27:49 +00:00
<#include "./plugin/style.theme.ftl">
<#if post?? || journals??>
2020-04-07 04:01:07 +00:00
<link rel="stylesheet" type="text/css" href="${theme_base!}/source/lib/prism/css/prism-${settings.code_pretty!'Default'}.css" />
2020-03-27 10:31:36 +00:00
<script type="text/javascript" src="${theme_base!}/source/lib/prism/js/prism.js"></script>
2019-10-02 16:15:37 +00:00
</#if>
<#if is_index??>
2020-04-07 04:01:07 +00:00
<link rel="stylesheet" href="${theme_base!}/source/css/widget_pin.css" />
<link rel="stylesheet" href="${settings.cdn_swiper_css!}" />
2019-10-02 16:15:37 +00:00
</#if>
2020-02-29 11:19:36 +00:00
<#if settings.kanbanniang!true>
<script src="https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget@latest/autoload.js"></script>
</#if>
2019-10-02 16:15:37 +00:00
</head>
<body class="is-3-column">
<@navbar 'page' />
2019-10-16 15:25:57 +00:00
<div class="card-normal">
<section class="section">
<div class="container">
<div class="columns"><#--<#if is_sheet??>is-centered</#if>-->
2019-10-16 15:25:57 +00:00
<#if post?? >
<#if is_post??>
<#if settings.share_type !=''>
<@module 'share' />
</#if>
<div class="column is-12-tablet is-8-desktop is-8-widescreen is-8-fullhd has-order-2 column-main">
<#nested />
</div>
<@widget 'right' />
<#elseif is_sheet??>
<div class="column is-12-tablet is-9-desktop is-9-widescreen is-9-fullhd has-order-3 column-main">
2019-10-16 15:25:57 +00:00
<#nested />
</div>
<@widget 'right' />
2019-10-16 15:25:57 +00:00
</#if>
<#else >
<#if is_index??>
<div class="column is-8-tablet is-8-desktop is-9-widescreen is-9-fullhd has-order-2 column-main"
style="margin-left: 10px">
<div class="columns">
<div class="column is-12-tablet is-12-desktop is-12-widescreen has-order-2 column-main">
<#--判断是否已经有置顶文章-->
2019-10-16 15:25:57 +00:00
<#list posts.content as post>
<#if post.topPriority == 1>
<#assign isTop = 'yes'>
<#break>
</#if>
</#list>
<#if isTop??>
<div class="level">
<#--<#include "./common/widget_pin.ftl">-->
2019-10-16 15:25:57 +00:00
<@module 'slider' />
</div>
2019-10-02 16:15:37 +00:00
</#if>
2019-12-08 10:21:57 +00:00
<div class="level is-medium">
<div class="ceta">
2020-04-07 04:01:07 +00:00
<div class="tabs" style="overflow: hidden;">
2019-12-08 10:21:57 +00:00
<ul style="overflow: hidden;border-bottom-style: none">
<li class="is-active"><a>全部</a></li>
<@categoryTag method="list">
2020-04-07 04:01:07 +00:00
<#list categories?sort_by("postCount")?reverse as category>
<#if category_index < 7>
2020-02-29 11:19:36 +00:00
<li>
2020-03-27 10:31:36 +00:00
<a href="${category.fullPath!}"
2020-04-07 04:01:07 +00:00
style="text-transform: capitalize;">${category.name!}</a>
2020-02-29 11:19:36 +00:00
</li>
</#if>
2019-12-08 10:21:57 +00:00
</#list>
</@categoryTag>
</ul>
</div>
</div>
</div>
2019-10-02 16:15:37 +00:00
<div class="level">
2020-04-07 04:01:07 +00:00
<div class="columns" style="width: 105%;">
2019-10-16 15:25:57 +00:00
<div class="column is-12-tablet is-12-desktop is-8-widescreen is-8-fullhd has-order-2 column-main">
<#nested />
</div>
<@widget 'right' />
2019-10-02 16:15:37 +00:00
</div>
</div>
2019-10-16 15:25:57 +00:00
</div>
2019-10-02 16:15:37 +00:00
</div>
</div>
2019-10-16 15:25:57 +00:00
<@widget 'left' />
<#else>
<div class="column is-12-tablet is-8-desktop is-6-widescreen is-6-fullhd has-order-2 column-main">
<#nested />
</div>
<@widget 'left' />
<@widget 'right' />
</#if>
2019-10-02 16:15:37 +00:00
</#if>
2019-10-16 15:25:57 +00:00
</div>
2019-10-02 16:15:37 +00:00
</div>
2019-10-16 15:25:57 +00:00
</section>
</div>
2019-10-02 16:15:37 +00:00
<#include "common/footer.ftl">
<#include "common/scripts.ftl">
<#include "search/local.ftl">
</body>
</html>
</#macro>