Make skill list flexible.

This commit is contained in:
projectmoon 2021-01-23 14:52:02 +00:00
parent ab58f0b971
commit 42ebfa4a54
2 changed files with 26 additions and 28 deletions

View File

@ -87,7 +87,7 @@ import * as api from "../api";
console.log("got a response back", resp);
}
const inputs = document.querySelectorAll("#basicInfo input");
const inputs = document.querySelectorAll("#basics input");
inputs.forEach(input => {
console.log('got an input', input);

View File

@ -52,8 +52,6 @@
}
.attribute {
margin: 0;
padding: 0;
display: flex;
}
@ -76,26 +74,25 @@
}
#skills {
padding: 4px;
border-collapse: collapse;
}
#skills .flex-container {
display: flex;
flex-flow: row wrap;
}
#skills .skills-section {
border: 1px solid gray;
border-collapse: collapse;
display: table-cell;
margin-top: -1px;
margin-left: -1px;
}
.skill {
margin: 0;
padding: 0;
display: flex;
}
.skill label {
display: inline-block;
float: left;
clear: left;
width: 10em;
text-align: right;
vertical-align: text-bottom;
@ -105,8 +102,6 @@
.skill input {
max-width: 4em;
display: inline-block;
float: left;
padding: 8px;
border: none;
background-color: lightgray;
@ -233,22 +228,25 @@
<div id="skills">
<h2>Skills</h2>
<div class="skills-section" id="mentalSkills">
{% for skill_name, skill in sheet.mentalSkills %}
{{ macros::skill(name=skill_name, value=skill.dots) }}
{% endfor %}
</div>
<div class="skills-section" id="physicalSkills">
{% for skill_name, skill in sheet.physicalSkills %}
{{ macros::skill(name=skill_name, value=skill.dots) }}
{% endfor %}
</div>
<div class="flex-container">
<div class="skills-section" id="mentalSkills">
{% for skill_name, skill in sheet.mentalSkills %}
{{ macros::skill(name=skill_name, value=skill.dots) }}
{% endfor %}
</div>
<div class="skills-section" id="socialSkills">
{% for skill_name, skill in sheet.socialSkills %}
{{ macros::skill(name=skill_name, value=skill.dots) }}
{% endfor %}
<div class="skills-section" id="physicalSkills">
{% for skill_name, skill in sheet.physicalSkills %}
{{ macros::skill(name=skill_name, value=skill.dots) }}
{% endfor %}
</div>
<div class="skills-section" id="socialSkills">
{% for skill_name, skill in sheet.socialSkills %}
{{ macros::skill(name=skill_name, value=skill.dots) }}
{% endfor %}
</div>
</div>
</div>