Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade yunqi page to fusion design #1365

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions react-materials/scaffolds/ice-yunqi-homepage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@icedesign/yunqi-homepage-scaffold",
"version": "1.0.1",
"version": "2.0.0",
"description": "云栖大会官方首页模板,适用于信息展示类的场景",
"homepage": "https://alibaba.github.io/ice/scaffold-preview/ice-yunqi-homepage/index.html",
"keywords": [
Expand All @@ -16,13 +16,13 @@
"access": "public"
},
"dependencies": {
"@icedesign/base": "^0.2.0",
"@icedesign/container": "^0.1.4",
"@icedesign/layout": "^0.1.2",
"@icedesign/menu": "^0.1.1",
"@icedesign/skin": "^0.1.0",
"@alifd/next": "^1.x",
"@alifd/theme-1": "^0.0.7",
"@icedesign/container": "^1.x",
"@icedesign/foundation-symbol": "^1.x",
"@icedesign/layout": "^1.x",
"classnames": "^2.2.5",
"foundation-symbol": "^0.1.3",
"moment": "^2.23.0",
"prop-types": "^15.5.8",
"rc-queue-anim": "^1.6.5",
"rc-scroll-anim": "^2.5.5",
Expand All @@ -44,13 +44,10 @@
"ice-scripts": "^1.6.0-next.3"
},
"buildConfig": {
"theme": "@icedesign/skin",
"theme": "@alifd/theme-1",
"entry": "src/index.js",
"localization": false
},
"themeConfig": {
"primaryColor": "#236cff"
},
"scaffoldConfig": {
"builder": "ice-scripts",
"name": "ice-yunqi-homepage",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Grid } from '@icedesign/base';
import { Grid } from '@alifd/next';

const { Row, Col } = Grid;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { Link, withRouter } from 'react-router-dom';
import Menu, { SubMenu, Item as MenuItem } from '@icedesign/menu';
import {Nav} from '@alifd/next';
import { headerMenuConfig } from '../../menuConfig';
import Logo from '../Logo';
import './index.scss';
Expand All @@ -23,20 +23,22 @@ export default class Header extends Component {
<div className="header-container">
<div className="header-content">
<Logo />
<Menu
<Nav
className="header-navbar-menu"
onClick={this.handleNavClick}
selectedKeys={[pathname]}
defaultSelectedKeys={[pathname]}
mode="horizontal"
direction="hoz"
triggerType="click"
activeDirection={null}
>
{headerMenuConfig &&
headerMenuConfig.length > 0 &&
headerMenuConfig.map((nav, index) => {
if (nav.children && nav.children.length > 0) {
return (
<SubMenu
triggerType="click"
<Nav.SubNav

key={index}
title={<span>{nav.name}</span>}
>
Expand All @@ -49,23 +51,23 @@ export default class Header extends Component {

linkProps.href = item.path;
return (
<MenuItem key={item.path}>
<Nav.Item key={item.path}>
<a {...linkProps}>
<span>{item.name}</span>
</a>
</MenuItem>
</Nav.Item>
);
}
linkProps.to = item.path;
return (
<MenuItem key={item.path}>
<Nav.Item key={item.path}>
<Link {...linkProps}>
<span>{item.name}</span>
</Link>
</MenuItem>
</Nav.Item>
);
})}
</SubMenu>
</Nav.SubNav>
);
}
const linkProps = {};
Expand All @@ -75,23 +77,23 @@ export default class Header extends Component {
}
linkProps.href = nav.path;
return (
<MenuItem key={nav.path}>
<Nav.Item key={nav.path}>
<a {...linkProps}>
<span>{nav.name}</span>
</a>
</MenuItem>
</Nav.Item>
);
}
linkProps.to = nav.path;
return (
<MenuItem key={nav.path}>
<Nav.Item key={nav.path}>
<Link {...linkProps}>
<span>{nav.name}</span>
</Link>
</MenuItem>
</Nav.Item>
);
})}
</Menu>
</Nav>
<a href="#" className="ticket-button">
立即购票
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,29 @@
justify-content: space-between;
}

.ice-menu {
background: transparent;
.next-nav {
background: transparent !important;
margin-right: 100px;
.ice-menu-item {
font-size: 14px;
box-shadow: none;
border: none;
.next-menu-item {
background-color: transparent !important;
font-weight: 600;
color: #fff;
color: #fff !important;
.next-menu-item-inner {
font-size: 14px !important;
}
&.next-selected {
color: hsla(0, 0%, 100%, 0.7) !important;
}
&:hover,
a:hover {
color: hsla(0, 0%, 100%, 0.7);
}
}
.ice-menu-item-selected {
color: hsla(0, 0%, 100%, 0.7);
}
// .ice-menu-item-selected {
// color: hsla(0, 0%, 100%, 0.7);
// }
}

.ticket-button {
Expand Down
2 changes: 1 addition & 1 deletion react-materials/scaffolds/ice-yunqi-homepage/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ReactDOM from 'react-dom';
// 载入默认全局样式 normalize
import '@icedesign/base/reset.scss';
import '@alifd/next/reset.scss';
import router from './router';

const ICE_CONTAINER = document.getElementById('ice-container');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid } from '@icedesign/base';
import { Grid } from '@alifd/next';
import MOCK_DATA from './data';

const { Row, Col } = Grid;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid } from '@icedesign/base';
import { Grid } from '@alifd/next';
import ScrollAnim from 'rc-scroll-anim';
import QueueAnim from 'rc-queue-anim';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid } from '@icedesign/base';
import { Grid } from '@alifd/next';

const { Row, Col } = Grid;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid } from '@icedesign/base';
import { Grid } from '@alifd/next';
import ScrollAnim from 'rc-scroll-anim';
import QueueAnim from 'rc-queue-anim';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid } from '@icedesign/base';
import { Grid } from '@alifd/next';

import MOCK_DATA from './data';

Expand Down