frontend: add community
Change-Id: I929c21d82ddab39d8b210b229ff7559320c1d853
diff --git a/src/app/community/community.scss b/src/app/community/community.scss
new file mode 100644
index 0000000..42bfda1
--- /dev/null
+++ b/src/app/community/community.scss
@@ -0,0 +1,219 @@
+// 全局容器样式
+.community-container {
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 0 2rem;
+}
+
+
+// 热门社区样式
+.hot-communities {
+ margin: 3rem 0;
+
+ h1 {
+ margin-bottom: 1.5rem;
+ text-align: center; // 页面居中
+ }
+
+ .p-card-body {
+ height: 80px;
+ padding: 0;
+ padding-left: 10px;
+ padding-bottom: 10px;
+ padding-right: 10px;
+ }
+
+ .p-card-content {
+ padding: 0;
+ }
+
+ &-carousel {
+ .p-carousel-container {
+ padding: 1rem 0;
+ }
+ }
+
+ &-card {
+ margin: 0.5rem;
+ transition: transform 0.3s ease;
+ box-shadow: none !important; // 取消阴影
+
+ &:hover {
+ transform: translateY(-5px);
+ }
+
+ p {
+ margin: 0;
+ }
+
+ .card-header {
+ position: relative;
+
+ .card-tag {
+ position: absolute;
+ top: 0;
+ left: 0;
+ background-color: #93C4C1;
+ color: white;
+ padding: 0.3rem 0.8rem;
+ border-radius: 0.5rem 0 0.5rem 0;
+ font-size: 2rem;
+ z-index: 1;
+ }
+
+ img {
+ border-radius: 0.5rem 0.5rem 0 0;
+ object-fit: cover;
+ }
+ }
+ }
+}
+
+h1 {
+ text-align: center; // 页面居中
+}
+
+// 全部分类样式
+.all-communities-classifications {
+ display: grid;
+ grid-template-columns: repeat(4, 1fr);
+ gap: 1.5rem;
+ margin: 2rem 0;
+
+ .communities-classification-card {
+ position: relative;
+ overflow: hidden;
+ border-radius: 1rem;
+ cursor: pointer;
+ transition: all 0.3s ease;
+
+ //鼠标悬浮效果
+ img:hover {
+ transform: translateY(-5px);
+ }
+
+ //图片样式
+ img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ border-radius: 0.5rem;
+ transition: all 0.3s ease;
+ }
+ }
+}
+
+// 全部社区样式
+.all-communities {
+ width: 100%;
+ padding: 1rem;
+
+ &-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ &-card {
+ height: 140px;
+ padding: 1.5rem;
+ margin-bottom: 1rem;
+ border-radius: 0.5rem;
+ transition: transform 0.3s ease;
+ box-shadow: none !important; // 取消阴影
+
+ //填充卡片
+ &.p-card.p-component {
+ padding: 0;
+ }
+
+ .p-card-body {
+ padding: 0;
+ }
+
+ &:hover {
+ transform: translateY(-3px);
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
+ }
+
+ .p-card-content {
+ height: 140px;
+ display: flex;
+ justify-content: space-between;
+ padding: 0;
+ }
+
+ img {
+ border-radius: 0.5rem 0 0 0.5rem;
+ object-fit: cover;
+ }
+
+ .community-header {
+ display: flex;
+ flex: 1;
+ max-width: 850px;
+ padding-left: 20px;
+ padding-right: 20px;
+ margin-bottom: 20px;
+ }
+
+ .community-content {
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+
+ h3 {
+ font-size: 1.5rem;
+ font-weight: bold;
+ color: #2c3e50;
+ }
+
+ .community-introduction {
+ color: #666;
+ font-size: 1rem;
+ margin-bottom: 0;
+ }
+ }
+
+ .community-states {
+ min-width: 120px;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-end;
+ align-items: flex-end;
+ gap: 0.5rem;
+
+ .state-item {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ color: #666;
+ font-size: 1rem;
+ }
+ }
+ }
+}
+
+
+// 响应式设计
+@media (max-width: 1024px) {
+ .all-communities-classifications {
+ grid-template-columns: repeat(2, 1fr);
+ }
+}
+
+@media (max-width: 768px) {
+ .community-container {
+ padding: 0 1rem;
+ }
+
+ .all-communities-classifications {
+ grid-template-columns: 1fr;
+ }
+
+ .hot-communities-carousel {
+ .p-carousel-items-container {
+ padding: 0;
+ }
+ }
+}
\ No newline at end of file