Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Adds basic "option group" to versioning template
Browse files Browse the repository at this point in the history
An option group consists of an image (e.g. a logo), a name and
an input type (radio or checkbox depending on whether multiple
options are possible or not). If a user picks an option
a form will be opened to add additional information for that
option.

An option can be for example a particular version control system,
or a build command. The opened form will be pre-populated with
the appropriate command. The user can then customize or change the
command associated with that option.
  • Loading branch information
lukpueh committed Apr 6, 2017
1 parent 4b8c0f9 commit 5de29f0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
30 changes: 30 additions & 0 deletions static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,33 @@ html, body, div, p, span {
color: #3d4a5c;
font-family: 'Calibri', 'Myriad Pro', 'Lucida Grande', 'Lucida Sans', Verdana, sans-serif;
}

label.option-group {
width: 100px;
display: inline-block;
border: 1px solid lightgrey;
margin: 0;
padding: 0;
}

label.option-group > img {
display: block;
margin: 10px auto;
height: 50px;
}

label.option-group > span {
display: block;
text-align: center;
padding: 10px
}

label.option-group > input {
display:none;
}

label.option-group > input:checked ~ span {
font-weight: bolder;
background-color: lightgrey;
}

8 changes: 5 additions & 3 deletions templates/versioning.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
tempor incididunt ut labore et dolore magna aliqua.

<h3>What version control system do you use?</h3>
{% for item in range(20) %}
{{ loop.index }}
{% endfor %}
{% for item in range(20) %}<label class="option-group">
<img src="https://git-scm.com/images/logos/downloads/Git-Icon-1788C.png">
<input type="radio" value="git" name="vcs">
<span>git</span>
</label>{% endfor %}
{% endblock %}

{% block links %}
Expand Down

0 comments on commit 5de29f0

Please sign in to comment.