Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
24 changes: 24 additions & 0 deletions GetBY.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
function UsingName()
{
let auxTag = document.getElementById("inputTag").value;
CallNode_Wname(document.body, auxTag);
}

function CallNode_Wname(node, element)
{
let ArrayEleTags=[];
let i = 0;
for(; i < node.childNodes.length; i++)
{
let NodeChild = node.childNodes[i];

if(NodeChild.childNodes.length > 0)
{
CallNode_Wname(NodeChild, element);
}
if (NodeChild.tagName == element)
{
ArrayEleTags.push(NodeChild);
}
}
}
Binary file added ImgDaw/Picsart_22-04-28_15-05-18-939.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ImgDaw/Picsart_22-04-28_15-05-42-589.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ImgDaw/Picsart_22-04-28_15-06-09-916.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ImgDaw/Picsart_22-04-28_15-06-32-298.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">

<link href="style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>

</head>
<body>

<div class="container">
<div class="row">
<div class="offset-3 col-6 offset-3" style="margin-top: 30px; margin-bottom: 15px;">
<div>
<label for="tittleInput">Titulo foda:</label><br>
<input type="text" id="titleInput" name="titleInput" value=""><br>
</div>
<div>
<textarea id="inputText" name="csvInput" rows="15" cols="60"></textarea>
</div>
<div>
<input type="submit" class="button1" value="Criar Tabela csv" onclick="ConverseCSV_HTML()">
</div>

<div id="Tabtitle"></div>
<div id="Tabcontent"></div>

</div>
</div>

<br>
<div class="row">
<div class="center col-6">
<img src="ImgDaw\Picsart_22-04-28_15-05-18-939.jpg" alt="image1 homiranha">
</div>

<div class="center col-6">
<img src="ImgDaw\Picsart_22-04-28_15-05-42-589.jpg" alt="image2 batman">
</div>

<div class="center col-6">
<img src="ImgDaw\Picsart_22-04-28_15-06-09-916.jpg" alt="image3 diario de uma paixão">
</div>

<div class="center col-6">
<img src="ImgDaw\Picsart_22-04-28_15-06-32-298.jpg" alt="image4 como eu era antes de voce" >
</div>
</div>

<div class="center" style="margin-bottom: 300px;">
<input type="submit" value="description" class="button1" onclick="troca_descIMG ()">
</div>

</div>


<script src="script.js"></script>
<script src="GetBy.js"></script>
</body>
</html>
59 changes: 59 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
function ConverseCSV_HTML()
{
let titleInput = document.getElementById("titleInput").value;
let inputText = document.getElementById("inputText").value;

let title = document.createTextNode(titleInput);

let Tabtitle = document.getElementById("Tabtitle");
let Tabcontent = document.getElementById("Tabcontent");

Tabtitle.innerHTML="";
Tabcontent.innerHTML="";

Tabtitle.style.borderTop = " .1rem solid black";
Tabtitle.style.borderRight = " .15rem solid black";
Tabtitle.style.borderLeft = " .15rem solid black";
Tabtitle.style.borderBottom = " .1rem solid black";

Tabtitle.appendChild(title);

let table = document.createElement("table");
let tableCSV_HTML = inputText.split("\n");

tableCSV_HTML.forEach(linhasTr=>{

let palavrasLinhas = linhasTr.toString().split(",");
let linhaX = document.createElement("tr");

palavrasLinhas.forEach(PaLinha=>{
let Neymar = document.createElement("td");
let texto = document.createTextNode(PaLinha);
Neymar.appendChild(texto);
linhaX.appendChild(Neymar);


})

table.appendChild(linhaX);

});

Tabcontent.appendChild(table);

}


function troca_descIMG ()
{
let IMG = [].slice.call(document.getElementsByTagName("img"));

IMG.forEach(img =>
{
let ParenteIMG = img.parentElement;
let description = document.createTextNode(img.alt.toString());
ParenteIMG.removeChild(img);
ParenteIMG.appendChild(description);
});
}

47 changes: 47 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
body
{
background-image: linear-gradient(greenyellow, green, greenyellow);
}

table
{
width: auto;
}

tr
{
border: 10px solid black;
min-width: 20px;
}

td
{
border: 10px solid black;
padding: 7px;
}

img
{
width: 500px;
margin: 15px;
border: 13px ridge green;
border-radius: 50%;
}

#Tabtitle
{
display: flex;
justify-content: center;
}

.center
{
display: flex;
justify-content: center;
}

.button1
{
border-radius: 5px;
background-color: green;
}