Files
compiler-explorer/views/noscript/compiler.pug
T
Mats Jun Larsen 47e8e6d3a7 Replace href=javascript:; with bootstrap link class (#7797)
Fixes #7792

Bootstrap styles `a:has([href])` as a link so the attribute had been
used in the past for things that aren't actually links, yet we want the
style for. It's better to just use `.link-primary` so it doesn't affect
the contents as discovered in #7792
2025-06-13 02:43:14 +09:00

44 lines
2.2 KiB
Plaintext

block content
each session in clientstate.sessions
form(action=`${httpRoot}api/noscript/compile` method='POST')
p=`${session.language} source #${session.id}`
input#lang(name='lang' value=session.language type='hidden')
input#filterAnsi(name='filterAnsi' value='true' type='hidden')
.form-pair.inlined.dropdown
a.btn.link-primary.nodropdown-toggle#outputDropdown(role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false")
span.fas.fa-cog
| Output
.output.noscriptdropdown(aria-labelledby="outputDropdown")
include ../options-output.pug
.form-pair.inlined.dropdown
a.btn.link-primary.nodropdown-toggle#filtersDropdown(role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false")
span.fas.fa-filter
| Filters
.filters.noscriptdropdown(aria-labelledby="filtersDropdown")
include ../options-filters.pug
.form-pair-inlined
label(for='compilerid') Compiler
select.compiler-picker#compilerid(name='compiler' placeholder='Select a compiler...')
- var selectedCompilerId = (session.compilers.length > 0) ? (session.compilers[0].id) : '';
each compiler in compilers
- var compilerIsSelected = compiler.id == selectedCompilerId
if compiler.lang == session.language && (!compiler.hidden || compilerIsSelected)
if compilerIsSelected
option(value=compiler.id selected=true)= compiler.name
else
option(value=compiler.id )= compiler.name
.form-pair-inlined
label(for='compileroptions') Options
input#compileroptions(name='userArguments' type="text" placeholder='Compiler options...' autocorrect="off" autocapitalize="off" spellcheck="false" value=(session.compilers.length > 0) ? session.compilers[0].options : '')
.form-pair-block
label(for='source') Source code
textarea#source(name='source' cols='70' rows='10' placeholder='Type your code here' autocorrect="off" autocapitalize="off" spellcheck="false")
=session.source
.form-pair-inlined
input(type='submit' value='Compile')