Commit c6599cd9 authored by Ludovic Dubost's avatar Ludovic Dubost
Browse files

Fixes for button sizes

parent 5ccc9b15
Loading
Loading
Loading
Loading
+42 −35
Original line number Original line Diff line number Diff line
@@ -54,6 +54,7 @@ The following parameters are available:
| buttonUrl | Link or Page for the button | //empty//
| buttonUrl | Link or Page for the button | //empty//
| buttonText2 | Allows to add a second button with the corresponding text | //empty//
| buttonText2 | Allows to add a second button with the corresponding text | //empty//
| buttonUrl2 | Link or Page for the second button | //empty//
| buttonUrl2 | Link or Page for the second button | //empty//
| padding | The padding between the center text and the top and bottom borders of the macro | 17rem
| Macro content field | The content field is displayed under the title field and can contain wiki syntax or HTML | //empty//
| Macro content field | The content field is displayed under the title field and can contain wiki syntax or HTML | //empty//


Example:
Example:
@@ -214,23 +215,10 @@ Example:
    margin-top: 2.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0
    margin-bottom: 0
  }
  }
  .btn-blue-o {
    margin-top: 2.5rem;
    min-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.cover-header {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1.2;
}


  .btn-blue-o {
  .btn-blue-o {
    margin-top: 2.5rem;
    margin-top: 2.5rem;
    min-width: 20rem;
    width: 30rem;
    margin-left: auto;
    margin-left: auto;
    margin-right: auto;
    margin-right: auto;
    background-image: none;
    background-image: none;
@@ -244,7 +232,20 @@ Example:
    padding-top: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    line-height: 1.9rem;
    line-height: 1.9rem;
}</code>
  }

  .btn-primary, .btn-secondary {
    color: #FFFFFF;
  }

  .cover-header {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1.2;
  }
}

</code>
    </property>
    </property>
    <property>
    <property>
      <contentType>LESS</contentType>
      <contentType>LESS</contentType>
@@ -389,6 +390,7 @@ Example:
#set($buttonUrl = $xcontext.macro.params.buttonUrl)
#set($buttonUrl = $xcontext.macro.params.buttonUrl)
#set($buttonText2 = $xcontext.macro.params.buttonText2)
#set($buttonText2 = $xcontext.macro.params.buttonText2)
#set($buttonUrl2 = $xcontext.macro.params.buttonUrl2)
#set($buttonUrl2 = $xcontext.macro.params.buttonUrl2)
#set($buttonWidth = $xcontext.macro.params.buttonWidth)
#set($imageDocument = $xcontext.macro.params.imageDocument)
#set($imageDocument = $xcontext.macro.params.imageDocument)
#set($image = $xcontext.macro.params.image)
#set($image = $xcontext.macro.params.image)
#set($color = $xcontext.macro.params.color)
#set($color = $xcontext.macro.params.color)
@@ -428,27 +430,32 @@ Example:
#end
#end
#if($content &amp;&amp; $content!="")
#if($content &amp;&amp; $content!="")
        &lt;p class="text-center editablecontent"&gt;${content}&lt;/p&gt;
        &lt;p class="text-center editablecontent"&gt;${content}&lt;/p&gt;
#end
#if(!$buttonText2)
 #if($buttonText &amp;&amp; $buttonText!="")
        &lt;a href="${buttonUrl}" class="btn btn-primary btn-blue-o" #if($buttonWidth)style="width: ${buttonWidth};"#end&gt;${buttonText}&lt;/a&gt;
 #end
#end
#end
      &lt;/div&gt;
      &lt;/div&gt;
      #set($colnb = "4")
     &lt;/div&gt; 
#if($buttonText2)
#if($buttonText2)
#set($colnb = "3")
#end
    &lt;div class="row"&gt;
    &lt;div class="row"&gt;
     &lt;div class="col-sm-${colnb}"&gt;&lt;/div&gt;
      &lt;div class="col-sm-2"&gt;
      &lt;div class="col-sm-${colnb}"&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-4"&gt;
 #if($buttonText &amp;&amp; $buttonText!="")
 #if($buttonText &amp;&amp; $buttonText!="")
        &lt;a href="${buttonUrl}" class="btn btn-primary btn-blue-o"&gt;${buttonText}&lt;/a&gt;
        &lt;a href="${buttonUrl}" class="btn btn-primary btn-blue-o" #if($buttonWidth)style="width: ${buttonWidth};"#end&gt;${buttonText}&lt;/a&gt;
 #end
 #end
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-${colnb}"&gt;
      &lt;div class="col-sm-4"&gt;
 #if($buttonText2 &amp;&amp; $buttonText2!="")
 #if($buttonText2 &amp;&amp; $buttonText2!="")
        &lt;a href="${buttonUrl2}" class="btn btn-primary btn-blue-o"&gt;${buttonText2}&lt;/a&gt;
        &lt;a href="${buttonUrl2}" class="btn btn-secondary btn-blue-o" #if($buttonWidth)style="width: ${buttonWidth};"#end&gt;${buttonText2}&lt;/a&gt;
 #end
 #end
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-${colnb}"&gt;&lt;/div&gt;
      &lt;div class="col-sm-2"&gt;
      &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
#end
   &lt;/div&gt;
   &lt;/div&gt;
 &lt;/div&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
@@ -867,13 +874,13 @@ Example:
      <defaultValue/>
      <defaultValue/>
    </property>
    </property>
    <property>
    <property>
      <description>Force height </description>
      <description>Document in which the background image is stored</description>
    </property>
    </property>
    <property>
    <property>
      <mandatory>0</mandatory>
      <mandatory>0</mandatory>
    </property>
    </property>
    <property>
    <property>
      <name>height</name>
      <name>imageDocument</name>
    </property>
    </property>
  </object>
  </object>
  <object>
  <object>
@@ -1197,13 +1204,13 @@ Example:
      <defaultValue/>
      <defaultValue/>
    </property>
    </property>
    <property>
    <property>
      <description>Document in which the background image is stored</description>
      <description>Optional button width</description>
    </property>
    </property>
    <property>
    <property>
      <mandatory>0</mandatory>
      <mandatory>0</mandatory>
    </property>
    </property>
    <property>
    <property>
      <name>imageDocument</name>
      <name>buttonWidth</name>
    </property>
    </property>
  </object>
  </object>
</xwikidoc>
</xwikidoc>
+98 −23
Original line number Original line Diff line number Diff line
@@ -199,12 +199,6 @@ Example:
    margin-bottom: 0;
    margin-bottom: 0;
    color: @btn-success-color;
    color: @btn-success-color;
  }
  }
}

.sect-header {
   font-size: 3.2rem;
   font-weight: 300;  
}


  .btn-blue-o {
  .btn-blue-o {
    margin-top: 2.5rem;
    margin-top: 2.5rem;
@@ -224,7 +218,16 @@ Example:
    padding-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    line-height: 1.9rem;
    line-height: 1.9rem;
  }
  }
</code>

  .btn-primary, .btn-secondary {
    color: #FFFFFF;
  }
}

.sect-header {
   font-size: 3.2rem;
   font-weight: 300;  
}</code>
    </property>
    </property>
    <property>
    <property>
      <contentType>LESS</contentType>
      <contentType>LESS</contentType>
@@ -369,6 +372,7 @@ Example:
#set($buttonUrl = $xcontext.macro.params.buttonUrl)
#set($buttonUrl = $xcontext.macro.params.buttonUrl)
#set($buttonText2 = $xcontext.macro.params.buttonText2)
#set($buttonText2 = $xcontext.macro.params.buttonText2)
#set($buttonUrl2 = $xcontext.macro.params.buttonUrl2)
#set($buttonUrl2 = $xcontext.macro.params.buttonUrl2)
#set($buttonWidth = $xcontext.macro.params.buttonWidth)
#set($image = $xcontext.macro.params.image)
#set($image = $xcontext.macro.params.image)
#set($color = $xcontext.macro.params.color)
#set($color = $xcontext.macro.params.color)
#set($height = $xcontext.macro.params.height)
#set($height = $xcontext.macro.params.height)
@@ -404,26 +408,31 @@ Example:
#if($content &amp;&amp; $content!="")
#if($content &amp;&amp; $content!="")
        &lt;p class="text-center"&gt;${content}&lt;/p&gt;
        &lt;p class="text-center"&gt;${content}&lt;/p&gt;
#end
#end
#if(!$buttonText2)
 #if($buttonText &amp;&amp; $buttonText!="")
        &lt;a href="${buttonUrl}" class="btn btn-primary btn-blue-o" #if($buttonWidth)style="width: ${buttonWidth};"#end&gt;${buttonText}&lt;/a&gt;
 #end
#end
      &lt;/div&gt;
     &lt;/div&gt; 
     &lt;/div&gt; 
#set($colnb = "4")
#if($buttonText2)
#if($buttonText2)
#set($colnb = "3")
#end
    &lt;div class="row"&gt;
    &lt;div class="row"&gt;
     &lt;div class="col-sm-${colnb}"&gt;&lt;/div&gt;
      &lt;div class="col-sm-2"&gt;
      &lt;div class="col-sm-${colnb}"&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-4"&gt;
 #if($buttonText &amp;&amp; $buttonText!="")
 #if($buttonText &amp;&amp; $buttonText!="")
        &lt;a href="${buttonUrl}" class="btn btn-primary btn-blue-o"&gt;${buttonText}&lt;/a&gt;
        &lt;a href="${buttonUrl}" class="btn btn-primary btn-blue-o" #if($buttonWidth)style="width: ${buttonWidth};"#end&gt;${buttonText}&lt;/a&gt;
 #end
 #end
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-${colnb}"&gt;
      &lt;div class="col-sm-4"&gt;
 #if($buttonText2 &amp;&amp; $buttonText2!="")
 #if($buttonText2 &amp;&amp; $buttonText2!="")
        &lt;a href="${buttonUrl2}" class="btn btn-primary btn-blue-o"&gt;${buttonText2}&lt;/a&gt;
        &lt;a href="${buttonUrl2}" class="btn btn-secondary btn-blue-o" #if($buttonWidth)style="width: ${buttonWidth};"#end&gt;${buttonText2}&lt;/a&gt;
 #end
 #end
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="col-sm-${colnb}"&gt;&lt;/div&gt;
      &lt;div class="col-sm-2"&gt;
      &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;/div&gt;
#end
   &lt;/div&gt;
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
@@ -1116,4 +1125,70 @@ Example:
      <name>buttonUrl2</name>
      <name>buttonUrl2</name>
    </property>
    </property>
  </object>
  </object>
  <object>
    <name>PublicWebSite.Code.BlockTextMacro</name>
    <number>10</number>
    <className>XWiki.WikiMacroParameterClass</className>
    <guid>c8dd0c2c-4d8f-4a94-b9d6-7b40ff7f8948</guid>
    <class>
      <name>XWiki.WikiMacroParameterClass</name>
      <customClass/>
      <customMapping/>
      <defaultViewSheet/>
      <defaultEditSheet/>
      <defaultWeb/>
      <nameField/>
      <validationScript/>
      <defaultValue>
        <disabled>0</disabled>
        <name>defaultValue</name>
        <number>4</number>
        <prettyName>Parameter default value</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </defaultValue>
      <description>
        <disabled>0</disabled>
        <name>description</name>
        <number>2</number>
        <prettyName>Parameter description</prettyName>
        <rows>5</rows>
        <size>40</size>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
      </description>
      <mandatory>
        <disabled>0</disabled>
        <displayFormType>select</displayFormType>
        <displayType>yesno</displayType>
        <name>mandatory</name>
        <number>3</number>
        <prettyName>Parameter mandatory</prettyName>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
      </mandatory>
      <name>
        <disabled>0</disabled>
        <name>name</name>
        <number>1</number>
        <prettyName>Parameter name</prettyName>
        <size>30</size>
        <unmodifiable>0</unmodifiable>
        <classType>com.xpn.xwiki.objects.classes.StringClass</classType>
      </name>
    </class>
    <property>
      <defaultValue/>
    </property>
    <property>
      <description>Optional Button Width</description>
    </property>
    <property>
      <mandatory>0</mandatory>
    </property>
    <property>
      <name>buttonWidth</name>
    </property>
  </object>
</xwikidoc>
</xwikidoc>