Skip to content

Commit

Permalink
Added support for static image embedding.
Browse files Browse the repository at this point in the history
  • Loading branch information
abingham committed Feb 19, 2017
1 parent 458c45c commit b6b6b2f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 23 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"license": "MIT",
"dependencies": {
"ace-css": "^1.1.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.26.1",
"elm-webpack-loader": "^4.1.1",
"file-loader": "^0.9.0",
Expand Down
38 changes: 21 additions & 17 deletions src/ACCUSchedule/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import ACCUSchedule.Routing as Routing
import ACCUSchedule.Search as Search
import ACCUSchedule.Sessions as Sessions
import ACCUSchedule.Types as Types
import Html exposing (a, br, div, h1, Html, p, text)
import Html exposing (a, br, div, h1, Html, img, p, text)
import Html.Attributes exposing (src)
import Material.Button as Button
import Material.Card as Card
import Material.Chip as Chip
import Material.Color as Color
import Material.Elevation as Elevation
import Material.Footer as Footer
import Material.Grid as Grid
import Material.Icon as Icon
import Material.Layout as Layout
import Material.Options as Options
Expand Down Expand Up @@ -303,6 +303,24 @@ agendaLink =
drawerLink Routing.agendaUrl "Agenda"


footer =
Footer.mini []
{ left =
Footer.left []
[ Footer.logo [] [ Footer.html <| text "ACCU 2017 Schedule" ]
, Footer.links []
[ Footer.linkItem [ Footer.href "https://conference.accu.org/site" ] [ Footer.html <| text "Conference" ]
, Footer.linkItem [ Footer.href "https://github.com/abingham/accu-2017-elm-app" ] [ Footer.html <| img [ src "/static/img/GitHub-Mark-Light-32px.png" ] [] ]
]
]
, right =
Footer.right []
[ Footer.links []
[ Footer.linkItem [ Footer.href "https://sixty-north.com" ] [ Footer.html <| text "© 2017 Sixty North AS" ] ]
]
}


view : Model.Model -> Html Msg.Msg
view model =
let
Expand Down Expand Up @@ -406,21 +424,7 @@ view model =
, Options.css "margin-bottom" "10px"
]
main
, Footer.mini []
{ left =
Footer.left []
[ Footer.logo [] [ Footer.html <| text "ACCU 2017 Schedule" ]
, Footer.links []
[ Footer.linkItem [ Footer.href "https://conference.accu.org/site" ] [ Footer.html <| text "Conference" ]
, Footer.linkItem [ Footer.href "https://github.com/abingham/accu-2017-elm-app" ] [ Footer.html <| text "Github" ]
]
]
, right =
Footer.right []
[ Footer.links []
[ Footer.linkItem [ Footer.href "https://sixty-north.com" ] [ Footer.html <| text "© 2017 Sixty North AS" ] ]
]
}
, footer
]
}
]
Binary file added src/static/img/GitHub-Mark-Light-32px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var CopyWebpackPlugin = require( 'copy-webpack-plugin' );
var path = require("path");

module.exports = {
Expand All @@ -24,29 +25,37 @@ module.exports = {
{
test: /\.html$/,
exclude: /node_modules/,
loader: 'file?name=[name].[ext]',
loader: 'file?name=[name].[ext]'
},
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
loader: 'elm-webpack?verbose=true&warn=true',
loader: 'elm-webpack?verbose=true&warn=true'
},
{
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'url-loader?limit=10000&mimetype=application/font-woff',
loader: 'url-loader?limit=10000&mimetype=application/font-woff'
},
{
test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader',
loader: 'file-loader'
},
],

noParse: /\.elm$/,
noParse: /\.elm$/
},
plugins: [
new CopyWebpackPlugin([
{
from: 'src/static/img/',
to: 'static/img/'
},
])
],

devServer: {
inline: true,
stats: { colors: true },
stats: { colors: true }
},

};

0 comments on commit b6b6b2f

Please sign in to comment.