Template:Business Solar: Difference between revisions
From WikiDemocracy
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This is the "Businesses" template. | This is the "Businesses" template. | ||
It should be called in the following format: | It should be called in the following format: | ||
<pre> | <pre> | ||
{{Businesses | {{Businesses | ||
| Line 16: | Line 18: | ||
|listing_year= | |listing_year= | ||
}} | }} | ||
</pre> | |||
Edit the page to see the template text. | |||
{{#cargo_declare: | |||
_table=Businesses | |||
|business_name=String | |||
|category=String | |||
|city=String | |||
|state=String | |||
|zip=String | |||
|address=String | |||
|description=Text | |||
|phone=String | |||
|email=String | |||
|link=URL | |||
|listing_year=Integer | |||
}} | }} | ||
</noinclude><includeonly> | |||
{{#seo: | |||
|title={{{business_name|}}} — Solar Business in {{{city|}}}, {{{state|}}} | |||
</noinclude><includeonly>{{#seo: | |||
|title={{{business_name|}}} | |||
|description={{{description|}}} | |description={{{description|}}} | ||
|keywords={{{business_name|}}}, {{{category|}}}, solar business, {{{city|}}}, {{{state|}}}, {{{zip|}}} | |||
|image=File:Placeholder.png | |||
|image_width=300 | |||
|image_height=200 | |||
|type=article | |type=article | ||
}}{{#cargo_store:_table=Businesses|business_name={{{business_name|}}}|address={{{address|}}}|description={{{description|}}}| | }} | ||
{{#cargo_store: | |||
_table=Businesses | |||
|business_name={{{business_name|}}} | |||
|category={{{category|}}} | |||
|city={{{city|}}} | |||
|state={{{state|}}} | |||
|zip={{{zip|}}} | |||
|address={{{address|}}} | |||
|description={{{description|}}} | |||
|phone={{{phone|}}} | |||
|email={{{email|}}} | |||
|link={{{link|}}} | |||
|listing_year={{{listing_year|}}} | |||
}} | |||
<div style="border: 1px solid #e0e0e0; border-radius: 8px; padding: 24px; max-width: 650px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); font-family: sans-serif; margin-bottom: 20px; background-color: #ffffff;" | <div style="border:1px solid #e0e0e0; border-radius:8px; padding:24px; max-width:650px; box-shadow:0 4px 12px rgba(0,0,0,0.05); font-family:sans-serif; margin-bottom:20px; background-color:#ffffff;"> | ||
<h2 style="margin:0 0 10px 0; color:#222; font-size:1.8em; border-bottom:none;"> | |||
{{{business_name|}}} | |||
</h2> | |||
{{#if:{{{category|}}}| | |||
<p style="color:#177c8c; font-weight:bold; margin:0 0 15px 0;"> | |||
{{{category}}} | |||
</p> | |||
}} | |||
<p style="line-height:1.6; color:#444; margin-bottom:15px;"> | |||
{{{description|}}} | |||
</p> | |||
{{#if:{{{address|}}}| | |||
<p style="font-size:0.95em; color:#555; margin-bottom:8px;"> | |||
<strong>📍 Address:</strong> {{{address}}} | |||
</p> | |||
}} | |||
{{#if:{{{city|}}}| | |||
<p style="font-size:0.95em; color:#555; margin-bottom:8px;"> | |||
<strong>Location:</strong> {{{city}}}{{#if:{{{state|}}}|, {{{state}}}}} {{#if:{{{zip|}}}|{{{zip}}}}} | |||
</p> | |||
}} | |||
{{#if:{{{phone|}}}| | |||
<p style="font-size:0.95em; color:#555; margin-bottom:8px;"> | |||
<strong>📞 Phone:</strong> [tel:{{{phone}}} {{{phone}}}] | |||
</p> | |||
}} | |||
{{#if:{{{email|}}}| | |||
<p style="font-size:0.95em; color:#555; margin-bottom:8px;"> | |||
<strong>✉️ Email:</strong> [mailto:{{{email}}} {{{email}}}] | |||
</p> | |||
}} | |||
<div style="margin-top:20px; display:flex; gap:12px; flex-wrap:wrap;"> | |||
{{#if:{{{link|}}}| | |||
<span style="background:#17a2b8; padding:10px 16px; border-radius:6px; font-weight:bold;"> | |||
[{{{link}}} <span style="color:white;">🌐 Visit Website</span>] | |||
</span> | |||
}} | |||
{{#if:{{{address|}}}| | |||
<span style="background:#377d3c; padding:10px 16px; border-radius:6px; font-weight:bold;"> | |||
[https://www.google.com/maps/search/?api=1&query={{urlencode:{{{address}}}, {{{city|}}}, {{{state|}}} {{{zip|}}}}} <span style="color:white;">🗺️ Map and Directions</span>] | |||
</span> | |||
}} | |||
</div> | </div> | ||
</div> | </div> | ||
{{#if:{{{category|}}}|[[Category:{{{category}}} businesses]]}} | |||
{{#if:{{{city|}}}|[[Category:Businesses in {{{city}}}{{#if:{{{state|}}}|, {{{state}}}}}]]}} | |||
{{#if:{{{state|}}}|[[Category:Businesses in {{{state}}}]]}} | |||
{{#if:{{{zip|}}}|[[Category:Businesses in ZIP code {{{zip}}}]]}} | |||
{{#if:{{{listing_year|}}}|[[Category:Business listings from {{{listing_year}}}]]}} | |||
</includeonly> | </includeonly> | ||