Skip to content
Open
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
36 changes: 16 additions & 20 deletions src/layouts/About/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@ import qrWeibo from '../../assets/images/qr-weibo.png';
import qrGithub from '../../assets/images/qr-github.png';

const details = [{
"title": "weixin",
"desc": "官方微信公众号",
"img": qrWechat
},
{
"title": "qq",
"desc": "官方QQ群",
"img": qrQq
},
{
"title": "weibo",
"desc": "官方微博",
"img": qrWeibo
},
{
"title": "github",
"desc": "官方github",
"img": qrGithub
},
];
"title": "weixin",
"desc": "官方微信公众号",
"img": qrWechat
},{
"title": "qq",
"desc": "官方QQ群",
"img": qrQq
},{
"title": "weibo",
"desc": "官方微博",
"img": qrWeibo
},{
"title": "github",
"desc": "官方github",
"img": qrGithub
}];

export default details;
63 changes: 32 additions & 31 deletions src/layouts/About/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,39 @@ require ('bootstrap');
// import {Row, Col, Popover, Button} from 'antd';
class Index extends Component {
showDetail(img, title){
return `<div class="detail-img">
<img src=${img} alt=${title}/>
</div>`
}
render() {

return (
<div className="about-container">
<div>
{
details.map((ele,index) => {
$(() => {
$(`#popover${index}`).popover(
{
title: ele.desc,
trigger: 'focus',
content: this.showDetail(ele.img, ele.title),
html: true
}
)
})
return (
<button id={`popover${index}`} type="button" className="btn" data-placement="top">
<FontAwesomeIcon icon={["fab", ele.title]}/>
</button>)
})
}
</div>
</div>
);
}
return `<div class="detail-img">
<img src=${img} alt=${title}/>
</div>`
}
render() {
return (
<div className="about-container">
<div>
{
details.map((ele,index) => {
$(() => {
$(`#popover${index}`).popover({
title: ele.desc,
trigger: 'focus',
content: this.showDetail(ele.img, ele.title),
html: true,
placement: 'top'
});
});
return (
<button id={`popover${index}`} type="button" className="btn" data-placement="top">
<FontAwesomeIcon icon={["fab", ele.title]}/>
</button>
);
})
}
</div>
</div>
);
}
}

///////////////////////////////antd///////////////////////////////////
// render() {
// return (
// <div className="about-container">
Expand Down
3 changes: 2 additions & 1 deletion src/layouts/About/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
margin: 5px 5px;
}
.detail-img {
max-width: 134px;
width: 134px;
height:134px;
img {
width: 100%;
height: auto;
Expand Down
6 changes: 3 additions & 3 deletions src/layouts/Footer.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { Component } from 'react';
//import {Row, Col} from 'antd';
import About from './About'
import $ from'jquery';
require('popper.js');
require ('bootstrap');
// import $ from'jquery';
// require('popper.js');
// require ('bootstrap');

class Footer extends Component {
render() {
Expand Down
24 changes: 10 additions & 14 deletions src/pages/Sponsors/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ import logoMicroSoft from '../../assets/images/Microsoft.png';
import logoBBD from '../../assets/images/BBD.png';
import logoGDG from '../../assets/images/GDG.png';

const sponsors = [
{
"title": "BBD",
"img": logoMicroSoft
},
{
"title": "MicroSoft",
"img": logoBBD
},
{
"title": "GDG",
"img": logoGDG
},
];
const sponsors = [{
"title": "BBD",
"img": logoMicroSoft
},{
"title": "MicroSoft",
"img": logoBBD
},{
"title": "GDG",
"img": logoGDG
}];

export default sponsors;
30 changes: 15 additions & 15 deletions src/pages/Sponsors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ import sponsors from './data';
import './style.css';

class Sponsors extends Component {
render() {
return (
<div className="row logolist">
{
sponsors.map((ele,index) => {
return (
<div className="col-md-2 col-xs-4">
<img src={ele.img} alt={ele.title} className="logo-img"/>
</div>
)
})
}
</div>
);
}
render() {
return (
<div className="row logolist">
{
sponsors.map((ele,index) => {
return (
<div className="col-md-2 col-xs-4">
<img src={ele.img} alt={ele.title} className="logo-img"/>
</div>
);
})
}
</div>
);
}
}

export default Sponsors;