Skip to content

Commit

Permalink
Narrower design #211
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed May 16, 2022
1 parent 011f460 commit 7a3a0d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
22 changes: 10 additions & 12 deletions app/codes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ const generateCodeElements = (data) => {
if (codes_description === false) {
element.innerHTML = `
<div id="codes${i}" class="lg:w-2/3 md:w-11/12 3xl:w-2/4 bg-gray-800 mt-10 mb-10 rounded-2xl mx-auto flex flex-col">
<div class="flex flex-row pt-8 justify-center items-center p-10">
<div class="flex flex-row py-6 justify-center items-center px-10">
<div class="flex flex-1 justify-start">
<h3 id="name${i}" tabindex="0" class="text-3xl font-normal mt-3">${lang.text.name}</h3>
</div>
<div class="flex flex-1 justify-center">
<p id="code${i}" tabindex="0" class="bg-gray-700 px-5 py-3 rounded-2xl text-2xl relative -top-[6px] select-all" id="code${i}">${lang.text.code}</p>
<p id="code${i}" tabindex="0" class="bg-gray-600 px-5 py-3 rounded-2xl text-2xl relative -top-[6px] select-all" id="code${i}">${lang.text.code}</p>
</div>
<div class="flex flex-1 justify-end">
<h3 id="time${i}" tabindex="0" class="text-3xl font-normal mt-3">${lang.text.time}</h3>
Expand All @@ -227,8 +227,8 @@ const generateCodeElements = (data) => {
<div class="progress">
<div id="progress${i}" class="progressFill"></div>
</div>
<div class="flex flex-col justify-center items-center pt-10">
<button onclick="copyCode(${i})" id="copy${i}" class="buttoni w-[170px] mb-10">
<div class="flex flex-col justify-center items-center pt-6">
<button onclick="copyCode(${i})" id="copy${i}" class="buttoni w-[170px] mb-7">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
</svg>
Expand All @@ -240,34 +240,32 @@ const generateCodeElements = (data) => {
} else {
element.innerHTML = `
<div id="codes${i}" class="lg:w-2/3 md:w-11/12 3xl:w-2/4 bg-gray-800 mt-10 mb-10 rounded-2xl mx-auto flex flex-col">
<div class="flex flex-row pt-8 justify-center items-center">
<div class="flex flex-row py-6 justify-center items-center px-10">
<div class="flex flex-1 justify-start">
<h3 id="name${i}" tabindex="0" class="text-3xl font-normal mt-3">${lang.text.name}</h3>
</div>
<div class="flex flex-1 justify-center">
<p id="code${i}" tabindex="0" class="bg-gray-700 px-5 py-3 rounded-2xl text-2xl relative -top-[6px] select-all" id="code${i}">${lang.text.code}</p>
<p id="code${i}" tabindex="0" class="bg-gray-600 px-5 py-3 rounded-2xl text-2xl relative -top-[6px] select-all" id="code${i}">${lang.text.code}</p>
</div>
<div class="flex flex-1 justify-end">
<h3 id="time${i}" tabindex="0" class="text-3xl font-normal mt-3">${lang.text.time}</h3>
</div>
</div>
<div class="flex justify-center pb-10">
<p tabindex="0" class="text-2xl bg-gray-700 px-5 py-3 rounded-2xl select-all mb-[10px] mt-1" id="description${i}">Description</p>
</div>
<div class="flex flex-col justify-center items-center -mt-5">
<div class="progress">
<div id="progress${i}" class="progressFill"></div>
</div>
<div class="flex flex-col justify-center items-center pt-10">
<button onclick="copyCode(${i})" id="copy${i}" class="buttoni w-[170px] mb-10">
<p tabindex="0" class="text-2xl bg-gray-600 px-5 py-3 rounded-2xl select-all mt-6" id="description${i}">Description</p>
<div class="flex flex-col justify-center items-center pt-6">
<button onclick="copyCode(${i})" id="copy${i}" class="buttoni w-[170px] mb-7">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
</svg>
${lang.button.copy}
</button>
</div>
</div>
`
`
}

// set div in html
Expand Down
Loading

0 comments on commit 7a3a0d8

Please sign in to comment.