Create a beautiful notes webapp
- User
Create a beautiful notes webapp
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Create a beautiful notes webapp
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
I'll create a beautiful notes web app for you with a clean, modern design. This will be a single HTML file with embedded CSS and JavaScript that you can run directly in your browser.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beautiful Notes</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.header {
text-align: center;
color: white;
margin-bottom: 40px;
}
.header h1 {
font-size: 3rem;
font-weight: 300;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.header p {
font-size: 1.2rem;
opacity: 0.9;
}
.add-note-section {
background: white;
border-radius: 20px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.input-group {
display: flex;
gap: 15px;
margin-bottom: 15px;
}
input[type="text"] {
flex: 1;
padding: 15px 20px;
border: 2px solid #e0e0e0;
border-radius: 10px;
font-size: 16px;
transition: border-color 0.3s;
}
input[type="text"]:focus {
outline: none;
border-color: #667eea;
}
textarea {
width: 100%;
padding: 15px 20px;
border: 2px solid #e0e0e0;
border-radius: 10px;
font-size: 16px;
resize: vertical;
min-height: 120px;
font-family: inherit;
transition: border-color 0.3s;
}
textarea:focus {
outline: none;
border-color: #667eea;
}
.color-picker {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.color-option {
width: 40px;
height: 40px;
border-radius: 50%;
cursor: pointer;
border: 3px solid transparent;
transition: all 0.3s;
}
.color-option:hover {
transform: scale(1.1);
}
.color-option.selected {
border-color: #333;
box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
}
.btn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 15px 40px;
border-radius: 10px;
font-size: 16px;
cursor: pointer;
transition: all 0.3s;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}
.notes-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
}
.note-card {
background: white;
border-radius: 15px;
padding: 25px;
box-shadow: 0 5px 20px rgba(0,0,0,0.1);
transition: all 0.3s;
position: relative;
overflow: hidden;
}
.note-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.note-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 5px;
background: var(--note-color, #667eea);
}
.note-title {
font-size: 1.5rem;
font-weight: 600;
margin-bottom: 10px;
color: #333;
}
.note-content {
color: #666;
line-height: 1.6;
margin-bottom: 15px;
white-space: pre-wrap;
}
.note-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 15px;
border-top: 1px solid #eee;
}
.note-date {
font-size: 0.85rem;
color: #999;
}
.delete-btn {
background: #ff4757;
color: white;
border: none;
padding: 8px 16px;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
transition: all 0.3s;
}
.delete-btn:hover {
background: #ff3838;
transform: scale(1.05);
}
.empty-state {
text-align: center;
color: white;
padding: 60px 20px;
}
.empty-state h2 {
font-size: 2rem;
margin-bottom: 10px;
opacity: 0.9;
}
.empty-state p {
font-size: 1.1rem;
opacity: 0.8;
}
@media (max-width: 768px) {
.header h1 {
font-size: 2rem;
}
.notes-grid {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>Beautiful Notes</h1>
<p>Capture your thoughts in style</p>
</div>
<div class="add-note-section">
<div class="input-group">
<input type="text" id="noteTitle" placeholder="Note title...">
</div>
<textarea id="noteContent" placeholder="Write your note here..."></textarea>
<div class="color-picker">
<div class="color-option selected" style="background: #667eea" data-color="#667eea"></div>
<div class="color-option" style="background: #f093fb" data-color="#f093fb"></div>
<div class="color-option" style="background: #4facfe" data-color="#4facfe"></div>
<div class="color-option" style="background: #43e97b" data-color="#43e97b"></div>
<div class="color-option" style="background: #fa709a" data-color="#fa709a"></div>
<div class="color-option" style="background: #feca57" data-color="#feca57"></div>
<div class="color-option" style="background: #ff6b6b" data-color="#ff6b6b"></div>
</div>
<button class="btn" onclick="addNote()">Add Note</button>
</div>
<div id="notesContainer">
<div class="empty-state">
<h2>No notes yet</h2>
<p>Create your first note to get started!</p>
</div>
</div>
</div>
<script>
let notes = JSON.parse(localStorage.getItem('beautifulNotes')) || [];
let selectedColor = '#667eea';
// Color picker functionality
document.querySelectorAll('.color-option').forEach(option => {
option.addEventListener('click', function() {
document.querySelectorAll('.color-option').forEach(opt => opt.classList.remove('selected'));
this.classList.add('selected');
selectedColor = this.dataset.color;
});
});
function addNote() {
const titleInput = document.getElementById('noteTitle');
const contentInput = document.getElementById('noteContent');
const title = titleInput.value.trim();
const content = contentInput.value.trim();
if (!title && !content) {
alert('Please enter a title or content for your note!');
return;
}
const note = {
id: Date.now(),
title: title || 'Untitled Note',
content: content || '',
color: selectedColor,
date: new Date().toLocaleDateString('en-US', {
year: 'numeric',
month: 'short',
day: 'numeric'
})
};
notes.unshift(note);
saveNotes();
renderNotes();
// Clear inputs
titleInput.value = '';
contentInput.value = '';
}
function deleteNote(id) {
if (confirm('Are you sure you want to delete this note?')) {
notes = notes.filter(note => note.id !== id);
saveNotes();
renderNotes();
}
}
function saveNotes() {
localStorage.setItem('beautifulNotes', JSON.stringify(notes));
}
function renderNotes() {
const container = document.getElementById('notesContainer');
if (notes.length === 0) {
container.innerHTML = `
<div class="empty-state">
<h2>No notes yet</h2>
<p>Create your first note to get started!</p>
</div>
`;
return;
}
container.innerHTML = '<div class="notes-grid">' +
notes.map(note => `
<div class="note-card" style="--note-color: ${note.color}">
<h3 class="note-title">${escapeHtml(note.title)}</h3>
<p class="note-content">${escapeHtml(note.content)}</p>
<div class="note-footer">
<span class="note-date">${note.date}</span>
<button class="delete-btn" onclick="deleteNote(${note.id})">Delete</button>
</div>
</div>
`).join('') +
'</div>';
}
function escapeHtml(text) {
const div = document.createElement('div');
div.textContent = text;
return div.innerHTML;
}
// Allow Enter key to add note when in title field
document.getElementById('noteTitle').addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
document.getElementById('noteContent').focus();
}
});
// Initial render
renderNotes();
</script>
</body>
</html>
This beautiful notes web app features:
Design Elements:
Functionality:
User Experience:
To use this app, simply save the code as an HTML file and open it in your web browser. Your notes will be saved locally and persist even after closing the browser.