|
@@ -10,14 +10,20 @@
|
|
|
<link rel="stylesheet" href="/assets/npm/docsify/vue.min.css">
|
|
|
<link rel="stylesheet" href="/assets/npm/gitalk/gitalk.min.css">
|
|
|
<script src="/assets/npm/docsify-plugin-carbon/index.min.js"></script>
|
|
|
+ <script type="text/javascript" charset="UTF-8" src="https://cdn.wwads.cn/js/makemoney.js" async></script>
|
|
|
<style>
|
|
|
nav.app-nav li ul {
|
|
|
min-width: 100px;
|
|
|
}
|
|
|
+ /* for wwads */
|
|
|
+ .content {
|
|
|
+ max-width: 1000px;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div id="app">Loading ...</div>
|
|
|
+ <div id="wwads-panel" class="wwads-cn wwads-vertical wwads-sticky" data-id="239" style="max-width:180px"></div>
|
|
|
<script>
|
|
|
window.$docsify = {
|
|
|
name: 'xrepo',
|
|
@@ -76,11 +82,37 @@
|
|
|
url = 'https://github.com/xmake-io/xrepo-docs/blob/master/' + vm.route.file
|
|
|
}
|
|
|
var editHtml = '[:memo: Edit Document](' + url + ')\n'
|
|
|
+ var wwads = ''
|
|
|
+ var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
|
+ if (isMobile) {
|
|
|
+ wwads += '\n\n----\n\n';
|
|
|
+ wwads += '<div class="wwads-cn wwads-horizontal" data-id="239" style="max-width:100%;background:#fff"></div>';
|
|
|
+ }
|
|
|
return editHtml
|
|
|
+ html
|
|
|
+ + wwads
|
|
|
+ '\n\n----\n\n'
|
|
|
+ '<a href="https://xmake.io" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Copyright (c) 2015-present tboox.org</a>'
|
|
|
- })
|
|
|
+ });
|
|
|
+
|
|
|
+ /* wwads */
|
|
|
+ hook.doneEach(function () {
|
|
|
+ var panel = document.getElementById('wwads-panel');
|
|
|
+ var cover = document.querySelector('.cover');
|
|
|
+ var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
|
+ if (!isMobile && cover && !cover.checkVisibility()) {
|
|
|
+ panel.style.bottom = '20px';
|
|
|
+ panel.style.right = '20px';
|
|
|
+ panel.style.width = '200px';
|
|
|
+ panel.style.height = '260px';
|
|
|
+ panel.style.position = 'fixed';
|
|
|
+ panel.style.background = '#fff';
|
|
|
+ panel.style.boxShadow = '0 0 5px rgba(0, 0, 0, 0)';
|
|
|
+ panel.innerHTML = '<p></p>';
|
|
|
+ } else {
|
|
|
+ panel.style.display = 'none';
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
DocsifyCarbon.create('CE7I52QU', 'xmakeio')
|
|
|
]
|