Ctrl K
ComunidadGuías…

mockups/edit_file.html

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Editing internal/router/router.go · mkappworks/cloudzilla — Cloudzilla</title>
<link rel="stylesheet" href="/assets/tailwind.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500&family=Geist:wght@400;500;600&display=swap" rel="stylesheet" />
</head>
<body class="min-h-screen flex flex-col antialiased font-sans">
<a href="#main-content" class="skip-link">Skip to main content</a>

<div id="cz-header" data-repo-tab="code"></div>

<main id="main-content" tabindex="-1" class="max-w-[1400px] mx-auto px-6 pt-6 pb-20 flex-1 w-full">
  <div class="space-y-6 max-w-5xl">
    <section aria-labelledby="editfile-title">
      <p class="font-mono text-[11px] text-muted-foreground uppercase tracking-wider mb-2">
        <a href="repo.html" class="hover:underline">cloudzilla</a>
        <span aria-hidden="true">·</span>
        Edit file
      </p>
      <h1 id="editfile-title" class="text-xl tracking-tight font-medium break-all">Editing internal/router/router.go</h1>
      <p class="text-[13px] text-muted-foreground mt-1">
        Committing to
        <span class="font-mono text-foreground">main</span>
      </p>
    </section>

    <form id="editfile-form" class="space-y-5">
      <div class="rounded-md border border-border bg-card p-5 space-y-4">
        <div>
          <label for="ef-path" class="block text-[12px] font-medium mb-1.5">File path</label>
          <input id="ef-path" name="path" type="text" value="internal/router/router.go" required class="w-full h-9 px-3 text-[13px] font-mono bg-background border border-border rounded-md focus:outline-hidden focus:ring-2 focus:ring-ring" />
          <p class="text-[11px] text-muted-foreground mt-1">Change the path to rename or move the file.</p>
        </div>
        <div>
          <label for="ef-content" class="block text-[12px] font-medium mb-1.5">Contents</label>
          <textarea id="ef-content" name="content" rows="24" spellcheck="false" class="w-full px-3 py-2 text-[13px] font-mono bg-background border border-border rounded-md focus:outline-hidden focus:ring-2 focus:ring-ring resize-y">
package router
 
import (
	"net/http"
 
	"github.com/go-chi/chi/v5"
	"github.com/mkappworks-dev/cloudzilla-app/internal/handler"
)
 
// New returns a chi router with all Cloudzilla routes registered.
func New(h *handler.Handlers) http.Handler {
	r := chi.NewRouter()
 
	r.Get("/", h.Home)
	r.Get("/explore", h.Explore)
 
	r.Route("/{owner}/{repo}", func(r chi.Router) {
		r.Get("/", h.PageRepo)
		r.Get("/tree/*", h.PageTree)
		r.Get("/blob/*", h.PageBlob)
		r.Get("/blame/*", h.PageBlame)
		r.Get("/commits/*", h.PageCommits)
		r.Get("/pulse", h.PagePulse)
	})
 
	return r
}
</textarea>
        </div>
      </div>

      <div class="rounded-md border border-border bg-card p-5">
        <label for="ef-message" class="block text-[12px] font-medium mb-1.5">Commit message</label>
        <input id="ef-message" name="message" type="text" value="" placeholder="Update internal/router/router.go" class="w-full h-9 px-3 text-[13px] bg-background border border-border rounded-md placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring" />
      </div>

      <div class="flex items-center justify-end gap-2">
        <a href="blob.html" class="h-9 px-3 inline-flex items-center text-[13px] border border-border rounded-md hover:bg-accent">Cancel</a>
        <button type="submit" class="h-9 px-4 inline-flex items-center text-[13px] bg-primary text-primary-foreground rounded-md hover:bg-primary/90 font-medium">Commit changes</button>
      </div>
    </form>
  </div>
</main>

<div id="cz-footer"></div>

<script src="shell.js"></script>
<script>
document.getElementById('editfile-form').addEventListener('submit', function (e) {
  e.preventDefault();
  window.czToast('Changes committed to main.');
  setTimeout(function () { location.href = 'blob.html'; }, 700);
});
</script>
</body>
</html>