diff --git a/src/assets/css/theme-style.css b/src/assets/css/theme-style.css index 934dfce..485382a 100644 --- a/src/assets/css/theme-style.css +++ b/src/assets/css/theme-style.css @@ -74,21 +74,7 @@ body a{ display:block; list-style:none; } -/* top-nav */ -.top-nav:before, -.top-nav:after { - content: " "; - display: table; - list-style:none; -} -.top-nav:after { - clear: both; -} -/* nav { - position: relative; - float: right; - list-style:none; -} */ + nav ul { padding: 0; float: right; @@ -126,17 +112,11 @@ nav a#pull { height: auto; } nav li { - width: 100%; position: relative; } nav li a { border-bottom: 1px solid #eee; } - nav a { - text-align: left; - width: 100%; - text-indent: 25px; - } } /*Styles for screen 515px and lower*/ @media only screen and (max-width : 768px) { @@ -148,14 +128,13 @@ nav a#pull { display: none; height: auto; margin:0; - background: #fff; } nav a#pull { display: block; position: relative; color: #F26D7D; text-align: right; - position: absolute; + /* position: absolute; */ top:12px; } nav a#pull:after { @@ -184,7 +163,7 @@ nav a#pull { nav li { display: block; float: none; - width: 100%; + /* width: 100%; */ } nav li a { border-bottom: 1px solid #576979; diff --git a/src/assets/css1/style.css b/src/assets/css1/style.css index 0c4a47f..4883c26 100644 --- a/src/assets/css1/style.css +++ b/src/assets/css1/style.css @@ -63,12 +63,6 @@ body { font-family: -apple-system, Helvetica Neue, Arial, PingFang SC, lucida grande, lucida sans unicode, lucida, helvetica, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif; } -p, -ul, -ol { - margin-bottom: 30px; -} - .btn.focus, .btn:focus { box-shadow: none !important; diff --git a/src/components/Pagination.astro b/src/components/Pagination.astro index ea043de..df59ad1 100644 --- a/src/components/Pagination.astro +++ b/src/components/Pagination.astro @@ -66,7 +66,7 @@ if (totalPages <= 7) { min-width: 32px; text-align: center; border-radius: 4px; - background: #f5f5f5; + background: #fff; color: #333; font-size: 1rem; user-select: none; diff --git a/src/pages/news.astro b/src/pages/news.astro index 4446de5..4c1120f 100644 --- a/src/pages/news.astro +++ b/src/pages/news.astro @@ -1,86 +1,138 @@ --- import Layout from "../layouts/Layout.astro"; -import { getConfig } from '../../utils/config' -import '../assets/css1/style.css' -import '../assets/css1/style5.css' +import { getConfig } from "../../utils/config"; +import "../assets/css1/style.css"; +import "../assets/css1/style5.css"; import { newsIndex } from "../../utils/rpc"; import { Image } from "astro:assets"; -import PaginationComponent from '../components/Pagination.astro' -import BreadComponent from '../components/Breadcrumb.astro' -const config = getConfig(Astro) +import PaginationComponent from "../components/Pagination.astro"; +import BreadComponent from "../components/Breadcrumb.astro"; +const config = getConfig(Astro); // 每页显示多少条 -const limit = 12 +const limit = 12; // 页码 -const { page = 1} = Astro.props; -const {code, data, total = 0, about} = await newsIndex(config.id, limit, page); -console.log(about) +const { page = 1 } = Astro.props; +const { code, data, total = 0, about } = await newsIndex(config.id, limit, page); +console.log(about); if (!data || code !== 0) { - return Astro.redirect('/404'); + return Astro.redirect("/404"); } - --- +
-
-
- +
+
-

SEO教程,SEO入门课程,定期分析SEO技术,大量SEO实战案例,SEO学习课程,快速掌握SEO技术。

-
+

+ SEO教程,SEO入门课程,定期分析SEO技术,大量SEO实战案例,SEO学习课程,快速掌握SEO技术。 +

+
{ - data?.map(e => { - return
-
-
- - {e.title} - -
-
-
- -

{e.title}

+ data?.map((e) => { + return ( +
+
+
+ + {e.title} + +
+
+
+ +

+ + {e.title} + +

+
+

+ {e.description} +

-

{e.description}

-
+ ); }) }
- +
-
+

最新文章

+ + ); }) } @@ -90,8 +142,55 @@ if (!data || code !== 0) { \ No newline at end of file + .divPrevious li { + position: relative; + margin-top: 20px; + overflow: hidden; + } + .divPrevious li.previous-1 { + margin-bottom: 0; + } + .divPrevious li.previous-1 .previous-recent-title { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: rgba(0, 0, 0, 0.5); + padding: 5px 15px; + margin-left: 0; + } + .divPrevious li.previous-1 .previous-one-img { + float: none; + width: auto; + height: auto; + max-height: initial; + position: relative; + margin-top: 0; + } + .divPrevious li.previous-1 .previous-one-img img { + width: 320px; + height: 180px; + vertical-align: middle; + } + .divPrevious li.previous-1 .previous-recent-title h4 { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .divPrevious li.previous-1 .previous-recent-title h4 a { + color: #e4e4e4; + } + .divPrevious li.previous-1 .previous-recent-title span { + color: #ccc; + } + .divPrevious li .previous-one-img { + float: left; + width: 75px; + height: auto; + max-height: 75px; + position: relative; + margin-top: 3px; + } + .divPrevious li .previous-one-img img { + width: 75px; + height: auto; + aspect-ratio: 4 / 3; + object-fit: cover; + } + .divPrevious li .previous-recent-title { + margin-left: 85px; + } + .divPrevious li .previous-recent-title h4 { + font-size: 13px; + font-weight: 400; + line-height: 1.6; + margin-bottom: 0; + } + .divPrevious li .previous-recent-title span { + font-size: 12px; + color: #9a9a9a; + } + diff --git a/src/pages/news/[...slug].astro b/src/pages/news/[...slug].astro index 2ec79d6..8eb0e20 100644 --- a/src/pages/news/[...slug].astro +++ b/src/pages/news/[...slug].astro @@ -82,6 +82,11 @@ if (!data || code !== 0) {