Skip to content

Commit

Permalink
埋め込みコードのページも
Browse files Browse the repository at this point in the history
  • Loading branch information
webfullsympathy committed Oct 4, 2024
1 parent 88dd97b commit 7a83acf
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 1 deletion.
23 changes: 23 additions & 0 deletions embed/m/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>埋め込みコード</title>
<link rel="icon" type="image/vnd.microsoft.icon" href="https://share-tool.vercel.app/src/share.jpg">
<link href="style.css" rel="stylesheet">
</head>
<body>
<img src="https://share-tool.vercel.app/src/share.jpg">
<h1 id="text">埋め込みコード</h1>
<h2 id="text">以下のHTMLコードを自身のページに貼り付けてください。</h2>
<code>
&lt;a&nbsp;href='https://share-tool.vercel.app?text=ここに共有したいテキストを入力'&gt;&lt;img src='https://share-tool.vercel.app/src/share.jpg' style='border-radius: 50px;'&gt;&lt;/a&gt;
</code>
<div>
<nobr>
<a href="https://github.com/webfullsympathy/share-tool/blob/main/README.md"><h3>README・使い方</h3></a>
</nobr>
</div>
</body>
</html>
89 changes: 89 additions & 0 deletions embed/m/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
@media (prefers-color-scheme: light) {
body{
background-color: #ffffff;
text-align: center;
}

div{
background-color: black;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
color: white;
display: flex;
justify-content: center;
}

a{
outline: none;
text-decoration: none;
color: white;
}

h3{
display: inline;
margin: 30px;
}

#text{
text-align: center;
-webkit-text-stroke: 1px #000;
text-stroke: 1px #000;
}

code{
background-color: #000;
border-radius: 3px;
font-family: courier, monospace;
border: 1px black solid;
}
}
@media (prefers-color-scheme: dark) {
body{
background-color: #1B1B1F;
text-align: center;
}

div{
background-color: #ffffff;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
color: black;
display: flex;
justify-content: center;
}

a{
outline: none;
text-decoration: none;
color: black;
}

h3{
display: inline;
margin: 30px;
}

#text{
text-align: center;
-webkit-text-stroke: 1px #FFF;
text-stroke: 1px #FFF;
}

code{
background-color: #eee;
border-radius: 3px;
font-family: courier, monospace;
border: 1px #fff solid;
}
}

img{
display: block;
margin: 0 auto;
width: 20%;
border-radius: 50px;
}
2 changes: 1 addition & 1 deletion src/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if (screen.availWidth < screen.availHeight){
}else if (location.href.includes("?")){
location.href = location.href.substring(0, location.href.indexOf("?")).replace("index.html","") + "/m?text=" + move_data
}else if (location.href.charAt(location.href.length -1) == "/"){
location.href = location.href.slice(0,-1).replace("index.html","") + "/m/index.html"
location.href = location.href.slice(0,-1).replace("index.html/","") + "/m/index.html"
}else{
location.href = location.href.replace("index.html","") + "/m/index.html"
}
Expand Down

0 comments on commit 7a83acf

Please sign in to comment.