Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 24b1e57

Browse files
committed
静态文件的一些修改
1 parent 7a314a9 commit 24b1e57

File tree

12 files changed

+116
-117
lines changed

12 files changed

+116
-117
lines changed

websites/code/studygolang/src/controller/ajax.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,5 +333,9 @@ func UploadImageHandler(rw http.ResponseWriter, req *http.Request) {
333333
return
334334
}
335335

336+
if origUrl != "" {
337+
uri = "http://studygolang.qiniudn.com/" + uri
338+
}
339+
336340
fmt.Fprint(rw, `{"ok": 1, "uri":"`+uri+`"}`)
337341
}

websites/code/studygolang/static/css/md_toolbar.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ form .md-toolbar ul .cur a { background: #fff;border: 1px solid #ddd;color: #666
55
form .md-toolbar .upload-img { cursor: pointer;}
66
form .content-preview { margin-bottom: 5px; width: 100%;height: 200px;border: 1px solid #CCCCCC;border-radius: 3px 3px 3px 3px;-moz-border-radius: 3px 3px 3px 3px;display: none;padding: 4px;overflow: scroll; display: none; }
77

8-
.sidebar .help-block ul {padding-left: 25px;font-size: 13px;line-height: 25px;margin-right: 10px;}
8+
.sidebar .help-block ul {padding-left: 25px;font-size: 13px;line-height: 25px;margin-right: 10px;}
9+
10+
.tooltip {white-space: nowrap;}

websites/code/studygolang/static/js/common.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,21 @@ SG.Publisher.prototype = {
5757
}
5858
}
5959

60+
SG.markSetting = function() {
61+
// 配置 marked 语法高亮
62+
marked.setOptions({
63+
highlight: function (code) {
64+
code = code.replace(/"/g, '"');
65+
code = code.replace(/&lt;/g, '<');
66+
code = code.replace(/&gt;/g, '>');
67+
code = code.replace(/&amp;/g, '&');
68+
return hljs.highlightAuto(code).value;
69+
}
70+
});
71+
72+
return marked;
73+
}
74+
6075
// 分析 @ 的用户
6176
SG.analyzeAt = function(text) {
6277
var usernames = [];
Lines changed: 85 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,90 @@
11
// emoji表情 http://www.emoji-cheat-sheet.com/
22
var emojis = [
3-
"plus1","ok_hand", "sleepy", "smile", "clap", "heart",
4-
"octopus", "six_pointed_star", "oden", "office", "ok", "ok_woman", "older_man","skull",
5-
"smiley", "smirk", "smoking", "snake", "snowman", "sob", "soccer",
6-
"point_down", "point_left", "point_right", "point_up", "point_up_2",
7-
"a", "ab", "airplane", "alien", "ambulance", "angel", "anger", "angry",
8-
"apple", "aquarius", "aries", "arrow_backward", "arrow_down","ski",
9-
"person_with_blond_hair", "phone", "pig", "pill", "pisces",
10-
"arrow_forward", "arrow_left", "arrow_lower_left", "arrow_lower_right",
11-
"arrow_right", "arrow_up", "arrow_upper_left", "arrow_upper_right",
12-
"art", "astonished", "atm", "b", "baby", "baby_chick", "baby_symbol",
13-
"balloon", "bamboo", "bank", "barber", "baseball", "basketball", "bath",
14-
"bear", "beer", "beers", "beginner", "bell", "bento", "bike", "bikini",
15-
"bird", "birthday", "black_square", "blue_car", "blue_heart", "blush",
16-
"boar", "boat", "bomb", "book", "boot", "bouquet", "bow", "bowtie",
17-
"boy", "bread", "briefcase", "broken_heart", "bug", "bulb","slot_machine",
18-
"bullettrain_front", "bullettrain_side", "bus", "busstop", "cactus",
19-
"cake", "calling", "camel", "camera", "cancer", "capricorn", "car",
20-
"cat", "cd", "chart", "checkered_flag", "cherry_blossom", "chicken",
21-
"christmas_tree", "church", "cinema", "city_sunrise", "city_sunset",
22-
"clapper", "clock1", "clock10", "clock11", "clock12", "clock2",
23-
"clock3", "clock4", "clock5", "clock6", "clock7", "clock8", "clock9",
24-
"closed_umbrella", "cloud", "clubs", "cn", "cocktail", "coffee",
25-
"cold_sweat", "computer", "confounded", "congratulations",
26-
"construction", "construction_worker", "convenience_store", "cool",
27-
"cop", "copyright", "couple", "couple_with_heart", "couplekiss", "cow",
28-
"crossed_flags", "crown", "cry", "cupid", "currency_exchange", "curry",
29-
"cyclone", "dancer", "dancers", "dango", "dart", "dash", "de",
30-
"department_store", "diamonds", "disappointed", "dog", "dolls",
31-
"dolphin", "dress", "dvd", "ear", "ear_of_rice", "egg", "eggplant",
32-
"egplant", "eight_pointed_black_star", "eight_spoked_asterisk",
33-
"elephant", "email", "es", "european_castle", "exclamation", "eyes",
34-
"factory", "fallen_leaf", "fast_forward", "fax", "fearful", "feelsgood",
35-
"feet", "ferris_wheel", "finnadie", "fire", "fire_engine", "fireworks",
36-
"fish", "fist", "flags", "flushed", "football", "fork_and_knife",
37-
"fountain", "four_leaf_clover", "fr", "fries", "frog", "fuelpump", "gb",
38-
"gem", "gemini", "ghost", "gift", "gift_heart", "girl", "goberserk",
39-
"godmode", "golf", "green_heart", "grey_exclamation", "grey_question",
40-
"-1", "0", "1", "109", "2", "3", "4", "5", "6", "7", "8", "8ball", "9",
41-
"grin", "guardsman", "guitar", "gun", "haircut", "hamburger", "hammer",
42-
"hamster", "hand", "handbag", "hankey", "hash", "headphones",
43-
"heart_decoration", "heart_eyes", "heartbeat", "heartpulse", "hearts",
44-
"hibiscus", "high_heel", "horse", "hospital", "hotel", "hotsprings",
45-
"house", "hurtrealbad", "icecream", "id", "ideograph_advantage", "imp",
46-
"information_desk_person", "iphone", "it", "jack_o_lantern",
47-
"japanese_castle", "joy", "jp", "key", "kimono", "kiss", "kissing_face",
48-
"kissing_heart", "koala", "koko", "kr", "leaves", "leo", "libra", "lips",
49-
"lipstick", "lock", "loop", "loudspeaker", "love_hotel", "mag",
50-
"mahjong", "mailbox", "man", "man_with_gua_pi_mao", "man_with_turban",
51-
"maple_leaf", "mask", "massage", "mega", "memo", "mens", "metal",
52-
"metro", "microphone", "minidisc", "mobile_phone_off", "moneybag",
53-
"monkey", "monkey_face", "moon", "mortar_board", "mount_fuji", "mouse",
54-
"movie_camera", "muscle", "musical_note", "nail_care", "necktie", "new",
55-
"no_good", "no_smoking", "nose", "notes", "o", "o2", "ocean", "octocat",
56-
"older_woman", "open_hands", "ophiuchus", "palm_tree", "parking",
57-
"part_alternation_mark", "pencil", "penguin", "pensive", "persevere",
58-
"police_car", "poop", "post_office", "postbox", "pray", "princess",
59-
"punch", "purple_heart", "question", "rabbit", "racehorse", "radio",
60-
"rage", "rage1", "rage2", "rage3", "rage4", "rainbow", "raised_hands",
61-
"ramen", "red_car", "red_circle", "registered", "relaxed", "relieved",
62-
"restroom", "rewind", "ribbon", "rice", "rice_ball", "rice_cracker",
63-
"rice_scene", "ring", "rocket", "roller_coaster", "rose", "ru", "runner",
64-
"sa", "sagittarius", "sailboat", "sake", "sandal", "santa", "satellite",
65-
"satisfied", "saxophone", "school", "school_satchel", "scissors",
66-
"scorpius", "scream", "seat", "secret", "shaved_ice", "sheep", "shell",
67-
"ship", "shipit", "shirt", "shit", "shoe", "signal_strength",
68-
"space_invader", "spades", "spaghetti", "sparkler", "sparkles",
69-
"speaker", "speedboat", "squirrel", "star", "star2", "stars", "station",
70-
"statue_of_liberty", "stew", "strawberry", "sunflower", "sunny",
71-
"sunrise", "sunrise_over_mountains", "surfer", "sushi", "suspect",
72-
"sweat", "sweat_drops", "swimmer", "syringe", "tada", "tangerine",
73-
"taurus", "taxi", "tea", "telephone", "tennis", "tent", "thumbsdown",
74-
"thumbsup", "ticket", "tiger", "tm", "toilet", "tokyo_tower", "tomato",
75-
"tongue", "top", "tophat", "traffic_light", "train", "trident",
76-
"trollface", "trophy", "tropical_fish", "truck", "trumpet", "tshirt",
77-
"tulip", "tv", "u5272", "u55b6", "u6307", "u6708", "u6709", "u6e80",
78-
"u7121", "u7533", "u7a7a", "umbrella", "unamused", "underage", "unlock",
79-
"up", "us", "v", "vhs", "vibration_mode", "virgo", "vs", "walking",
80-
"warning", "watermelon", "wave", "wc", "wedding", "whale", "wheelchair",
81-
"white_square", "wind_chime", "wink", "wink2", "wolf", "woman",
82-
"womans_hat", "womens", "x", "yellow_heart", "zap", "zzz", "+1"
3+
// people
4+
"bowtie", "smile", "laughing", "blush", "smiley", "relaxed", "smirk",
5+
"heart_eyes", "kissing_heart", "kissing_closed_eyes", "flushed", "relieved", "satisfied", "grin",
6+
"wink", "stuck_out_tongue_winking_eye", "stuck_out_tongue_closed_eyes", "grinning", "kissing", "kissing_smiling_eyes", "stuck_out_tongue", "sleeping",
7+
"worried", "frowning", "anguished", "open_mouth", "grimacing", "confused", "hushed", "expressionless",
8+
"unamused", "sweat_smile", "sweat", "disappointed_relieved", "weary", "pensive", "disappointed", "confounded",
9+
"fearful", "cold_sweat", "persevere", "cry", "sob", "joy", "astonished",
10+
"scream", "neckbeard", "tired_face", "angry", "rage", "triumph", "sleepy",
11+
"yum", "mask", "sunglasses", "dizzy_face", "imp", "smiling_imp", "neutral_face",
12+
"no_mouth", "innocent", "alien", "yellow_heart", "blue_heart", "purple_heart", "heart",
13+
"green_heart", "broken_heart", "heartbeat", "heartpulse", "two_hearts", "revolving_hearts", "cupid",
14+
"sparkling_heart", "sparkles", "star", "star2", "dizzy", "boom", "collision",
15+
"anger", "exclamation", "question", "grey_exclamation", "grey_question", "zzz", "dash",
16+
"sweat_drops", "notes", "musical_note", "fire", "hankey", "poop", "shit",
17+
"+1", "thumbsup", "-1", "thumbsdown", "ok_hand", "punch", "facepunch",
18+
"fist", "v", "wave", "hand", "raised_hand", "open_hands", "point_up",
19+
"point_down", "point_left", "point_right", "raised_hands", "pray", "point_up_2", "clap",
20+
"muscle", "metal", "fu", "walking", "runner", "running", "couple",
21+
"family", "two_men_holding_hands", "two_women_holding_hands", "dancer", "dancers", "ok_woman", "no_good",
22+
"information_desk_person", "raising_hand", "bride_with_veil", "person_with_pouting_face", "person_frowning", "bow", "couplekiss",
23+
"couple_with_heart", "massage", "haircut", "nail_care", "boy", "girl", "woman",
24+
"man", "baby", "older_woman", "older_man", "person_with_blond_hair", "man_with_gua_pi_mao", "man_with_turban",
25+
"construction_worker", "cop", "angel", "princess", "smiley_cat", "smile_cat", "heart_eyes_cat",
26+
"kissing_cat", "smirk_cat", "scream_cat", "crying_cat_face", "joy_cat", "pouting_cat", "japanese_ogre",
27+
"japanese_goblin", "see_no_evil", "hear_no_evil", "speak_no_evil", "guardsman", "skull", "feet",
28+
"lips", "kiss", "droplet", "ear", "eyes", "nose", "tongue",
29+
"love_letter", "bust_in_silhouette", "busts_in_silhouette", "speech_balloon", "thought_balloon", "feelsgood", "finnadie",
30+
"goberserk", "godmode", "hurtrealbad", "rage1", "rage2", "rage3", "rage4",
31+
"suspect", "trollface",
32+
// nature
33+
"sunny", "umbrella", "cloud", "snowflake", "snowman", "zap", "cyclone",
34+
"foggy", "ocean", "cat", "dog", "mouse", "hamster", "rabbit",
35+
"wolf", "frog", "tiger", "koala", "bear", "pig", "pig_nose",
36+
"cow", "boar", "monkey_face", "monkey", "horse", "racehorse", "camel",
37+
"sheep", "elephant", "panda_face", "snake", "bird", "baby_chick", "hatched_chick",
38+
"hatching_chick", "chicken", "penguin", "turtle", "bug", "honeybee", "ant",
39+
"beetle", "snail", "octopus", "tropical_fish", "fish", "whale", "whale2",
40+
"dolphin", "cow2", "ram", "rat", "water_buffalo", "tiger2", "rabbit2",
41+
"dragon", "goat", "rooster", "dog2", "pig2", "mouse2", "ox",
42+
"dragon_face", "blowfish", "crocodile", "dromedary_camel", "leopard", "cat2", "poodle",
43+
"paw_prints", "bouquet", "cherry_blossom", "tulip", "four_leaf_clover", "rose", "sunflower",
44+
"hibiscus", "maple_leaf", "leaves", "fallen_leaf", "herb", "mushroom", "cactus",
45+
"palm_tree", "evergreen_tree", "deciduous_tree", "chestnut", "seedling", "blossom", "ear_of_rice",
46+
"shell", "globe_with_meridians", "sun_with_face", "full_moon_with_face", "new_moon_with_face", "new_moon", "waxing_crescent_moon",
47+
"first_quarter_moon", "waxing_gibbous_moon", "full_moon", "waning_gibbous_moon", "last_quarter_moon", "waning_crescent_moon", "last_quarter_moon_with_face",
48+
"first_quarter_moon_with_face", "moon", "earth_africa", "earth_americas", "earth_asia", "volcano", "milky_way",
49+
"partly_sunny", "octocat", "squirrel",
50+
// objects
51+
"bamboo", "gift_heart", "dolls", "school_satchel", "mortar_board", "flags", "fireworks",
52+
"sparkler", "wind_chime", "rice_scene", "jack_o_lantern", "ghost", "santa", "christmas_tree",
53+
"gift", "bell", "no_bell", "tanabata_tree", "tada", "confetti_ball", "balloon",
54+
"crystal_ball", "cd", "dvd", "floppy_disk", "camera", "video_camera", "movie_camera",
55+
"computer", "tv", "iphone", "phone", "telephone", "telephone_receiver", "pager",
56+
"fax", "minidisc", "vhs", "sound", "speaker", "mute", "loudspeaker",
57+
"mega", "hourglass", "hourglass_flowing_sand", "alarm_clock", "watch", "radio", "satellite",
58+
"loop", "mag", "mag_right", "unlock", "lock", "lock_with_ink_pen", "closed_lock_with_key",
59+
"key", "bulb", "flashlight", "high_brightness", "low_brightness", "electric_plug", "battery",
60+
"calling", "email", "mailbox", "postbox", "bath", "bathtub", "shower",
61+
"toilet", "wrench", "nut_and_bolt", "hammer", "seat", "moneybag", "yen",
62+
"dollar", "pound", "euro", "credit_card", "money_with_wings", "e-mail", "inbox_tray",
63+
"outbox_tray", "envelope", "incoming_envelope", "postal_horn", "mailbox_closed", "mailbox_with_mail", "mailbox_with_no_mail",
64+
"package", "door", "smoking", "bomb", "gun", "hocho", "pill",
65+
"syringe", "page_facing_up", "page_with_curl", "bookmark_tabs", "bar_chart", "chart_with_upwards_trend", "chart_with_downwards_trend",
66+
"scroll", "clipboard", "calendar", "date", "card_index", "file_folder", "open_file_folder",
67+
"scissors", "pushpin", "paperclip", "black_nib", "pencil2", "straight_ruler", "triangular_ruler",
68+
"closed_book", "green_book", "blue_book", "orange_book", "notebook", "notebook_with_decorative_cover", "ledger",
69+
"books", "bookmark", "name_badge", "microscope", "telescope", "newspaper", "football",
70+
"basketball", "soccer", "baseball", "tennis", "8ball", "rugby_football", "bowling",
71+
"golf", "mountain_bicyclist", "bicyclist", "horse_racing", "snowboarder", "swimmer", "surfer",
72+
"ski", "spades", "hearts", "clubs", "diamonds", "gem", "ring",
73+
"trophy", "musical_score", "musical_keyboard", "violin", "space_invader", "video_game", "black_joker",
74+
"flower_playing_cards", "game_die", "dart", "mahjong", "clapper", "memo", "pencil",
75+
"book", "art", "microphone", "headphones", "trumpet", "saxophone", "guitar",
76+
"shoe", "sandal", "high_heel", "lipstick", "boot", "shirt", "tshirt",
77+
"necktie", "womans_clothes", "dress", "running_shirt_with_sash", "jeans", "kimono", "bikini",
78+
"ribbon", "tophat", "crown", "womans_hat", "mans_shoe", "closed_umbrella", "briefcase",
79+
"handbag", "pouch", "purse", "eyeglasses", "fishing_pole_and_fish", "coffee", "tea",
80+
"sake", "baby_bottle", "beer", "beers", "cocktail", "tropical_drink", "wine_glass",
81+
"fork_and_knife", "pizza", "hamburger", "fries", "poultry_leg", "meat_on_bone",
82+
"spaghetti", "curry", "fried_shrimp", "bento", "sushi", "fish_cake", "rice_ball",
83+
"rice_cracker", "rice", "ramen", "stew", "oden", "dango", "egg",
84+
"bread", "doughnut", "custard", "icecream", "ice_cream", "shaved_ice", "birthday",
85+
"cake", "cookie", "chocolate_bar", "candy", "lollipop", "honey_pot", "apple",
86+
"green_apple", "tangerine", "lemon", "cherries", "grapes", "watermelon", "strawberry", "peach", "melon",
87+
"banana", "pear", "pineapple", "sweet_potato", "eggplant", "tomato", "corn",
8388
];
8489

8590
emojis = $.map(emojis, function(value, i) {return {key:':'+value+':', name:value}});

websites/code/studygolang/static/js/md_toolbar.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,7 @@
1717
evt.preventDefault();
1818

1919
// 配置 marked 语法高亮
20-
marked.setOptions({
21-
highlight: function (code) {
22-
code = code.replace(/&#34;/g, '"');
23-
code = code.replace(/&lt;/g, '<');
24-
code = code.replace(/&gt;/g, '>');
25-
return hljs.highlightAuto(code).value;
26-
}
27-
});
20+
marked = SG.markSetting();
2821

2922
$(this).addClass('cur');
3023
var $mdToobar = $(this).parents('.md-toolbar');

websites/code/studygolang/static/js/projects.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@
44
SG.Projects.prototype.parseDesc = function(){
55
var markdownString = $('.project .desc').text();
66
// 配置 marked 语法高亮
7-
marked.setOptions({
8-
highlight: function (code) {
9-
code = code.replace(/&#34;/g, '"');
10-
code = code.replace(/&lt;/g, '<');
11-
code = code.replace(/&gt;/g, '>');
12-
return hljs.highlightAuto(code).value;
13-
}
14-
});
7+
marked = SG.markSetting();
158

169
$('.project .desc').html(marked(markdownString));
1710
}

websites/code/studygolang/static/js/resources.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,7 @@
1818
SG.Resources.prototype.parseContent = function(selector) {
1919
var markdownString = selector.text();
2020
// 配置 marked 语法高亮
21-
marked.setOptions({
22-
highlight: function (code) {
23-
code = code.replace(/&#34;/g, '"');
24-
code = code.replace(/&lt;/g, '<');
25-
code = code.replace(/&gt;/g, '>');
26-
return hljs.highlightAuto(code).value;
27-
}
28-
});
21+
marked = SG.markSetting();
2922

3023
selector.html(marked(markdownString));
3124

websites/code/studygolang/static/js/topics.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,7 @@
1818
SG.Topics.prototype.parseContent = function(selector) {
1919
var markdownString = selector.text();
2020
// 配置 marked 语法高亮
21-
marked.setOptions({
22-
highlight: function (code) {
23-
code = code.replace(/&#34;/g, '"');
24-
code = code.replace(/&lt;/g, '<');
25-
code = code.replace(/&gt;/g, '>');
26-
return hljs.highlightAuto(code).value;
27-
}
28-
});
21+
marked = SG.markSetting();
2922

3023
selector.html(marked(markdownString));
3124

websites/code/studygolang/template/common/layout.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
<img src="/static/img/logo.png" widht="48px" height="48px" alt="golang logo">
106106
</div>
107107
<p class="links">
108-
<a href="/wiki/about">关于</a> | <a href="/api">API</a> | <a href="/wiki/contributors">贡献者</a> | <a href="/wiki/">帮助推广</a> | <a href="/topics/node16">反馈</a> | <a href="http://github.com/studygolang" target="_blank" rel="nofollow">Github</a> | <a href="http://weibo.com/studygolang" target="_blank" rel="nofollow">新浪微博</a> | <a href="http://www.ucai.cn" target="_blank">优才网</a>
108+
<a href="/wiki/about">关于</a> | <a href="/api">API</a> | <a href="/wiki/contributors">贡献者</a> | <a href="/wiki/">帮助推广</a> | <a href="/topics/node16">反馈</a> | <a href="http://github.com/studygolang" target="_blank" rel="nofollow">Github</a> | <a href="http://weibo.com/studygolang" target="_blank" rel="nofollow">新浪微博</a> | <a href="/wiki/duty">免责声明</a>
109109
</p>
110110
<p class="copyright">&copy;2013-2015 studygolang.com 采用 <a href="http://golang.org" target="_blank">Go语言</a> + <a href="http://www.mysql.com/" target="_blank">MYSQL 构建</a>
111111
&nbsp;&nbsp;当前在线:<span id="onlineusers">30</span>人&nbsp;&nbsp;历史最高:<span id="maxonline">300</span>
@@ -114,7 +114,7 @@
114114
<br/>中国 Golang 社区,Go语言学习园地,致力于构建完善的 Golang 中文社区,Go语言爱好者的学习家园。
115115
京ICP备14030343号-1
116116
</p>
117-
<p class="text-center"><a href="https://portal.qiniu.com/signup?code=3lfz4at7pxfma" title="七牛云存储" target="_blank"><img src="http://qiniutek.com/images/logo-2.png" alt="七牛云存储" width="290px" height="45px" /></a></p>
117+
<p class="text-center"><a href="http://www.ucai.cn" title="优才网" target="_blank"><img src="http://p3.ucai.cn/static/i3/mission/moblie_ucai_logo.png" alt="优才网" width="175px" height="45px" /><a href="https://portal.qiniu.com/signup?code=3lfz4at7pxfma" title="七牛云存储" target="_blank"><img src="http://qiniutek.com/images/logo-2.png" alt="七牛云存储" width="290px" height="45px" /></a></p>
118118
</div>
119119
</div>
120120
</footer>

websites/code/studygolang/template/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h3><a href="/resources">Golang 资源</a></h3>
3030
</div>
3131
<ul class="clearfix list-unstyled">
3232
{{range .resources}}
33-
<li><i></i><a href="{{if .Url}}{{.Url}}{{else}}/resources/{{.Id}}{{end}}" title="{{.Title}}" target="_blank">{{substring .Title 30 "..."}}</a><span class="pull-right timeago" title="{{.Ctime}}"></span></li>
33+
<li><i></i><a href="/resources/{{.Id}}" title="{{.Title}}" target="_blank">{{substring .Title 30 "..."}}</a><span class="pull-right timeago" title="{{.Ctime}}"></span></li>
3434
{{end}}
3535
</ul>
3636
</div>

websites/code/studygolang/template/topics/new.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ <h3 class="title"><i class="glyphicon glyphicon-list-alt"></i>&nbsp;发布主题
7777
<ul>
7878
<li>支持 Markdown 格式, <strong>**粗体**</strong>、~~删除线~~、<code>`单行代码`</code></li>
7979
<li>http://example.org 自动加链接</li>
80+
<li>代码支持高亮,如:```go func main() {}``` 则是Go语法高亮</li>
8081
<li><strong>@name</strong> 会链接到用户页面,并会通知他</li>
8182
<li>![alt 文本](http://foo.com/bar.jpg) 显示图片</li>
8283
<li>:smile: 支持 <strong>emoji 表情</strong>,见<a href="http://www.emoji-cheat-sheet.com/" target="_blank">Emoji cheat sheet</a></li>

0 commit comments

Comments
 (0)