Documentation ¶
Index ¶
- Constants
- Variables
- func GetBaseUrl(r *web.Response) string
- func GetMinJsFiles() []string
- func GetResCssFiles() []string
- func GetResJsFiles() []string
- func GetUrlWithBaseUrl(url string, r *web.Response) string
- func IsValidLang(code string) bool
- func Minify() error
- func SetAppendNumber(num int)
- func SetPageAndOffset(r *web.Response, offset int)
Constants ¶
View Source
const ( UrlIndex = "/" UrlProtocol = "/protocol" UrlGuides = "/guides" UrlDisclaimer = "/disclaimer" UrlIntroducing = "/introducing-memo" UrlOpenSource = "/open-sourcing-memo" UrlNeedFunds = "/need-funds" UrlNewPosts = "/new-posts" UrlStats = "/stats" UrlCharts = "/charts" UrlActivity = "/activity" UrlAbout = "/about" UrlNotFound = "/404" UrlMemoSetLanguage = "/set-language" UrlAll = "/all" TmplAll = "/index/all" TmplAbout = "/index/about" TmplDashboard = "/index/dashboard" TmplDashboardNoFunds = "/index/dashboard-no-funds" TmplDisclaimer = "/index/disclaimer" TmplActivity = "/index/activity" TmplGuides = "/index/guides" TmplIntroducing = "/index/introducing-memo" TmplNeedFunds = "/index/need-funds" TmplOpenSource = "/index/open-source" TmplProtocol = "/index/protocol" TmplStats = "/index/stats" TmplCharts = "/index/charts" )
View Source
const ( UrlSignup = "/signup" UrlSignupSubmit = "/signup-submit" UrlLogin = "/login" UrlLoginSubmit = "/login-submit" UrlLogout = "/logout" TmplSignup = "/auth/signup" TmplLogin = "/auth/login" )
View Source
const ( UrlKeyExport = "/key/export" UrlKeyLoad = "/key/load" UrlKeyChangePassword = "/key/change-password" UrlKeyChangePasswordSubmit = "/key/change-password-submit" UrlKeyDeleteAccount = "/key/delete-account" UrlKeyDeleteAccountSubmit = "/key/delete-account-submit" )
View Source
const ( UrlMemoNew = "/memo/new" UrlMemoNewSubmit = "/memo/new-submit" UrlMemoSetName = "/memo/set-name" UrlMemoSetNameSubmit = "/memo/set-name-submit" UrlMemoFollow = "/memo/follow" UrlMemoFollowSubmit = "/memo/follow-submit" UrlMemoUnfollow = "/memo/unfollow" UrlMemoUnfollowSubmit = "/memo/unfollow-submit" UrlMemoPost = "/post" UrlMemoPostThreaded = "/post-threaded" UrlMemoPostMoreThreadedAjax = "/post-more-threaded-ajax" UrlMemoPostThreadedAjax = "/post-threaded-ajax" UrlMemoPostAjax = "/post-ajax" UrlMemoLike = "/memo/like" UrlMemoLikeSubmit = "/memo/like-submit" UrlMemoReply = "/memo/reply" UrlMemoReplySubmit = "/memo/reply-submit" UrlMemoWait = "/memo/wait" UrlMemoWaitSubmit = "/memo/wait-submit" UrlMemoSetProfile = "/memo/set-profile" UrlMemoSetProfileSubmit = "/memo/set-profile-submit" UrlMemoSetProfilePic = "/memo/set-profile-pic" UrlMemoSetProfilePicSubmit = "/memo/set-profile-pic-submit" TmplMemoPost = "/memo/post" TmplMemoPostThreaded = "/memo/post-threaded" )
View Source
const ( UrlProfiles = "/profiles" UrlProfilesNew = "/profiles/new" UrlProfilesMostActions = "/profiles/most-actions" UrlProfilesMostFollowers = "/profiles/most-followers" UrlProfileView = "/profile" UrlProfileFollowers = "/profile/followers" UrlProfileFollowing = "/profile/following" UrlProfileSettings = "/settings" UrlProfileAccount = "/account" UrlProfileCoins = "/coins" UrlProfileSettingsSubmit = "/settings-submit" UrlProfileNotifications = "/notifications" UrlProfileTopicsFollowing = "/profile/topics-following" UrlProfileMini = "/profile/mini" TmplProfiles = "/profile/all" TmplProfilesNew = "/profile/new" TmplProfileSettings = "/profile/settings" TmplProfileAccount = "/profile/account" TmplProfileCoins = "/profile/coins" TmplProfileNotifications = "/profile/notifications" TmplProfilesMostActions = "/profile/most-actions" TmplProfilesMostFollowers = "/profile/most-followers" )
View Source
const ( UrlPostsNew = "/posts/new" UrlPostsTop = "/posts/top" UrlPostsRanked = "/posts/ranked" UrlPostsThreads = "/posts/threads" UrlPostsPolls = "/polls" UrlPostsArchive = "/posts/archive" UrlPostsPersonalized = "/posts/personalized" TmplPostsPolls = "/posts/polls" )
View Source
const ( UrlTopics = "/topics" UrlTopicsAll = "/topics/all" UrlTopicsMostFollowed = "/topics/most-followed" UrlTopicsMostPosts = "/topics/most-posts" UrlTopicsFollowing = "/topics/following" UrlTopicsCreate = "/topics/create" UrlTopicsCreateSubmit = "/topics/create-submit" UrlTopicView = "/topic" UrlTopicThreads = "/topics/threads" UrlTopicsSocket = "/topics/socket" UrlTopicsMorePosts = "/topics/more-posts" UrlTopicsPostAjax = "/topics/post-ajax" UrlTopicsFollowSubmit = "/topics/follow-submit" UrlTopicsFollowers = "/topics/followers" TmplTopicView = "/topics/view" TmplTopicPost = "/topics/post" )
View Source
const ( UrlPollCreate = "/poll/create" UrlPollCreateSubmit = "/poll/create-submit" UrlPollVoteSubmit = "/poll/vote-submit" UrlPollVotesAjax = "/poll/votes-ajax" )
View Source
const ( TmplSnippetsPost = "/post/post" TmplSnippetsPostThreaded = "/post/post-threaded" TmplSnippetsPostThreadedLoadMore = "/post/snippets/post-threaded-load-more" )
View Source
const (
PicPath = "web/public/img/profilepics/"
)
Variables ¶
View Source
var CssFiles = []string{
"https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css",
"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css",
"https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/0.8.2/css/flag-icon.min.css",
"style.css",
}
View Source
var JsFiles = []string{
"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/identicon.js/2.3.2/pnglib.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/identicon.js/2.3.2/identicon.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/jstimezonedetect/1.0.6/jstz.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js",
"js/init.js",
"js/login.js",
"js/signup.js",
"js/key.js",
"js/memo.js",
"js/topics.js",
"js/profile.js",
"js/poll.js",
"js/vote.js",
"js/modal.js",
"js/mini-profile.js",
}
View Source
var Languages = []lang{{
Code: "en-US",
Name: "English",
Flag: "us",
}, {
Code: "es-LA",
Name: "Español",
Flag: "es",
}, {
Code: "zh-CN",
Name: "中文(简体)",
Flag: "cn",
}, {
Code: "ja-JP",
Name: "日本語",
Flag: "jp",
}, {
Code: "fr-FR",
Name: "français",
Flag: "fr",
}, {
Code: "sv-SE",
Name: "svenska",
Flag: "se",
}, {
Code: "ko-KR",
Name: "한국어",
Flag: "kr",
}, {
Code: "el-GR",
Name: "Ελληνικά",
Flag: "gr",
}, {
Code: "pl-PL",
Name: "Polski",
Flag: "pl",
}, {
Code: "pt-BR",
Name: "Português",
Flag: "br",
}, {
Code: "cs-CZ",
Name: "Čeština",
Flag: "cz",
}, {
Code: "nl-NL",
Name: "Nederlands",
Flag: "nl",
}, {
Code: "ru-RU",
Name: "Русский",
Flag: "ru",
}}
View Source
var MinJsFile = "js/min.js"
Functions ¶
func GetBaseUrl ¶
func GetMinJsFiles ¶
func GetMinJsFiles() []string
func GetResCssFiles ¶
func GetResCssFiles() []string
func GetResJsFiles ¶
func GetResJsFiles() []string
func IsValidLang ¶
func SetAppendNumber ¶
func SetAppendNumber(num int)
func SetPageAndOffset ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.