entry: [
'bootstrap-loader',
path.resolve(projectRootPath,'src/app.js')
]
loaders:[
{
test:/\.js$/,
exclude:/node_modules/,
loader:'babel-loader',
query:{
presets:['es2015','react','stage-0'],
plugins:['transform-decorators-legacy']
}
},
{test:/\.css$/,loader:'style!css'},
{ test: /\.scss$/,
loader: 'style!css?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!postcss-loader!sass?outputStyle=expanded&sourceMap'
},
{
test: /\.woff2?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: "url?limit=10000"
},
{
test: /\.(ttf|eot|svg)(\?[\s\S]+)?$/,
loader: 'file'
}
]loaders:[
{
test:/\.js$/,
exclude:/node_modules/,
loader:'babel-loader',
query:{
presets:['es2015','react','stage-0'],
plugins:['transform-decorators-legacy']
}
},
{test:/\.css$/,loader:'style!css'},
{ test: /\.scss$/,
loader: 'style!css?modules&importLoaders=2&sourceMap&localIdentName=[local]___[hash:base64:5]!postcss-loader!sass?outputStyle=expanded&sourceMap'
},
{
test: /\.woff2?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: "url?limit=10000"
},
{
test: /\.(ttf|eot|svg)(\?[\s\S]+)?$/,
loader: 'file'
}
]
preBootstrapCustomizations: ./src/theme/variables.scss
// 自己定义颜色 $cyan: #33e0ff; $humility: #777; // Bootstrap 变量 $brand-primary: darken(#428bca, 6.5%); $brand-secondary: #e25139; $brand-success: #5cb85c; $brand-warning: #f0ad4e; $brand-danger: #d9534f; $brand-info: #5bc0de; $text-color: #333; $font-size-base: 14px; $font-family-sans-serif: "Helvetica Neue", Helvetica, sans-serif;
appStyles: ./src/theme/bootstrap.overrides.scss
.navbar-brand {
position: relative;
padding-left: 50px;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #33e0ff;
background-color: transparent;
}
import React,{Component, PropTypes} from 'react'
import {IndexLink} from 'react-router' //主页路由
import { Navbar, Nav, NavItem } from 'react-bootstrap'; // 导航组件
export default class App extends Component {
render(){
const styles = require('./App.scss') //scss的样式
return(
<div className={styles.app}>
<Navbar fixedTop>
<Navbar.Header>
<Navbar.Brand> //注意这里,就用了我们重写的navbar-brand
<IndexLink to="/" activeStyle={{color: '#33e0ff'}}>
<div className={styles.brand}/>
<span>React Redux Example</span>
</IndexLink>
</Navbar.Brand>
<Navbar.Toggle/>
</Navbar.Header>
</Navbar>
<div className={styles.appContent}>{this.props.children}</div>
<div>App footer</div>
</div>
)
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有