Template:FAQ: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Simplify Category assignment. Add category Errata when using the FAQ template.)
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#switch:{{{version|}}}
<noinclude>{{FAQ
  |1.2 = {{#if:{{{page|}}}  
|question  = Am i a question?
          | {{FAQ_1.2
|answer    = Yes, this is an answer<br>It has multiple lines.<br>Even more lines to show how it looks.
            |page={{{page|}}}
|source    = https://wiki.descent-community.org
            }}
|reference = I'm just a reference
          | {{FAQ_1.2}}
}}</noinclude><includeonly>{{ #vardefine: def_icon | {{#if: {{{icon|}}} | {{{icon|}}} | [[File:Icon_-_Descent.png|50px]]}}
        }} [[Category:FAQProblems]]
}}{{#if:{{{question|}}} |
  |1.5 = {{#if:{{{page|}}}  
  {{#if:{{{answer|}}} |
          | {{FAQ_1.5
    {{#if:{{{source|}}} |
            |page={{{page|}}}
      {{#if:{{{reference|}}} |
            }}
        <div style="vertical-align:bottom; margin-bottom:5px; background-color:lightgrey; padding:5px; border-top-left-radius:15px; border-top-right-radius:15px; border-bottom-right-radius:15px; border-bottom-left-radius:15px;min-width:270px;overflow:hidden;">
          | {{FAQ_1.5}}
           <div style="display:table;width:100%;">
        }} [[Category:FAQProblems]]
            <div style="display:table-caption;width:100%">'''{{{question|}}}'''</div>
  |1.6 = {{#if:{{{page|}}}
             <div style="width:100%; vertical-align: middle; display:table-row;">
           | {{FAQ_1.6
              <div style="text-align:center; width:55px; display:table-cell; vertical-align: middle;">{{#var: def_icon}}</div>
            |page={{{page|}}}
              <div style="min-height:64px; display:flex; flex-wrap: wrap; align-items: center;">
             }}
                <div style="border:1px solid RGB(85,172,238); border-top-left-radius:15px; border-top-right-radius:15px; border-bottom-right-radius:15px; border-bottom-left-radius:15px; padding:7px; background-color:white;">{{{answer|}}}</div>
          | {{FAQ_1.6}}
                 <div style="align-self:flex-end; flex-grow:1; text-align:right;">{{Source|{{{source|}}}}} {{{reference|}}}</div>
        }}
              </div>
  |#default  = {{#if:{{{page|}}}
            </div>
                 | {{FAQ_1.6
          </div>
                  |page={{{page|}}}
        </div>
                  }}
      }}
                | {{FAQ_1.6}}
    }}
              }}
  }}
}}[[Category:FAQ]][[Category:Errata]]</includeonly>
}}[[Category:FAQ]]</includeonly><noinclude>{{documentation}}</noinclude>
<noinclude>{{documentation}}</noinclude>

Navigation menu