Actions

Translations

Translations:New Template System in LS3.x/78/ja

From LimeSurvey Manual

ナビゲーションバーのアンケートタイトルの見た目を変更する

  1. 次の新しいディレクトリーを作成します。/upload/themes/survey/yourThemeName/views/subviews/header/
  2. /themes/survey/vanilla/views/subviews/header/nav_bar.twigをコピーし新しいディレクトリーにコピーします。
  3. /themes/survey/vanilla/views/subviews/header/nav_bar.twigを開き、"{# Logo option #}"を探します。その下で、 logo/survey-nameのIFステートメントを次のように変更します。
    		{# Logo option #}
            {% if( aSurveyInfo.options.brandlogo == "on") %}
                <div class="{{ aSurveyInfo.class.navbarbrand }} logo-container"  {{ aSurveyInfo.attr.navbarbrand }}  >
                    {{ image(aSurveyInfo.options.brandlogofile, aSurveyInfo.name, {"class": "logo img-responsive"}) }}
                </div>
            {% endif %}
            {% if( aSurveyInfo.options.surveyname1 == "on") %}
                <div class="{{ aSurveyInfo.class.navbarbrand }}"  {{ aSurveyInfo.attr.navbarbrand }} >
                    {{ aSurveyInfo.name }}
                </div>
            {% endif %}
    
  4. /upload/themes/survey/yourThemeName/css/custom.cssに次のような記述を追加します。
    .navbar-brand {
        line-height: 60px;
        font-size: 32px;
    }
    
  5. "Survey name in navbar"というテーマオプションを"Yes"にします。
  6. このようになります。

プログレスバーの下にあるアンケートタイトルの見た目を変更する

  1. 次の新しいディレクトリーを作成します。/upload/themes/survey/yourThemeName/views/subviews/survey/group_subviews
  2. /themes/survey/vanilla/views/subviews/survey/group_subviews/group_container.twigを新しいディレクトリーにコピーします。
  3. /themes/survey/vanilla/views/subviews/survey/group_subviews/group_container.twigを開き、アンケート名のためのエレメント<h1>を追加します。このようになります。
    <div class="{{ aSurveyInfo.class.groupcontainer }} space-col" {{ aSurveyInfo.attr.groupcontainer }}>
     
        {# Custom survey name #}
        {% if( aSurveyInfo.options.surveyname2 == "on") %}
        	<h1 class="custom-survey-name">{{ aSurveyInfo.name }}</h1>
        {% endif %}
     
        {# Group Name #}
        {{ include('./subviews/survey/group_subviews/group_name.twig') }}
     
        {# Group Description #}
        {{ include('./subviews/survey/group_subviews/group_desc.twig') }}
     
        {#
            PRESENT THE QUESTIONS
     
            This is the main part. It will render each question for this group
         #}
     
        <!-- PRESENT THE QUESTIONS -->
        {% for  aQuestion in aGroup.aQuestions %}
             {{ include('./subviews/survey/question_container.twig') }}
        {% endfor %}
     
        <!-- Hidden inputs -->
        {% if aGroup.show_last_group == true %}
            <input type='hidden' name='lastgroup' value='{{ aGroup.lastgroup }}' id='lastgroup' />
        {% endif %}
     
        {% if aGroup.show_last_answer == true %}
            <input type='hidden' name='lastanswer' value='{{ aGroup.lastanswer }}' id='lastanswer' />
        {% endif %}
    </div>
    
  4. /upload/themes/survey/yourThemeName/css/custom.cssに次のような記述を追加します。
    .navbar-brand {
        line-height: 60ph1.custom-survey-name {
    	margin: 0;
    	text-align: center;
    }
    
  5. "Survey name below progress bar"というテーマオプションを"Yes"にします。
  6. このようになります。