通知设置 新通知
copyright token
DNN主题 • 舒正兴 发表了文章 • 0 个评论 • 119 次浏览 • 2025-01-13 11:36
自动将站点设置中的copyright输出
自动将站点设置中的copyright输出
利用 猴油 快速删除 xBlog 的 文章
其他 • 秦宏瑾 发表了文章 • 0 个评论 • 102 次浏览 • 2024-12-26 17:30
'use strict';
setTimeout(function () {
// 选择删除
$("#ArticleList_ddlStatus").val(4);
// 删除
if ($("#CheckboxAll").val() == 0) {
SelectAll();
}
// 屏蔽确认框
window.ApplyStatus = function () {
var StatusSelected = $("#ArticleList_ddlStatus").find("option:selected").val();
if (StatusSelected >= 0) {
var checkok = false;
$("#ArticleList_gvArticleList input[type='checkbox'][type-item='true']").each(function (i, n) {
if ($(this).prop('checked')) {
checkok = true;
}
});
if (checkok) {
return true;
}
alert('Please operate with one line of record selected at least.');
} else {
alert('Please choose the operation you need.');
}
return false;
}
// 模拟点击
$("#ArticleList_btnApply").click();
}, 2000)
// Your code here...
})(); 查看全部
(function () {
'use strict';
setTimeout(function () {
// 选择删除
$("#ArticleList_ddlStatus").val(4);
// 删除
if ($("#CheckboxAll").val() == 0) {
SelectAll();
}
// 屏蔽确认框
window.ApplyStatus = function () {
var StatusSelected = $("#ArticleList_ddlStatus").find("option:selected").val();
if (StatusSelected >= 0) {
var checkok = false;
$("#ArticleList_gvArticleList input[type='checkbox'][type-item='true']").each(function (i, n) {
if ($(this).prop('checked')) {
checkok = true;
}
});
if (checkok) {
return true;
}
alert('Please operate with one line of record selected at least.');
} else {
alert('Please choose the operation you need.');
}
return false;
}
// 模拟点击
$("#ArticleList_btnApply").click();
}, 2000)
// Your code here...
})();
pagespeed-站点优化-DNNGo.LayerGallery平替为Gallerypro效果简洁版
其他 • 舒正兴 发表了文章 • 0 个评论 • 114 次浏览 • 2024-11-22 08:32
https://pagespeed.web.dev/
Gallerypro效果在附件中,LayerGallery文件多,导致评分低,安装简洁版本后可以提高分数
boostarp在线生成器Layoutit!-拖拽网格内容-grid-root-svg
前端技术 • 舒正兴 发表了文章 • 0 个评论 • 96 次浏览 • 2024-11-19 08:39
下图是gird网格
下图是变量生成器root,来控制主题字体,颜色,间距,等自定义功能,内置基本变量
下图是svg,里面是简单免费,代码简洁得svg
查看全部
EasyDNNNews模块定制
DNN主题 • 舒正兴 发表了文章 • 0 个评论 • 144 次浏览 • 2024-11-08 09:54
附件:
Getting_started_with_EasyDNNnews_module.pdf
1.EasyDNNnewsWidgets这是添加主模块组件,类似我们博客dashbread.
可以选择显示下面的外观,不同的选择对应不同的模板文件,需要在设置界面在基础模板上进行在修改,避免模板直接无法通用
其中,默认设置是一个初始值,每次添加模式时都会继承这里的设置,当你需要另外的变化,而不影响其他就需要在模块设置中进行单独设置。
2.EasyDNNnews这个是主程序,可以添加文章和删除文章,同时EasyDNNnews也可以设置用来显示文章列表,和文章详情,
3.附件:
EasyDNNnews_Tokens_(1).pdf
里面将模块用的token也区分了,有些token只能用在list和deatil有些用在分类菜单中
4.后台设置Theme and template selection用来应用列表和详情的模板。
5.[EasyDNNnewsLocalizedText:SomeText.Text]这个是多语言标签,对应文件\DesktopModules\EasyDNNnews\App_LocalResourceslViewEasyDNNNews.ascx.resx
1.需要注意!!!,设置中关于图片参数修改后,文章需要重新保存一下才能生效!
2.模板文件创建的时候记得备份,创建副本进行修改!创建的新的主题模板不会影响模块升级将默认模板还原。
查看全部
附件:
1.EasyDNNnewsWidgets这是添加主模块组件,类似我们博客dashbread.
可以选择显示下面的外观,不同的选择对应不同的模板文件,需要在设置界面在基础模板上进行在修改,避免模板直接无法通用
其中,默认设置是一个初始值,每次添加模式时都会继承这里的设置,当你需要另外的变化,而不影响其他就需要在模块设置中进行单独设置。
2.EasyDNNnews这个是主程序,可以添加文章和删除文章,同时EasyDNNnews也可以设置用来显示文章列表,和文章详情,
3.附件: 里面将模块用的token也区分了,有些token只能用在list和deatil有些用在分类菜单中
4.后台设置Theme and template selection用来应用列表和详情的模板。
5.[EasyDNNnewsLocalizedText:SomeText.Text]这个是多语言标签,对应文件\DesktopModules\EasyDNNnews\App_LocalResourceslViewEasyDNNNews.ascx.resx
1.需要注意!!!,设置中关于图片参数修改后,文章需要重新保存一下才能生效!
2.模板文件创建的时候记得备份,创建副本进行修改!创建的新的主题模板不会影响模块升级将默认模板还原。
PNG图片颜色改变
前端技术 • 秦宏瑾 发表了文章 • 0 个评论 • 135 次浏览 • 2024-09-19 13:37
<html>
<head>
<script src="https://code.jquery.com/jquery ... gt%3B
<style>
*{
box-sizing: border-box;
}
.iconList{
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.icon{
display: flex;
justify-content: center;
align-items: center;
width: 100px;
height: 100px;
color: #000;
border-radius: 50%;
background-color: #fff;
box-shadow:0px 0px 8px rgba(0, 0, 0, .1);
transition: all ease-in 300ms;
}
.icon:nth-child(1):hover{
color: red;
}
.icon:nth-child(2):hover{
color: blue;
}
.icon:nth-child(3):hover{
color: green;
}
.icon .maskBox{
--IconUrl: "";
width: fit-content;
color: currentColor;
background: currentColor;
-webkit-mask: var(--IconUrl);
mask: var(--IconUrl);
mask-position: center;
mask-size: contain;
mask-repeat: no-repeat;
}
.icon img {
opacity: 0;
}
</style>
</head>
<body>
<div class="iconList">
<div class="icon">
<div class="maskBox">
<img src="./icon.png" alt="">
</div>
</div>
<div class="icon">
<div class="maskBox">
<img src="./icon.png" alt="">
</div>
</div>
<div class="icon">
<div class="maskBox">
<img src="./icon.png" alt="">
</div>
</div>
</div>
<script>
$(document).ready(function () {
$(".iconList .icon").each(function () {
let maskBox = $(this).find(".maskBox");
let IconUrl = maskBox.find("img").attr("src");
maskBox.css("--IconUrl", `url(${IconUrl})`);
})
});
</script>
</body>
</html>
查看全部
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery ... gt%3B
<style>
*{
box-sizing: border-box;
}
.iconList{
display: flex;
flex-wrap: wrap;
gap: 20px;
}
.icon{
display: flex;
justify-content: center;
align-items: center;
width: 100px;
height: 100px;
color: #000;
border-radius: 50%;
background-color: #fff;
box-shadow:0px 0px 8px rgba(0, 0, 0, .1);
transition: all ease-in 300ms;
}
.icon:nth-child(1):hover{
color: red;
}
.icon:nth-child(2):hover{
color: blue;
}
.icon:nth-child(3):hover{
color: green;
}
.icon .maskBox{
--IconUrl: "";
width: fit-content;
color: currentColor;
background: currentColor;
-webkit-mask: var(--IconUrl);
mask: var(--IconUrl);
mask-position: center;
mask-size: contain;
mask-repeat: no-repeat;
}
.icon img {
opacity: 0;
}
</style>
</head>
<body>
<div class="iconList">
<div class="icon">
<div class="maskBox">
<img src="./icon.png" alt="">
</div>
</div>
<div class="icon">
<div class="maskBox">
<img src="./icon.png" alt="">
</div>
</div>
<div class="icon">
<div class="maskBox">
<img src="./icon.png" alt="">
</div>
</div>
</div>
<script>
$(document).ready(function () {
$(".iconList .icon").each(function () {
let maskBox = $(this).find(".maskBox");
let IconUrl = maskBox.find("img").attr("src");
maskBox.css("--IconUrl", `url(${IconUrl})`);
})
});
</script>
</body>
</html>
CSS模拟五角星评分
前端技术 • 秦宏瑾 发表了文章 • 0 个评论 • 138 次浏览 • 2024-08-22 10:48
<html>
<head>
<title>CSS模拟五角星评分</title>
<style type="text/css">
*{
box-sizing: border-box;
margin: 0;
padding: 0;
}
.box{
max-width: 500px;
margin: 100px auto 0;
}
.box .item{
margin-bottom: 20px;
}
.review-rating {
--rating-size: 1em;
--rating-spacing: .25em;
--rating-position: calc(var(--rating-size) + var(--rating-spacing));
--rating-img: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M50,5 67,32 98,40 77,64 80,96 50,84 20,96 23,64 2,40 33,32 50,5" stroke-width="4" stroke="%2300FF8C" fill="none" ></path></svg>');
--rating-fill: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M50,5 67,32 98,40 77,64 80,96 50,84 20,96 23,64 2,40 33,32 50,5" stroke-width="4" stroke="%2300FF8C" fill="%2300FF8C" ></path></svg>');
--rating: 0;
background-image: var(--rating-img), var(--rating-img), var(--rating-img), var(--rating-img), var(--rating-img);
background-size: var(--rating-size);
background-position: 0 center, calc(var(--rating-position) * 1) center, calc(var(--rating-position) * 2) center, calc(var(--rating-position) * 3) center, calc(var(--rating-position) * 4) center;
background-repeat: no-repeat;
width: calc(var(--rating-size)*5 + var(--rating-spacing) * 4);
height: var(--rating-size);
cursor: auto;
}
.review-rating::before {
content: "";
background-image: var(--rating-fill), var(--rating-fill), var(--rating-fill), var(--rating-fill), var(--rating-fill);
background-size: inherit;
background-position: inherit;
background-repeat: no-repeat;
width: calc((var(--rating-size) + var(--rating-spacing)) * var(--rating));
width: calc((var(--rating-size) + var(--rating-spacing))*(var(--rating) - rem(var(--rating), 1)) + var(--rating-size)* rem(var(--rating), 1));
height: 100%;
display: block;
}
</style>
</head>
<body>
<div class="box">
<div class="item">
<div class="review-rating" style="--rating: 0;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 1;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 2;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 3;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 4;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 5;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 3.5;"></div>
</div>
</div>
</body>
</html>
查看全部
<!DOCTYPE html>
<html>
<head>
<title>CSS模拟五角星评分</title>
<style type="text/css">
*{
box-sizing: border-box;
margin: 0;
padding: 0;
}
.box{
max-width: 500px;
margin: 100px auto 0;
}
.box .item{
margin-bottom: 20px;
}
.review-rating {
--rating-size: 1em;
--rating-spacing: .25em;
--rating-position: calc(var(--rating-size) + var(--rating-spacing));
--rating-img: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M50,5 67,32 98,40 77,64 80,96 50,84 20,96 23,64 2,40 33,32 50,5" stroke-width="4" stroke="%2300FF8C" fill="none" ></path></svg>');
--rating-fill: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M50,5 67,32 98,40 77,64 80,96 50,84 20,96 23,64 2,40 33,32 50,5" stroke-width="4" stroke="%2300FF8C" fill="%2300FF8C" ></path></svg>');
--rating: 0;
background-image: var(--rating-img), var(--rating-img), var(--rating-img), var(--rating-img), var(--rating-img);
background-size: var(--rating-size);
background-position: 0 center, calc(var(--rating-position) * 1) center, calc(var(--rating-position) * 2) center, calc(var(--rating-position) * 3) center, calc(var(--rating-position) * 4) center;
background-repeat: no-repeat;
width: calc(var(--rating-size)*5 + var(--rating-spacing) * 4);
height: var(--rating-size);
cursor: auto;
}
.review-rating::before {
content: "";
background-image: var(--rating-fill), var(--rating-fill), var(--rating-fill), var(--rating-fill), var(--rating-fill);
background-size: inherit;
background-position: inherit;
background-repeat: no-repeat;
width: calc((var(--rating-size) + var(--rating-spacing)) * var(--rating));
width: calc((var(--rating-size) + var(--rating-spacing))*(var(--rating) - rem(var(--rating), 1)) + var(--rating-size)* rem(var(--rating), 1));
height: 100%;
display: block;
}
</style>
</head>
<body>
<div class="box">
<div class="item">
<div class="review-rating" style="--rating: 0;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 1;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 2;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 3;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 4;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 5;"></div>
</div>
<div class="item">
<div class="review-rating" style="--rating: 3.5;"></div>
</div>
</div>
</body>
</html>
DNN后台文件管理页-批量下载文件
前端技术 • 秦宏瑾 发表了文章 • 0 个评论 • 180 次浏览 • 2024-07-15 10:48
然后在控制台输入下方代码
需要设置前置url变量---preUrl
文件名会自动补充(function(){
// 创建一个<script>标签并设置其src属性为JSZip的CDN链接
var script = document.createElement('script');
script.src = "https://cdnjs.cloudflare.com/a ... 3B%3B
// 将脚本添加到页面中
document.body.appendChild(script);
// 前置Url
const preUrl = "";
// 文件URL
let fileUrls = [];
// DNN勾选
let itemTitle = $(".rgSelectedRow .dnnModuleDigitalAssetItemNameTemplate");
for (let index = 0; index < itemTitle.length; index++) {
const curUrl = itemTitle.eq(index).attr("title");
fileUrls.push(preUrl + curUrl);
}
// 等待脚本加载完成
script.onload = function() {
// 用于从URL下载文件并将其添加到JSZip对象的函数
async function downloadAndZipFiles(urls) {
const zip = new JSZip();
for (let url of urls) {
console.log("正在下载:", url.split(preUrl)[1]);
const response = await fetch(url);
const blob = await response.blob();
// 给文件在ZIP中设置一个名称
const filename = url.split('/').pop();
zip.file(filename, blob, { binary: true });
}
// 将JSZip对象转换为Blob
const content = await zip.generateAsync({ type: 'blob' });
// 创建下载链接并触发下载
const downloadUrl = URL.createObjectURL(content);
const downloadLink = document.createElement('a');
downloadLink.href = downloadUrl;
downloadLink.download = 'downloaded-files.zip';
document.body.appendChild(downloadLink);
downloadLink.click();
// 下载完成后撤销URL
document.body.removeChild(downloadLink);
URL.revokeObjectURL(downloadUrl);
}
// 调用函数开始批量下载并打包ZIP
downloadAndZipFiles(fileUrls);
};
})(); 查看全部
勾选需要下载的,
然后在控制台输入下方代码
需要设置前置url变量---preUrl
文件名会自动补充
(function(){
// 创建一个<script>标签并设置其src属性为JSZip的CDN链接
var script = document.createElement('script');
script.src = "https://cdnjs.cloudflare.com/a ... 3B%3B
// 将脚本添加到页面中
document.body.appendChild(script);
// 前置Url
const preUrl = "";
// 文件URL
let fileUrls = [];
// DNN勾选
let itemTitle = $(".rgSelectedRow .dnnModuleDigitalAssetItemNameTemplate");
for (let index = 0; index < itemTitle.length; index++) {
const curUrl = itemTitle.eq(index).attr("title");
fileUrls.push(preUrl + curUrl);
}
// 等待脚本加载完成
script.onload = function() {
// 用于从URL下载文件并将其添加到JSZip对象的函数
async function downloadAndZipFiles(urls) {
const zip = new JSZip();
for (let url of urls) {
console.log("正在下载:", url.split(preUrl)[1]);
const response = await fetch(url);
const blob = await response.blob();
// 给文件在ZIP中设置一个名称
const filename = url.split('/').pop();
zip.file(filename, blob, { binary: true });
}
// 将JSZip对象转换为Blob
const content = await zip.generateAsync({ type: 'blob' });
// 创建下载链接并触发下载
const downloadUrl = URL.createObjectURL(content);
const downloadLink = document.createElement('a');
downloadLink.href = downloadUrl;
downloadLink.download = 'downloaded-files.zip';
document.body.appendChild(downloadLink);
downloadLink.click();
// 下载完成后撤销URL
document.body.removeChild(downloadLink);
URL.revokeObjectURL(downloadUrl);
}
// 调用函数开始批量下载并打包ZIP
downloadAndZipFiles(fileUrls);
};
})();
钉钉聊天记录备份迁移
其他 • 刘欣 发表了文章 • 0 个评论 • 1195 次浏览 • 2024-06-06 09:11
找到以数字开头、_v2结尾的文件夹,将其拷贝到新的电脑或需要备份的地方。
在新电脑或重装系统的电脑上安装好钉钉,将拷贝出来的文件夹放到%appdata%\DingTalk下,然后登录钉钉,即可恢复聊天记录到新安装的钉钉中。 查看全部
找到以数字开头、_v2结尾的文件夹,将其拷贝到新的电脑或需要备份的地方。
在新电脑或重装系统的电脑上安装好钉钉,将拷贝出来的文件夹放到%appdata%\DingTalk下,然后登录钉钉,即可恢复聊天记录到新安装的钉钉中。
如何移除DNN自带的CSS和JS
C#技术 • 刘欣 发表了文章 • 0 个评论 • 188 次浏览 • 2024-02-20 09:27
通过SQL语句修改字段长度
C#技术 • 刘欣 发表了文章 • 0 个评论 • 395 次浏览 • 2024-01-09 09:57
关于皮肤是浮动菜单 给 Login页面撑间距
前端技术 • 秦宏瑾 发表了文章 • 0 个评论 • 242 次浏览 • 2023-08-30 10:21
--SpecialPageTopSpacing:calc( var(--headerHeight) + 30px );
}
@media only screen and (max-width:991.98px) {
:root{
--SpecialPageTopSpacing: 30px;
}
}
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(#dnn_ctr_Login_DNN),
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(#dnn_ctr_Privacy_lblPrivacy),
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(#dnn_ctr_Terms_lblTerms),
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(dnn-resource-manager.hydrated){
padding-top: var(--SpecialPageTopSpacing);
}
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content #dnn_ctr_Login_DNN),
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content #dnn_ctr_Privacy_lblPrivacy),
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content #dnn_ctr_Terms_lblTerms),
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content dnn-resource-manager.hydrated){
background-color: rgba(0,0,0,0.64);
}
@-moz-document url-prefix() {
#Form[action="/Privacy" i] #dnn_content,
#Form[action="/Privacy/" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/Terms" i] #dnn_content,
#Form[action="/Terms/" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/login" i] #dnn_content,
#Form[action="/login/" i] #dnn_content,
#Form[action^="/login?" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action^="/Host/Global-Assets/portalid/" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/Admin/File-Management" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/Privacy" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Privacy/" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Terms" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Terms/" i] .header-replace.header-position.sticky-fixed,
#Form[action="/login" i] .header-replace.header-position.sticky-fixed,
#Form[action="/login/" i] .header-replace.header-position.sticky-fixed,
#Form[action^="/login?" i] .header-replace.header-position.sticky-fixed,
#Form[action^="/Host/Global-Assets/portalid/" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Admin/File-Management" i] .header-replace.header-position.sticky-fixed{
background-color: rgba(0,0,0,0.64);
}
}
其中headerHeight的值需要修改模板才能生成
resource\vendor\themeplugin\shortcode\shortcode-snippets.js
if (attr.height) {
style += `
:root{
--${attr.areaname}-height: ${attr.height}px;
}
`;
}
if (attr.styheight) {
style += `
:root{
--floating-${attr.areaname}-height: ${attr.styheight}px;
}
`;
}
if (attr.height) {
style += `
:root{
--${attr.areaname}-height: ${attr.height}px;
}
`;
}
template\template.global.css:root{
--headerHeight: calc( var(--header-top-height,0px) + var(--header-center-height,0px) + var(--header-bottom-height,0px) );
--mobileHeaderHeight: calc( var(--header-mobile-top-height,0px) + var(--header-mobile-height,0px) + var(--header-mobile-bottom-height,0px) );
--floatingHeaderHeight: calc( var(--floating-header-top-height,0px) + var(--floating-header-center-height,0px) + var(--floating-header-bottom-height,0px) );
} 查看全部
:root{
--SpecialPageTopSpacing:calc( var(--headerHeight) + 30px );
}
@media only screen and (max-width:991.98px) {
:root{
--SpecialPageTopSpacing: 30px;
}
}
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(#dnn_ctr_Login_DNN),
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(#dnn_ctr_Privacy_lblPrivacy),
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(#dnn_ctr_Terms_lblTerms),
#dng-wrapper:has(.header-replace.header-position.sticky-fixed) #dnn_content:has(dnn-resource-manager.hydrated){
padding-top: var(--SpecialPageTopSpacing);
}
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content #dnn_ctr_Login_DNN),
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content #dnn_ctr_Privacy_lblPrivacy),
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content #dnn_ctr_Terms_lblTerms),
.header-replace.header-position.sticky-fixed:has( ~ #dnn_content dnn-resource-manager.hydrated){
background-color: rgba(0,0,0,0.64);
}
@-moz-document url-prefix() {
#Form[action="/Privacy" i] #dnn_content,
#Form[action="/Privacy/" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/Terms" i] #dnn_content,
#Form[action="/Terms/" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/login" i] #dnn_content,
#Form[action="/login/" i] #dnn_content,
#Form[action^="/login?" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action^="/Host/Global-Assets/portalid/" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/Admin/File-Management" i] #dnn_content{
padding-top: var(--SpecialPageTopSpacing);
}
#Form[action="/Privacy" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Privacy/" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Terms" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Terms/" i] .header-replace.header-position.sticky-fixed,
#Form[action="/login" i] .header-replace.header-position.sticky-fixed,
#Form[action="/login/" i] .header-replace.header-position.sticky-fixed,
#Form[action^="/login?" i] .header-replace.header-position.sticky-fixed,
#Form[action^="/Host/Global-Assets/portalid/" i] .header-replace.header-position.sticky-fixed,
#Form[action="/Admin/File-Management" i] .header-replace.header-position.sticky-fixed{
background-color: rgba(0,0,0,0.64);
}
}
其中headerHeight的值需要修改模板才能生成
resource\vendor\themeplugin\shortcode\shortcode-snippets.js
if (attr.height) {
style += `
:root{
--${attr.areaname}-height: ${attr.height}px;
}
`;
}
if (attr.styheight) {
style += `
:root{
--floating-${attr.areaname}-height: ${attr.styheight}px;
}
`;
}
if (attr.height) {
style += `
:root{
--${attr.areaname}-height: ${attr.height}px;
}
`;
}
template\template.global.css
:root{
--headerHeight: calc( var(--header-top-height,0px) + var(--header-center-height,0px) + var(--header-bottom-height,0px) );
--mobileHeaderHeight: calc( var(--header-mobile-top-height,0px) + var(--header-mobile-height,0px) + var(--header-mobile-bottom-height,0px) );
--floatingHeaderHeight: calc( var(--floating-header-top-height,0px) + var(--floating-header-center-height,0px) + var(--floating-header-bottom-height,0px) );
}
JS获取 css里面的 自定义属性
前端技术 • 秦宏瑾 发表了文章 • 0 个评论 • 275 次浏览 • 2023-01-04 10:37
获取设置在:root上面的自定义属性
window.getComputedStyle(document.documentElement,null).getPropertyValue('--header-floating-height').trim() 查看全部
获取设置在:root上面的自定义属性
window.getComputedStyle(document.documentElement,null).getPropertyValue('--header-floating-height').trim()
日期格式添加 st,nd,rd,th
前端技术 • 秦宏瑾 发表了文章 • 0 个评论 • 418 次浏览 • 2022-12-22 08:51
* 数字前置补零
* @param {number} num - 原始数字
* @param {number} length - 数字长度,如果原始数字长度小于 length,则前面补零,如:util.digit(7, 3) //007
* @returns
*/
let digit = function(num, length){
var str = '';
num = String(num);
length = length || 2;
for(var i = num.length; i < length; i++){
str += '0';
}
return num < Math.pow(10, length) ? str + (num|0) : num;
}
/**
* 转化时间戳或日期对象为日期格式字符
* @param {(object|string))} fmt - 日期格式 - 可以是日期对象,也可以是毫秒数
* @param {format} date - 日期字符格式(默认:yyyy-MM-dd HH:mm:ss),可随意定义,如:yyyy年MM月dd日
* @return {string} 返回的日期字符串
*/
let toDateString = function( time, format ){
//若 null 或空字符,则返回空字符
if(time === null || time === '') return '';
let date = new Date(function(){
if(!time) return;
return isNaN(time) ? time : (typeof time === 'string' ? parseInt(time) : time)
}() || new Date())
,ymd = [
digit(date.getFullYear(), 4)
,digit(date.getMonth() + 1)
,digit(date.getDate())
]
,hms = [
digit(date.getHours())
,digit(date.getMinutes())
,digit(date.getSeconds())
];
format = format || 'yyyy-MM-dd HH:mm:ss';
return format.replace(/yyyy/g, ymd[0])
.replace(/MM/g, ymd[1])
.replace(/dd/g, ymd[2])
.replace(/HH/g, hms[0])
.replace(/mm/g, hms[1])
.replace(/ss/g, hms[2]);
}
/**
* 转换为项目所需要的格式
* @param {string} time - 日期格式 - 可以是日期对象,也可以是毫秒数
* @return {string} 返回的日期字符串
*/
let showDateString = function(time){
let D = toDateString( time, 'dd');
let M = toDateString( time, 'MM');
let Y = toDateString( time, 'yyyy');
// https://zhuanlan.zhihu.com/p/84118627
let strD = parseInt(D);
if( D[0] != 1 ){
switch ( D[1] ) {
case "1":
strD += "st";
break;
case "2":
strD += "nd";
break;
case "3":
strD += "rd";
break;
default:
strD += "th";
break;
}
}else{
strD += "th";
}
let strM = enumsMonth[ parseInt(M) -1 ];
let strY = parseInt(Y);
return `${strM} ${strD}, ${strY}`;
}
showDateString 方法里面
参考
https://zhuanlan.zhihu.com/p/84118627 查看全部
/**
* 数字前置补零
* @param {number} num - 原始数字
* @param {number} length - 数字长度,如果原始数字长度小于 length,则前面补零,如:util.digit(7, 3) //007
* @returns
*/
let digit = function(num, length){
var str = '';
num = String(num);
length = length || 2;
for(var i = num.length; i < length; i++){
str += '0';
}
return num < Math.pow(10, length) ? str + (num|0) : num;
}
/**
* 转化时间戳或日期对象为日期格式字符
* @param {(object|string))} fmt - 日期格式 - 可以是日期对象,也可以是毫秒数
* @param {format} date - 日期字符格式(默认:yyyy-MM-dd HH:mm:ss),可随意定义,如:yyyy年MM月dd日
* @return {string} 返回的日期字符串
*/
let toDateString = function( time, format ){
//若 null 或空字符,则返回空字符
if(time === null || time === '') return '';
let date = new Date(function(){
if(!time) return;
return isNaN(time) ? time : (typeof time === 'string' ? parseInt(time) : time)
}() || new Date())
,ymd = [
digit(date.getFullYear(), 4)
,digit(date.getMonth() + 1)
,digit(date.getDate())
]
,hms = [
digit(date.getHours())
,digit(date.getMinutes())
,digit(date.getSeconds())
];
format = format || 'yyyy-MM-dd HH:mm:ss';
return format.replace(/yyyy/g, ymd[0])
.replace(/MM/g, ymd[1])
.replace(/dd/g, ymd[2])
.replace(/HH/g, hms[0])
.replace(/mm/g, hms[1])
.replace(/ss/g, hms[2]);
}
/**
* 转换为项目所需要的格式
* @param {string} time - 日期格式 - 可以是日期对象,也可以是毫秒数
* @return {string} 返回的日期字符串
*/
let showDateString = function(time){
let D = toDateString( time, 'dd');
let M = toDateString( time, 'MM');
let Y = toDateString( time, 'yyyy');
// https://zhuanlan.zhihu.com/p/84118627
let strD = parseInt(D);
if( D[0] != 1 ){
switch ( D[1] ) {
case "1":
strD += "st";
break;
case "2":
strD += "nd";
break;
case "3":
strD += "rd";
break;
default:
strD += "th";
break;
}
}else{
strD += "th";
}
let strM = enumsMonth[ parseInt(M) -1 ];
let strY = parseInt(Y);
return `${strM} ${strD}, ${strY}`;
}
showDateString 方法里面
参考
https://zhuanlan.zhihu.com/p/84118627
youtube,facebook,twitter社交添加到页面中的plugin页面汇总
前端技术 • 舒正兴 发表了文章 • 0 个评论 • 262 次浏览 • 2022-09-22 13:57
https://developers.facebook.com/docs/plugins/page-plugin/
youtube,订阅页面点查看完整的播放列表,然后点分享
https://www.youtube.com/playlist?list=PLJODhwBPyvrII0GvIc5jCNWzET5AQX7HM
https://publish.twitter.com/%3 ... eline 查看全部
https://developers.facebook.com/docs/plugins/page-plugin/
youtube,订阅页面点查看完整的播放列表,然后点分享
https://www.youtube.com/playlist?list=PLJODhwBPyvrII0GvIc5jCNWzET5AQX7HM
https://publish.twitter.com/%3 ... eline
dnn默认给客户发邮件模板多语言
DNN主题 • 舒正兴 发表了文章 • 0 个评论 • 308 次浏览 • 2022-09-08 11:43
EMAIL_USER_REGISTRATION_PUBLIC_BODY.Text
EMAIL_USER_REGISTRATION_VERIFIED_BODY.Text
富文本编辑器 设置:
其他 • 秦宏瑾 发表了文章 • 0 个评论 • 833 次浏览 • 2022-08-03 08:55
这是因为 插件的 相关栏目被 初始化了, 导致 是用的 初始化设置里面的 配置.
这个时候,打开下面的文件
Resources\pear\modules\tinymce\tinymce.js
找到 option.menu , 将里面的 中文改成英文 即可。
如果需要匹配多国语言,建议 注释掉 option.menu, 采用默认的menu;
公式这一栏,
Resources\pear\modules\tinymce\tinymce.js
搜索 kityformula-editor 然后删除,公式即可去掉.如果要改成英文 则翻译
Resources\pear\modules\tinymce\tinymce\plugins\kityformula-editor\plugin.min.js
如果要删除
则在
Resources\pear\modules\tinymce\tinymce.js
里面添加
option.quickbars_insert_toolbar = isset(option.quickbars_insert_toolbar) ? option.quickbars_insert_toolbar : '';
路径自动处理成相对路径 关闭
option.convert_urls = isset(option.convert_urls) ? option.convert_urls : false;
查看全部
这是因为 插件的 相关栏目被 初始化了, 导致 是用的 初始化设置里面的 配置.
这个时候,打开下面的文件
Resources\pear\modules\tinymce\tinymce.js
找到 option.menu , 将里面的 中文改成英文 即可。
如果需要匹配多国语言,建议 注释掉 option.menu, 采用默认的menu;
公式这一栏,
Resources\pear\modules\tinymce\tinymce.js
搜索 kityformula-editor 然后删除,公式即可去掉.如果要改成英文 则翻译
Resources\pear\modules\tinymce\tinymce\plugins\kityformula-editor\plugin.min.js
如果要删除
则在
Resources\pear\modules\tinymce\tinymce.js
里面添加
option.quickbars_insert_toolbar = isset(option.quickbars_insert_toolbar) ? option.quickbars_insert_toolbar : '';
路径自动处理成相对路径 关闭
option.convert_urls = isset(option.convert_urls) ? option.convert_urls : false;
如何在DNN中运行vue
C#技术 • 刘欣 发表了文章 • 0 个评论 • 307 次浏览 • 2022-07-15 15:28
<remove fileExtension=".vue" />
<mimeMap fileExtension=".vue" mimeType="text/vue" />
查看全部
<remove fileExtension=".vue" />
<mimeMap fileExtension=".vue" mimeType="text/vue" />
https://wave.webaim.org/ 可访问性检测站点路径不对的问题。
DNN主题 • 胡怡伟 发表了文章 • 0 个评论 • 330 次浏览 • 2021-11-18 15:52