Jump to content

User:Layer-09/Sandbox/Infobox Emacs: Difference between revisions

From NixOS Wiki
Layer-09 (talk | contribs)
No edit summary
Layer-09 (talk | contribs)
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 2: Line 2:
<div class="nix-wiki infobox" style="
<div class="nix-wiki infobox" style="
   --infobox-color: rgb(82, 119, 195);
   --infobox-color: rgb(82, 119, 195);
   --infobox-background: #ffffff;
   --infobox-background: #f9f9f9;


   --infobox-border-color: var(--infobox-color);
   --infobox-border-color: var(--infobox-color);
Line 12: Line 12:
   --infobox-title-weight: bold;
   --infobox-title-weight: bold;
   --infobox-title-align: center;
   --infobox-title-align: center;
  /* Define specific paddings for better control over spacing */
  --infobox-header-vertical-padding: 0.3rem;
  --infobox-content-vertical-padding: 0.3rem;
  --infobox-horizontal-padding: 1rem;


   --infobox-content-size: 90%;
   --infobox-content-size: 90%;
  --infobox-content-padding: {{#if: {{{clip|}}} | calc(var(--infobox-border-radius) / 2) var(--infobox-border-radius) | var(--infobox-border-radius)}};
   --infobox-content-title-color: var(--infobox-title-color);
   --infobox-content-title-color: var(--infobox-title-color);


Line 23: Line 27:
   border-radius: var(--infobox-border-radius);
   border-radius: var(--infobox-border-radius);
   overflow-y: hidden;
   overflow-y: hidden;
  width: 50em; /* Increased width */
  float: right;
  clear: right;
">
">
   <div class="nix-wiki infobox-header" style="
   <div class="nix-wiki infobox-header" style="
     padding: var(--infobox-content-padding);
     padding: var(--infobox-header-vertical-padding) var(--infobox-horizontal-padding);
     text-align: center; /* Added for centering logo */
     text-align: center;
   ">
   ">
     <p class="nix-wiki infobox-title" style="
     <p class="nix-wiki infobox-title" style="
Line 34: Line 41:
       text-align: var(--infobox-title-align);
       text-align: var(--infobox-title-align);
       margin-top: 0;
       margin-top: 0;
      margin-bottom: 0.5em;
     ">{{{title}}}</p>
     ">{{{title}}}</p>
     <div class="nix-wiki infobox-image">[[File:{{{image}}}|frameless|upright=0.7]]</div>
     <div class="nix-wiki infobox-image" style="margin: 0 auto;">[[File:{{{image}}}|frameless|upright=0.45]]</div>
   </div>
   </div>


Line 46: Line 54:


   <div class="nix-wiki infobox-content" style="
   <div class="nix-wiki infobox-content" style="
     padding: var(--infobox-content-padding);
     padding: var(--infobox-content-vertical-padding) var(--infobox-horizontal-padding);
     background-color: #ffffff;
     background-color: var(--infobox-background);
     text-align: left;
     text-align: left;
     font-size: var(--infobox-content-size);
     font-size: var(--infobox-content-size);
   ">
   ">
     {{#if: {{{developer|}}} | <p><span style="font-weight: bold;">Developer:</span> {{{developer}}}</p> }}
     <table style="width: 100%; border-collapse: collapse; background-color: transparent;">
    {{#if: {{{initial_release|}}} | <p><span style="font-weight: bold;">Initial release:</span> {{{initial_release}}}</p> }}
      {{#if: {{{paradigm|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color); white-space: nowrap; width: 1px;">Paradigm</th><td style="padding: 0.2em 0;">{{{paradigm}}}</td></tr> }}
    {{#if: {{{latest_release_version|}}} | <p><span style="font-weight: bold;">Latest version:</span> {{{latest_release_version}}}</p> }}
      {{#if: {{{family|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color); white-space: nowrap; width: 1px;">Family</th><td style="padding: 0.2em 0;">{{{family}}}</td></tr> }}
    {{#if: {{{latest_release_date|}}} | <p><span style="font-weight: bold;">Release date:</span> {{{latest_release_date}}}</p> }}
      {{#if: {{{designed_by|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color); white-space: nowrap; width: 1px;">Designed by</th><td style="padding: 0.2em 0;">{{{designed_by}}}</td></tr> }}
    {{#if: {{{programming_language|}}} | <p><span style="font-weight: bold;">Programming language:</span> {{{programming_language}}}</p> }}
      {{#if: {{{developer|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color); white-space: nowrap; width: 1px;">Developer</th><td style="padding: 0.2em 0;">{{{developer}}}</td></tr> }}
    {{#if: {{{operating_system|}}} | <p><span style="font-weight: bold;">Operating system:</span> {{{operating_system}}}</p> }}
      {{#if: {{{first_appeared|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color); white-space: nowrap; width: 1px;">First appeared</th><td style="padding: 0.2em 0;">{{{first_appeared}}}</td></tr> }}
    {{#if: {{{license|}}} | <p><span style="font-weight: bold;">License:</span> {{{license}}}</p> }}
      {{#if: {{{stable_release|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color); white-space: nowrap; width: 1px;">Stable release</th><td style="padding: 0.2em 0;">{{{stable_release}}}</td></tr> }}
    {{#if: {{{footer|}}} | <p style="text-align: center; margin-top: 1em; font-size: 90%;">{{{footer}}}</p> }}
      {{#if: {{{os|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color); white-space: nowrap; width: 1px;">OS</th><td style="padding: 0.2em 0;">{{{os}}}</td></tr> }}
      {{#if: {{{license|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color); white-space: nowrap; width: 1px;">License</th><td style="padding: 0.2em 0;">{{{license}}}</td></tr> }}
      {{#if: {{{filename_extensions|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color); white-space: nowrap; width: 1px;">Extensions</th><td style="padding: 0.2em 0;">{{{filename_extensions}}}</td></tr> }}
      {{#if: {{{website|}}} | <tr><th style="text-align: left; vertical-align: top; padding: 0.2em 1em 0.2em 0; color: var(--infobox-title-color);">Website</th><td style="padding: 0.2em 0;">{{{website}}}</td></tr> }}
    </table>
   </div>
   </div>
</div>
</div>
Line 69: Line 81:
<pre>
<pre>
{{User:Layer-09/Sandbox/Infobox Emacs
{{User:Layer-09/Sandbox/Infobox Emacs
  | title                  = Emacs
  | title                  = GNU Emacs
  | image                  = EmacsIcon.svg
  | image                  = EmacsIcon.svg
  | developer              = [[Free Software Foundation]]
  | paradigm                = Functional, meta, reflective
  | initial_release        = 1976
  | family                  = Lisp
  | latest_release_version  = 29.2
  | designed_by            = [[Richard Stallman]], [[Guy L. Steele, Jr.]]
  | latest_release_date    = {{Start date and age|2024|04|12}}
  | developer              = [[GNU Project]]
  | programming_language    = [[C (programming language)|C]], [[Emacs Lisp]]
| first_appeared          = 1985; 40 years ago
  | operating_system        = Cross-platform
  | stable_release          = 29.4 / 22 June 2024; 11 months ago
  | os                      = Cross-platform
  | license                = [[GNU General Public License]]
  | license                = [[GNU General Public License]]
  | footer                  = [https://www.gnu.org/software/emacs gnu.org/emacs]
  | filename_extensions    = .el, .elc, .eln
| website                = [https://www.gnu.org/software/emacs gnu.org/emacs]
}}
}}
</pre>
</pre>
</noinclude>
</noinclude>

Latest revision as of 15:34, 5 June 2025


Example Usage

Paste this into a page to see the infobox:

{{User:Layer-09/Sandbox/Infobox Emacs
 | title                   = GNU Emacs
 | image                   = EmacsIcon.svg
 | paradigm                = Functional, meta, reflective
 | family                  = Lisp
 | designed_by             = [[Richard Stallman]], [[Guy L. Steele, Jr.]]
 | developer               = [[GNU Project]]
 | first_appeared          = 1985; 40 years ago
 | stable_release          = 29.4 / 22 June 2024; 11 months ago
 | os                      = Cross-platform
 | license                 = [[GNU General Public License]]
 | filename_extensions     = .el, .elc, .eln
 | website                 = [https://www.gnu.org/software/emacs gnu.org/emacs]
}}