Skip to content

Styling #34

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
external stylesheet is loaded
  • Loading branch information
annapanana committed Mar 23, 2017
commit 3fa1de63269e7795fb2bfcc810363cc0d877bdbd
1 change: 0 additions & 1 deletion 3-flux/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/cerulean/bootstrap.min.css" rel="stylesheet">

<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
</head>
Expand Down
7 changes: 4 additions & 3 deletions 3-flux/src/js/components/Todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ export default class Todo extends React.Component {

const icon = complete ? "../../assets/icon_done.svg" : "../../assets/icon_not_done.svg";
const trash = "../../assets/icon_trash.svg";
const iconStyle = {

const trashStyle = {
maxWidth: "50px",
padding: "5px"
};

const checkboxStyle = {
maxWidth: "50px",
padding: "10px"
}
};

if (edit) {
return (
Expand All @@ -37,7 +38,7 @@ export default class Todo extends React.Component {
return (
<li>
<span><img style={checkboxStyle} src={icon} /></span>
<span onClick={this.deleteTodo.bind(this)}><img style={iconStyle} src={trash} /></span>
<span onClick={this.deleteTodo.bind(this)}><img style={trashStyle} src={trash} /></span>
<span>{text}</span>
</li>
);
Expand Down
9 changes: 8 additions & 1 deletion 3-flux/src/js/pages/Favorites.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React from "react";

export default class Archives extends React.Component {
render() {

const headerStyling = {
fontFamily: "Roboto",
color: "#3C1053",
marginBottom: "20px"
};

return (
<div>
<h1>Favorites</h1>
<h1 style={headerStyling}>Favorites</h1>
</div>
);
}
Expand Down
2 changes: 2 additions & 0 deletions 3-flux/src/js/pages/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Link } from "react-router";
import Footer from "../components/layout/Footer";
import Nav from "../components/layout/Nav";

import "../../styles.css";

export default class Layout extends React.Component {
render() {
const { location } = this.props;
Expand Down
9 changes: 8 additions & 1 deletion 3-flux/src/js/pages/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ import React from "react";

export default class Settings extends React.Component {
render() {

const headerStyling = {
fontFamily: "Roboto",
color: "#3C1053",
marginBottom: "20px"
};

return (
<div>
<h1>Settings</h1>
<h1 style={headerStyling}>Settings</h1>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion 3-flux/src/js/pages/Todos.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class Todos extends React.Component {

return (
<div>
<h1 style={headerStyling}>A List of things To Do</h1>
<h1 style={headerStyling}>To Do</h1>
<NewTodo />
<ul style={customUl}>{TodoComponents}</ul>
</div>
Expand Down
3 changes: 3 additions & 0 deletions 3-flux/src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
background-color: #000;
}
5 changes: 4 additions & 1 deletion 3-flux/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ module.exports = {
plugins: ['react-html-attrs', 'transform-class-properties', 'transform-decorators-legacy'],
}
},
{ test: /\.css$/, loader: "style-loader!css-loader" }
{
test: /\.css$/,
loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
}
]
},
output: {
Expand Down