Skip to content

Commit

Permalink
feat: update style of image and image-text
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGolms committed Jan 12, 2021
1 parent 26d8a9e commit d58ce09
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 22 deletions.
28 changes: 20 additions & 8 deletions src/data/chapter/chapter01.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ export const Section01 = () => {
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.070000`)}</li>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.080000`)}</li>
</ul>
<IonImg src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)} />
<IonText>
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</IonText>
Expand All @@ -53,8 +56,11 @@ export const Section02 = () => {
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.050000`)}</li>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.060000`)}</li>
</ul>
<IonImg src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)} />
<IonText>
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</IonText>
Expand All @@ -75,8 +81,11 @@ export const Section03 = () => {
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.050000`)}</li>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.060000`)}</li>
</ul>
<IonImg src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)} />
<IonText>
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</IonText>
Expand Down Expand Up @@ -106,8 +115,11 @@ export const Section04 = () => {
</ul>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.040000`)}</li>
</ul>
<IonImg src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)} />
<IonText>
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</IonText>
Expand Down
36 changes: 24 additions & 12 deletions src/data/chapter/chapter02.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ export const Section01 = () => {
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.020000`)}</li>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.030000`)}</li>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.040000`)}</li>
<div className="chapter-image-title">
<div>
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</div>
Expand All @@ -32,11 +33,12 @@ export const Section01 = () => {
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.070000`)}</li>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.080000`)}</li>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.090000`)}</li>
<div className="chapter-image-title">
<div>
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.02.FILENAME`)}
/>
<IonText>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.02.TITLE`)}
</IonText>
</div>
Expand All @@ -61,8 +63,11 @@ export const Section02 = () => {
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.060000`)}</li>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.070000`)}</li>
</ul>
<IonImg src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)} />
<IonText>
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</IonText>
Expand All @@ -86,8 +91,11 @@ export const Section03 = () => {
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.080000`)}</li>
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.090000`)}</li>
</ul>
<IonImg src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)} />
<IonText>
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</IonText>
Expand All @@ -106,9 +114,10 @@ export const Section04 = () => {
<li>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.LIST.01.020000`)}</li>
<div className="chapter-image-title">
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</div>
Expand All @@ -122,9 +131,10 @@ export const Section04 = () => {
<p>{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.TEXT.PARAGRAPH.03`)}</p>
<div className="chapter-image-title">
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.02.FILENAME`)}
/>
<IonText>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.02.TITLE`)}
</IonText>
</div>
Expand All @@ -148,9 +158,10 @@ export const Section05 = () => {
</ul>
<div className="chapter-image-title">
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</div>
Expand Down Expand Up @@ -180,9 +191,10 @@ export const Section06 = () => {
</ul>
<div className="chapter-image-title">
<IonImg
class="ion-padding-vertical"
src={t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.FILENAME`)}
/>
<IonText>
<IonText class="ion-padding-bottom" className="image-text">
{t(`CHAPTER.${CHAPTER_ID}.${sectionId}.IMAGE.01.TITLE`)}
</IonText>
</div>
Expand Down
5 changes: 3 additions & 2 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ https://allexperts16.blogspot.com/2018/06/allow-users-to-select-and-copy-text-in
user-select: text;
}

.chapter-image-title {
color: #00000099;
.image-title {
display: block;
font-size: small;
text-align: center;
}

Expand Down

0 comments on commit d58ce09

Please sign in to comment.