Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0634fcc
commit 1fbbb96
Showing
12 changed files
with
151 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
export drupal from "./drupal" | ||
export generic from "./generic" | ||
export joomla from "./joomla" | ||
export shopify from "./shopify" | ||
export squarespace from "./squarespace" | ||
export tumblr from "./tumblr" | ||
export weebly from "./weebly" | ||
export wordpress from "./wordpress" | ||
export squarespace from "./squarespace" | ||
export shopify from "./shopify" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import tumblrLatest from "./tumblr-latest" | ||
import icon from "./tumblr.svg" | ||
|
||
import BaseTarget from "components/base-target" | ||
|
||
export default class TumblrTarget extends BaseTarget { | ||
static icon = icon; | ||
static id = "tumblr"; | ||
static label = "Tumblr"; | ||
static supports = {embedCode: true}; | ||
static versions = [tumblrLatest]; | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import template from "./tumblr-latest.pug" | ||
import installScript from "./install-script" | ||
|
||
export default { | ||
id: "latest", | ||
template, | ||
screenshots: {installScript} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import template from "./install-script.pug" | ||
import stylesheet from "./install-script.styl" | ||
|
||
import BaseScreenshot from "components/base-screenshot" | ||
|
||
export default class Screenshot extends BaseScreenshot { | ||
static template = template; | ||
static stylesheet = stylesheet; | ||
|
||
componentDidMount(target) { | ||
const {body} = this.iframe.contentDocument | ||
const escaper = this.iframe.contentDocument.createElement("textarea") | ||
|
||
escaper.textContent = target.copyText | ||
const escapedText = `<div class="focal-point relative-arrow" data-arrow="above">${escaper.innerHTML}</div>` | ||
|
||
body.innerHTML = body.innerHTML.replace(/\{\{EMBED_CODE_SLOT\}\}/g, escapedText) | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
app/targets/tumblr/tumblr-latest/install-script/install-script.pug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
.screenshot | ||
if this.location === "head" | ||
:marked | ||
```django | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
{{EMBED_CODE_SLOT}} | ||
<title>{Title}{block:SearchPage} ({lang:Search results for SearchQuery}){/block:SearchPage}{block:PermalinkPage}{block:PostSummary} — {PostSummary}{/block:PostSummary}{/block:PermalinkPage}</title> | ||
|
||
<meta charset="utf-8"> | ||
<meta name="description" content="{block:IndexPage}{block:Description}{MetaDescription}{/block:Description}{/block:IndexPage}{block:PermalinkPage}{block:PostSummary}{PostSummary}{/block:PostSummary}{/block:PermalinkPage}" /> | ||
</head> | ||
|
||
<body> | ||
{block:IfShowBarOnTop}<section id="color_bar"></section>{/block:IfShowBarOnTop} | ||
<section id="container" class="group"> | ||
</section> | ||
</body> | ||
</html> | ||
``` | ||
else | ||
:marked | ||
```django | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>{Title}{block:SearchPage} ({lang:Search results for SearchQuery}){/block:SearchPage}{block:PermalinkPage}{block:PostSummary} — {PostSummary}{/block:PostSummary}{/block:PermalinkPage}</title> | ||
|
||
<meta charset="utf-8"> | ||
<meta name="description" content="{block:IndexPage}{block:Description}{MetaDescription}{/block:Description}{/block:IndexPage}{block:PermalinkPage}{block:PostSummary}{PostSummary}{/block:PostSummary}{/block:PermalinkPage}" /> | ||
</head> | ||
|
||
<body> | ||
{{EMBED_CODE_SLOT}} | ||
{block:IfShowBarOnTop}<section id="color_bar"></section>{/block:IfShowBarOnTop} | ||
<section id="container" class="group"> | ||
</section> | ||
</body> | ||
</html> | ||
``` |
6 changes: 6 additions & 0 deletions
6
app/targets/tumblr/tumblr-latest/install-script/install-script.styl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
body | ||
width 700px | ||
height 275px | ||
|
||
pre | ||
min-height 100vh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
include ../../../components/base-screenshot/mixin-annotation-arrow.pug | ||
|
||
ol.steps | ||
li | ||
h2 Login to the <a target="_blank" href="https://www.tumblr.com/login">Tumblr Dashboard</a>. | ||
|
||
li | ||
h2 Navigate to <strong>Edit appearance<span class="with-more-icon-after"></span> Edit Theme <span class="with-more-icon-after"></span> Edit HTML</strong>. | ||
p | ||
| In the top right menu bar, click the user icon, then <strong>Edit appearance</strong>. | ||
|
||
p Then click <strong>Edit HTML/CSS</strong> in the menu that appears. | ||
|
||
figure | ||
img(src=require("./edit-appearance.jpg")) | ||
+annotation-arrow("ne")(style={top: "-3%", left: "47%", width: "19%"} transform="rotate(41deg)") | ||
+annotation-arrow("nw")(style={top: "76%", left: "33%", width: "18%"} transform="rotate(135deg)") | ||
|
||
li | ||
p In the center column, Click <strong>Edit Theme</strong>. | ||
|
||
figure | ||
img(src=require("./edit-theme.jpg")) | ||
+annotation-arrow("sw")(style={top: "45%", left: "46%", width: "20%"}) | ||
|
||
li | ||
p On the top left, Click <strong>Edit HTML</strong>. | ||
|
||
figure | ||
img(src=require("./edit-html.jpg")) | ||
+annotation-arrow("nw")(style={top: "47%", left: "44%", width: "20%"} transform="rotate(17deg)") | ||
|
||
li | ||
h2 Copy the code below. | ||
|
||
.copy-container | ||
button.button.primary.run(data-ref="copyButtons[]") Copy | ||
div.copyable(contenteditable)= this.copyText | ||
|
||
p Paste this code into your site’s <#{this.location}> tag. | ||
|
||
figure(data-ref="screenshotMounts[]" data-screenshot="installScript") | ||
|
||
li | ||
h2 Save your changes. | ||
|
||
p Clicking <strong>Update Preview</strong> and <strong>Save</strong>. | ||
p You’re done! |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters