diff --git a/.dockerignore b/.dockerignore index dcc7c95..026a3b2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,3 @@ -web/content/datasets/* \ No newline at end of file +web/content/datasets/* +dev_utils/* +nginx_proxy/* \ No newline at end of file diff --git a/.github/workflows/chart_publisher.yml b/.github/workflows/chart_publisher.yml new file mode 100644 index 0000000..e0dbf79 --- /dev/null +++ b/.github/workflows/chart_publisher.yml @@ -0,0 +1,29 @@ +name: Publish chart +on: + push: + branches: + - main +jobs: + release: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v3.5.3 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v3.5 + with: + version: v3.4.0 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.5.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.gitignore b/.gitignore index f64d0c1..8c9ee7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,4 @@ -web/public/ -dev_utils/config.yaml -web/static/img/m_p_b/ -web/static/img/m_p_c/ -web/static/img/m_p_p/ -web/static/img/m_r_f/ -web/content/datasets/* +web/public/* +web/content/datasets/test* +web/data/* dev_utils/config.yaml \ No newline at end of file diff --git a/charts/landing-pages-chart/.helmignore b/charts/landing-pages-chart/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/landing-pages-chart/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/landing-pages-chart/Chart.yaml b/charts/landing-pages-chart/Chart.yaml new file mode 100644 index 0000000..c74effe --- /dev/null +++ b/charts/landing-pages-chart/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: landing-pages-chart +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/charts/landing-pages-chart/templates/ingress.yaml b/charts/landing-pages-chart/templates/ingress.yaml new file mode 100644 index 0000000..d63fe75 --- /dev/null +++ b/charts/landing-pages-chart/templates/ingress.yaml @@ -0,0 +1,26 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + nginx.ingress.kubernetes.io/upstream-vhost: {{ .Values.s3Host}} + nginx.ingress.kubernetes.io/secure-backends: "true" + nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + nginx.ingress.kubernetes.io/rewrite-log: "true" + nginx.ingress.kubernetes.io/rewrite-target: {{ .Values.bucketUrl }}/$1 + nginx.ingress.kubernetes.io/use-regex: "true" + nginx.ingress.kubernetes.io/app-root: /index.html + name: my-ingress + namespace: {{ .Values.namespace }} +spec: + ingressClassName: nginx + rules: + - http: + paths: + - backend: + service: + name: landing-pages-service + port: + number: 443 + path: /(.*) + pathType: Prefix + diff --git a/charts/landing-pages-chart/templates/service.yaml b/charts/landing-pages-chart/templates/service.yaml new file mode 100644 index 0000000..9c4ada3 --- /dev/null +++ b/charts/landing-pages-chart/templates/service.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Service +metadata: + name: landing-pages-service + namespace: {{ .Values.namespace }} +spec: + externalName: {{ .Values.s3Host }} + sessionAffinity: None + type: ExternalName \ No newline at end of file diff --git a/charts/landing-pages-chart/values.yaml b/charts/landing-pages-chart/values.yaml new file mode 100644 index 0000000..69cacd3 --- /dev/null +++ b/charts/landing-pages-chart/values.yaml @@ -0,0 +1,5 @@ + +namespace: +s3Host: +bucketUrl: + diff --git a/download_metadata.go b/download_metadata.go index b418279..d93dfe5 100644 --- a/download_metadata.go +++ b/download_metadata.go @@ -16,7 +16,7 @@ func metadataDownloader(Metadataclient *MetadataBackend) { var ( Bucket = Metadataclient.Bucket // Download from this bucket Prefix = "datasets/" // Using this key prefix - LocalDirectory = "web/content/" // Into this directory + LocalDirectory = "web/data/" // Into this directory ) client := Metadataclient.Client diff --git a/main.go b/main.go index d44050a..f0d3a2d 100644 --- a/main.go +++ b/main.go @@ -12,11 +12,14 @@ func main() { Metadataclient := connectMetadatas3(mConf) log.Infof("Connection to the bucket established") metadataDownloader(Metadataclient) + markDownCreator() cmd := exec.Command("hugo") cmd.Dir = "./web/" cmd.Run() log.Infof("Hugo successfully built") - deConf := getDeploymentConfig() - connectDeployments3(deConf) + dConf := getDeploymentConfig() + DeploymenClient := connectDeployments3(dConf) + log.Infof("Connection to the bucket established") + test(DeploymenClient) } diff --git a/markdown_writer.go b/markdown_writer.go new file mode 100644 index 0000000..e08939b --- /dev/null +++ b/markdown_writer.go @@ -0,0 +1,76 @@ +package main + +import ( + "fmt" + "os" + "path/filepath" + "strings" +) + +func markDownCreator() { + // XML directory path (change this to your XML directory path) + xmlDirPath := "web/data/datasets/" + + // Directory to save Markdown files + markdownDir := "web/content/datasets/" + + // Create the Markdown directory if it doesn't exist + if err := os.MkdirAll(markdownDir, 0755); err != nil { + fmt.Println("Error creating directory:", err) + os.Exit(1) + } + + // Walk through the XML directory + err := filepath.Walk(xmlDirPath, func(xmlFilePath string, info os.FileInfo, err error) error { + if err != nil { + fmt.Printf("Error accessing file %s: %v\n", xmlFilePath, err) + return nil + } + // Skip directories + if info.IsDir() { + return nil + } + + // Read XML file name + xmlFileName := filepath.Base(xmlFilePath) + + // Remove file extension + fileNameWithoutExt := strings.TrimSuffix(xmlFileName, filepath.Ext(xmlFileName)) + + // Markdown content + markdownContent := fmt.Sprintf(` +--- +--- + +{{< datafetch variable="%s" >}} + + +Filename of the associated XML file: %s +`, fileNameWithoutExt, xmlFileName) + + // Create Markdown file + mdFileName := filepath.Join(markdownDir, fileNameWithoutExt+".md") + mdFile, err := os.Create(mdFileName) + if err != nil { + fmt.Printf("Error creating Markdown file %s: %v\n", mdFileName, err) + return nil + } + defer mdFile.Close() + + // Write Markdown content to the file + _, err = mdFile.WriteString(markdownContent) + if err != nil { + fmt.Printf("Error writing to Markdown file %s: %v\n", mdFileName, err) + return nil + } + + fmt.Printf("Markdown file %s created successfully!\n", mdFileName) + + return nil + }) + + if err != nil { + fmt.Println("Error walking through directory:", err) + os.Exit(1) + } +} diff --git a/s3.go b/s3.go index 5538a7a..dad6aa1 100644 --- a/s3.go +++ b/s3.go @@ -6,7 +6,6 @@ import ( "net/http" "github.com/aws/aws-sdk-go-v2/aws" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/service/s3" @@ -23,16 +22,11 @@ type DeploymentBackend struct { } func connectMetadatas3(mConf MetadataS3Config) *MetadataBackend { - httpClient := awshttp.NewBuildableClient().WithTransportOptions(func(tr *http.Transport) { - if tr.TLSClientConfig == nil { - tr.TLSClientConfig = &tls.Config{} - } - tr.TLSClientConfig.MinVersion = tls.VersionTLS13 - }) cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("auto"), - config.WithHTTPClient(httpClient), + config.WithHTTPClient(&http.Client{Transport: &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}}), config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(mConf.AccessKey, mConf.SecretKey, "")), config.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc( func(service, region string, options ...interface{}) (aws.Endpoint, error) { @@ -61,16 +55,11 @@ func connectMetadatas3(mConf MetadataS3Config) *MetadataBackend { } func connectDeployments3(dConf DeployS3Config) *DeploymentBackend { - httpClient := awshttp.NewBuildableClient().WithTransportOptions(func(tr *http.Transport) { - if tr.TLSClientConfig == nil { - tr.TLSClientConfig = &tls.Config{} - } - tr.TLSClientConfig.MinVersion = tls.VersionTLS13 - }) cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("auto"), - config.WithHTTPClient(httpClient), + config.WithHTTPClient(&http.Client{Transport: &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}}), config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(dConf.AccessKey, dConf.SecretKey, "")), config.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc( func(service, region string, options ...interface{}) (aws.Endpoint, error) { diff --git a/static_files_uploader.go b/static_files_uploader.go new file mode 100644 index 0000000..f6132f8 --- /dev/null +++ b/static_files_uploader.go @@ -0,0 +1,81 @@ +package main + +import ( + "context" + "net/http" + "os" + "path/filepath" + + log "github.com/sirupsen/logrus" + + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/feature/s3/manager" + "github.com/aws/aws-sdk-go-v2/service/s3" +) + +func test(DeploymenClient *DeploymentBackend) { + var ( + localPath = "web/public/" + bucket = DeploymenClient.Bucket + ) + + walker := make(fileWalk) + go func() { + // Gather the files to upload by walking the path recursively + if err := filepath.Walk(localPath, walker.Walk); err != nil { + log.Fatalln("Walk failed:", err) + } + close(walker) + }() + + // For each file found walking, upload it to Amazon S3 + for path := range walker { + rel, err := filepath.Rel(localPath, path) + if err != nil { + log.Fatalln("Unable to get relative path:", path, err) + } + file, err := os.Open(path) + if err != nil { + log.Println("Failed opening file", path, err) + continue + } + buf := make([]byte, 512) + _, err = file.Read(buf) + contentType := http.DetectContentType(buf) + ext := filepath.Ext(path) + if ext == ".css" { + contentType = "text/css;" + } + + if err != nil { + log.Fatalln("File bytes empty", path, err) + } + + client := DeploymenClient.Client + uploader := manager.NewUploader(client) + result, err := uploader.Upload(context.TODO(), &s3.PutObjectInput{ + Bucket: &bucket, + Key: aws.String(rel), + Body: file, + ContentType: aws.String(contentType), + }) + println(contentType) + file.Close() + if err != nil { + log.Fatalln("Failed to upload", path, err) + } + log.Infoln("Uploaded", path, result.Location) + } +} + +type fileWalk chan string + +func (f fileWalk) Walk(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + if !info.IsDir() { + f <- path + } + return nil +} diff --git a/web/README.md b/web/README.md new file mode 100644 index 0000000..22f6eea --- /dev/null +++ b/web/README.md @@ -0,0 +1,2 @@ +# hugo.bp.datasets.nbis.se +Bigpicture landing pages and data description pages using HUGO diff --git a/web/archetypes/dataset.md b/web/archetypes/dataset.md deleted file mode 100644 index db555a0..0000000 --- a/web/archetypes/dataset.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "An Example Post" -subtitle: "" -description: "" -date: 2018-06-04 -author:     "" -image: "" -tags: ["tag1", "tag2"] -categories: ["Tech" ] ---- diff --git a/web/config.toml b/web/config.toml index df4e527..4e947c2 100644 --- a/web/config.toml +++ b/web/config.toml @@ -1,20 +1,15 @@ -baseurl = "https://nbisweden.github.io/hugo.bp.datasets.nbis.se" +baseurl = "https://foo.bar.com" title = "Bigpicture datasets" languageCode = "en-us" -preserveTaxonomyNames = true -paginate = 5 #frontpage pagination - +uglyURLs = true [params] header_image = "img/bigpicture-banner.jpg" SEOTitle = "Bigpicture datasets" - slogan = "Demo site for Bigpicture landing pages using HUGO" + slogan = "Demo site for Bigpicture landing pages using HUGO" image_404 = "img/404-bg.jpg" # Sidebar settings sidebar_about_description = "Bigpicture dataset description pages" sidebar_avatar = "img/bigpicture_logo.svg" # use absolute URL, seeing it's used in both `/` and `/about/` - - -[[params.addtional_menus]] \ No newline at end of file diff --git a/web/content/datasets/Screenshot from 2024-01-19 15-51-54.png b/web/content/datasets/Screenshot from 2024-01-19 15-51-54.png deleted file mode 100644 index 43cb4a2..0000000 Binary files a/web/content/datasets/Screenshot from 2024-01-19 15-51-54.png and /dev/null differ diff --git a/web/content/datasets/_index.md b/web/content/datasets/_index.md new file mode 100644 index 0000000..b938cb9 --- /dev/null +++ b/web/content/datasets/_index.md @@ -0,0 +1,7 @@ +--- +title: "Test" +date: 2024-03-20T10:31:33+01:00 +layout: test +--- + +helloowsdfsdf \ No newline at end of file diff --git a/web/content/datasets/mock_p_p_7.md b/web/content/datasets/mock_p_p_7.md deleted file mode 100644 index 2e145be..0000000 --- a/web/content/datasets/mock_p_p_7.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -hidden: no -datacite: - "@context": "http://schema.org" - "@type": "Dataset" - "@id": "https://doi.org/10.123/70x8wi7vq" - name: "Mock data 38" - about: "Pathology" - url: "https:/.Mock" - author: - - name: "Person 1" - #"@id": # FIXME: missing info - "@type": "Person" - - name: "Person 2" - "@id": "https://orcid.org/0" - "@type": "Person" - - name: "Person 3" - "@id": "https://orcid.org/0" - "@type": "Person" - - name: "Person 4" - "@id": "https://orcid.org/0" - "@type": "Person" - - name: "Person 5" - "@id": "https://orcid.org/0" - "@type": "Person" - publisher: - "@type": "Organization" - name: "BP" - copyrightYear: 2020 - copyrightHolder: - - name: "University 2" - url: "https://uni2.se/" - "@type": "Organization" - - name: "person 1" - "@id": "https://orcid.org/0" - "@type": "Person" - provider: - - name: "Person 2" - email: "person1@uni1.se" - "@id": "https://orcid.org/0" - "@type": "Person" - - name: "person 3" - email: "person3@uni1.se" - #"@id": "" # FIXME: missing info - "@type": "Person" - - name: "Person 4" - email: "Person4@uni1.se" - "@id": "https://orcid.org/0" - "@type": "Person" - - name: "BP" - email: "BP@mock.com" - "@id": "https://datahub.bp.mock.se" - "@type": "Organization" - dateCreated: "2023-02-05" - datePublished: "2023-02-07" - dateModified: "2023-02-09" - keywords: "Prostate Cancer, Pathology" - version: "1.0.0" - description: | - 2000 scanned prostate biopsies from 120 patient cases. - license: - - name: "Controlled access" - id: "https://datahub.bp.mock.se/mock#controlled-access" - "@type": "CreativeWork" - abstract: | - Free for use in legal and ethical medical diagnostics research. - - name: "Big picture license" - id: "https://" - citation: -other: - shortName: "MD38" - status: "Completed" - annotation: | - - countries-shared: # Fixme: insert link to paper in annotation text above when published. - - "SE" - organ: - - name: "Prostate" - sctid: 41216001 # SNOMED-CT https://termbrowser.nhs.uk/?perspective=full&conceptId1=%s - age-span: "39 - 79 years, median 67 years" - bytes: 492600000000 # ~160 GB - numberOfScans: 2611 - caseLevelAnnotaions: "Treatment decision, Gleason, PIRADS, PSA, Prostate volume, clinical T-stage" - imageLevelAnnotations: "Connection to use" - numberOfAnnotations: # 652 (x8 echo times) + 40 (x8 echo times) - resolution: "0.2204 microns per pixel (40x)" - modality: - - "SM" - scanner: - - "Hamamatsu NanoZoomer S60" - stain: "H&E" - phase: - image: "img/m_p_p/lymph-nodes-to-scale.jpeg" - exampleImage: - - title: "Example biopsy downsampled 8x" - url: "/assets/images/mock_datasets/bp/m_p_p/lymph-nodes-to-scale.jpeg" - thumbnail-url: "/assets/images/mock_datasets/bp/m_p_p/lymph-nodes-to-scale-thumbnail.jpeg" - - title: "Example biopsy downsampled 8x" - url: "/assets/images/mock_datasets/bp/m_p_p/b.jpg" - thumbnail-url: "/assets/images/mock_datasets/bp/m_p_p/b_thumb.jpg" - - title: "Example patch in full resolution" - url: "/assets/images/mock_datasets/bp/m_p_p/pa_fullres.jpg" - thumbnail-url: "/assets/images/mock_datasets/bp/m_p_p/pa_fullres_thumb.jpg" - - title: "Macro image with annotation" - url: "/assets/images/mock_datasets/bp/m_p_p/macro_a.jpg" - thumbnail-url: "/assets/images/mock_datasets/bp/m_p_p/macro_a_thumb.jpg" -access: Indirect ---- - - -## File formats - -Images: Pyramidal .tif - -Metadata: .csv - -## License - - - - - - -Copyright -{{ page.datacite.copyrightYear }} -{{ page.datacite.copyrightHolder | map: "name" | join: ", " }} - -Donec nibh elit, tincidunt eget vulputate ac, consequat in ipsum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Cras interdum enim at libero sodales finibus. Donec vitae lorem quam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus eget orci vulputate quam porttitor dignissim. Maecenas commodo, nibh et iaculis blandit, leo arcu scelerisque tortor, id porttitor metus tortor commodo quam. Vivamus a dapibus ipsum, eu euismod elit. - -{{ page.datacite.author | map: "name" | array_to_sentence_string }} -({{ page.datacite.datePublished | date: "%Y" }}) -{{ page.datacite.name }} -[doi:{{ page.datacite['@id'] | remove: "https://doi.org/" }}]({{ page.datacite["@id"] }}). - - Integer tempus ullamcorper quam, eu consequat ante pulvinar ac. Nulla in ipsum mattis, congue orci vitae, rhoncus lacus. Aliquam nunc turpis, tincidunt in nibh eu, bibendum luctus diam. Praesent varius orci erat, nec sollicitudin tellus venenatis vel. Morbi quis ullamcorper arcu, quis ultricies odio. diff --git a/web/content/datasets/test_s4.txt b/web/content/datasets/test_s4.txt deleted file mode 100644 index 42893d6..0000000 --- a/web/content/datasets/test_s4.txt +++ /dev/null @@ -1 +0,0 @@ -hello from the s3 side diff --git a/web/content/datasets/test_s5.txt b/web/content/datasets/test_s5.txt deleted file mode 100644 index 42893d6..0000000 --- a/web/content/datasets/test_s5.txt +++ /dev/null @@ -1 +0,0 @@ -hello from the s3 side diff --git a/web/content/test/test.md b/web/content/test/test.md deleted file mode 100644 index efa15d7..0000000 --- a/web/content/test/test.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: test list layout ---- - -Hello from test layout \ No newline at end of file diff --git a/web/layouts/_default/_markup/render-image.html b/web/layouts/_default/_markup/render-image.html deleted file mode 100644 index 13b94cb..0000000 --- a/web/layouts/_default/_markup/render-image.html +++ /dev/null @@ -1,8 +0,0 @@ -{{ if .Title }} -
- {{ .Text }} -
{{ .Title }}
-
-{{ else }} - {{ .Text }} -{{ end }} diff --git a/web/layouts/_default/list.html b/web/layouts/_default/list.html new file mode 100644 index 0000000..cf41d21 --- /dev/null +++ b/web/layouts/_default/list.html @@ -0,0 +1,5 @@ +{{ define "main" }} + +{{ .Content }} + +{{ end }} \ No newline at end of file diff --git a/web/layouts/_default/single.html b/web/layouts/_default/single.html new file mode 100644 index 0000000..f752ee3 --- /dev/null +++ b/web/layouts/_default/single.html @@ -0,0 +1,3 @@ +{{ define "main" }} +{{ .Content }} +{{ end }} \ No newline at end of file diff --git a/web/layouts/datasets/list.html b/web/layouts/datasets/list.html index 9a216d7..becc75b 100644 --- a/web/layouts/datasets/list.html +++ b/web/layouts/datasets/list.html @@ -1,20 +1,18 @@ {{ define "main" }} -
- -{{range .Pages}} - - - - - -{{end}} -
- {{ .Params.datacite.name }}
- Keywords: {{ .Params.datacite.keywords }}.
-
{{ .Params.others.datePublished }}
-
+ + +{{ .Params.datasets.name }} {{ .Content }} diff --git a/web/layouts/datasets/single.html b/web/layouts/datasets/single.html index 9ebbf01..3b948c8 100644 --- a/web/layouts/datasets/single.html +++ b/web/layouts/datasets/single.html @@ -1,187 +1,7 @@ {{ define "main" }} -
-

{{.Params.datacite.name}}

-

Sample images

-

Sample images with reduced image quality. Please click to preview.

- -
- -
-

Dataset information

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Title{{ .Params.datacite.name }}
Short name{{ .Params.other.shortName }}
Age at extraction - {{range .Params.other.age_at_extraction}} -

{{.}}

- {{end}} -
Anatomical site - {{range .Params.other.anatomical_site }} -

{{.}}

- {{ end }} -
Animal species{{.Params.other.animal_species}}
Block preparation{{ .Params.other.block_preparation }}
BP image type - {{.Params.other.bp_image_type}} -
Extraction method - {{ range .Params.other.extraction_method }} -

{{.}}

- {{ end }} -
Image resolution - {{ range .Params.other.image_resolution }} -

{{.}}

- {{ end }} -
Indirect access only{{.Params.other.indirect_access_only}}
Staining name - {{ range .Params.other.staining_name }} -

{{.}}

- {{ end }} -
Scanner - {{ range .Params.other.scanner }} -

{{.}}

- {{end}} -
Cite as - {{ .Params.datacite.author }} - {{ .Params.datacite.name}} -
Field{{ .Params.datacite.about }}
Organ - {{ range .Params.other.organ }} - {{ . }}
- {{ end }} -
Year
DOI.Params.datacite
Status{{ .Params.other.status }}
Version{{ .Params.datacite.version }}
Scans{{ .Params.other.numberOfScans }}
Annotations{{ .Params.other.numberOfAnnotations }}
Size{{.Params.other.bytes}}
Modality - {{ .Params.other.modality }} -
Copyright - -
Sample attribute - {{.Params.SAMPLE.SAMPLE_ATTRIBUTES}} -
Sample name - {{.Params.SAMPLE.SAMPLE_NAME}} -
Alias - {{.Params.SAMPLE.alias}} -
Center name - {{.Params.SAMPLE.center_name}} -
-
- {{.Content}} - - - +{{ .Content }} - {{ end }} \ No newline at end of file +{{ end }} \ No newline at end of file diff --git a/web/layouts/partials/category.html b/web/layouts/partials/category.html deleted file mode 100644 index 9308b10..0000000 --- a/web/layouts/partials/category.html +++ /dev/null @@ -1,2 +0,0 @@ -{{ $paginator := .Paginate (where .Data.Pages "Section" "post") }} -{{ partial "posts.html" . }} diff --git a/web/layouts/partials/comments.html b/web/layouts/partials/comments.html deleted file mode 100644 index d2500d8..0000000 --- a/web/layouts/partials/comments.html +++ /dev/null @@ -1,45 +0,0 @@ - -{{ if .Site.Params.disqus_proxy }} - -
- - -{{ else if .Site.DisqusShortname }} - -
-{{ template "_internal/disqus.html" . }} -{{ else if .Site.Params.twikoo_env_id }} -
- - -{{ end }} -{{ if .Site.Params.giscus }} - -{{ end }} diff --git a/web/layouts/partials/home.html b/web/layouts/partials/home.html deleted file mode 100644 index e69de29..0000000 diff --git a/web/layouts/partials/nav.html b/web/layouts/partials/nav.html index 1840069..c7947d3 100644 --- a/web/layouts/partials/nav.html +++ b/web/layouts/partials/nav.html @@ -7,7 +7,7 @@ Home - Datasets + Datasets diff --git a/web/layouts/partials/page_view_counter.html b/web/layouts/partials/page_view_counter.html deleted file mode 100644 index bc32ede..0000000 --- a/web/layouts/partials/page_view_counter.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/web/layouts/shortcodes/datafetch.html b/web/layouts/shortcodes/datafetch.html new file mode 100644 index 0000000..d25fc6b --- /dev/null +++ b/web/layouts/shortcodes/datafetch.html @@ -0,0 +1,12 @@ + +{{- $variable := .Get "variable" -}} +
+ {{ $data := index .Site.Data.datasets $variable }} + {{ if $data }} + {{ range $data.LANDING_PAGE.ATTRIBUTES.STRING_ATTRIBUTE }} +

{{ .TAG }} : {{ .VALUE }}

+ {{ end }} + {{ else }} +

Data for '{{ $variable }}' not found.

+ {{ end }} +
diff --git a/web/layouts/shortcodes/param.html b/web/layouts/shortcodes/param.html deleted file mode 100644 index bee7ee1..0000000 --- a/web/layouts/shortcodes/param.html +++ /dev/null @@ -1 +0,0 @@ -{{ with .Get 0 }}{{ $.Page.Param . }}{{ end }} \ No newline at end of file diff --git a/web/layouts/taxonomy/category.html b/web/layouts/taxonomy/category.html deleted file mode 100644 index 92e0961..0000000 --- a/web/layouts/taxonomy/category.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ define "main" }} - {{ partial "category.html" . }} -{{ end }} diff --git a/web/layouts/taxonomy/tag.html b/web/layouts/taxonomy/tag.html deleted file mode 100644 index 92e0961..0000000 --- a/web/layouts/taxonomy/tag.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ define "main" }} - {{ partial "category.html" . }} -{{ end }} diff --git a/web/layouts/taxonomy/terms.html b/web/layouts/taxonomy/terms.html deleted file mode 100644 index 35983fa..0000000 --- a/web/layouts/taxonomy/terms.html +++ /dev/null @@ -1,47 +0,0 @@ -{{ define "main" }} - -
-
-
- -
- - {{ .Content }} - {{ partial "comments.html" . }} - -
- - -
-
-
- -{{ end }} - - diff --git a/web/layouts/test/list.html b/web/layouts/test/list.html deleted file mode 100644 index dd98916..0000000 --- a/web/layouts/test/list.html +++ /dev/null @@ -1,15 +0,0 @@ - - -{{ partial "head.html" . }} -{{ partial "nav.html" . }} - -{{ block "header" .}} -
-

{{ .Site.Title}}

-

{{ .Site.Params.slogan }}

-
-{{ end }} -aaa - - - \ No newline at end of file diff --git a/web/layouts/top/single.html b/web/layouts/top/single.html deleted file mode 100644 index 95465bd..0000000 --- a/web/layouts/top/single.html +++ /dev/null @@ -1,26 +0,0 @@ - -{{ define "main" }} - -
-
-
- -
- -
- {{ .Content }} -
-
- {{ partial "sidebar.html" . }} -
-
-
- -{{ end }} - -