mirror of https://gitlab.com/bashrc2/epicyon
Change the display of vote results
parent
a8d76b4d18
commit
1be54efd21
|
@ -159,6 +159,12 @@
|
||||||
--header-font: 'Arial, Helvetica, sans-serif';
|
--header-font: 'Arial, Helvetica, sans-serif';
|
||||||
--button-bottom-margin: 10px;
|
--button-bottom-margin: 10px;
|
||||||
--rendering: normal;
|
--rendering: normal;
|
||||||
|
--voteresult-color: #dddddd;
|
||||||
|
--voteresult-border-color: #aaaaaa;
|
||||||
|
--voteresult-height: 32px;
|
||||||
|
--voteresult-height-mobile: 32px;
|
||||||
|
--voteresult-width: 80%;
|
||||||
|
--voteresult-width-mobile: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -1724,6 +1730,16 @@ div.container {
|
||||||
}
|
}
|
||||||
.pageslist {
|
.pageslist {
|
||||||
}
|
}
|
||||||
|
.voteresult {
|
||||||
|
width: var(--voteresult-width);
|
||||||
|
height: var(--voteresult-height);
|
||||||
|
}
|
||||||
|
.voteresultbar {
|
||||||
|
height: var(--voteresult-height);
|
||||||
|
fill: var(--voteresult-color);
|
||||||
|
stroke-width: 10;
|
||||||
|
stroke: var(--voteresult-border-color)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 2200px) {
|
@media screen and (min-width: 2200px) {
|
||||||
|
@ -2429,4 +2445,14 @@ div.container {
|
||||||
}
|
}
|
||||||
.pageslist {
|
.pageslist {
|
||||||
}
|
}
|
||||||
|
.voteresult {
|
||||||
|
width: var(--voteresult-width-mobile);
|
||||||
|
height: var(--voteresult-height-mobile);
|
||||||
|
}
|
||||||
|
.voteresultbar {
|
||||||
|
height: var(--voteresult-height-mobile);
|
||||||
|
fill: var(--voteresult-color);
|
||||||
|
stroke-width: 10;
|
||||||
|
stroke: var(--voteresult-border-color)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,6 @@ def insertQuestion(baseDir: str, translate: {},
|
||||||
votes = int(questionOption['replies']['totalItems'])
|
votes = int(questionOption['replies']['totalItems'])
|
||||||
except BaseException:
|
except BaseException:
|
||||||
print('EX: insertQuestion unable to convert to int')
|
print('EX: insertQuestion unable to convert to int')
|
||||||
pass
|
|
||||||
if votes > maxVotes:
|
if votes > maxVotes:
|
||||||
maxVotes = int(votes+1)
|
maxVotes = int(votes+1)
|
||||||
|
|
||||||
|
@ -91,18 +90,19 @@ def insertQuestion(baseDir: str, translate: {},
|
||||||
votes = int(questionOption['replies']['totalItems'])
|
votes = int(questionOption['replies']['totalItems'])
|
||||||
except BaseException:
|
except BaseException:
|
||||||
print('EX: insertQuestion unable to convert to int 2')
|
print('EX: insertQuestion unable to convert to int 2')
|
||||||
pass
|
|
||||||
votesPercent = str(int(votes * 100 / maxVotes))
|
votesPercent = str(int(votes * 100 / maxVotes))
|
||||||
|
|
||||||
content += \
|
content += \
|
||||||
'<p><input type="text" title="' + str(votes) + \
|
'<p>\n' + \
|
||||||
'" name="skillName' + str(questionCtr) + \
|
' <label class="labels">' + \
|
||||||
'" value="' + questionOption['name'] + \
|
questionOption['name'] + '</label><br>\n' + \
|
||||||
' (' + str(votes) + ')" style="width:40%">\n'
|
' <svg class="voteresult">\n' + \
|
||||||
content += \
|
' <rect width="' + votesPercent + \
|
||||||
'<input type="range" min="1" max="100" ' + \
|
'%" class="voteresultbar" />\n' + \
|
||||||
'class="slider" title="' + \
|
' </svg>' + \
|
||||||
str(votes) + '" name="skillValue' + str(questionCtr) + \
|
' <label class="labels">' + votesPercent + '%</label>\n' + \
|
||||||
'" value="' + votesPercent + '"></p>\n'
|
'</p>\n'
|
||||||
|
|
||||||
questionCtr += 1
|
questionCtr += 1
|
||||||
content += '</div>\n'
|
content += '</div>\n'
|
||||||
return content
|
return content
|
||||||
|
|
Loading…
Reference in New Issue