Scan with your iPhone to install
Build a We
What's New
Version 1.0
First release
What it does
16 actions-
CommentThis shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=347783db-19f7-4b93-a4ca-2c5805428721
-
Ask for InputWhat's the title of your website?
-
Ask for InputWhat text do you want on the page?
-
Text
-
List
-
Select Photos
-
Text
-
Set VariableimageHTML
-
Repeat with Each
-
Base64 Encode
-
Text
-
Add to Variable
-
Text
-
Base64 Encode
-
Text
-
Open URLs
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#include 'actions/web'
#include 'actions/photos'
#define glyph globeDesk
// This shortcut is public. View it at https://shortcutstudio.app/marketplace-item.html?id=347783db-19f7-4b93-a4ca-2c5805428721
const TitleInput = prompt("What's the title of your website?", "Text", true)
const BodyInput = prompt("What text do you want on the page?", "Text", true)
list()
const SelectedPhotos = selectPhotos(true)
@imageHTML = ""
for _ in "!ID" {
const Base64Image = base64Encode(@RepeatItem)
@imageHTML += "<img src='data:image/jpeg;base64,{Base64Image}' style='max-width:100%;margin:10px 0;'>"
}
const FullHTML = "<!DOCTYPE html><html><head><meta name='viewport' content='width=device-width, initial-scale=1'><title>{TitleInput}</title></head><body><h1>{TitleInput}</h1><p>{BodyInput}</p>{@imageHTMLbodyhtml}"
const EncodedHTML = base64Encode(FullHTML)
const DataURL = "data:text/html;base64,{EncodedHTML}"
openURL(DataURL)
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by boomchickaboomboom
You Might Also Like
Advertisement