File tree Expand file tree Collapse file tree 4 files changed +9
-3
lines changed
Expand file tree Collapse file tree 4 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const RecentSnippetItem = ({ snippet }) => {
1010 const syntax = mode . caption ;
1111 const snippetTitle = snippet . get ( 'title' ) || `#${ snippet . get ( 'id' ) } , Untitled` ;
1212 const download = ( ) => downloadSnippet ( snippet ) ;
13+ const rawUrl = process . env . RAW_SNIPPETS_URL_FORMAT . replace ( '%s' , snippet . get ( 'id' ) ) ;
1314
1415 return (
1516 < li className = "recent-snippet-item" >
@@ -25,7 +26,7 @@ const RecentSnippetItem = ({ snippet }) => {
2526 < div className = "recent-snippet-actions" >
2627 < span className = "recent-snippet-lang" > { syntax } </ span >
2728 < div >
28- < button className = "recent-snippet-button light" > Raw</ button >
29+ < a href = { rawUrl } className = "recent-snippet-button light" > Raw</ a >
2930 < button className = "recent-snippet-button light" onClick = { download } > Download</ button >
3031 < Link to = { `${ snippet . get ( 'id' ) } ` } className = "recent-snippet-button" > Show</ Link >
3132 </ div >
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ class Snippet extends React.Component {
5151 const snippetTitle = snippet . get ( 'title' ) || `#${ snippet . get ( 'id' ) } , Untitled` ;
5252 const mode = modesByName [ snippet . get ( 'syntax' ) ] || modesByName . text ;
5353 const syntax = mode . caption ;
54+ const rawUrl = process . env . RAW_SNIPPETS_URL_FORMAT . replace ( '%s' , snippet . get ( 'id' ) ) ;
5455
5556 return (
5657 [
@@ -67,7 +68,7 @@ class Snippet extends React.Component {
6768 < div className = "snippet-data-actions" >
6869 < span className = "snippet-data-lang" > { syntax } </ span >
6970 < div >
70- < button className = "snippet-button" > Raw</ button >
71+ < a href = { rawUrl } className = "snippet-button" > Raw</ a >
7172 < button className = "snippet-button" onClick = { this . download } > Download</ button >
7273 < button
7374 className = { `snippet-button ${ this . state . isShowEmbed } ` }
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ button-group-width = 312px
6868 background-color : button-active
6969 text-transform : uppercase
7070 cursor : pointer
71+ text-decoration : none
7172 & :last-child
7273 margin-right : 0
7374 & .true
Original file line number Diff line number Diff line change @@ -205,7 +205,10 @@ module.exports = () => {
205205 // testing to make debugging easier. We do not know which default they
206206 // use, so let's set 'production' explicitly and let user to override
207207 // this value.
208- new webpack . EnvironmentPlugin ( { NODE_ENV : 'production' } ) ,
208+ new webpack . EnvironmentPlugin ( {
209+ NODE_ENV : 'production' ,
210+ RAW_SNIPPETS_URL_FORMAT : '//xsnippet.org/%s/raw' ,
211+ } ) ,
209212
210213 // Generate index.html based on passed template, populating it with
211214 // produced JavaScript bundles.
You can’t perform that action at this time.
0 commit comments