screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/react/17.0.2/umd/react.development.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/17.0.2/umd/react-dom.development.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script> </head> <body> <div id="app"></div> <script type="text/babel"> const { useState } = React; function App() { // Sample compareTo function (replace with your actual implementation) function compareTo(uuid1, uuid2) { // Your implementation here // Example: Compare the two UUIDs and return -1, 0, or 1 based on the comparison result if (uuid1 === uuid2) { return 0; } else if (uuid1 < uuid2) { return -1; } else { return 1; } } const uuid1 = '550e8400-e29b-41d4-a716-446655440000'; // Example UUID 1 const uuid2 = '550e8400-e29b-41d4-a716-446655440001'; // Example UUID 2 const comparisonResult = compareTo(uuid1, uuid2); let resultClass; if (comparisonResult === -1) { resultClass = 'less-than'; } else if (comparisonResult === 0) { resultClass = 'equal'; } else { resultClass = 'greater-than'; } return ( <div className='container'> <h1>UUID Comparison</h1> <p className='uuid-paragraph'>UUID 1: {uuid1}</p> <p className='uuid-paragraph'>UUID 2: {uuid2}</p> <p className={resultClass}>Resut : {comparisonResult}</p> </div> ); } ReactDOM.render(<App />, document.getElementById("app")); </script> <style> .container { max-width: 500px; margin: 0 auto; padding: 20px; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); display: flex; flex-direction: column; align-items: center; justify-content: center; } .uuid-paragraph { font-size: 18px; margin: 10px 0; color: #555; } .less-than { font-size: 20px; font-weight: bold; margin-top: 20px; color: #ff0000; /* Red color for less than */ } .equal { font-size: 20px; font-weight: bold; margin-top: 20px; color: #4CAF50; /* Green color for equal */ } .greater-than { font-size: 20px; font-weight: bold; margin-top: 20px; color: #0000ff; /* Blue color for greater than */ } </style> </body> </html>