Skip to content

refactor(webserver): consolidate inline <style> blocks into style.css - #89

Merged
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:fix/consolidate-inline-styles
Jun 11, 2026
Merged

refactor(webserver): consolidate inline <style> blocks into style.css#89
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:fix/consolidate-inline-styles

Conversation

@ngosang

@ngosang ngosang commented Jun 11, 2026

Copy link
Copy Markdown
Member

Every page of the default template embedded an almost identical ~80-line <style> block that duplicated and overrode style.css. Remove the inline blocks from the 11 pages carrying the common block and make style.css the single source of truth, preserving the styling that was effectively rendered before:

  • a:hover color becomes #c0c0c0 (the inline value that always won over the #FFFFFF in style.css).
  • .texte absorbs the text-overflow/ellipsis extras used by the downloads, shared and search pages.
  • The page-specific column widths move to dedicated classes: .texte-full-name (45%), .texte-full-name-upload (55%) and the new .texte-full-name-search (75%), now referenced from the search page.
  • textarea keeps the inline values (#90B6DB background, white text); no <textarea> exists in the template so this is dead CSS either way.
  • The duplicated label rule is merged (the later trebuchet ms 12px rule was the effective one) and the invalid font-height property is gone.

stats.php had no stylesheet link at all, so its inline block is replaced by the to style.css. log.php and stats_tree.php only contain page-specific styles and are left for a later cleanup (item 17 of the modernization plan).

Verified against a running amuleweb: all 11 pages return 200 with no <style> block and one style.css link, and style.css is served as text/css matching the new content.

Every page of the default template embedded an almost identical ~80-line
<style> block that duplicated and overrode style.css. Remove the inline
blocks from the 11 pages carrying the common block and make style.css the
single source of truth, preserving the styling that was effectively
rendered before:

- a:hover color becomes #c0c0c0 (the inline value that always won over
  the #FFFFFF in style.css).
- .texte absorbs the text-overflow/ellipsis extras used by the
  downloads, shared and search pages.
- The page-specific column widths move to dedicated classes:
  .texte-full-name (45%), .texte-full-name-upload (55%) and the new
  .texte-full-name-search (75%), now referenced from the search page.
- textarea keeps the inline values (#90B6DB background, white text);
  no <textarea> exists in the template so this is dead CSS either way.
- The duplicated label rule is merged (the later trebuchet ms 12px rule
  was the effective one) and the invalid font-height property is gone.

stats.php had no stylesheet link at all, so its inline block is replaced
by the <link> to style.css. log.php and stats_tree.php only contain
page-specific styles and are left for a later cleanup (item 17 of the
modernization plan).

Verified against a running amuleweb: all 11 pages return 200 with no
<style> block and one style.css link, and style.css is served as
text/css matching the new content.
@ngosang
ngosang merged commit 7599bef into amule-org:master Jun 11, 2026
9 checks passed
@ngosang
ngosang deleted the fix/consolidate-inline-styles branch June 11, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant