
今晚通宵
2006-12-15 20:18 今天晚上通宵 我要干一下几件事 下载软件 flashfxp leadfxp opera theworld xrea-worldpress TTSITE刷贡献 hideip IP代理 18ceo- 电信空间h...
2006-12-15 20:18 今天晚上通宵 我要干一下几件事 下载软件 flashfxp leadfxp opera theworld xrea-worldpress TTSITE刷贡献 hideip IP代理 18ceo- 电信空间h...
2006-12-12 11:53 刚在网上看到的,觉得不错,转来与大家分享。 1·在你这样的年纪这样的阅历的这个阶段,自己觉得能成功的事都别去干,别人推荐能赚钱的项目都别去做。记住,蠢蠢欲动,或被蠢蠢欲动,都是经商的大忌。 2·成功...
短域名,国别域名,单字符域名,四声母域名,个性域名,欢迎您进来挑选和撩一下 微信:691699
2006-11-25 21:08 一、不轻言退缩 二、不停学习,不断修正。 三、坐言起行,立即动手,从小事做起。 为什么看到机会却没有抓住,是因为我们在犹豫:用什么方法更好啊,是不是还有更好的机会啊,或者这是不是机会啊。 说狼在森林里追兔子...
2006-11-21 07:27 第一句话:优秀是一种习惯 这句话是古希腊哲学家亚里士多德说的。如果说优秀是一种习惯,那么懒惰也是一种习 惯。人出生的时候,除了脾气会因为天性而有所不同,其他的东西基本都是后天形成的,是家庭影响和教育的...
2006-11-10 15:20 相关收藏,评论不一,有时间有兴趣好好看一看 ———————————R...
2006-11-02 21:55 学习一下如何追女孩子,这个 不是广泛用的,如果是自己用,也就对一个女孩子用吧,借以勉励自己吧!学习一下如何追女孩子: 做为一个男生,看到有的男生想追自己喜欢的女孩子又不敢追,还想人家倒追他,我很反感. 从一...
2006-11-02 21:49 转载的次数太多,也不知道那里是原载了 这里指的是在一棵树上吊死,如果你是个痴情专一的汉字,对一个MM渴望用坚持和痴情来感动,我想你离沉重打击不远了,现在的MM才不喜欢你用情专一呢,如果你能到 处沾花惹草正说...
2006-11-02 21:38 好的习惯是需要培养的!正如:重于实践,再好的想法和计划,不去实施,随着时间的长短也会磨灭!所以即使自己只做一点也比不做要强很多! 1.出门看天气,进门看脸色,留心事物,细心观察细节 2.对待事情,要善于总结...
2006-10-23 14:29 掏老婆需要的是悲情,掏女朋友需要的激情 ————————爱情魔法师
2006-10-21 08:53 2006-10-21 03:10:00 来源: 重庆晚报 本报讯在新一轮大学生求职高潮来临之际。记者在不少网站上发现,不少大学生将自己的博客链接加入简历,或干脆将求职博客挂上人才网站,期待招聘单位通过这...
/**
* 初始化说说参数
*/
function shuoshuo_init()
{
$labels = array('name' => '说说', 'singular_name' => 'singularname', 'add_new' => '发表说说', 'add_new_item' => '发表说说', 'edit_item' => '编辑说说', 'new_item' => '新说说', 'view_item' => '查看说说', 'search_items' => '搜索说说', 'not_found' => '找不到说说', 'not_found_in_trash' => '回收站里找不到说说', 'parent_item_colon' => '', 'menu_name' => '说说');
$args = array('labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title', 'editor', 'author'));
register_post_type('shuoshuo', $args);
}
add_action('init', 'shuoshuo_init');
上面的代码注册了一个新的 post 类型 shuoshuo ,并在后台管理界面启用菜单。在路径 wp-content/themes/nisarg/ 下面创建 shuoshuo.php 单页面模板文件,页面样式复用首页的文章列表,文件内容如下:
<?php
/*
* Template Name: 说说
* author: 倾城
* url: https://www.codingbrick.com/shuoshuo
*/
get_header(); ?>
<style>
/* 内容样式 */
.type-shuoshuo {
padding: 10px;
border-radius: 10px;
display: inline-block;
}
/* 内容 图片样式 */
.type-shuoshuo img {
margin-right: 3px;
width: 160px;
height: 160px;
float: left;
object-fit: cover;
}
/* 作者 */
.shuoshuo_author {
background: #FFFFFF;
color: #000;
width: 60px;
height: 60px;
border-radius: 50%;
justify-content: center;
align-items: center;
text-align: center;
display: flex;
}
/* 发布日期 */
.shuoshuo_date {
color: gray;
width: 100%;
clear: both;
}
/* 移动端样式 */
@media screen and (max-width: 65.375em) {
/* 让手机页面更规整,隐藏作者 */
.shuoshuo_author {
display: none;
}
}
</style>
<div class="container">
<div class="row">
<header class="archive-page-header">
<h3 class="archive-page-title"><span>说说</span></h3>
</header>
</div>
<div class="row">
<div id="primary" class="col-md-9 content-area">
<main id="main" class="site-main" role="main">
<?php
// 获取页面分页参数
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("post_type=shuoshuo&post_status=publish&paged=".$paged);
if (have_posts()) : while (have_posts()) :
the_post(); ?>
<div class="row">
<div class="col-md-1">
<div class="shuoshuo_author"><?php the_author(); ?></div>
</div> <div class="col-md-11">
<article id="post-<?php the_ID(); ?>" <?php post_class('post-content'); ?>>
<?php the_content(); ?>
<div class="shuoshuo_date"><?php echo friendly_date(get_gmt_from_date(get_the_time('Y-m-d G:i:s'))); ?></div>
</article> </div> </div> <?php endwhile;
//分页导航条
nisarg_posts_navigation();
endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar('sidebar-1'); ?>
</div> <!--.row-->
</div><!--.container-->
<?php get_footer(); ?>
shuoshuo.php 页面将文章的发布时间调整为阅读友好的“刚刚、几天前”格式,friendly_date 函数内容如下:
/**
* 转化友好型的时间格式
*/
function friendly_date( $pub_time ) {
$pub_time = strtotime($pub_time);
$interval_time = time() - $pub_time;
if ($interval_time < 1) return '刚刚';
$interval = array (
12 * 30 * 24 * 60 * 60 => '年前 ('.date('Y-m-d', $pub_time).')',
30 * 24 * 60 * 60 => '个月前 ('.date('m-d', $pub_time).')',
7 * 24 * 60 * 60 => '周前 ('.date('m-d', $pub_time).')',
24 * 60 * 60 => '天前',
60 * 60 => '小时前',
60 => '分钟前',
1 => '秒前'
);
foreach ($interval as $second => $str) {
$d = $interval_time / $second;
if ($d >= 1) {
$r = round($d);
return $r . $str;
}
};
}
在管理后台创建说说单页面,模板类型选择“说说”,并且配置顶部菜单,如下图所示:
技术面试题为什么这么多八股文?招聘市场上一直都是求职者多的惊人,而岗位少的可怜。八股文能够迅速简单粗暴的过滤掉“不合格的”人,有效降低招聘的时间成本。过了八股文的都是人才吗?不重要,反正是进来拧螺丝钉的,差不多够用就行。<div><a href="https://www.codingbrick.com/wp-content/uploads/2022/09/taste-life-17-03.jpg"><img src="https://www.codingbrick.com/wp-content/uploads/2022/09/taste-life-17-03-300x240.jpg"/></a></div>
好
毛玻璃效果卡片,带有微妙阴影 悬停时卡片上浮增强交互感 新域名突出显示,带有呼吸光效 使用渐变色背景动画,色彩随时间流动变化 添加了50个随机移动的粒子元素,营造空间感 响应式设计: 适配各种屏幕尺寸 在移动设备上自动调整元素大小 源码分享:https://pan.baidu.com/s/1l2gSvAwpU8DFZo-7zl4ltQ?pwd=8888 |