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 }) => {
10
10
const syntax = mode . caption ;
11
11
const snippetTitle = snippet . get ( 'title' ) || `#${ snippet . get ( 'id' ) } , Untitled` ;
12
12
const download = ( ) => downloadSnippet ( snippet ) ;
13
+ const rawUrl = process . env . RAW_SNIPPETS_URL_FORMAT . replace ( '%s' , snippet . get ( 'id' ) ) ;
13
14
14
15
return (
15
16
< li className = "recent-snippet-item" >
@@ -25,7 +26,7 @@ const RecentSnippetItem = ({ snippet }) => {
25
26
< div className = "recent-snippet-actions" >
26
27
< span className = "recent-snippet-lang" > { syntax } </ span >
27
28
< div >
28
- < button className = "recent-snippet-button light" > Raw</ button >
29
+ < a href = { rawUrl } className = "recent-snippet-button light" > Raw</ a >
29
30
< button className = "recent-snippet-button light" onClick = { download } > Download</ button >
30
31
< Link to = { `${ snippet . get ( 'id' ) } ` } className = "recent-snippet-button" > Show</ Link >
31
32
</ div >
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ class Snippet extends React.Component {
51
51
const snippetTitle = snippet . get ( 'title' ) || `#${ snippet . get ( 'id' ) } , Untitled` ;
52
52
const mode = modesByName [ snippet . get ( 'syntax' ) ] || modesByName . text ;
53
53
const syntax = mode . caption ;
54
+ const rawUrl = process . env . RAW_SNIPPETS_URL_FORMAT . replace ( '%s' , snippet . get ( 'id' ) ) ;
54
55
55
56
return (
56
57
[
@@ -67,7 +68,7 @@ class Snippet extends React.Component {
67
68
< div className = "snippet-data-actions" >
68
69
< span className = "snippet-data-lang" > { syntax } </ span >
69
70
< div >
70
- < button className = "snippet-button" > Raw</ button >
71
+ < a href = { rawUrl } className = "snippet-button" > Raw</ a >
71
72
< button className = "snippet-button" onClick = { this . download } > Download</ button >
72
73
< button
73
74
className = { `snippet-button ${ this . state . isShowEmbed } ` }
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ button-group-width = 312px
68
68
background-color : button-active
69
69
text-transform : uppercase
70
70
cursor : pointer
71
+ text-decoration : none
71
72
& :last-child
72
73
margin-right : 0
73
74
& .true
Original file line number Diff line number Diff line change @@ -205,7 +205,10 @@ module.exports = () => {
205
205
// testing to make debugging easier. We do not know which default they
206
206
// use, so let's set 'production' explicitly and let user to override
207
207
// 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
+ } ) ,
209
212
210
213
// Generate index.html based on passed template, populating it with
211
214
// produced JavaScript bundles.
You can’t perform that action at this time.
0 commit comments