mirror of
https://gitee.com/ineo6/homebrew-install.git
synced 2025-04-06 03:58:05 +08:00
feat: 添加外卖banner
This commit is contained in:
parent
3307e6ca51
commit
ed40e3a56f
@ -5,6 +5,7 @@ import Navbar from 'dumi-theme-default/src/components/Navbar';
|
||||
import SideMenu from 'dumi-theme-default/src/components/SideMenu';
|
||||
import SlugList from 'dumi-theme-default/src/components/SlugList';
|
||||
import SearchBar from 'dumi-theme-default/src/components/SearchBar';
|
||||
import { Popover } from 'antd';
|
||||
import Notice from './Notice';
|
||||
import './style/layout.less';
|
||||
|
||||
@ -24,6 +25,30 @@ const Hero = hero => (
|
||||
</>
|
||||
);
|
||||
|
||||
const WaimaiBanner = () => (
|
||||
<div className="waimai-banner">
|
||||
<Popover
|
||||
placement="bottom"
|
||||
content={
|
||||
<>
|
||||
<p style={{ textAlign: 'center' }}>天天有点券</p>
|
||||
<img
|
||||
src="/images/mini-waimai.jpg"
|
||||
style={{ height: '129px', width: '129px' }}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
trigger="hover"
|
||||
>
|
||||
<img className="waimai-banner-img" src="/images/waimai-banner.png" />
|
||||
<img
|
||||
className="waimai-banner-tiny-img"
|
||||
src="/images/waimai-banner-sm.png"
|
||||
/>
|
||||
</Popover>
|
||||
</div>
|
||||
);
|
||||
|
||||
const Features = features => (
|
||||
<div className="__dumi-default-layout-features">
|
||||
{features.map(feat => (
|
||||
@ -87,7 +112,12 @@ const Layout: React.FC<IRouteComponentProps> = ({ children, location }) => {
|
||||
>
|
||||
<Navbar
|
||||
location={location}
|
||||
navPrefix={<SearchBar />}
|
||||
navPrefix={
|
||||
<div style={{ display: 'inline-block' }}>
|
||||
<WaimaiBanner />
|
||||
<SearchBar />
|
||||
</div>
|
||||
}
|
||||
onMobileMenuClick={ev => {
|
||||
setMenuCollapsed(val => !val);
|
||||
ev.stopPropagation();
|
||||
|
@ -157,6 +157,7 @@ body {
|
||||
a dt {
|
||||
color: @c-link;
|
||||
transition: opacity 0.2s;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
text-decoration: underline;
|
||||
@ -320,3 +321,30 @@ body {
|
||||
#vcomments {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.waimai-banner {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
|
||||
.waimai-banner-img {
|
||||
height: 64px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.waimai-banner-tiny-img {
|
||||
cursor: pointer;
|
||||
height: 50px;
|
||||
display: none;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
@media @mobile {
|
||||
.waimai-banner-img {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.waimai-banner-tiny-img {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
public/images/mini-waimai.jpg
Normal file
BIN
public/images/mini-waimai.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 52 KiB |
BIN
public/images/waimai-banner-sm.png
Normal file
BIN
public/images/waimai-banner-sm.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
BIN
public/images/waimai-banner.png
Normal file
BIN
public/images/waimai-banner.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
Loading…
x
Reference in New Issue
Block a user