First version
This commit is contained in:
36
CHDataManagement/Page Elements/PageHead.swift
Normal file
36
CHDataManagement/Page Elements/PageHead.swift
Normal file
@@ -0,0 +1,36 @@
|
||||
import Foundation
|
||||
//import Elementary
|
||||
|
||||
struct PageHead {
|
||||
|
||||
let title: String
|
||||
|
||||
let description: String
|
||||
|
||||
var content: String {
|
||||
"""
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>\(title)</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
|
||||
<meta name="description" content="\(description)">
|
||||
<link rel="stylesheet" href="/assets/swiper/swiper.css" />
|
||||
<link rel="stylesheet" href="/assets/css/style.css" />
|
||||
</head>
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
extension PageHead: HTML {
|
||||
|
||||
var content: some HTML {
|
||||
meta(.charset(.utf8))
|
||||
meta(.title(title))
|
||||
meta(.name(.viewport), .content("width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"))
|
||||
meta(.name(.description), .content(description))
|
||||
link(.rel(.stylesheet), .href("style.css"))
|
||||
link(.rel(.stylesheet), .href("swiper.css"))
|
||||
}
|
||||
}
|
||||
*/
|
Reference in New Issue
Block a user