diff --git a/css/style.css b/css/style.css index 2cedbb4..952a33c 100644 --- a/css/style.css +++ b/css/style.css @@ -58,6 +58,7 @@ footer.page-footer { top:50%; left:50%; transform:translate(-50%,-50%); + text-align: center; } .size-full{ width: 100%; diff --git a/index.php b/index.php index a2ecf68..e02d021 100644 --- a/index.php +++ b/index.php @@ -3,9 +3,15 @@ /** * 获取bing图片简介 */ + $banner_text = get_option('mad')['banner_text']; + if ($banner_text==""&&empty($banner_text)) { $str=file_get_contents('http://cn.bing.com/HPImageArchive.aspx?idx=0&n=1'); if(preg_match("/(.+?)<\/copyright>/ies",$str,$matches)){ $imgcopyright=$matches[1]; + } + } + else { + $imgcopyright = $banner_text; } ?>
diff --git a/options.php b/options.php index b63e837..8ed2059 100644 --- a/options.php +++ b/options.php @@ -31,5 +31,13 @@ function optionsframework_options() { 'type' => 'text' ); + $options[] = array( + 'name' => __( '站点Banner介绍'), + 'desc' => __( '留空即为对应Bing每日一图的介绍'), + 'id' => 'banner_text', + 'std' => '', + 'type' => 'text' + ); + return $options; } \ No newline at end of file