소스 검색

Added another example + added scalesPageToFit prop

Onno Schwanen 4 년 전
부모
커밋
7b022e4bc2
4개의 변경된 파일152개의 추가작업 그리고 4개의 파일을 삭제
  1. 1
    0
      demo/App.js
  2. 3
    2
      demo/config.js
  3. 2
    2
      demo/ios/Podfile.lock
  4. 146
    0
      demo/newsletterBahn.js

+ 1
- 0
demo/App.js 파일 보기

115
         alignItems: 'center',
115
         alignItems: 'center',
116
       }}>
116
       }}>
117
       <AutoHeightWebView
117
       <AutoHeightWebView
118
+        scalesPageToFit
118
         scrollableWhenZoomin
119
         scrollableWhenZoomin
119
         scrollEnabled={false}
120
         scrollEnabled={false}
120
         customStyle={
121
         customStyle={

+ 3
- 2
demo/config.js 파일 보기

1
 'use strict';
1
 'use strict';
2
 
2
 
3
-import newsletterZeit from "./newsletterZeit";
3
+import newsletter from "./newsletterZeit";
4
+// import newsletter from "./newsletterBahn";
4
 
5
 
5
-const autoHeightHtml0 = newsletterZeit;//`<p style="font-weight: 400;font-style: normal;font-size: 21px;line-height: 1.58;letter-spacing: -.003em;"><a href="https://github.com/iou90/react-native-autoheight-webview">Tags</a> are great for describing the essence of your story in a single word or phrase, but stories are rarely about a single thing. <span style="background-color: transparent !important;background-image: linear-gradient(to bottom, rgba(146, 249, 190, 1), rgba(146, 249, 190, 1));">If I pen a story about moving across the country to start a new job in a car with my husband, two cats, a dog, and a tarantula, I wouldn't only tag the piece with "moving". I’d also use the <a href="http://x-squad.com">tags</a> "pets", "marriage", "career change", and "travel tips".</span></p>`;
6
+const autoHeightHtml0 = newsletter;//`<p style="font-weight: 400;font-style: normal;font-size: 21px;line-height: 1.58;letter-spacing: -.003em;"><a href="https://github.com/iou90/react-native-autoheight-webview">Tags</a> are great for describing the essence of your story in a single word or phrase, but stories are rarely about a single thing. <span style="background-color: transparent !important;background-image: linear-gradient(to bottom, rgba(146, 249, 190, 1), rgba(146, 249, 190, 1));">If I pen a story about moving across the country to start a new job in a car with my husband, two cats, a dog, and a tarantula, I wouldn't only tag the piece with "moving". I’d also use the <a href="http://x-squad.com">tags</a> "pets", "marriage", "career change", and "travel tips".</span></p>`;
6
 
7
 
7
 const autoHeightHtml1 = `Tags are great for describing the essence of your story in a single word or phrase, but stories are rarely about a single thing. If I pen a story about moving across the country to start a new job in a car with my husband, two cats, a dog, and a tarantula, I wouldn’t only tag the piece with "moving".`;
8
 const autoHeightHtml1 = `Tags are great for describing the essence of your story in a single word or phrase, but stories are rarely about a single thing. If I pen a story about moving across the country to start a new job in a car with my husband, two cats, a dog, and a tarantula, I wouldn’t only tag the piece with "moving".`;
8
 
9
 

+ 2
- 2
demo/ios/Podfile.lock 파일 보기

182
     - React-cxxreact (= 0.61.5)
182
     - React-cxxreact (= 0.61.5)
183
     - React-jsi (= 0.61.5)
183
     - React-jsi (= 0.61.5)
184
   - React-jsinspector (0.61.5)
184
   - React-jsinspector (0.61.5)
185
-  - react-native-webview (7.5.2):
185
+  - react-native-webview (8.0.2):
186
     - React
186
     - React
187
   - React-RCTActionSheet (0.61.5):
187
   - React-RCTActionSheet (0.61.5):
188
     - React-Core/RCTActionSheetHeaders (= 0.61.5)
188
     - React-Core/RCTActionSheetHeaders (= 0.61.5)
326
   React-jsi: cb2cd74d7ccf4cffb071a46833613edc79cdf8f7
326
   React-jsi: cb2cd74d7ccf4cffb071a46833613edc79cdf8f7
327
   React-jsiexecutor: d5525f9ed5f782fdbacb64b9b01a43a9323d2386
327
   React-jsiexecutor: d5525f9ed5f782fdbacb64b9b01a43a9323d2386
328
   React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
328
   React-jsinspector: fa0ecc501688c3c4c34f28834a76302233e29dc0
329
-  react-native-webview: d1b30cc9128256ec1a9c6d10fb572231bd371337
329
+  react-native-webview: 99bdfd6c189772b0f15494f728430c23b18b93e4
330
   React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
330
   React-RCTActionSheet: 600b4d10e3aea0913b5a92256d2719c0cdd26d76
331
   React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
331
   React-RCTAnimation: 791a87558389c80908ed06cc5dfc5e7920dfa360
332
   React-RCTBlob: d89293cc0236d9cb0933d85e430b0bbe81ad1d72
332
   React-RCTBlob: d89293cc0236d9cb0933d85e430b0bbe81ad1d72

+ 146
- 0
demo/newsletterBahn.js 파일 보기

1
+export default `
2
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+<html>
4
+  <head>
5
+    <title>DB BAHN - Current information about your connection:</title>
6
+    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
7
+    <meta name="viewport" content="width=device-width">
8
+  </head>
9
+  <body style="background-color: rgb(206, 206, 206);margin: 0; width:100%;">
10
+    <div id="doc" style="font-family:Arial,sans-serif;font-size:12px;height:100%; min-width:500px; max-width: 944px; background: #fff; margin: 0; color:#333333">
11
+      <table style="width: 100%;">
12
+        <tr style="height: 48px;">
13
+          <td style="vertical-align:bottom;padding-left:24px;">
14
+              &nbsp;
15
+          </td>
16
+          <td style="vertical-align:bottom;text-align: right;">
17
+            <img style="padding-right:16px;" src="http://www.bahn.de/wmedia/view/mdb/media/app/push-email/logo-db.gif" width="126" height="32" alt="DB Bahn" />
18
+          </td>
19
+        </tr>
20
+      </table>
21
+
22
+      <div style="padding:0;border:0;background-color:#f00;height:48px;">
23
+        <p style="padding-top:12px;">
24
+          <span style="color:#fff; font-weight:bold; font-size:16px;padding-left:24px;margin-top:12px;">Current information on your connection (order HFRXDK)</span>
25
+        </p>
26
+      </div>
27
+      <div style="overflow: hidden;">
28
+        <img src="http://www.bahn.de/wmedia/view/mdb/media/app/push-email/push_uhr1_944x70.jpg" />
29
+      </div>
30
+
31
+      <div style="padding-left: 24px;padding-top:16px;padding-right:24px;">
32
+        <div style="margin-bottom: 8px;font-weight:bold;">
33
+          Dear Mr Foo,
34
+        </div>
35
+
36
+        <div style="margin-bottom: 4px;">
37
+          There are some changes affecting the connection you booked.
38
+          <br/>
39
+          Please click on the red button to request the latest information:
40
+        </div>
41
+        <div style="margin-top:20px; margin-bottom: 20px;" class="button-inside">
42
+           <span><a style="text-decoration: none; color: #FFFFFF; cursor: pointer; font-weight: bold; letter-spacing: 1px;background: none repeat scroll 0 0 #FF0000;border: 1px solid #AF1818;padding:2px;" href="http://reiseauskunft.bahn.de/bin/query.exe/en?E=P&storeRecData=pushService&dbkanal_009=L01_S01_D001_KNL0011_pushm_LZ03&timestamp=1562346136&SS=8000036&ZS=8400285&T=201907051626&VH=T%248000036%248000086%24201907051626%24201907051747%24ICE++848%C2%A7T%248000086%248400058%24201907051827%24201907052028%24ICE++122%C2%A7T%248400058%248400285%24201907052034%24201907052049%24IC++2270"><span>Current information about your connection:</span></a></span>
43
+        </div>
44
+        <div style="margin-bottom:8px;font-weight:bold;">
45
+          Deviation calculated from the time the mail was sent at 19:02 o'clock:
46
+        </div>
47
+        <div style="margin-bottom:8px;">
48
+            You may not reach your connecting train in time
49
+        </div>
50
+        <div style="margin-bottom: 4px;">
51
+          All data are included without warranty, express or implied. Please note that the current traffic situation can change at any time.
52
+        </div>
53
+        <div style="margin-top: 28px;margin-bottom:4px;"><span style="font-weight:bold;">Booked connection</span></div>
54
+        <table style="font-family:Arial,sans-serif;font-size:12px;border-collapse: collapse;border-spacing: 0;">
55
+            <tr>
56
+                <th style="border-top: 1px solid #000; font-weight: bold; padding: 2px 12px 2px 4px;">Station/Stop</th>
57
+                <th style="border-top: 1px solid #000; font-weight: bold; padding: 2px 12px 2px 4px;">Date</th>
58
+                <th style="border-top: 1px solid #000; font-weight: bold; padding: 2px 12px 2px 4px;" colspan="2">Time</th>
59
+                <th style="border-top: 1px solid #000; font-weight: bold; padding: 2px 12px 2px 4px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
60
+            </tr>
61
+           <tr class="first">
62
+                <td style="padding: 2px 12px 2px 4px;border-top: 1px solid #000;">Bielefeld Hbf</td>
63
+                <td style="padding: 2px 12px 2px 4px;border-top: 1px solid #000;">05.07.2019</td>
64
+                <td style="padding: 2px 12px 2px 4px;border-top: 1px solid #000;">ab</td>
65
+                <td style="padding: 2px 12px 2px 4px;border-top: 1px solid #000;">16:26</td>
66
+                <td style="padding: 2px 12px 2px 4px;border-top: 1px solid #000;"><a style="text-decoration: underline; color:#333333;word-wrap:normal;" href="http://reiseauskunft.bahn.de/bin/query.exe/en?E=P&storeRecData=pushService&dbkanal_009=L01_S01_D001_KNL0011_pushm_LZ03&timestamp=1562346136&SS=8000036&ZS=8400285&T=201907051626&VH=T%248000036%248000086%24201907051626%24201907051747%24ICE++848%C2%A7T%248000086%248400058%24201907051827%24201907052028%24ICE++122%C2%A7T%248400058%248400285%24201907052034%24201907052049%24IC++2270"><span>Access current information</span></a></td>
67
+           </tr>
68
+           <tr class="last">
69
+                <td style="padding: 2px 12px 2px 4px;border-bottom: 1px solid #000;">Haarlem</td>
70
+                <td style="padding: 2px 12px 2px 4px;border-bottom: 1px solid #000;">05.07.2019</td>
71
+                <td style="padding: 2px 12px 2px 4px;border-bottom: 1px solid #000;">an</td>
72
+                <td style="padding: 2px 12px 2px 4px;border-bottom: 1px solid #000;">20:49</td>
73
+                <td style="padding: 2px 12px 2px 4px;border-bottom: 1px solid #000;">&nbsp;</td>
74
+           </tr>
75
+        </table>
76
+        <br/>
77
+
78
+        <div style="margin-top: 20px; margin-bottom: 4px;">
79
+          Kind regards,
80
+        </div>
81
+        <p>
82
+          <div style="overflow: hidden;">
83
+              <img title="Your Team from www.bahn.de" alt="Your Team from www.bahn.de" src="http://www.bahn.de/wmedia/view/mdb/media/app/push-email/unterschrift_pk_en.gif" />
84
+          </div>
85
+        </p>
86
+
87
+        <div style="margin-top:20px; margin-bottom:20px; border-color:#cccccc; border-width:1px 0 0 0; border-style:solid;"></div>
88
+
89
+        <p style="margin-bottom: 4px;">
90
+          <span style="font-weight:bold;">Additional information</span>
91
+        </p>
92
+
93
+        <p style="margin-bottom: 4px;">
94
+          <a style="color: #333333; text-decoration: underline;" href="http://www.bahn.de/app_tarifinfo_pk_en.shtml">Information on the validity of tickets and reservations</a>
95
+        </p>
96
+
97
+        <p style="margin-bottom: 4px;">
98
+          Current real-time information is not available for all modes of transportation. Possible portions of your itinerary by public transportation (e.g. by bus or tram) may therefore not be included in our information service.
99
+          <br/><br/>
100
+          Should your trip not be possible as planned (e.g. a missed connection due to a delay, or cancellation etc.), your passenger rights are still valid. These can be read at <a style="color: #333333;text-decoration: underline;" href="http://www.bahn.de/passengersrights">www.bahn.de/passengersrights</a>. 
101
+          <br/>
102
+        </p>
103
+
104
+        <p style="margin-bottom: 4px;">
105
+            All information on the delay alarm will be deleted at the end of the journey.
106
+        </p>
107
+        <p style="margin-bottom: 4px;margin-top: 20px;">
108
+          <a style="color: #333333; text-decoration: underline;" href="http://www.bahn.de/app_hilfe_pushnotification_pk_en_GBR.shtml">Push notification instead of e-mail</a>
109
+        </p>
110
+        <p style="margin-bottom: 4px;">
111
+          If you use the DB Navigator app, you can receive the delay alarm on your smart phone as a push notification instead of as an e-mail.
112
+        </p>
113
+        <p style="margin-bottom: 4px;">
114
+          <a style="color: #333333; text-decoration: underline;" href="http://www.bahn.de/app_hilfe_pushnotification_pk_en_GBR.shtml">How to activate push notifications</a>
115
+        </p>
116
+      </div>
117
+
118
+      <div style="margin-left:24px; margin-right:24px;margin-top:20px; margin-bottom:20px; border-color:#cccccc; border-width:1px 0 0 0; border-style:solid;"></div>
119
+      <div style="font-size:10px; padding-left: 24px;padding-right:24px;">
120
+        <p><span style="font-weight:bold;">Publishing details</span></p>
121
+        <p>
122
+          DB Vertrieb GmbH<br/>
123
+          Stephensonstraße 1<br/>
124
+          60326 Frankfurt am Main, Germany<br/>
125
+        </p>
126
+        <p>
127
+          German Register of Companies (Handelsregister) B for the Local Court of Frankfurt am Main<br/>
128
+          HRB 79808<br/>
129
+          VAT ID No.: DE 814160246<br/>
130
+        </p>
131
+        <p>DB Vertrieb GmbH is represented by the Chairman of the Management Board Georg Lauber, the Managing Director responsible for Digital Business, Nils Hartgen and the Managing Director responsible for Finance & Controlling, Dr. Christian Runzheimer.</p>
132
+      </div>
133
+
134
+      <div style="margin-top:16px;padding:0;border:0;background-color:#f00;height:32px;text-align:right;vertival-align:bottom;">
135
+        <p style="padding-top:10px;">
136
+          <span style="padding-right:40px;color:#fff">&copy;&nbsp;Deutsche Bahn AG&nbsp;</span>
137
+        </p>
138
+      </div>
139
+    </div>
140
+	<p class="webtrack">
141
+	  <img src="http://t.bahn.de/b/ss/dbbahnprod/1/H.20.3--NS/996711116?pageName=BAHN_ASK_DEU_DE_BAHN_PushServiceMail&amp;ch=BAHN_ASK_DEU_DE_BAHN&amp;events=event48" width="5" height="5" alt="" />
142
+	</p>
143
+</p>
144
+
145
+  </body>
146
+</html>`;