Skip to content
This repository has been archived by the owner on Sep 2, 2023. It is now read-only.

Commit

Permalink
release Petals 0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingSky-CN committed Feb 7, 2022
1 parent ae4af08 commit e25516b
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 26 deletions.
20 changes: 20 additions & 0 deletions core/css/style-petals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Main
*/

/**
* Page
*/
Expand Down Expand Up @@ -30,6 +34,22 @@
color: #fff;
}

/** QR Code */

.mdr-qrcode {
background: #fff !important;
line-height: 0px;
width: 170px;
height: 170px;
padding: 10px 0;
}

.mdr-qrcode canvas {
display: block !important;
margin-right: auto !important;
margin-left: auto !important;
}

/**
* Post
*/
Expand Down
9 changes: 0 additions & 9 deletions core/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,6 @@ html.pray {
text-align: center;
}

#pageQrCode {
background: #fff !important;
padding: 10px 0px 0px 10px;
width: 170px;
height: 170px;
right: 8px;
top: 8px
}

#post .mdui-card-header {
padding-top: 8px;
padding-bottom: 8px;
Expand Down
2 changes: 1 addition & 1 deletion core/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ function mdrIsStatus($post)
{
if (!$post->tags) return false;
foreach ($post->tags as $tag)
if (in_array($tag, ['Status', 'status', '状态'])) return true;
if (in_array($tag['name'], ['Status', 'status', '状态'])) return true;
return false;
}

Expand Down
14 changes: 7 additions & 7 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function mdrfa() {
mdui.Drawer('#mdrDrawerL').close();
}
<?php if ($this->options->mdrQrCode) : ?>
getQrCode();
genQrCode();
<?php endif; ?>
al();
ac();
Expand Down Expand Up @@ -293,20 +293,20 @@ function ap() {
<!-- mdr | mdrQrCode -->
<script src="<?= staticUrl('jquery.qrcode.min.js') ?>"></script>
<script>
var mdrQrCode = new mdui.Menu('#switchQrCode', '#pageQrCode', {
new mdui.Menu('#switchQrCode', '#mdrQrCode', {
position: "bottom",
align: "right"
align: "right",
});

function getQrCode() {
$('#pageQrCode').html('');
$('#pageQrCode').qrcode({
function genQrCode() {
$('#mdrQrCode').html('');
$('#mdrQrCode').qrcode({
width: 150,
height: 150,
text: window.location.href
})
}
getQrCode();
genQrCode();
</script>
<?php endif; ?>
<?php if ($this->options->DarkMode) : ?>
Expand Down
2 changes: 0 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ function themeConfig($form)
<a href="#mdr-cdn"><button class="btn btn-s">CDN</button></a>
<a href="#mdr-nav"><button class="btn btn-s">边栏</button></a>
<a href="#mdr-pjax"><button class="btn btn-s">Ajax</button></a>
<a href="#mdr-dark"><button class="btn btn-s">黑暗模式</button></a>
<a href="#mdr-music"><button class="btn btn-s">背景音乐</button></a>
<a href="#mdr-func"><button class="btn btn-s">附加功能</button></a>
<a href="#mdr-custom"><button class="btn btn-s">自定义</button></a>
<a href="#mdr-end"><button class="btn btn-s">完成</button></a>
Expand Down
13 changes: 7 additions & 6 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,22 @@
<link rel="stylesheet" href="<?= staticUrl('mdui.min.css') ?>" />
<?php if (!$this->options->mdrCornertool) : ?>
<style>
*::-webkit-scrollbar { /* Chrome, Safari, Opera */
*::-webkit-scrollbar {
width: 0px;
height: 0px;
}

html {
-ms-overflow-style: none; /* IE, Edge */
scrollbar-width: none; /* Firefox */
-ms-overflow-style: none;
scrollbar-width: none;
}
</style>
<?php endif; ?>
<?php if (MDR_DEBUG) : ?>
<link rel="stylesheet" href="<?php cjUrl('css/style-petals.css?ts=' . time()) ?>" />
<link rel="stylesheet" href="<?php cjUrl('css/style.css?ts=' . time()) ?>" />
<?php else: ?>
<link rel="stylesheet" href="<?php cjUrl('css/style.min.css?v=petals-dev-3') ?>" />
<?php else : ?>
<link rel="stylesheet" href="<?php cjUrl('css/style.min.css?v=' . str_replace(' ', '-', strtolower(MDR_VERSION))) ?>" />
<?php endif; ?>
<?php if ($this->options->ViewImg) : ?>
<link rel="stylesheet" href="<?= staticUrl('jquery.fancybox.min.css') ?>" />
Expand All @@ -80,7 +81,7 @@
</a>
<div class="mdui-toolbar-spacer"></div>
<?php if ($this->options->mdrQrCode) : ?>
<div id="pageQrCode" class="mdui-menu" onclick="mdrQrCode.close()"></div>
<div id="mdrQrCode" class="mdui-menu mdr-qrcode" onclick="mdrQrCode.close()"></div>
<button class="mdui-btn mdui-btn-icon" id="switchQrCode"><i class="mdui-icon material-icons">phonelink</i></button>
<?php endif; ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @package MDr
* @author FlyingSky
* @version Petals Dev
* @version Petals 0.1
* @link https://fsky7.com/
*/
$this->need('header.php'); ?>
Expand Down

0 comments on commit e25516b

Please sign in to comment.