Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
philffm committed Jul 7, 2024
1 parent 42838e5 commit dad49d6
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 110 deletions.
22 changes: 11 additions & 11 deletions bookmarklet-generator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
<body>
<div class="container">
<h1>AI Summary Helper</h1>
<h2>Bookmarklet Generator</h2>
<label for="apiKey">API Key: <a href="https://platform.openai.com/api-keys" target="_blank"> (get your API key)</a></label>
<!-- <h2>Bookmarklet Generator</h2> -->
<label for="apiKey">API Key <a href="https://platform.openai.com/api-keys" target="_blank"> (get your API key)</a></label>
<input type="text" id="apiKey" placeholder="Enter your OpenAI API Key">
<label class="light" for="apiKey">Disclaimer: We are not saving your token. The token is stored locally on your device.</label>
<label for="prompt">Prompt:</label>
<label for="prompt">Prompt</label>
<textarea id="prompt">
<h3> Article summary section with creative title explaining the article in simple terms.
<h3> More extensive summary with a bit more detail (4-5 sentences).
<h3> Fun reference to the topic related to my competence as a UX designer.
<h3> Humorous take on the topic like a standup comedian.
<h3> Related book and media recommendations.
<h3> Answer additional questions in a serious and engaging way.
Add emojis, hashtags, use HTML, highlight interesting parts, max 1000 words.
<h3> Article summary section with creative title explaining the article in simple terms.
<h3> More extensive summary with a bit more detail (4-5 sentences).
<h3> Fun reference to the topic related to my competence as a UX designer.
<h3> Humorous take on the topic like a standup comedian.
<h3> Related book and media recommendations.
<h3> Answer additional questions in a serious and engaging way.
Add emojis, hashtags, use HTML, highlight interesting parts, max 1000 words.
</textarea>
<label class="light" for="apiKey">🔒 The API key is stored locally and does not leave your device. Do not share the bookmarklet with others, since it contains the API key.</label>
<button onclick="generateBookmarklet()">Generate Bookmarklet</button>
<div class="output" id="output"></div>
</div>
Expand Down
153 changes: 54 additions & 99 deletions bookmarklet-generator/styles.css
Original file line number Diff line number Diff line change
@@ -1,113 +1,68 @@
@import url('https://fontshare.com/css?f[]=inter@700,400');

body {
font-family: 'Inter', sans-serif;
background-color: #121212;
color: #e0e0e0;
margin: 0;
padding: 20px;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
box-sizing: border-box;
}

.container {
background: #1e1e1e;
border-radius: 12px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
padding: 20px;
max-width: 500px;
width: 100%;
box-sizing: border-box;
}

h1 {
color: #007bff;
text-align: center;
margin-bottom: 20px;
font-size: 24px;
}

label {
display: block;
margin: 15px 0 5px;
color: #007bff;
font-weight: bold;
}

.light {
color: #e0e0e0;
}

input, textarea {
width: 100%;
padding: 12px;
margin-bottom: 15px;
border: 1px solid #333;
border-radius: 6px;
font-size: 16px;
background-color: #2b2b2b;
color: #e0e0e0;
box-sizing: border-box;
}

textarea {
height: 150px;
resize: vertical;
}

button {
width: 100%;
padding: 12px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 6px;
font-size: 18px;
cursor: pointer;
transition: background-color 0.3s ease;
margin-bottom: 10px;
}

button:hover {
background-color: #0056b3;
}

.output {
margin-top: 20px;
word-wrap: break-word;
background: #2b2b2b;
padding: 10px;
border-radius: 6px;
border: 1px solid #333;
}

@media (max-width: 600px) {
body {
padding: 10px;
font-family: Arial, sans-serif;
background-color: #f8f9fa;
color: #333;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

.container {
padding: 15px;
background: #fff;
border-radius: 12px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 24px;
max-width: 500px;
width: 100%;
}

h1 {
font-size: 20px;
color: #007bff;
text-align: center;
}
label {
display: block;
margin: 12px 0 4px;
color: #2c2c2c;
font-weight: 200;
font-size: 16px;
}
.light{
color: #333;
}

input, textarea {
/* width: 100%; */
width: -webkit-fill-available;
padding: 10px;
font-size: 14px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 16px;
}
textarea {
height: 100px;
}

button {
width: 100%;
padding: 10px;
font-size: 16px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 12px;
font-size: 18px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}

.output {
padding: 8px;
margin-top: 20px;
word-wrap: break-word;
background: #e9ecef;
padding: 10px;
border-radius: 4px;
border: 1px solid #ccc;
}
}


0 comments on commit dad49d6

Please sign in to comment.