質問編集履歴

4

WordPress記述をHTMLに変更

2017/09/05 08:04

投稿

hrn
hrn

スコア17

test CHANGED
File without changes
test CHANGED
@@ -64,97 +64,127 @@
64
64
 
65
65
 
66
66
 
67
- ↓ドロワーメニュー(WordPress)
67
+ ↓ドロワーメニュー
68
-
68
+
69
- ```
69
+ ```
70
+
70
-
71
+ <!--drawer start-->
72
+
71
- <body class="drawer drawer--left">
73
+ <body class="drawer drawer--left">
72
-
74
+
73
- <div id="slider-aontainer"></div>
75
+ <div id="slider-aontainer"></div>
74
-
76
+
75
- <main>
77
+ <main>
76
-
78
+
77
- <button type="button" class="drawer-toggle drawer-hamburger">
79
+ <button type="button" class="drawer-toggle drawer-hamburger">
78
-
80
+
79
- <span class="sr-only">toggle navigation</span>
81
+ <span class="sr-only">toggle navigation</span>
80
-
82
+
81
- <span class="drawer-hamburger-icon"></span>
83
+ <span class="drawer-hamburger-icon"></span>
82
-
84
+
83
- <span class="drawer_title">contents menu</span>
85
+ <span class="drawer_title">contents menu</span>
84
-
86
+
85
- </button>
87
+ </button>
86
-
88
+
87
- <nav class="drawer-nav">
89
+ <nav class="drawer-nav">
88
-
90
+
89
- <ul class="drawer-menu">
91
+ <ul class="drawer-menu">
90
-
91
- <li>
92
-
93
- <ul>
94
-
95
- <a href="/index.php?cat=5#contents">カテゴリ名</a>
96
-
97
-
98
-
99
- <?php query_posts("cat=5&order=DESC&posts_per_page=10"); ?>
100
-
101
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
102
-
103
-
104
92
 
105
93
  <li>
106
94
 
107
- <a href="<?php the_permalink(); ?>" target="_blank">
108
-
109
- <p><?php the_title(); ?> : <?php nskw_subtitle(); ?></p>
110
-
111
- </a>
112
-
113
- </li>
114
-
115
-
116
-
117
- <?php endwhile; endif; ?>
118
-
119
-
120
-
121
- <div class="more">
122
-
123
-
124
-
125
- <?php query_posts("showposts=-1&offset=10&cat=5&order=DESC"); ?>
126
-
127
- <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
128
-
129
-
130
-
131
- <li>
132
-
133
- <a href="<?php the_permalink(); ?>" target="_blank">
134
-
135
- <p><?php the_title(); ?> : <?php nskw_subtitle(); ?></p>
136
-
137
- </a>
138
-
139
- </li>
140
-
141
-
142
-
143
- <?php endwhile; endif; ?>
144
-
145
- <?php wp_reset_query(); ?>
146
-
147
-
148
-
149
- </div>
150
-
151
-
95
+ <ul>
96
+
97
+ <a href="#">カテゴリ名</a>
98
+
99
+ <li><a href="#">contents</a></li>
100
+
101
+ <li><a href="#">contents</a></li>
102
+
103
+ <li><a href="#">contents</a></li>
104
+
105
+ <li><a href="#">contents</a></li>
106
+
107
+ <li><a href="#">contents</a></li>
108
+
109
+ <div class="more">
110
+
111
+ <li><a href="#">contents</a></li>
112
+
113
+ <li><a href="#">contents</a></li>
114
+
115
+ <li><a href="#">contents</a></li>
116
+
117
+ </div>
118
+
119
+ </ul>
120
+
121
+ </li>
122
+
123
+ <li>
124
+
125
+ <ul>
126
+
127
+ <a href="#">カテゴリ名</a>
128
+
129
+ <li><a href="#">contents</a></li>
130
+
131
+ <li><a href="#">contents</a></li>
132
+
133
+ <li><a href="#">contents</a></li>
134
+
135
+ <li><a href="#">contents</a></li>
136
+
137
+ <li><a href="#">contents</a></li>
138
+
139
+ <div class="more">
140
+
141
+ <li><a href="#">contents</a></li>
142
+
143
+ <li><a href="#">contents</a></li>
144
+
145
+ <li><a href="#">contents</a></li>
146
+
147
+ </div>
148
+
149
+ </ul>
150
+
151
+ </li>
152
+
153
+ <li>
154
+
155
+ <ul>
156
+
157
+ <a href="#">カテゴリ名</a>
158
+
159
+ <li><a href="#">contents</a></li>
160
+
161
+ <li><a href="#">contents</a></li>
162
+
163
+ <li><a href="#">contents</a></li>
164
+
165
+ <li><a href="#">contents</a></li>
166
+
167
+ <li><a href="#">contents</a></li>
168
+
169
+ <div class="more">
170
+
171
+ <li><a href="#">contents</a></li>
172
+
173
+ <li><a href="#">contents</a></li>
174
+
175
+ <li><a href="#">contents</a></li>
176
+
177
+ </div>
178
+
179
+ </ul>
180
+
181
+ </li>
152
182
 
153
183
  </ul>
154
184
 
155
- </li>
185
+ </nav>
156
-
157
- </ul>
186
+
187
+
158
188
 
159
189
  ```
160
190
 

3

試したことを追記しました。

2017/09/05 08:04

投稿

hrn
hrn

スコア17

test CHANGED
File without changes
test CHANGED
@@ -168,8 +168,6 @@
168
168
 
169
169
  もっと読むクリック時に、display:block;で表示
170
170
 
171
- を設定してみたが変化がありませんでした。
172
-
173
171
  ```
174
172
 
175
173
  <script>
@@ -188,6 +186,8 @@
188
186
 
189
187
  ```
190
188
 
189
+ 上記の状態だと、1度は実現したい形になるものの、再度ドロワーメニューを開くと元に戻ってしまう
190
+
191
191
 
192
192
 
193
193
  ###補足情報(言語/FW/ツール等のバージョンなど)

2

状況がわかるよう追加しました。

2017/09/05 06:51

投稿

hrn
hrn

スコア17

test CHANGED
File without changes
test CHANGED
@@ -64,6 +64,102 @@
64
64
 
65
65
 
66
66
 
67
+ ↓ドロワーメニュー(WordPress)
68
+
69
+ ```
70
+
71
+ <body class="drawer drawer--left">
72
+
73
+ <div id="slider-aontainer"></div>
74
+
75
+ <main>
76
+
77
+ <button type="button" class="drawer-toggle drawer-hamburger">
78
+
79
+ <span class="sr-only">toggle navigation</span>
80
+
81
+ <span class="drawer-hamburger-icon"></span>
82
+
83
+ <span class="drawer_title">contents menu</span>
84
+
85
+ </button>
86
+
87
+ <nav class="drawer-nav">
88
+
89
+ <ul class="drawer-menu">
90
+
91
+ <li>
92
+
93
+ <ul>
94
+
95
+ <a href="/index.php?cat=5#contents">カテゴリ名</a>
96
+
97
+
98
+
99
+ <?php query_posts("cat=5&order=DESC&posts_per_page=10"); ?>
100
+
101
+ <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
102
+
103
+
104
+
105
+ <li>
106
+
107
+ <a href="<?php the_permalink(); ?>" target="_blank">
108
+
109
+ <p><?php the_title(); ?> : <?php nskw_subtitle(); ?></p>
110
+
111
+ </a>
112
+
113
+ </li>
114
+
115
+
116
+
117
+ <?php endwhile; endif; ?>
118
+
119
+
120
+
121
+ <div class="more">
122
+
123
+
124
+
125
+ <?php query_posts("showposts=-1&offset=10&cat=5&order=DESC"); ?>
126
+
127
+ <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
128
+
129
+
130
+
131
+ <li>
132
+
133
+ <a href="<?php the_permalink(); ?>" target="_blank">
134
+
135
+ <p><?php the_title(); ?> : <?php nskw_subtitle(); ?></p>
136
+
137
+ </a>
138
+
139
+ </li>
140
+
141
+
142
+
143
+ <?php endwhile; endif; ?>
144
+
145
+ <?php wp_reset_query(); ?>
146
+
147
+
148
+
149
+ </div>
150
+
151
+
152
+
153
+ </ul>
154
+
155
+ </li>
156
+
157
+ </ul>
158
+
159
+ ```
160
+
161
+
162
+
67
163
  ###試したこと
68
164
 
69
165
  最初から高さを取得させるためにもっと読む内のコンテンツを開けておき

1

試したこと、更新

2017/09/05 06:48

投稿

hrn
hrn

スコア17

test CHANGED
File without changes
test CHANGED
@@ -76,25 +76,19 @@
76
76
 
77
77
  ```
78
78
 
79
- <script>
79
+ <script>
80
80
 
81
- $(function() {
81
+ $(function() {
82
82
 
83
- $('button.drawer-toggle drawer-hamburger').mouseover(function(e){
83
+ $('button.drawer-toggle.drawer-hamburger').hover(function(){
84
84
 
85
- $('.more li').css('display', 'none');
85
+ $('.more li, .close').css('display', 'none');
86
86
 
87
- });
87
+ });
88
88
 
89
- $('p.more').click(function(){
89
+ });
90
90
 
91
- $('p.more').css('display', 'block');
92
-
93
- });
94
-
95
- });
96
-
97
- </script>
91
+ </script>
98
92
 
99
93
  ```
100
94