DEVELOPMENT ENVIRONMENT

~liljamo/felu

80794a2467e2e6e5c48dc00e469e2dcdb3c190bd — Jonni Liljamo 22 days ago 9e41bc5 master 0.2.0
feat: add RFC 2136 docs for lego
3 files changed, 24 insertions(+), 10 deletions(-)

M internal/components/manage.templ
M internal/components/managepartials.templ
M static/styles.css
M internal/components/manage.templ => internal/components/manage.templ +15 -5
@@ 3,8 3,8 @@ package components
import "git.src.quest/~liljamo/felu/internal/config"
import "fmt"

func getDomainPattern() string {
	return fmt.Sprintf(".%s", config.FeluConfig.Domain)
func getDomain() string {
    return config.FeluConfig.Domain
}

func getUpdateACommand() string {


@@ 21,14 21,24 @@ templ Manage() {
			<div class="p-2 flex flex-col">
				<div class="flex flex-col">
					<p class="font-bold">Updating A Records automatically</p>
					<div class="">
						<p class="">
					<div>
						<p>
							The following should be ran via some automation, like a cron job.
							You are on your own till real docs are made.
						</p>
						<code>{ getUpdateACommand() }</code>
					</div>
				</div>
                <div class="flex flex-col">
					<p class="font-bold">RFC 2136 settings for lego</p>
					<div class="flex flex-col">
						<code>RFC2136_NAMESERVER={ getDomain() }</code>
                        <code>RFC2136_TSIG_KEY=DOMAIN.{ getDomain() }</code>
                        <code>RFC2136_TSIG_ALGORITHM=hmac-sha256.</code>
                        <code>RFC2136_TSIG_SECRET=TSIG_KEY</code>
					</div>
				</div>

			</div>
		</details>
		<div class="bg-teal-200">


@@ 36,7 46,7 @@ templ Manage() {
				<label for="domain">Domain</label>
				<div>
					<input class="border" type="text" placeholder="..." name="domain" id="domain"/>
					<span>{ getDomainPattern() }</span>
					<span>.{ getDomain() }</span>
				</div>
				<label for="a_record">A Record</label>
				<input class="border" type="text" placeholder="..." name="a_record" id="a_record"/>

M internal/components/managepartials.templ => internal/components/managepartials.templ +1 -1
@@ 66,7 66,7 @@ templ ManagePartialDomains(domains []db.Domain) {
						<td>
							<div class="p-2">
								<span class="font-bold">{ domain.Domain }</span>
								<span class="">{ getDomainPattern() }</span>
								<span class="">.{ getDomain() }</span>
							</div>
						</td>
						<td>

M static/styles.css => static/styles.css +8 -4
@@ 612,10 612,6 @@ video {
          user-select: none;
}

.list-inside {
  list-style-position: inside;
}

.list-none {
  list-style-type: none;
}


@@ 658,6 654,10 @@ video {
  gap: 1rem;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.border {
  border-width: 1px;
}


@@ 717,6 717,10 @@ video {
  text-align: start;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;