mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Fixed custom rule settings CSS
This commit is contained in:
parent
86fc751e58
commit
3f973a28ea
@ -14,5 +14,5 @@ func validateLanguage(language string) bool {
|
||||
}
|
||||
|
||||
func validateExtension(extension string) bool {
|
||||
return len(extension) >= 2
|
||||
return len(extension) >= 1
|
||||
}
|
||||
|
@ -70,42 +70,43 @@
|
||||
<div class="font-semibold text-lg text-white m-0 border-b-2 border-green-700 inline-block">
|
||||
Custom Rules
|
||||
</div>
|
||||
|
||||
<div class="text-gray-300 text-sm mb-4 mt-6">
|
||||
Custom rules modify future coding activity, they’re useful for correcting languages displayed wrong on your dashboard.
|
||||
</div>
|
||||
|
||||
{{ if .Rules }}
|
||||
|
||||
{{ range $i, $rule := .Rules }}
|
||||
<div class="text-white border-1 w-full border-green-700 inline-block my-1 py-1 text-align">
|
||||
<label class="inline-block text-sm mb-1 text-gray-500" >When filename ends in:</label>
|
||||
{{ $rule.Extension }}
|
||||
<label class="inline-block text-sm mb-1 text-gray-500" >Change the language to:</label>
|
||||
{{ $rule.Language }}
|
||||
<div class="text-white border-1 w-full border-green-700 inline-block my-1 py-1 text-align">
|
||||
<label class="inline-block text-sm mb-1 text-gray-500" >When filename ends in:</label>
|
||||
{{ $rule.Extension }}
|
||||
<label class="inline-block text-sm mb-1 text-gray-500" >Change the language to:</label>
|
||||
{{ $rule.Language }}
|
||||
|
||||
<form class="float-right" action="settings/customrules/delete" method="post">
|
||||
<input type="hidden" id="ruleid" name="ruleid" required value="{{ $rule.ID }}">
|
||||
<button type="submit" class="py-1 px-3 rounded bg-red-500 hover:bg-red-600 text-white text-sm">
|
||||
Remove
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="text-white border-1 w-full border-green-700 inline-block my-1 py-1">
|
||||
No rules.
|
||||
</div>
|
||||
<form class="float-right" action="settings/customrules/delete" method="post">
|
||||
<input type="hidden" id="ruleid" name="ruleid" required value="{{ $rule.ID }}">
|
||||
<button type="submit" class="py-1 px-3 rounded bg-red-500 hover:bg-red-600 text-white text-sm">
|
||||
Remove
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="text-white border-1 w-full border-green-700 inline-block my-1 py-1">
|
||||
No rules.
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
<form class="mt-10" action="settings/customrules" method="post">
|
||||
<div class="flex justify-around mt-4">
|
||||
|
||||
<form action="settings/customrules" method="post">
|
||||
<div class="inline-block justify-around mt-4 w-full">
|
||||
<label class="inline-block text-sm mb-1 text-gray-500" for="extension">When filename ends in:</label>
|
||||
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
|
||||
<input class="shadow appearance-nonshadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
|
||||
type="text" id="extension"
|
||||
name="extension" placeholder="py" minlength="1" required>
|
||||
</div>
|
||||
<div class="flex justify-around mt-4">
|
||||
<div class="inline-block justify-around mt-4 w-full">
|
||||
<label class="inline-block text-sm mb-1 text-gray-500" for="language">Change the language to:</label>
|
||||
<input class="shadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
|
||||
<input class="shadow appearance-nonshadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded w-full py-1 px-3"
|
||||
type="text" id="language"
|
||||
name="language" placeholder="Python" minlength="1" required>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user