recipe page challenge complete fingers crossed
This commit is contained in:
parent
85517d94f6
commit
7388b5e700
|
@ -1,163 +0,0 @@
|
|||
>>> How would I use async JavaScript to access this api https://dj.tdn.wf/products/1
|
||||
To access an API using async JavaScript, you can utilize the Fetch API, which provides a modern and powerful way to perform HTTP requests in JavaScript. Here's how you
|
||||
can use the Fetch API to retrieve data from the provided API:
|
||||
|
||||
```javascript
|
||||
const url = "https://dj.tdn.wf/products/1";
|
||||
|
||||
async function fetchData(url) {
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error(`Error: HTTP status ${response.status} - ${response.statusText}`);
|
||||
}
|
||||
|
||||
return response.json();
|
||||
} catch (error) {
|
||||
console.error("An error occurred while fetching data:", error);
|
||||
}
|
||||
}
|
||||
|
||||
fetchData(url).then((data) => {
|
||||
console.log("Fetched data:", data);
|
||||
}).catch((error) => {
|
||||
console.error("Error accessing API:", error);
|
||||
});
|
||||
```
|
||||
|
||||
In the code snippet above, we define an `async` function called `fetchData` that takes a URL as its parameter and uses the Fetch API to retrieve data from that URL. The
|
||||
response is then parsed as JSON using the `response.json()` method. If an error occurs during the fetch or parsing process, it will be caught and handled in the
|
||||
try/catch block.
|
||||
|
||||
To use this function, you can call `fetchData(url)`, where `url` is the URL of the API endpoint you want to access. The result will be logged to the console, or any
|
||||
errors that occur during the request will also be logged.
|
||||
|
||||
>>> Thank you, that worked perfectly.
|
||||
You're welcome! I'm glad to hear that the code snippet helped you access the API successfully. If you have any more questions or need further assistance with JavaScript
|
||||
or other programming-related topics, feel free to ask. I'm here to help!
|
||||
|
||||
>>> /?
|
||||
Available Commands:
|
||||
/set Set session variables
|
||||
/show Show model information
|
||||
/load <model> Load a session or model
|
||||
/save <model> Save your current session
|
||||
/bye Exit
|
||||
/?, /help Help for a command
|
||||
/? shortcuts Help for keyboard shortcuts
|
||||
|
||||
Use """ to begin a multi-line message.
|
||||
|
||||
>>> /? shortcuts
|
||||
Available keyboard shortcuts:
|
||||
Ctrl + a Move to the beginning of the line (Home)
|
||||
Ctrl + e Move to the end of the line (End)
|
||||
Alt + b Move back (left) one word
|
||||
Alt + f Move forward (right) one word
|
||||
Ctrl + k Delete the sentence after the cursor
|
||||
Ctrl + u Delete the sentence before the cursor
|
||||
|
||||
Ctrl + l Clear the screen
|
||||
Ctrl + c Stop the model from responding
|
||||
Ctrl + d Exit ollama (/bye)
|
||||
|
||||
>>> What programming languages can you write code for?
|
||||
As an AI language model, I am proficient in a wide range of programming and scripting languages, including but not limited to:
|
||||
|
||||
1. Python
|
||||
2. JavaScript
|
||||
3. Java
|
||||
4. C/C++
|
||||
5. PHP
|
||||
6. Ruby
|
||||
7. HTML/CSS/DOM manipulation
|
||||
8. SQL (for database-related tasks)
|
||||
|
||||
I can write code snippets, functions, classes, or entire applications in these languages, as well as help you with syntax, semantics, and best practices for each
|
||||
language. If you have any specific questions or need assistance with a particular programming problem, feel free to ask!
|
||||
|
||||
>>> Whats your level of Swift & SwiftUI knowledge?
|
||||
While I am proficient in many programming languages, my ability to write code and provide insights for Apple's Swift language is limited. However, I can still assist
|
||||
with general concepts related to Swift and SwiftUI and provide guidance on algorithmic and design-related questions. If you have specific questions or issues related to
|
||||
Swift or SwiftUI, feel free to ask, and I'll do my best to help.
|
||||
|
||||
>>> Is there an AI model you would recommend for Swift & SwiftUI?
|
||||
While I can provide guidance on algorithmic and design-related questions in the context of Swift and SwiftUI, I am not a specialized AI model specifically designed for
|
||||
these technologies. There are several online communities, forums, and resources where you can find experts who can help with your Swift and SwiftUI questions:
|
||||
|
||||
1. Stack Overflow (https://stackoverflow.com/): A popular question-and-answer platform where developers from around the world share their knowledge and expertise on
|
||||
various programming languages and technologies, including Swift and SwiftUI.
|
||||
2. Reddit (https://www.reddit.com/r/swift/ & https://www.reddit.com/r/swiftui/): Online communities where you can ask questions and receive answers from experienced
|
||||
developers.
|
||||
3. Apple Developer Forums (https://developer.apple.com/forums/): A community forum hosted by Apple, where you can discuss Swift, SwiftUI, and related topics with other
|
||||
developers and Apple experts.
|
||||
4. GitHub: Explore open-source projects built using Swift and SwiftUI to learn from real-world code examples.
|
||||
|
||||
You may also find helpful AI models that specialize in specific domains or technologies by visiting platforms like OpenAI's Playground
|
||||
(https://beta.openai.com/playground) or using APIs provided by language models such as GPT-3.
|
||||
|
||||
>>> Thanks for the suggestions. I already do some Swift & SwiftUI programming, and just wanted to evaluate the sort of code an AI Model might generate. Likewise with HTML/CS
|
||||
... S/JS/DOM
|
||||
I understand your curiosity about how an AI model might approach generating code in various languages. While I can't directly demonstrate what a specific AI model would
|
||||
produce for Swift, SwiftUI, or other web technologies like HTML, CSS, JavaScript, and DOM manipulation, I can offer some insights into the general approach of AI
|
||||
models:
|
||||
|
||||
1. The AI model learns from vast amounts of data, including code snippets, patterns, and best practices in the respective languages.
|
||||
2. When prompted with a specific problem or task, the AI model uses its learned knowledge to generate code that addresses the problem or achieves the desired outcome.
|
||||
3. The quality and effectiveness of the generated code depend on several factors, including the complexity of the problem, the breadth and depth of the model's training
|
||||
data, and the alignment between the model's strengths and the specific task at hand.
|
||||
|
||||
In practice, an AI model might generate code that is syntactically correct but lacks the nuance or optimization of a human-written solution. The generated code may also
|
||||
contain errors or inefficiencies, which would require a developer to review, refine, and test before deploying.
|
||||
|
||||
Ultimately, while AI models can be helpful for generating initial ideas or solutions, they are not a replacement for the expertise, judgment, and critical thinking of
|
||||
human developers.
|
||||
|
||||
>>> Understood. Thank you. Do you feel confident you could provide test coverage for JavaScript code?
|
||||
Yes, I can assist with designing unit tests for JavaScript functions and help ensure adequate test coverage to verify the correctness and stability of your code. Unit
|
||||
testing is an essential part of the software development process as it helps catch bugs early, improves code quality, and facilitates refactoring. Here's a general
|
||||
approach to writing unit tests for JavaScript code:
|
||||
|
||||
1. Identify the components (functions, classes, modules) that you want to test. Break down each component into smaller pieces, if necessary, to enable comprehensive
|
||||
testing.
|
||||
2. For each component, define its expected behavior in terms of inputs and outputs, or preconditions and postconditions. This will help guide your test cases and
|
||||
determine the desired results for each input.
|
||||
3. Write unit tests for each identified component, using a JavaScript testing framework such as Jest, Mocha, or QUnit. These frameworks provide assertion libraries that
|
||||
allow you to verify whether the actual output of a function matches the expected result.
|
||||
4. Create test cases that exercise the boundary conditions and edge cases of your components. This includes handling null or undefined inputs, testing for correct error
|
||||
messages, and ensuring the expected behavior in both synchronous and asynchronous scenarios.
|
||||
5. Run the tests regularly during development to ensure that any new changes or modifications do not break existing functionality.
|
||||
|
||||
While I can help you design unit tests and guide you through the process, it's essential to understand that testing is a human-driven activity that requires critical
|
||||
thinking and understanding of the code being tested.
|
||||
|
||||
>>> Send a message (/? for help)
|
||||
|
||||
>>> Indeed, but the assistance would be appreciated. For instance at the beginning of this chat you proposed a funtion "function fetchData(url)", what test would you write to
|
||||
... ensure that the passed in url is a real url or at least correctly formed
|
||||
To test whether the passed-in `url` is well-formed, we can create a unit test case for the `fetchData` function. The following example demonstrates how you could write
|
||||
such a test using Jest, a popular JavaScript testing framework:
|
||||
```javascript
|
||||
const fetchData = require('./fetchData'); // Assuming 'fetchData' function is in a separate file named 'fetchData.js'
|
||||
|
||||
test('Check if the passed URL is well-formed', () => {
|
||||
const validUrls = [
|
||||
'https://www.example.com/products/1',
|
||||
'http://example.org/products?category=electronics',
|
||||
'//example.net/products#top_rated', // An absolute URL with no scheme (e.g., "//example.net") is considered equivalent to "http://example.net"
|
||||
];
|
||||
|
||||
validUrls.forEach((url) => {
|
||||
expect(fetchData(url)).resolves.toBeDefined();
|
||||
});
|
||||
});
|
||||
```
|
||||
In this test case, we're using the `expect()` method provided by Jest to assert that calling `fetchData` with a well-formed URL resolves to any value
|
||||
(`.resolves.toBeDefined()`) instead of rejecting or throwing an error.
|
||||
|
||||
This is just one aspect of testing for the `fetchData` function, and you would need more comprehensive tests to ensure all aspects of its behavior are covered.
|
||||
|
||||
>>> Well time for me to go to sleep, its rather late. Thank you for your assistance (and please excuse any spelling mistakes)
|
||||
You're welcome! It was my pleasure to assist you today. I'm always here if you have more questions or need help with JavaScript or other programming-related topics.
|
||||
Sleep well, and I hope you have a great day tomorrow!
|
|
@ -4,38 +4,34 @@ This is a solution to the [Recipe page challenge on Frontend Mentor](https://www
|
|||
|
||||
## Table of contents
|
||||
|
||||
- [Overview](#overview)
|
||||
- [The challenge](#the-challenge)
|
||||
- [Frontend Mentor - Recipe page solution](#frontend-mentor---recipe-page-solution)
|
||||
- [Table of contents](#table-of-contents)
|
||||
- [Overview](#overview)
|
||||
- [Screenshot](#screenshot)
|
||||
- [Links](#links)
|
||||
- [My process](#my-process)
|
||||
- [My process](#my-process)
|
||||
- [Built with](#built-with)
|
||||
- [What I learned](#what-i-learned)
|
||||
- [Continued development](#continued-development)
|
||||
- [Useful resources](#useful-resources)
|
||||
- [Author](#author)
|
||||
- [Acknowledgments](#acknowledgments)
|
||||
|
||||
**Note: Delete this note and update the table of contents based on what sections you keep.**
|
||||
- [Author](#author)
|
||||
|
||||
## Overview
|
||||
|
||||
### Screenshot
|
||||
|
||||
![](./screenshot.jpg)
|
||||
Mobile
|
||||
|
||||
Add a screenshot of your solution. The easiest way to do this is to use Firefox to view your project, right-click the page and select "Take a Screenshot". You can choose either a full-height screenshot or a cropped one based on how long the page is. If it's very long, it might be best to crop it.
|
||||
![](./screenshots/mobile.png)
|
||||
|
||||
Alternatively, you can use a tool like [FireShot](https://getfireshot.com/) to take the screenshot. FireShot has a free option, so you don't need to purchase it.
|
||||
Desktop
|
||||
|
||||
Then crop/optimize/edit your image however you like, add it to your project, and update the file path in the image above.
|
||||
|
||||
**Note: Delete this note and the paragraphs above when you add your screenshot. If you prefer not to add a screenshot, feel free to remove this entire section.**
|
||||
![](./screenshots/desktop.png)
|
||||
|
||||
### Links
|
||||
|
||||
- Solution URL: [Add solution URL here](https://your-solution-url.com)
|
||||
- Live Site URL: [Add live site URL here](https://your-live-site-url.com)
|
||||
- Solution URL: [Github](https://github.com/tarasis/tarasis.github.io/tree/main/projects/FrontendMentor/newbie/recipe-page)
|
||||
- Live Site URL: [Tarasis Github.io](https://tarasis.github.io/FrontendMentor/newbie/recipe-page/)
|
||||
|
||||
## My process
|
||||
|
||||
|
@ -46,59 +42,18 @@ Then crop/optimize/edit your image however you like, add it to your project, and
|
|||
- Flexbox
|
||||
- CSS Grid
|
||||
- Mobile-first workflow
|
||||
- [React](https://reactjs.org/) - JS library
|
||||
- [Next.js](https://nextjs.org/) - React framework
|
||||
- [Styled Components](https://styled-components.com/) - For styles
|
||||
|
||||
**Note: These are just examples. Delete this note and replace the list above with your own choices**
|
||||
|
||||
### What I learned
|
||||
|
||||
Use this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge.
|
||||
|
||||
To see how you can add code snippets, see below:
|
||||
|
||||
```html
|
||||
<h1>Some HTML code I'm proud of</h1>
|
||||
```
|
||||
```css
|
||||
.proud-of-this-css {
|
||||
color: papayawhip;
|
||||
}
|
||||
```
|
||||
```js
|
||||
const proudOfThisFunc = () => {
|
||||
console.log('🎉')
|
||||
}
|
||||
```
|
||||
|
||||
If you want more help with writing markdown, we'd recommend checking out [The Markdown Guide](https://www.markdownguide.org/) to learn more.
|
||||
|
||||
**Note: Delete this note and the content within this section and replace with your own learnings.**
|
||||
|
||||
### Continued development
|
||||
|
||||
Use this section to outline areas that you want to continue focusing on in future projects. These could be concepts you're still not completely comfortable with or techniques you found useful that you want to refine and perfect.
|
||||
|
||||
**Note: Delete this note and the content within this section and replace with your own plans for continued development.**
|
||||
|
||||
### Useful resources
|
||||
|
||||
- [Example resource 1](https://www.example.com) - This helped me for XYZ reason. I really liked this pattern and will use it going forward.
|
||||
- [Example resource 2](https://www.example.com) - This is an amazing article which helped me finally understand XYZ. I'd recommend it to anyone still learning this concept.
|
||||
|
||||
**Note: Delete this note and replace the list above with resources that helped you during the challenge. These could come in handy for anyone viewing your solution or for yourself when you look back on this project in the future.**
|
||||
|
||||
## Author
|
||||
|
||||
- Website - [Add your name here](https://www.your-site.com)
|
||||
- Frontend Mentor - [@yourusername](https://www.frontendmentor.io/profile/yourusername)
|
||||
- Twitter - [@yourusername](https://www.twitter.com/yourusername)
|
||||
|
||||
**Note: Delete this note and add/remove/edit lines above based on what links you'd like to share.**
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
This is where you can give a hat tip to anyone who helped you out on this project. Perhaps you worked in a team or got some inspiration from someone else's solution. This is the perfect place to give them some credit.
|
||||
|
||||
**Note: Delete this note and edit this section's content as necessary. If you completed this challenge by yourself, feel free to delete this section entirely.**
|
||||
- Website - [Robert McGovern](https://tarasis.net)
|
||||
- Frontend Mentor - [@tarasis](https://www.frontendmentor.io/profile/tarasis)
|
||||
- Twitter/X - [@tarasis](https://www.twitter.com/tarasis)
|
|
@ -1,24 +1,25 @@
|
|||
/* Layer architecture */
|
||||
/* Best practice to put @layer at top of the import file for organization */
|
||||
|
||||
@layer reset, base, properties, typography, theme, layouts, components, utilities;
|
||||
@layer reset, variables, base, properties, typography, theme, layouts, components, utilities;
|
||||
|
||||
/* Base */
|
||||
@import "reset.css" layer(reset);
|
||||
@import 'reset.css' layer(reset);
|
||||
/* @import '../css/base/normalize.css' layer(base); */
|
||||
@import "base.css" layer(base);
|
||||
@import "properties.css" layer(properties);
|
||||
@import "theme.css" layer(theme); /* theme variables */
|
||||
@import "typography.css" layer(typography); /* theme typography */
|
||||
@import "utilities.css" layer(utilities);
|
||||
@import 'variables.css' layer(variables);
|
||||
@import 'base.css' layer(base);
|
||||
@import 'properties.css' layer(properties);
|
||||
@import 'theme.css' layer(theme); /* theme variables */
|
||||
@import 'typography.css' layer(typography); /* theme typography */
|
||||
@import 'utilities.css' layer(utilities);
|
||||
|
||||
/* Layouts */
|
||||
|
||||
@import "layout.css" layer(layouts);
|
||||
@import 'layout.css' layer(layouts);
|
||||
|
||||
/* Components */
|
||||
|
||||
@import "recipe-page.css" layer(components);
|
||||
@import 'recipe-page.css' layer(components);
|
||||
|
||||
/* ! important */
|
||||
/* ? Question */
|
||||
|
|
|
@ -1,57 +1,62 @@
|
|||
:root {
|
||||
/*! @media doesn't support variables, grr */
|
||||
/* --min-width: 45ch; */
|
||||
|
||||
--border-radius-card: 24px;
|
||||
--border-radius-img: 12px;
|
||||
--border-radius-callout: 12px;
|
||||
}
|
||||
|
||||
main {
|
||||
display: grid;
|
||||
place-content: center;
|
||||
}
|
||||
|
||||
article {
|
||||
outline: orange 10px solid;
|
||||
|
||||
padding: 0px 32px;
|
||||
padding: 0 2rem 2.5rem 2rem;
|
||||
|
||||
@media (min-width: 50ch) {
|
||||
outline: purple 10px solid;
|
||||
max-width: 46rem;
|
||||
|
||||
padding: 40px;
|
||||
|
||||
border-radius: var(--border-radius-card);
|
||||
}
|
||||
}
|
||||
|
||||
article > * + * {
|
||||
> * + * {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* might need grid trick to pop the image out */
|
||||
header {
|
||||
/* width: 100vw; */
|
||||
header {
|
||||
width: 100%;
|
||||
|
||||
@media (min-width: 50ch) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
header img {
|
||||
img {
|
||||
margin-bottom: 40px;
|
||||
width: 100%;
|
||||
/* width: 100%; */
|
||||
|
||||
left: 50%;
|
||||
margin-left: -50vw;
|
||||
margin-right: -50vw;
|
||||
max-width: 100vw;
|
||||
position: relative;
|
||||
right: 50%;
|
||||
width: 100vw;
|
||||
|
||||
@media (min-width: 50ch) {
|
||||
width: 100%;
|
||||
border-radius: var(--border-radius-img);
|
||||
}
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
left: initial;
|
||||
margin-left: initial;
|
||||
margin-right: initial;
|
||||
max-width: initial;
|
||||
position: initial;
|
||||
right: initial;
|
||||
}
|
||||
}
|
||||
|
||||
h1 + p {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
/*
|
||||
using inside means you can't adjust
|
||||
the padding of both into position
|
||||
|
@ -61,45 +66,55 @@ ol {
|
|||
|
||||
/* list-style-position: inside; */
|
||||
padding-inline-start: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
li {
|
||||
padding-inline-start: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
li + li {
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
tr:first-child td {
|
||||
/* padding-top: 0px; */
|
||||
padding-block-end: 12px;
|
||||
}
|
||||
|
||||
table > * + * {
|
||||
}
|
||||
|
||||
table > tr > td + td {
|
||||
}
|
||||
|
||||
tbody > tr:first-child > td {
|
||||
padding-top: 24px;
|
||||
}
|
||||
|
||||
tr > * + * {
|
||||
tr:not(:first-child) > * + * {
|
||||
padding-block: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
td {
|
||||
tr:not(:last-child) {
|
||||
border-bottom: 1px solid var(--white-coffee);
|
||||
}
|
||||
}
|
||||
|
||||
tr td:first-child {
|
||||
tr td:first-child {
|
||||
padding-inline-start: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
tr td:last-child {
|
||||
tr td:last-child {
|
||||
padding-inline-end: 2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
section > * + * {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.preparation {
|
||||
padding: 1.5rem;
|
||||
|
||||
ul {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.preparation {
|
||||
@media (min-width: 50ch) {
|
||||
padding: 1.75rem;
|
||||
border-radius: var(--border-radius-callout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
:root {
|
||||
--dark-charcoal: #312e2c;
|
||||
--dark-raspberry: #7a284e;
|
||||
--brandy-red: #854632;
|
||||
--wenge-brown: #5f564d;
|
||||
--eggshell: #f3e5d7;
|
||||
--white-coffee: #e3ddd7;
|
||||
--snow: #fff7fb;
|
||||
--white: #fff;
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--wenge-brown);
|
||||
background-color: var(--eggshell);
|
||||
|
@ -16,28 +5,28 @@ body {
|
|||
|
||||
article {
|
||||
background-color: var(--white);
|
||||
}
|
||||
|
||||
h1 {
|
||||
h1 {
|
||||
color: var(--dark-charcoal);
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
h2 {
|
||||
color: var(--brandy-red);
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
h3 {
|
||||
color: var(--dark-raspberry);
|
||||
}
|
||||
}
|
||||
|
||||
li:before {
|
||||
li:before {
|
||||
color: var(--brandy-red);
|
||||
}
|
||||
}
|
||||
|
||||
hr {
|
||||
hr {
|
||||
height: 1px;
|
||||
color: var(--white-coffee);
|
||||
}
|
||||
}
|
||||
|
||||
.preparation {
|
||||
.preparation {
|
||||
background-color: var(--snow);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,35 +1,11 @@
|
|||
@font-face {
|
||||
font-family: "YoungSerif";
|
||||
src: url("../fonts/young-serif/YoungSerif-Regular.ttf");
|
||||
font-family: 'YoungSerif';
|
||||
src: url('../fonts/young-serif/YoungSerif-Regular.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Outfit";
|
||||
src: url("../fonts/outfit/Outfit-VariableFont_wght.ttf");
|
||||
}
|
||||
|
||||
:root {
|
||||
/* Font Family */
|
||||
--ff-outfit: "Outfit", sans-serif;
|
||||
--ff-young: "YoungSerif", sans-serif;
|
||||
|
||||
/* Font Weights */
|
||||
--fw-400: 400;
|
||||
--fw-600: 600;
|
||||
--fw-700: 700;
|
||||
|
||||
/* Font Sizes */
|
||||
/* * 36px * 375, 40px @ 1440px */
|
||||
--fs-title: clamp(2.25rem, 2.162rem + 0.3756vi, 2.5rem);
|
||||
--fs-16: 1rem;
|
||||
--fs-20: 1.25rem;
|
||||
--fs-28: 1.75rem;
|
||||
|
||||
--fs-default: var(--fs-16);
|
||||
|
||||
/* Line Heights */
|
||||
--lh-100: 1;
|
||||
--lh-150: 1.5;
|
||||
font-family: 'Outfit';
|
||||
src: url('../fonts/outfit/Outfit-VariableFont_wght.ttf');
|
||||
}
|
||||
|
||||
body,
|
||||
|
|
|
@ -1 +1,11 @@
|
|||
/* https://gomakethings.com/how-to-break-an-image-out-of-its-parent-container-with-css/ */
|
||||
|
||||
.full-width {
|
||||
left: 50%;
|
||||
margin-left: -50vw;
|
||||
margin-right: -50vw;
|
||||
max-width: 100vw;
|
||||
position: relative;
|
||||
right: 50%;
|
||||
width: 100vw;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
:root {
|
||||
/*! @media doesn't support variables, grr */
|
||||
/* --min-width: 45ch; */
|
||||
|
||||
--border-radius-card: 24px;
|
||||
--border-radius-img: 12px;
|
||||
--border-radius-callout: 12px;
|
||||
|
||||
/* * Colors */
|
||||
--dark-charcoal: #312e2c;
|
||||
--dark-raspberry: #7a284e;
|
||||
--brandy-red: #854632;
|
||||
--wenge-brown: #5f564d;
|
||||
--eggshell: #f3e5d7;
|
||||
--white-coffee: #e3ddd7;
|
||||
--snow: #fff7fb;
|
||||
--white: #fff;
|
||||
|
||||
/** Font Stuff */
|
||||
/* Font Family */
|
||||
--ff-outfit: 'Outfit', sans-serif;
|
||||
--ff-young: 'YoungSerif', sans-serif;
|
||||
|
||||
/* Font Weights */
|
||||
--fw-400: 400;
|
||||
--fw-600: 600;
|
||||
--fw-700: 700;
|
||||
|
||||
/* Font Sizes */
|
||||
/* * 36px * 375, 40px @ 1440px */
|
||||
--fs-title: clamp(2.25rem, 2.162rem + 0.3756vi, 2.5rem);
|
||||
--fs-16: 1rem;
|
||||
--fs-20: 1.25rem;
|
||||
--fs-28: 1.75rem;
|
||||
|
||||
--fs-default: var(--fs-16);
|
||||
|
||||
/* Line Heights */
|
||||
--lh-100: 1;
|
||||
--lh-150: 1.5;
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<!-- displays site properly based on user's device -->
|
||||
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./assets/images/favicon-32x32.png">
|
||||
<link rel="stylesheet" href="./assets/css/index.css">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./assets/images/favicon-32x32.png" />
|
||||
<link rel="stylesheet" href="./assets/css/index.css" />
|
||||
|
||||
<title>Frontend Mentor | Recipe page</title>
|
||||
|
||||
|
@ -25,82 +25,82 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<main>
|
||||
<article>
|
||||
<header>
|
||||
<figure>
|
||||
<img src="./assets/images/image-omelette.jpeg"
|
||||
alt="A folded crepe with on a plate, filled with vegetable matter. Also on the plate is some orange humus">
|
||||
alt="A folded crepe with on a plate, filled with vegetable matter. Also on the plate is some orange humus" />
|
||||
</figure>
|
||||
<h1>Simple Omelette Recipe</h1>
|
||||
<p>An easy and quick dish, perfect for any meal. This classic omelette combines beaten eggs cooked to
|
||||
perfection, optionally filled with your choice of cheese, vegetables, or meats.</p>
|
||||
<p>
|
||||
An easy and quick dish, perfect for any meal. This
|
||||
classic omelette combines beaten eggs cooked to
|
||||
perfection, optionally filled with your choice of
|
||||
cheese, vegetables, or meats.
|
||||
</p>
|
||||
</header>
|
||||
<section class="preparation">
|
||||
<h3>Preparation time
|
||||
</h3>
|
||||
<h3>Preparation time</h3>
|
||||
<ul>
|
||||
<li><span>Total:</span> Approximately 10 minutes
|
||||
</li>
|
||||
<li><span>Preparation:</span> 5 minutes
|
||||
</li>
|
||||
<li><span>Cooking:</span> 5 minutes
|
||||
</li>
|
||||
<li><span>Total:</span> Approximately 10 minutes</li>
|
||||
<li><span>Preparation:</span> 5 minutes</li>
|
||||
<li><span>Cooking:</span> 5 minutes</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Ingredients
|
||||
</h2>
|
||||
<h2>Ingredients</h2>
|
||||
<ul>
|
||||
<li>2-3 large eggs
|
||||
</li>
|
||||
<li>Salt, to taste
|
||||
</li>
|
||||
<li>Pepper, to taste
|
||||
</li>
|
||||
<li>1 tablespoon of butter or oil
|
||||
</li>
|
||||
<li>Optional fillings: cheese, diced vegetables, cooked meats, herbs
|
||||
<li>2-3 large eggs</li>
|
||||
<li>Salt, to taste</li>
|
||||
<li>Pepper, to taste</li>
|
||||
<li>1 tablespoon of butter or oil</li>
|
||||
<li>
|
||||
Optional fillings: cheese, diced vegetables, cooked
|
||||
meats, herbs
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<hr>
|
||||
<hr />
|
||||
<section>
|
||||
<h2>Instructions
|
||||
</h2>
|
||||
<h2>Instructions</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<span>Beat the eggs:</span> In a bowl, beat the eggs with a pinch of salt and pepper until they are well
|
||||
mixed.
|
||||
You can add a tablespoon of water or milk for a fluffier texture.
|
||||
<span>Beat the eggs:</span> In a bowl, beat the eggs
|
||||
with a pinch of salt and pepper until they are well
|
||||
mixed. You can add a tablespoon of water or milk for
|
||||
a fluffier texture.
|
||||
</li>
|
||||
<li>
|
||||
<span>Heat the pan:</span> Place a non-stick frying pan over medium heat and add butter or oil.
|
||||
<span>Heat the pan:</span> Place a non-stick frying
|
||||
pan over medium heat and add butter or oil.
|
||||
</li>
|
||||
<li>
|
||||
<span>Cook the omelette:</span> Once the butter is melted and bubbling, pour in the eggs. Tilt the pan to
|
||||
ensure
|
||||
the eggs evenly coat the surface.
|
||||
<span>Cook the omelette:</span> Once the butter is
|
||||
melted and bubbling, pour in the eggs. Tilt the pan
|
||||
to ensure the eggs evenly coat the surface.
|
||||
</li>
|
||||
<li>
|
||||
<span>Add fillings (optional):</span> When the eggs begin to set at the edges but are still slightly
|
||||
runny in the
|
||||
middle, sprinkle your chosen fillings over one half of the omelette.
|
||||
fillings. Let it cook for another minute, then slide it onto a plate.
|
||||
<span>Add fillings (optional):</span> When the eggs begin to set at the
|
||||
edges but are still slightly runny in the middle, sprinkle your chosen fillings over one half of
|
||||
the omelette.
|
||||
</li>
|
||||
<li>
|
||||
<span>Fold and serve:</span> As the omelette continues to cook, carefully lift one edge and fold it over
|
||||
the
|
||||
<span>Fold and serve:</span>As the omelette continues to cook, carefully lift one edge and fold
|
||||
it over the fillings. Let it cook for another minute, then slide it onto a plate.
|
||||
</li>
|
||||
<li>
|
||||
<span>Enjoy:</span> Serve hot, with additional salt and pepper if needed.
|
||||
<span>Enjoy:</span> Serve hot, with additional salt
|
||||
and pepper if needed.
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
<hr />
|
||||
<section>
|
||||
<h2>Nutrition</h2>
|
||||
<p>The table below shows nutritional values per serving without the additional fillings.
|
||||
<p>
|
||||
The table below shows nutritional values per serving
|
||||
without the additional fillings.
|
||||
</p>
|
||||
<table>
|
||||
<tr>
|
||||
|
@ -124,11 +124,13 @@
|
|||
</article>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<!-- <div class="attribution">
|
||||
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank" rel="noopener">Frontend
|
||||
Mentor</a>.
|
||||
Coded by <a href="https://rmcg.dev">Robert McGovern</a>.
|
||||
</div> -->
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
After Width: | Height: | Size: 776 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 MiB |
Binary file not shown.
After Width: | Height: | Size: 826 KiB |
|
@ -1,9 +0,0 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
|
Loading…
Reference in New Issue