1634197860
Como todos sabéis, qué es un diccionario y para qué sirve. En este proyecto (Aplicación de Diccionario JavaScript), al principio en la página web solo hay entrada de búsqueda y cuando escribe cualquier palabra existente y presiona Enter, el texto de carga se muestra como "Buscar significado". De… .. ".
Si la palabra buscada existe, el significado, ejemplo, sinónimos, etc. de la palabra buscada se mostrarán mediante la animación de diapositivas; de lo contrario, se mostrará el mensaje “No se puede encontrar el significado de…”. También hay un icono de pronunciación para pronunciar la palabra buscada.
Para crear este proyecto (Aplicación de diccionario JavaScript). Primero, necesita crear tres archivos: HTML, CSS y JavaScript. Después de crear estos archivos, simplemente pegue los siguientes códigos en su archivo.
Primero, cree un archivo HTML llamado index.html y pegue los códigos dados en su archivo HTML. Recuerde, debe crear un archivo con la extensión .html.
<!DOCTYPE html>
<!-- Coding By Codequs -->
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Dictionary App in JavaScript | Codequs</title>
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CDN Link for Icons -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
</head>
<body>
<div class="wrapper">
<header>English Dictionary</header>
<div class="search">
<input type="text" placeholder="Search a word" required spellcheck="false">
<i class="fas fa-search"></i>
<span class="material-icons">close</span>
</div>
<p class="info-text">Type any existing word and press enter to get meaning, example, synonyms, etc.</p>
<ul>
<li class="word">
<div class="details">
<p>__</p>
<span>_ _</span>
</div>
<i class="fas fa-volume-up"></i>
</li>
<div class="content">
<li class="meaning">
<div class="details">
<p>Meaning</p>
<span>___</span>
</div>
</li>
<li class="example">
<div class="details">
<p>Example</p>
<span>___</span>
</div>
</li>
<li class="synonyms">
<div class="details">
<p>Synonyms</p>
<div class="list"></div>
</div>
</li>
</div>
</ul>
</div>
<script src="script.js"></script>
</body>
</html>
En segundo lugar, cree un archivo CSS con el nombre style.css y pegue los códigos dados en su archivo CSS. Recuerde, debe crear un archivo con la extensión .css.
/* Import Google Font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body{
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: #4D59FB;
}
::selection{
color: #fff;
background: #4D59FB;
}
.wrapper{
width: 420px;
border-radius: 7px;
background: #fff;
padding: 25px 28px 45px;
box-shadow: 7px 7px 20px rgba(0, 0, 0, 0.05);
}
.wrapper header{
font-size: 28px;
font-weight: 500;
text-align: center;
}
.wrapper .search{
position: relative;
margin: 35px 0 18px;
}
.search input{
height: 53px;
width: 100%;
outline: none;
font-size: 16px;
border-radius: 5px;
padding: 0 42px;
border: 1px solid #999;
}
.search input:focus{
padding: 0 41px;
border: 2px solid #4D59FB;
}
.search input::placeholder{
color: #B8B8B8;
}
.search :where(i, span){
position: absolute;
top: 50%;
color: #999;
transform: translateY(-50%);
}
.search i{
left: 18px;
pointer-events: none;
font-size: 16px;
}
.search input:focus ~ i{
color: #4D59FB;
}
.search span{
right: 15px;
cursor: pointer;
font-size: 18px;
display: none;
}
.search input:valid ~ span{
display: block;
}
.wrapper .info-text{
font-size: 13px;
color: #9A9A9A;
margin: -3px 0 -10px;
}
.wrapper.active .info-text{
display: none;
}
.info-text span{
font-weight: 500;
}
.wrapper ul{
height: 0;
opacity: 0;
padding-right: 1px;
overflow-y: hidden;
transition: all 0.2s ease;
}
.wrapper.active ul{
opacity: 1;
height: 303px;
}
.wrapper ul li{
display: flex;
list-style: none;
margin-bottom: 14px;
align-items: center;
padding-bottom: 17px;
border-bottom: 1px solid #D9D9D9;
justify-content: space-between;
}
ul li:last-child{
margin-bottom: 0;
border-bottom: 0;
padding-bottom: 0;
}
ul .word p{
font-size: 22px;
font-weight: 500;
}
ul .word span{
font-size: 12px;
color: #989898;
}
ul .word i{
color: #999;
font-size: 15px;
cursor: pointer;
}
ul .content{
max-height: 215px;
overflow-y: auto;
}
ul .content::-webkit-scrollbar{
width: 0px;
}
.content li .details{
padding-left: 10px;
border-radius: 4px 0 0 4px;
border-left: 3px solid #4D59FB;
}
.content li p{
font-size: 17px;
font-weight: 500;
}
.content li span{
font-size: 15px;
color: #7E7E7E;
}
.content .synonyms .list{
display: flex;
flex-wrap: wrap;
}
.content .synonyms span{
cursor: pointer;
margin-right: 5px;
text-decoration: underline;
}
Finalmente, cree un archivo JavaScript con el nombre script.js y pegue los códigos dados en su archivo JavaScript. Recuerde, debe crear un archivo .js.
const wrapper = document.querySelector(".wrapper"),
searchInput = wrapper.querySelector("input"),
volume = wrapper.querySelector(".word i"),
infoText = wrapper.querySelector(".info-text"),
synonyms = wrapper.querySelector(".synonyms .list"),
removeIcon = wrapper.querySelector(".search span");
let audio;
function data(result, word){
if(result.title){
infoText.innerHTML = `Can't find the meaning of <span>"${word}"</span>. Please, try to search for another word.`;
}else{
wrapper.classList.add("active");
let definitions = result[0].meanings[0].definitions[0],
phontetics = `${result[0].meanings[0].partOfSpeech} /${result[0].phonetics[0].text}/`;
document.querySelector(".word p").innerText = result[0].word;
document.querySelector(".word span").innerText = phontetics;
document.querySelector(".meaning span").innerText = definitions.definition;
document.querySelector(".example span").innerText = definitions.example;
audio = new Audio("https:" + result[0].phonetics[0].audio);
if(definitions.synonyms[0] == undefined){
synonyms.parentElement.style.display = "none";
}else{
synonyms.parentElement.style.display = "block";
synonyms.innerHTML = "";
for (let i = 0; i < 5; i++) {
let tag = `<span onclick="search('${definitions.synonyms[i]}')">${definitions.synonyms[i]},</span>`;
tag = i == 4 ? tag = `<span onclick="search('${definitions.synonyms[i]}')">${definitions.synonyms[4]}</span>` : tag;
synonyms.insertAdjacentHTML("beforeend", tag);
}
}
}
}
function search(word){
fetchApi(word);
searchInput.value = word;
}
function fetchApi(word){
wrapper.classList.remove("active");
infoText.style.color = "#000";
infoText.innerHTML = `Searching the meaning of <span>"${word}"</span>`;
let url = `https://api.dictionaryapi.dev/api/v2/entries/en/${word}`;
fetch(url).then(response => response.json()).then(result => data(result, word)).catch(() =>{
infoText.innerHTML = `Can't find the meaning of <span>"${word}"</span>. Please, try to search for another word.`;
});
}
searchInput.addEventListener("keyup", e =>{
let word = e.target.value.replace(/\s+/g, ' ');
if(e.key == "Enter" && word){
fetchApi(word);
}
});
volume.addEventListener("click", ()=>{
volume.style.color = "#4D59FB";
audio.play();
setTimeout(() =>{
volume.style.color = "#999";
}, 800);
});
removeIcon.addEventListener("click", ()=>{
searchInput.value = "";
searchInput.focus();
wrapper.classList.remove("active");
infoText.style.color = "#9A9A9A";
infoText.innerHTML = "Type any existing word and press enter to get meaning, example, synonyms, etc.";
});
Eso es todo, ahora ha construido con éxito la aplicación de diccionario de inglés en HTML CSS y JavaScript.
1677108125
Are you looking to build a professional-looking blog with HTML, CSS, and JavaScript? In this video
tutorial, we'll walk you through the process of designing and developing a blog from scratch, step-by-step.
From creating the layout of your blog with HTML and CSS to adding interactivity and functionality with JavaScript,
we'll cover everything you need to know to create a fully functional blog. Whether you're a blogger,
web developer, or simply looking to learn new skills, this tutorial is for you!
We'll also provide some tips and tricks along the way to help you optimize your blog for search engines, improve your website's accessibility, and enhance the user experience.
🔔 Subscribe for more!
https://www.youtube.com/channel/UCHI9Mo7HCSlqum1UMP2APFQ
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
🔗 Source code
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
☝ Start developing the project (base files + images)
- Click on the UpFiles link
- Click the green button (code)
- Click Download ZIP
- Extract the project to the desired location
📂Assets
Icons: https://boxicon.com/
Fonts: https://fonts.google.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
🔥 Follow me!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Tags:
#responsiveportfolio #portfoliohtmlcssjs #webmonster #html #css #javascript #webdesign #website #react #blog, #HTML #CSS #JavaScript #web_development #responsive_design #accessibility #user_experience #tutorial.
So, if you're ready to start building your own blog, this video is the perfect place to start. Be sure to like this video and subscribe to our channel for more web development tutorials and tips!
Link of The Video :
https://youtu.be/BqgWIel4uuU
1628189100
Image Uploader with Preview || Html CSS JavaScript || #html #css #javascript #coding
1671267560
In this tutorial we are going to make a personal Portfolio in this website there are six section Home, About, Services,Portfolio , Skills, and Contact the main features of this is dark/light mode function
∎ Download Source codes - https://www.thesimplifieddev.com/make-a-personal-portfolio-website
Features : -
1630506330
This video is about the product landing page using HTML CSS And JavaScript, in which we created a simple product landing page using HTML CSS and in order to perform those powerful animations we use the GSAP a JavaScript animation library for work done.
In this video we broadly cover the concepts of CSS Flex box and CSS Grid system and Some CSS Properties such as nth child selector, ::before & ::after much more.
Don't forget to join the channel for more videos like this. Code Savvy
0:00 - Intro
0:10 - Result
0:38 - Project Setup
01:35 – Reset HTML
02:21 – Left Container HTML
03:41 – Wrapper
14:58 – Bottom Shoe Nav
26:23 – Right Container HTML
33:10 – Product Size
35:49 – Reviews
41:11 – GSAP Animations
Click to Watch Full tutorial on YOUTUBE
1635890400
Nuevo Live Coding en directo utilizando HTML, CSS y JavaScript para desarrollar una aplicación de búsqueda de letras de canciones.