我正在使用Jekyll构建一个静态网站,并且首页滚动到页面上下锚点,但如果用户去了帖子,那么菜单显然不会去任何地方,因为链接如下:
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define NUM_THREADS 5
#define DIM_VETTORE 100
void *Calcola_max(void* args){
}
int main(){
int vettore[DIM_VETTORE];
int t;
int i;
srand(time(NULL));
/*riempio il vettore con numeri random*/
for (i=0; i<DIM_VETTORE; i++){
vettore[i]=rand() % 500 + 1;
printf("Numero in posizione %d: %d\n", i,vettore[i]);
}
/*indico le dimensioni di ogni array splittato*/
int dimensione_split=DIM_VETTORE/NUM_THREADS;
printf("Dimensione degli array splittati: %d\n", dimensione_split);
/*creo tutti i thread*/
pthread_t thread[NUM_THREADS];
for (t=0;t<NUM_THREADS; t++){
printf("Main: creazione thread %d\n", t);
int rc;
rc=pthread_create(&thread[t], NULL, Calcola_max, &vettore);
if (rc) {
printf("ERRORE: %d\n", rc);
exit(-1);
}
}
}
在Jekyll中有一种说法在cofig文件中说如果帖子页然后用菜单-B替换菜单-A?
谢谢,
答案 0 :(得分:1)
那是什么布局。
您的/index.html
页面将使用home.html
模板
您的posts
将使用post.html
,然后使用default.html
模板
<强>的index.html 强>
---
layout: home
...
---
your content here
<强> _layouts / home.html做为强>
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include menu-a.html %} <----------LOADING Menu a
<div class="page-content">
<div class="wrapper">
{{ content }}
</div>
</div>
{% include footer.html %}
</body>
</html>
<强> _layouts / default.html中强>
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include menu-b.html %} <----------LOADING Menu b
<div class="page-content">
<div class="wrapper">
{{ content }}
</div>
</div>
{% include footer.html %}
</body>
</html>